🐭️ MouseHunt Improved

Improve your MouseHunt experience. Please only use this when the extension is not available.

当前为 2024-06-19 提交的版本,查看 最新版本

// ==UserScript==
// @name        🐭️ MouseHunt Improved
// @description Improve your MouseHunt experience. Please only use this when the extension is not available.
// @version     0.48.1
// @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.48.1';
const mhImprovedPlatform = 'userscript';
var mhui = (() => {
var __create = Object.create;
var __defProp = Object.defineProperty, __defProps = Object.defineProperties, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropDescs = Object.getOwnPropertyDescriptors, __getOwnPropNames = Object.getOwnPropertyNames, __getOwnPropSymbols = Object.getOwnPropertySymbols, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b))
      __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
  return a;
}, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __esm = (fn, res) => function() {
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function() {
  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: !0 });
}, __copyProps = (to, from, except, desc) => {
  if (from && typeof from == "object" || typeof from == "function")
    for (let key of __getOwnPropNames(from))
      !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  return to;
};
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: !0 }) : target,
  mod
));
var __async = (__this, __arguments, generator) => new Promise((resolve, reject2) => {
  var fulfilled = (value) => {
    try {
      step(generator.next(value));
    } catch (e) {
      reject2(e);
    }
  }, rejected = (value) => {
    try {
      step(generator.throw(value));
    } catch (e) {
      reject2(e);
    }
  }, step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
  step((generator = generator.apply(__this, __arguments)).next());
});

// node_modules/@sentry/utils/esm/is.js
function isBuiltin(wat, className) {
  return objectToString.call(wat) === `[object ${className}]`;
}
function isPlainObject(wat) {
  return isBuiltin(wat, "Object");
}
function isThenable(wat) {
  return !!(wat && wat.then && typeof wat.then == "function");
}
var objectToString, init_is = __esm({
  "node_modules/@sentry/utils/esm/is.js"() {
    objectToString = Object.prototype.toString;
  }
});

// node_modules/@sentry/utils/esm/version.js
var SDK_VERSION, init_version = __esm({
  "node_modules/@sentry/utils/esm/version.js"() {
    SDK_VERSION = "8.9.2";
  }
});

// node_modules/@sentry/utils/esm/worldwide.js
function getGlobalSingleton(name, creator, obj) {
  let gbl = obj || GLOBAL_OBJ, __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {}, versionedCarrier = __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};
  return versionedCarrier[name] || (versionedCarrier[name] = creator());
}
var GLOBAL_OBJ, init_worldwide = __esm({
  "node_modules/@sentry/utils/esm/worldwide.js"() {
    init_version();
    GLOBAL_OBJ = globalThis;
  }
});

// node_modules/@sentry/utils/esm/debug-build.js
var DEBUG_BUILD, init_debug_build = __esm({
  "node_modules/@sentry/utils/esm/debug-build.js"() {
    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();
  let console2 = GLOBAL_OBJ.console, wrappedFuncs = {}, wrappedLevels = Object.keys(originalConsoleMethods);
  wrappedLevels.forEach((level) => {
    let 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 = !1, logger2 = {
    enable: () => {
      enabled = !0;
    },
    disable: () => {
      enabled = !1;
    },
    isEnabled: () => enabled
  };
  return DEBUG_BUILD ? CONSOLE_LEVELS.forEach((name) => {
    logger2[name] = (...args) => {
      enabled && consoleSandbox(() => {
        GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);
      });
    };
  }) : CONSOLE_LEVELS.forEach((name) => {
    logger2[name] = () => {
    };
  }), logger2;
}
var PREFIX, CONSOLE_LEVELS, originalConsoleMethods, logger, init_logger = __esm({
  "node_modules/@sentry/utils/esm/logger.js"() {
    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/object.js
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: !0,
      configurable: !0
    });
  } catch (o_O) {
    DEBUG_BUILD && logger.log(`Failed to add non-enumerable property "${name}" to object`, obj);
  }
}
var init_object = __esm({
  "node_modules/@sentry/utils/esm/object.js"() {
    init_debug_build();
    init_logger();
  }
});

// node_modules/@sentry/utils/esm/time.js
function dateTimestampInSeconds() {
  return Date.now() / ONE_SECOND_IN_MS;
}
function createUnixTimestampInSecondsFunc() {
  let { performance } = GLOBAL_OBJ;
  if (!performance || !performance.now)
    return dateTimestampInSeconds;
  let approxStartingTimeOrigin = Date.now() - performance.now(), timeOrigin = performance.timeOrigin == null ? approxStartingTimeOrigin : performance.timeOrigin;
  return () => (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;
}
var ONE_SECOND_IN_MS, timestampInSeconds, _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, init_time = __esm({
  "node_modules/@sentry/utils/esm/time.js"() {
    init_worldwide();
    ONE_SECOND_IN_MS = 1e3;
    timestampInSeconds = createUnixTimestampInSecondsFunc(), browserPerformanceTimeOrigin = (() => {
      let { performance } = GLOBAL_OBJ;
      if (!performance || !performance.now) {
        _browserPerformanceTimeOriginMode = "none";
        return;
      }
      let threshold = 3600 * 1e3, performanceNow = performance.now(), dateNow = Date.now(), timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold, timeOriginIsReliable = timeOriginDelta < threshold, navigationStart = performance.timing && performance.timing.navigationStart, navigationStartDelta = typeof navigationStart == "number" ? Math.abs(navigationStart + performanceNow - dateNow) : threshold, navigationStartIsReliable = navigationStartDelta < threshold;
      return timeOriginIsReliable || navigationStartIsReliable ? timeOriginDelta <= navigationStartDelta ? (_browserPerformanceTimeOriginMode = "timeOrigin", performance.timeOrigin) : (_browserPerformanceTimeOriginMode = "navigationStart", navigationStart) : (_browserPerformanceTimeOriginMode = "dateNow", dateNow);
    })();
  }
});

// node_modules/@sentry/utils/esm/misc.js
function uuid4() {
  let gbl = GLOBAL_OBJ, crypto2 = gbl.crypto || gbl.msCrypto, getRandomByte = () => Math.random() * 16;
  try {
    if (crypto2 && crypto2.randomUUID)
      return crypto2.randomUUID().replace(/-/g, "");
    crypto2 && crypto2.getRandomValues && (getRandomByte = () => {
      let typedArray = new Uint8Array(1);
      return crypto2.getRandomValues(typedArray), typedArray[0];
    });
  } catch (_) {
  }
  return ("10000000100040008000" + 1e11).replace(
    /[018]/g,
    (c) => (
      // eslint-disable-next-line no-bitwise
      (c ^ (getRandomByte() & 15) >> c / 4).toString(16)
    )
  );
}
var init_misc = __esm({
  "node_modules/@sentry/utils/esm/misc.js"() {
    init_worldwide();
  }
});

// node_modules/@sentry/utils/esm/propagationContext.js
function generatePropagationContext() {
  return {
    traceId: uuid4(),
    spanId: uuid4().substring(16)
  };
}
var init_propagationContext = __esm({
  "node_modules/@sentry/utils/esm/propagationContext.js"() {
    init_misc();
  }
});

// node_modules/@sentry/utils/esm/index.js
var init_esm = __esm({
  "node_modules/@sentry/utils/esm/index.js"() {
    init_worldwide();
    init_is();
    init_logger();
    init_misc();
    init_object();
    init_time();
    init_propagationContext();
    init_version();
  }
});

// node_modules/@sentry/core/esm/carrier.js
function getMainCarrier() {
  return getSentryCarrier(GLOBAL_OBJ), GLOBAL_OBJ;
}
function getSentryCarrier(carrier) {
  let __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {};
  return __SENTRY__.version = __SENTRY__.version || SDK_VERSION, __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {};
}
var init_carrier = __esm({
  "node_modules/@sentry/core/esm/carrier.js"() {
    init_esm();
  }
});

// node_modules/@sentry/core/esm/session.js
function updateSession(session, context = {}) {
  if (context.user && (!session.ipAddress && context.user.ip_address && (session.ipAddress = context.user.ip_address), !session.did && !context.did && (session.did = context.user.id || context.user.email || context.user.username)), session.timestamp = context.timestamp || timestampInSeconds(), context.abnormal_mechanism && (session.abnormal_mechanism = context.abnormal_mechanism), context.ignoreDuration && (session.ignoreDuration = context.ignoreDuration), context.sid && (session.sid = context.sid.length === 32 ? context.sid : uuid4()), context.init !== void 0 && (session.init = context.init), !session.did && context.did && (session.did = `${context.did}`), typeof context.started == "number" && (session.started = context.started), session.ignoreDuration)
    session.duration = void 0;
  else if (typeof context.duration == "number")
    session.duration = context.duration;
  else {
    let duration = session.timestamp - session.started;
    session.duration = duration >= 0 ? duration : 0;
  }
  context.release && (session.release = context.release), context.environment && (session.environment = context.environment), !session.ipAddress && context.ipAddress && (session.ipAddress = context.ipAddress), !session.userAgent && context.userAgent && (session.userAgent = context.userAgent), typeof context.errors == "number" && (session.errors = context.errors), context.status && (session.status = context.status);
}
var init_session = __esm({
  "node_modules/@sentry/core/esm/session.js"() {
    init_esm();
  }
});

// node_modules/@sentry/core/esm/utils/spanOnScope.js
function _setSpanForScope(scope, span) {
  span ? addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, span) : delete scope[SCOPE_SPAN_FIELD];
}
function _getSpanForScope(scope) {
  return scope[SCOPE_SPAN_FIELD];
}
var SCOPE_SPAN_FIELD, init_spanOnScope = __esm({
  "node_modules/@sentry/core/esm/utils/spanOnScope.js"() {
    init_esm();
    SCOPE_SPAN_FIELD = "_sentrySpan";
  }
});

// node_modules/@sentry/core/esm/scope.js
var DEFAULT_MAX_BREADCRUMBS, ScopeClass, Scope, init_scope = __esm({
  "node_modules/@sentry/core/esm/scope.js"() {
    init_esm();
    init_session();
    init_spanOnScope();
    DEFAULT_MAX_BREADCRUMBS = 100, ScopeClass = class _ScopeClass {
      /** Flag if notifying is happening. */
      /** Callback for client to receive scope changes. */
      /** Callback list that will be called during event processing. */
      /** 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 */
      /**
       * Transaction Name
       *
       * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.
       * It's purpose is to assign a transaction to the scope that's added to non-transaction events.
       */
      /** Session */
      /** Request Mode Session Status */
      /** The client on this scope */
      /** Contains the last event id of a captured event.  */
      // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.
      constructor() {
        this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = generatePropagationContext();
      }
      /**
       * @inheritDoc
       */
      clone() {
        let newScope = new _ScopeClass();
        return 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._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, newScope._lastEventId = this._lastEventId, _setSpanForScope(newScope, _getSpanForScope(this)), newScope;
      }
      /**
       * @inheritDoc
       */
      setClient(client) {
        this._client = client;
      }
      /**
       * @inheritDoc
       */
      setLastEventId(lastEventId2) {
        this._lastEventId = lastEventId2;
      }
      /**
       * @inheritDoc
       */
      getClient() {
        return this._client;
      }
      /**
       * @inheritDoc
       */
      lastEventId() {
        return this._lastEventId;
      }
      /**
       * @inheritDoc
       */
      addScopeListener(callback) {
        this._scopeListeners.push(callback);
      }
      /**
       * @inheritDoc
       */
      addEventProcessor(callback) {
        return this._eventProcessors.push(callback), this;
      }
      /**
       * @inheritDoc
       */
      setUser(user2) {
        return this._user = user2 || {
          email: void 0,
          id: void 0,
          ip_address: void 0,
          username: void 0
        }, this._session && updateSession(this._session, { user: user2 }), this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      getUser() {
        return this._user;
      }
      /**
       * @inheritDoc
       */
      getRequestSession() {
        return this._requestSession;
      }
      /**
       * @inheritDoc
       */
      setRequestSession(requestSession) {
        return this._requestSession = requestSession, this;
      }
      /**
       * @inheritDoc
       */
      setTags(tags) {
        return this._tags = __spreadValues(__spreadValues({}, this._tags), tags), this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      setTag(key, value) {
        return this._tags = __spreadProps(__spreadValues({}, this._tags), { [key]: value }), this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      setExtras(extras) {
        return this._extra = __spreadValues(__spreadValues({}, this._extra), extras), this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      setExtra(key, extra) {
        return this._extra = __spreadProps(__spreadValues({}, this._extra), { [key]: extra }), this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      setFingerprint(fingerprint) {
        return this._fingerprint = fingerprint, this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      setLevel(level) {
        return this._level = level, this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      setTransactionName(name) {
        return this._transactionName = name, this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      setContext(key, context) {
        return context === null ? delete this._contexts[key] : this._contexts[key] = context, this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      setSession(session) {
        return session ? this._session = session : delete this._session, this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      getSession() {
        return this._session;
      }
      /**
       * @inheritDoc
       */
      update(captureContext) {
        if (!captureContext)
          return this;
        let scopeToMerge = typeof captureContext == "function" ? captureContext(this) : captureContext, [scopeInstance, requestSession] = scopeToMerge instanceof Scope ? [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()] : isPlainObject(scopeToMerge) ? [captureContext, captureContext.requestSession] : [], { tags, extra, user: user2, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {};
        return this._tags = __spreadValues(__spreadValues({}, this._tags), tags), this._extra = __spreadValues(__spreadValues({}, this._extra), extra), this._contexts = __spreadValues(__spreadValues({}, this._contexts), contexts), user2 && Object.keys(user2).length && (this._user = user2), level && (this._level = level), fingerprint.length && (this._fingerprint = fingerprint), propagationContext && (this._propagationContext = propagationContext), requestSession && (this._requestSession = requestSession), this;
      }
      /**
       * @inheritDoc
       */
      clear() {
        return 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._session = void 0, _setSpanForScope(this, void 0), this._attachments = [], this._propagationContext = generatePropagationContext(), this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      addBreadcrumb(breadcrumb, maxBreadcrumbs) {
        let maxCrumbs = typeof maxBreadcrumbs == "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;
        if (maxCrumbs <= 0)
          return this;
        let mergedBreadcrumb = __spreadValues({
          timestamp: dateTimestampInSeconds()
        }, breadcrumb), breadcrumbs = this._breadcrumbs;
        return breadcrumbs.push(mergedBreadcrumb), this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs, this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      getLastBreadcrumb() {
        return this._breadcrumbs[this._breadcrumbs.length - 1];
      }
      /**
       * @inheritDoc
       */
      clearBreadcrumbs() {
        return this._breadcrumbs = [], this._notifyScopeListeners(), this;
      }
      /**
       * @inheritDoc
       */
      addAttachment(attachment) {
        return this._attachments.push(attachment), this;
      }
      /**
       * @inheritDoc
       */
      clearAttachments() {
        return this._attachments = [], this;
      }
      /** @inheritDoc */
      getScopeData() {
        return {
          breadcrumbs: this._breadcrumbs,
          attachments: this._attachments,
          contexts: this._contexts,
          tags: this._tags,
          extra: this._extra,
          user: this._user,
          level: this._level,
          fingerprint: this._fingerprint || [],
          eventProcessors: this._eventProcessors,
          propagationContext: this._propagationContext,
          sdkProcessingMetadata: this._sdkProcessingMetadata,
          transactionName: this._transactionName,
          span: _getSpanForScope(this)
        };
      }
      /**
       * @inheritDoc
       */
      setSDKProcessingMetadata(newData) {
        return this._sdkProcessingMetadata = __spreadValues(__spreadValues({}, this._sdkProcessingMetadata), newData), this;
      }
      /**
       * @inheritDoc
       */
      setPropagationContext(context) {
        return this._propagationContext = context, this;
      }
      /**
       * @inheritDoc
       */
      getPropagationContext() {
        return this._propagationContext;
      }
      /**
       * @inheritDoc
       */
      captureException(exception, hint) {
        let eventId = hint && hint.event_id ? hint.event_id : uuid4();
        if (!this._client)
          return logger.warn("No client configured on scope - will not capture exception!"), eventId;
        let syntheticException = new Error("Sentry syntheticException");
        return this._client.captureException(
          exception,
          __spreadProps(__spreadValues({
            originalException: exception,
            syntheticException
          }, hint), {
            event_id: eventId
          }),
          this
        ), eventId;
      }
      /**
       * @inheritDoc
       */
      captureMessage(message, level, hint) {
        let eventId = hint && hint.event_id ? hint.event_id : uuid4();
        if (!this._client)
          return logger.warn("No client configured on scope - will not capture message!"), eventId;
        let syntheticException = new Error(message);
        return this._client.captureMessage(
          message,
          level,
          __spreadProps(__spreadValues({
            originalException: message,
            syntheticException
          }, hint), {
            event_id: eventId
          }),
          this
        ), eventId;
      }
      /**
       * @inheritDoc
       */
      captureEvent(event, hint) {
        let eventId = hint && hint.event_id ? hint.event_id : uuid4();
        return this._client ? (this._client.captureEvent(event, __spreadProps(__spreadValues({}, hint), { event_id: eventId }), this), eventId) : (logger.warn("No client configured on scope - will not capture event!"), eventId);
      }
      /**
       * This will be called on every set call.
       */
      _notifyScopeListeners() {
        this._notifyingListeners || (this._notifyingListeners = !0, this._scopeListeners.forEach((callback) => {
          callback(this);
        }), this._notifyingListeners = !1);
      }
    }, Scope = ScopeClass;
  }
});

// node_modules/@sentry/core/esm/defaultScopes.js
function getDefaultCurrentScope() {
  return getGlobalSingleton("defaultCurrentScope", () => new Scope());
}
function getDefaultIsolationScope() {
  return getGlobalSingleton("defaultIsolationScope", () => new Scope());
}
var init_defaultScopes = __esm({
  "node_modules/@sentry/core/esm/defaultScopes.js"() {
    init_esm();
    init_scope();
  }
});

// node_modules/@sentry/core/esm/asyncContext/stackStrategy.js
function getAsyncContextStack() {
  let registry = getMainCarrier(), sentry = getSentryCarrier(registry);
  return sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope());
}
function withScope(callback) {
  return getAsyncContextStack().withScope(callback);
}
function withSetScope(scope, callback) {
  let stack = getAsyncContextStack();
  return stack.withScope(() => (stack.getStackTop().scope = scope, callback(scope)));
}
function withIsolationScope(callback) {
  return getAsyncContextStack().withScope(() => callback(getAsyncContextStack().getIsolationScope()));
}
function getStackAsyncContextStrategy() {
  return {
    withIsolationScope,
    withScope,
    withSetScope,
    withSetIsolationScope: (_isolationScope, callback) => withIsolationScope(callback),
    getCurrentScope: () => getAsyncContextStack().getScope(),
    getIsolationScope: () => getAsyncContextStack().getIsolationScope()
  };
}
var AsyncContextStack, init_stackStrategy = __esm({
  "node_modules/@sentry/core/esm/asyncContext/stackStrategy.js"() {
    init_esm();
    init_defaultScopes();
    init_scope();
    init_carrier();
    AsyncContextStack = class {
      constructor(scope, isolationScope) {
        let assignedScope;
        scope ? assignedScope = scope : assignedScope = new Scope();
        let assignedIsolationScope;
        isolationScope ? assignedIsolationScope = isolationScope : assignedIsolationScope = new Scope(), this._stack = [{ scope: assignedScope }], this._isolationScope = assignedIsolationScope;
      }
      /**
       * Fork a scope for the stack.
       */
      withScope(callback) {
        let scope = this._pushScope(), maybePromiseResult;
        try {
          maybePromiseResult = callback(scope);
        } catch (e) {
          throw this._popScope(), e;
        }
        return isThenable(maybePromiseResult) ? maybePromiseResult.then(
          (res) => (this._popScope(), res),
          (e) => {
            throw this._popScope(), e;
          }
        ) : (this._popScope(), maybePromiseResult);
      }
      /**
       * Get the client of the stack.
       */
      getClient() {
        return this.getStackTop().client;
      }
      /**
       * Returns the scope of the top stack.
       */
      getScope() {
        return this.getStackTop().scope;
      }
      /**
       * Get the isolation scope for the stack.
       */
      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];
      }
      /**
       * Push a scope to the stack.
       */
      _pushScope() {
        let scope = this.getScope().clone();
        return this.getStack().push({
          client: this.getClient(),
          scope
        }), scope;
      }
      /**
       * Pop a scope from the stack.
       */
      _popScope() {
        return this.getStack().length <= 1 ? !1 : !!this.getStack().pop();
      }
    };
  }
});

// node_modules/@sentry/core/esm/asyncContext/index.js
function getAsyncContextStrategy(carrier) {
  let sentry = getSentryCarrier(carrier);
  return sentry.acs ? sentry.acs : getStackAsyncContextStrategy();
}
var init_asyncContext = __esm({
  "node_modules/@sentry/core/esm/asyncContext/index.js"() {
    init_carrier();
    init_stackStrategy();
  }
});

// node_modules/@sentry/core/esm/currentScopes.js
function getCurrentScope() {
  let carrier = getMainCarrier();
  return getAsyncContextStrategy(carrier).getCurrentScope();
}
var init_currentScopes = __esm({
  "node_modules/@sentry/core/esm/currentScopes.js"() {
    init_asyncContext();
    init_carrier();
  }
});

// node_modules/@sentry/core/esm/utils/prepareEvent.js
function parseEventHintOrCaptureContext(hint) {
  if (hint)
    return hintIsScopeOrFunction(hint) ? { captureContext: hint } : hintIsScopeContext(hint) ? {
      captureContext: hint
    } : hint;
}
function hintIsScopeOrFunction(hint) {
  return hint instanceof Scope || typeof hint == "function";
}
function hintIsScopeContext(hint) {
  return Object.keys(hint).some((key) => captureContextKeys.includes(key));
}
var captureContextKeys, init_prepareEvent = __esm({
  "node_modules/@sentry/core/esm/utils/prepareEvent.js"() {
    init_scope();
    captureContextKeys = [
      "user",
      "level",
      "extra",
      "contexts",
      "tags",
      "fingerprint",
      "requestSession",
      "propagationContext"
    ];
  }
});

// node_modules/@sentry/core/esm/exports.js
function captureException(exception, hint) {
  return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));
}
var init_exports = __esm({
  "node_modules/@sentry/core/esm/exports.js"() {
    init_currentScopes();
    init_prepareEvent();
  }
});

// node_modules/@sentry/core/esm/index.js
var init_esm2 = __esm({
  "node_modules/@sentry/core/esm/index.js"() {
    init_exports();
  }
});

// node_modules/@sentry/browser/esm/index.js
var init_esm3 = __esm({
  "node_modules/@sentry/browser/esm/index.js"() {
    init_esm2();
  }
});

// src/utils/settings.js
var getSettingDirect, saveSettingDirect, getGroupAndKey, getSetting, deleteSetting, getSettings, saveSetting, init_settings = __esm({
  "src/utils/settings.js"() {
    getSettingDirect = (key = null, defaultValue = null, identifier = "mousehunt-improved-settings") => {
      let settings2 = JSON.parse(localStorage.getItem(identifier)) || {};
      if (!key)
        return settings2;
      if (!key.includes("."))
        return settings2[key] === void 0 ? defaultValue : settings2[key];
      let groupAndKey = getGroupAndKey(key);
      if (!groupAndKey.group)
        return settings2[groupAndKey.key] === void 0 ? defaultValue : settings2[groupAndKey.key];
      let groupSettings = settings2[groupAndKey.group] || {};
      return groupSettings[groupAndKey.key] === void 0 ? defaultValue : groupSettings[groupAndKey.key];
    }, saveSettingDirect = (key, value, identifier = "mousehunt-improved-settings") => {
      let settings2 = getSettingDirect(null, {}, identifier), groupAndKey = getGroupAndKey(key);
      groupAndKey.group ? (settings2[groupAndKey.group] || (settings2[groupAndKey.group] = {}), settings2[groupAndKey.group][groupAndKey.key] = value) : settings2[key] = value, localStorage.setItem(identifier, JSON.stringify(settings2));
    }, getGroupAndKey = (key) => {
      let split = key.split(".");
      return split.length === 1 ? {
        group: null,
        key: split[0]
      } : split[0] === "location-huds-enabled" ? {
        group: "location-huds-enabled",
        key: split[1]
      } : {
        group: `${split[0]}-settings`,
        key: split[1]
      };
    }, getSetting = (key, defaultValue = !1) => getSettingDirect(key, defaultValue, "mousehunt-improved-settings"), deleteSetting = (key) => {
      let settings2 = getSettings(), groupAndKey = getGroupAndKey(key);
      groupAndKey.group ? settings2[groupAndKey.group] ? delete settings2[groupAndKey.group][groupAndKey.key] : delete settings2[groupAndKey.key] : delete settings2[key], localStorage.setItem("mousehunt-improved-settings", JSON.stringify(settings2));
    }, getSettings = () => {
      let settings2 = localStorage.getItem("mousehunt-improved-settings");
      return settings2 ? JSON.parse(settings2) : {};
    }, saveSetting = (key, value) => (saveSettingDirect(key, value, "mousehunt-improved-settings"), value);
  }
});

// src/utils/elements.js
var makeElement, makeButton, makeMhButton, makeLink, makeFavoriteButton, createPopup, makeTooltip, makePage, makeMathButton, makeMathButtons, toEscapedJSON, makeProgressLogLink, init_elements = __esm({
  "src/utils/elements.js"() {
    init_settings();
    makeElement = (tag, classes = "", text = "", appendTo = null) => {
      let element = document.createElement(tag);
      return Array.isArray(classes) && (classes = classes.join(" ")), classes && classes.length && (element.className = classes), element.innerHTML = text, appendTo ? (appendTo.append(element), appendTo) : element;
    }, makeButton = (text, href, tiny = !0, extraClasses = [], encodeAsSpace = !1) => (href = href.replaceAll(/\s/g, "_"), href = encodeAsSpace ? href.replaceAll("_", "%20") : href.replaceAll(/\s/g, "_"), href = href.replaceAll("$", "_"), `<a href="${href}" class="mousehuntActionButton ${tiny ? "tiny" : ""} ${extraClasses.join(" ")}"><span>${text}</span></a>`), makeMhButton = (opts) => {
      let {
        text = "",
        size = "small",
        className = "",
        callback = () => {
        },
        appendTo = null
      } = opts, button = makeElement("a", ["mousehuntActionButton", size, className]);
      return makeElement("span", "", text, button), button.title = opts.title || text, button.addEventListener("click", () => {
        callback(button);
      }), appendTo && appendTo.append(button), button;
    }, makeLink = (text, href, encodeAsSpace = !1) => (encodeAsSpace && (href = href.replaceAll("_", "%20")), `<a href="${href}" target="_mouse" class="mousehuntActionButton tiny"><span>${text}</span></a>`), makeFavoriteButton = (options2) => __async(void 0, null, function* () {
      let {
        id = null,
        target = null,
        size = "small",
        state = !1,
        isSetting = !0,
        defaultState = !1,
        onChange = null,
        onActivate = null,
        onDeactivate = null
      } = options2, existing = document.querySelector(`#${id}`);
      existing && existing.remove();
      let star = document.createElement("a");
      star.classList.add("custom-favorite-button"), 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 = !1;
      return currentSetting = isSetting ? getSetting(id, defaultState) : state, currentSetting ? star.classList.add("active") : star.classList.add("inactive"), star.addEventListener("click", (e) => __async(void 0, null, function* () {
        star.classList.add("busy"), e.preventDefault(), e.stopPropagation();
        let currentStar = e.target, currentState = !currentStar.classList.contains("active");
        onChange !== null ? yield onChange(currentState) : isSetting && saveSetting(id, currentState), currentStar.classList.remove("inactive"), currentStar.classList.remove("active"), currentState ? (currentStar.classList.add("active"), onActivate !== null && (yield onActivate(currentState))) : (currentStar.classList.add("inactive"), onDeactivate !== null && (yield onDeactivate(currentState))), setTimeout(() => {
          currentStar.classList.remove("busy");
        }, 300);
      })), target && target.append(star), star;
    }), createPopup = (options2) => {
      if (typeof jsDialog == "undefined" || !jsDialog)
        return !1;
      let settings2 = Object.assign({}, {
        title: "",
        content: "",
        hasCloseButton: !0,
        template: "default",
        show: !0,
        className: ""
      }, options2), popup = new jsDialog();
      return popup.setIsModal(!settings2.hasCloseButton), popup.setTemplate(settings2.template), popup.addToken("{*title*}", settings2.title), popup.addToken("{*content*}", settings2.content), popup.setAttributes({
        className: settings2.className
      }), settings2.show && popup.show(), popup;
    }, makeTooltip = (options2) => {
      if (!options2.appendTo)
        return !1;
      let { appendTo, className = "", text = "" } = options2, tooltip = makeElement("div", ["PreferencesPage__blackTooltip", "mh-improved-tooltip", className]);
      return makeElement("span", "PreferencesPage__blackTooltipText", text, tooltip), appendTo.append(tooltip), tooltip;
    }, makePage = (content) => {
      var _a, _b;
      let setContent = () => {
        let pageContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
        pageContainer && (typeof content == "function" ? (pageContainer.innerHTML = "", content(pageContainer)) : typeof content == "object" && content instanceof HTMLElement ? (pageContainer.innerHTML = "", pageContainer.append(content)) : pageContainer.innerHTML = content);
      };
      (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.setPage && hg.utils.PageUtil.setPage("PrivacyPolicy", {}, setContent, setContent);
    }, makeMathButton = (amount, opts) => {
      let {
        appendTo = null,
        input = null,
        maxQty = 0,
        classNames = []
      } = opts, button = makeElement("a", ["mousehuntActionButton", "mh-improved-math-button", ...classNames]), plusText = amount > 0 ? `+${amount}` : amount, minusText = amount > 0 ? `-${amount}` : amount, buttonText = makeElement("span", "", plusText), updateButtonText = (e) => {
        let currentText = buttonText.innerText;
        e.shiftKey && currentText !== minusText ? buttonText.innerText = minusText : !e.shiftKey && currentText !== plusText && (buttonText.innerText = plusText);
      };
      return buttonText.addEventListener("mouseover", updateButtonText), window.addEventListener("keydown", updateButtonText), window.addEventListener("keyup", updateButtonText), button.append(buttonText), button.addEventListener("click", (e) => {
        e.preventDefault();
        let current = Number.parseInt(input.value, 10);
        Number.isNaN(current) && (current = 0);
        let tempAmount = e.shiftKey ? -amount : amount;
        current + tempAmount >= maxQty ? input.value = maxQty : current + tempAmount <= 0 ? input.value = 0 : input.value = current + tempAmount;
        let event = new Event("keyup");
        input.dispatchEvent(event);
      }), appendTo && appendTo.append(button), button;
    }, makeMathButtons = (amounts, opts) => {
      let returnVal = [];
      return amounts.forEach((amount) => {
        returnVal.push(makeMathButton(amount, opts));
      }), returnVal;
    }, toEscapedJSON = (obj) => JSON.stringify(obj).replaceAll('"', "&quot;"), makeProgressLogLink = (opts = {}) => {
      let progress = {
        time: opts.time || "1 day, 12 hours",
        catches: opts.catches || [],
        baits: opts.baits || [],
        loots: opts.loots || []
      }, catches = {}, baits = {}, loots = {};
      return progress.catches.forEach((mouse) => {
        catches[`${mouse.environment}_${mouse.id}`] = mouse.caught;
      }), progress.baits.forEach((bait) => {
        baits[`${bait.id}_bu`] = bait.used || bait.catches + bait.fta + bait.ftc, baits[`${bait.id}_c`] = bait.catches, baits[`${bait.id}_m`] = bait.ftc, baits[`${bait.id}_af`] = bait.fta, baits[`${bait.id}_bs`] = bait.stale, baits[`${bait.id}_bl`] = bait.stolen;
      }), progress.loots.forEach((loot) => {
        loots[loot.id] = loot.quantity;
      }), `<a href="#" onclick="app.views.HeadsUpDisplayView.hud.showLogSummary('${progress.time}', ${toEscapedJSON(catches)}, ${toEscapedJSON(baits)}, ${toEscapedJSON(loots)}); return false;" class="mh-ui-progress-log-link mousehuntActionButton small lightBlue"><span>${opts.text || "View Progress Log"}</span></a>`;
    };
  }
});

// src/utils/event-registry.js
var addEvent, doEvent2, doInternalEvent, eventsAdded, onEvent, onSettingsChange, init_event_registry = __esm({
  "src/utils/event-registry.js"() {
    addEvent = (eventName, eventCallback, args) => {
      let {
        eventScope = null,
        removeAfterFire = !1,
        weight = 0,
        id = null
      } = args || {};
      eventRegistry && eventRegistry.addEventListener(eventName, eventCallback, eventScope, removeAfterFire, weight, id);
    }, doEvent2 = (eventName, params) => {
      eventRegistry && eventRegistry.doEvent(eventName, params);
    }, doInternalEvent = (eventName, params) => {
      document.dispatchEvent(new CustomEvent(eventName, { detail: params }));
    }, eventsAdded = {}, onEvent = (event, callback, remove = !1) => {
      if (!eventRegistry)
        return;
      let id = `${event}-${remove.toString()}-${callback.toString()}`;
      eventsAdded[id] || (eventsAdded[id] = !0, eventRegistry.addEventListener(event, callback, null, remove));
    }, onSettingsChange = (key, callback) => {
      onEvent("mh-improved-settings-changed", (args) => {
        args.key === key && (typeof callback == "function" ? callback(args) : typeof callback == "object" && (args.value ? callback.enable(args) : callback.disable(args)));
      });
    };
  }
});

// src/utils/blueprint.js
var activeBlueprint, addedEvent, toggleBlueprint, init_blueprint = __esm({
  "src/utils/blueprint.js"() {
    init_elements();
    init_event_registry();
    activeBlueprint = null, addedEvent = !1, toggleBlueprint = (id, content) => {
      let container = document.querySelector("#mousehuntContainer");
      if (!container)
        return;
      let blueprint = document.querySelector(".trapSelectorView__blueprint");
      if (!blueprint)
        return;
      let browserStateParent = document.querySelector(".trapSelectorView__browserStateParent");
      if (!browserStateParent)
        return;
      let existing = document.querySelector(`#mh-improved-blueprint--${id}`);
      existing && existing.remove();
      let wrapper = makeElement("div", [
        "trapSelectorView__browserState",
        "trapSelectorView__browserContainer",
        "mh-improved-blueprint",
        `mh-improved-blueprint--${id}`
      ]);
      wrapper.id = `mh-improved-blueprint--${id}`;
      let inner = makeElement("div", "trapSelectorView__outerBlock");
      if (inner.append(content), wrapper.append(inner), browserStateParent.append(wrapper), activeBlueprint === id)
        activeBlueprint = null, container.classList.remove("showBlueprint"), blueprint.classList.remove("trapSelectorView__blueprint--active", "mh-improved-blueprint--active"), browserStateParent.classList.remove(`trapSelectorView__browserStateParent--${id}`);
      else {
        let close2 = document.querySelector(".campPage-trap-blueprint-closeButton");
        close2 && close2.click(), activeBlueprint = id, container.classList.add("showBlueprint"), blueprint.classList.add("trapSelectorView__blueprint--active", "mh-improved-blueprint--active"), browserStateParent.classList.add(`trapSelectorView__browserStateParent--${id}`);
      }
      addedEvent || (onEvent("camp_page_toggle_blueprint", () => {
        activeBlueprint = null;
      }), addedEvent = !0);
    };
  }
});

// src/utils/db.js
var database, databaseDelete, dbGet, dbSet, dbDelete, dbGetAll, dbDeleteAll, init_db = __esm({
  "src/utils/db.js"() {
    database = (databaseName) => __async(void 0, null, function* () {
      return new Promise((resolve, reject2) => {
        let request = indexedDB.open(`mh-improved-${databaseName}`, 7);
        request.onerror = (event) => reject2(event.target.error), request.onsuccess = (event) => resolve(event.target.result), request.onupgradeneeded = (event) => {
          let db = event.target.result;
          db.objectStoreNames.contains(databaseName) || db.createObjectStore(databaseName, { keyPath: "id" });
        };
      });
    }), databaseDelete = (databaseName) => __async(void 0, null, function* () {
      return databaseName = `mh-improved-${databaseName}`, new Promise((resolve, reject2) => {
        let request = indexedDB.deleteDatabase(databaseName);
        request.onerror = (event) => reject2(event.target.error), request.onsuccess = (event) => resolve(event.target.result);
      });
    }), dbGet = (databaseName, id) => __async(void 0, null, function* () {
      let db = yield database(databaseName), transaction = db.transaction(databaseName, "readonly");
      transaction.onerror = (event) => {
        throw new Error(event.target.error);
      };
      let request = transaction.objectStore(databaseName).get(id);
      return new Promise((resolve, reject2) => {
        request.onsuccess = (event) => {
          db.close(), resolve(event.target.result);
        }, request.onerror = (event) => reject2(event.target.error);
      });
    }), dbSet = (databaseName, data) => __async(void 0, null, function* () {
      let db = yield database(databaseName), transaction = db.transaction(databaseName, "readwrite"), objectStore = transaction.objectStore(databaseName);
      data = {
        data,
        id: data.id || Date.now()
      };
      let request = objectStore.put(data);
      return new Promise((resolve, reject2) => {
        request.onsuccess = (event) => resolve(event.target.result), request.onerror = (event) => reject2(event.target.error), transaction.oncomplete = () => db.close();
      });
    }), dbDelete = (databaseName, id) => __async(void 0, null, function* () {
      let db = yield database(databaseName), transaction = db.transaction(databaseName, "readwrite"), request = transaction.objectStore(databaseName).delete(id);
      return new Promise((resolve, reject2) => {
        request.onsuccess = (event) => resolve(event.target.result), request.onerror = (event) => reject2(event.target.error), transaction.oncomplete = () => db.close();
      });
    }), dbGetAll = (databaseName) => __async(void 0, null, function* () {
      let db = yield database(databaseName), transaction = db.transaction(databaseName, "readonly"), request = transaction.objectStore(databaseName).getAll();
      return new Promise((resolve, reject2) => {
        request.onsuccess = (event) => resolve(event.target.result), request.onerror = (event) => reject2(event.target.error), transaction.oncomplete = () => db.close();
      });
    }), dbDeleteAll = (databaseName) => __async(void 0, null, function* () {
      let db = yield database(databaseName), transaction = db.transaction(databaseName, "readwrite"), request = transaction.objectStore(databaseName).clear();
      return new Promise((resolve, reject2) => {
        request.onsuccess = (event) => resolve(event.target.result), request.onerror = (event) => reject2(event.target.error), transaction.oncomplete = () => db.close();
      });
    });
  }
});

// src/utils/global.js
var setGlobal, getGlobal, init_global = __esm({
  "src/utils/global.js"() {
    setGlobal = (key, value) => {
      window.mhui = window.mhui || {}, window.mhui[key] = value, app.mhui = window.mhui;
    }, getGlobal = (key) => {
      var _a;
      return window != null && window.mhui ? window.mhui[key] || !1 : ((_a = app == null ? void 0 : app.mhui) == null ? void 0 : _a[key]) || !1;
    };
  }
});

// src/utils/debug.js
var shouldLogDebug, debug, debuglog, init_debug = __esm({
  "src/utils/debug.js"() {
    init_global();
    init_settings();
    shouldLogDebug = (context) => getSetting("debug.all", !1) || getSetting(`debug.${context}`, !1) || getGlobal("mh-improved-updating") || getGlobal("mh-improved-debug"), debug = (message, ...args) => {
      shouldLogDebug("module") && console.log(
        `%cMH Improved%c: ${message}`,
        "color: #90588c; font-weight: 900",
        "color: inherit; font-weight: inherit",
        ...args
      );
    }, debuglog = (module, message, ...args) => {
      shouldLogDebug(module) && console.log(
        `%cMH Improved %c${module}%c ${message}`,
        "color: #90588c; font-weight: 900",
        "color: #90588c; font-weight: 400",
        "color: inherit; font-weight: inherit",
        ...args
      );
    };
  }
});

// src/utils/data.js
var validDataFiles, isValidDataFile, getCacheExpiration, setCacheExpiration, isCacheExpired, fetchData, getData, clearCaches, updateCaches, getHeaders, sessionSet, sessionGet, sessionDelete, sessionsDelete, cacheSet, dataCacheSet, cacheGetHelper, cacheGet, dataCacheGet, cacheDelete, init_data = __esm({
  "src/utils/data.js"() {
    init_db();
    init_debug();
    init_settings();
    validDataFiles = /* @__PURE__ */ new Set([
      "community-map-data",
      "effs",
      "environments-events",
      "environments",
      "item-thumbnails",
      "items-tradable",
      "m400-locations",
      "marketplace-hidden-items",
      "mice-groups",
      "mice-regions",
      "mice-thumbnails",
      "minlucks",
      "relic-hunter-hints",
      "scoreboards",
      "ultimate-checkmark",
      "upscaled-images",
      "wisdom",
      "items"
    ]), isValidDataFile = (file) => validDataFiles.has(file), getCacheExpiration = (key = null) => __async(void 0, null, function* () {
      return yield cacheGet(`expiration-${key}`, !1);
    }), setCacheExpiration = (key) => __async(void 0, null, function* () {
      debuglog("utils-data", `Setting cache expiration for ${key}`), cacheSet(`expiration-${key}`, Date.now() + (Math.floor(Math.random() * 7) + 7) * 24 * 60 * 60 * 1e3);
    }), isCacheExpired = (key) => __async(void 0, null, function* () {
      let expiration = yield getCacheExpiration(key);
      return expiration ? expiration.date < Date.now() : !0;
    }), fetchData = (key, retries = 0) => __async(void 0, null, function* () {
      try {
        return yield (yield fetch(`https://api.mouse.rip/${key}`, {
          method: "GET",
          headers: getHeaders()
        })).json();
      } catch (error) {
        return console.error(`Error fetching data for ${key}:`, error), retries >= 3 ? !1 : (yield new Promise((resolve) => setTimeout(resolve, 500 * retries)), fetchData(key, retries + 1));
      }
    }), getData = (key, force = !1) => __async(void 0, null, function* () {
      if (!isValidDataFile(key))
        return debuglog("utils-data", `Cannot get data for ${key}, invalid key`), !1;
      if (!(yield isCacheExpired(key)) && !force) {
        let cachedData = yield dataCacheGet(key, !1);
        if (cachedData)
          return cachedData;
      }
      debuglog("utils-data", `Fetching data for ${key}\u2026`);
      let data = yield fetchData(key);
      return debuglog("utils-data", `Fetched data for ${key}`, data), data && (dataCacheSet(key, data), setCacheExpiration(key)), data;
    }), clearCaches = () => __async(void 0, null, function* () {
      dbDeleteAll("ar-cache");
      for (let key of Object.keys(localStorage))
        key.startsWith("mh-improved-cache") && localStorage.removeItem(key);
      for (let key of Object.keys(sessionStorage))
        key.startsWith("mh-improved") && sessionStorage.removeItem(key);
      yield dbDelete("cache", "expirations"), yield updateCaches();
    }), updateCaches = () => __async(void 0, null, function* () {
      for (let file of validDataFiles)
        yield getData(file, !0);
    }), getHeaders = () => ({
      "Content-Type": "application/json",
      "X-MH-Improved": "true",
      "X-MH-Improved-Version": mhImprovedVersion || "unknown",
      "X-MH-Improved-Platform": mhImprovedPlatform || "unknown"
    }), sessionSet = (key, value, retry = !1) => {
      if (getSetting("debug.no-cache"))
        return;
      key = `mh-improved-${key}`;
      let stringified = JSON.stringify(value);
      try {
        sessionStorage.setItem(key, stringified);
      } catch (error) {
        error.name === "QuotaExceededError" && !retry && (clearCaches(), sessionSet(key, value, !0));
      }
    }, sessionGet = (key, defaultValue = !1) => {
      if (getSetting("debug.no-cache"))
        return defaultValue;
      key = `mh-improved-${key}`;
      let value = sessionStorage.getItem(key);
      return value ? JSON.parse(value) : defaultValue;
    }, sessionDelete = (key) => {
      key = `mh-improved-${key}`, sessionStorage.removeItem(key);
    }, sessionsDelete = (prefix) => {
      for (let key of Object.keys(sessionStorage))
        key.startsWith(prefix) && sessionStorage.removeItem(key);
    }, cacheSet = (key, value) => {
      dbSet("cache", { id: key, value });
    }, dataCacheSet = (key, value) => {
      dbSet("data", { id: key, value });
    }, cacheGetHelper = (key, defaultValue = !1, db = "cache") => __async(void 0, null, function* () {
      var _a;
      let cached = yield dbGet(db, key);
      return (_a = cached == null ? void 0 : cached.data) != null && _a.value ? cached.data.value : defaultValue;
    }), cacheGet = (key, defaultValue = !1) => __async(void 0, null, function* () {
      return yield cacheGetHelper(key, defaultValue, "cache");
    }), dataCacheGet = (key, defaultValue = !1) => __async(void 0, null, function* () {
      return yield cacheGetHelper(key, defaultValue, "data");
    }), cacheDelete = (key) => {
      dbDelete("cache", key);
    };
  }
});

// src/utils/draggable.js
var makeElementDraggable, init_draggable = __esm({
  "src/utils/draggable.js"() {
    makeElementDraggable = (dragTarget, dragHandle, defaultX = null, defaultY = null, storageKey = null, savePosition = !0) => {
      let modal = document.querySelector(dragTarget);
      if (!modal)
        return;
      let handle = document.querySelector(dragHandle);
      if (!handle)
        return;
      let keepWithinLimits = (type, value) => type === "top" ? value < -20 ? -20 : value : value < handle.offsetWidth * -1 + 20 ? handle.offsetWidth * -1 + 20 : value > document.body.clientWidth - 20 ? document.body.clientWidth - 20 : value, onMouseDown = (e) => {
        e.preventDefault(), setTimeout(() => {
          x1 = e.clientX, y1 = e.clientY, modal.classList.add("mh-is-dragging"), document.onmousemove = onDrag, document.onmouseup = finishDrag;
        }, 50);
      }, finishDrag = () => {
        document.onmouseup = null, document.onmousemove = null, modal.classList.remove("mh-is-dragging"), storageKey && localStorage.setItem(storageKey, JSON.stringify({ x: modal.offsetLeft, y: modal.offsetTop }));
      }, onDrag = (e) => {
        e.preventDefault(), x2 = x1 - e.clientX, y2 = y1 - e.clientY, x1 = e.clientX, y1 = e.clientY;
        let newLeft = keepWithinLimits("left", modal.offsetLeft - x2), newTop = keepWithinLimits("top", modal.offsetTop - y2);
        modal.style.left = `${newLeft}px`, modal.style.top = `${newTop}px`;
      }, startX = defaultX || 0, startY2 = defaultY || 0;
      if (storageKey || (storageKey = `mh-draggable-${dragTarget}-${dragHandle}`), savePosition) {
        let storedPosition = localStorage.getItem(storageKey);
        if (storedPosition) {
          let position = JSON.parse(storedPosition);
          startX = keepWithinLimits("left", position.x), startY2 = keepWithinLimits("top", position.y);
        }
      }
      modal.style.left = `${startX}px`, modal.style.top = `${startY2}px`;
      let x1 = 0, y1 = 0, x2 = 0, y2 = 0;
      handle.onmousedown = onMouseDown;
    };
  }
});

// src/utils/page.js
var getCurrentPage, setPage, setTab, getCurrentTab, getCurrentSubtab, getCurrentDialog, isCurrentPage, init_page = __esm({
  "src/utils/page.js"() {
    getCurrentPage = () => {
      var _a, _b, _c, _d;
      if (!((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.getCurrentPage))
        return null;
      let page = hg.utils.PageUtil.getCurrentPage();
      if (!page) {
        let query = ((_d = (_c = hg == null ? void 0 : hg.utils) == null ? void 0 : _c.PageUtil) == null ? void 0 : _d.getQueryParams()) || {};
        return query != null && query.switch_to && query.switch_to === "mobile" ? "camp" : null;
      }
      return page.toLowerCase();
    }, setPage = (page, ...args) => {
      var _a, _b, _c;
      if (page.toLowerCase() === "wiki") {
        doEvent("mh-improved-open-wiki");
        return;
      }
      page = page.charAt(0).toUpperCase() + page.slice(1), (_c = (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) == null ? void 0 : _b.setPage) == null || _c.call(_b, page, ...args);
    }, setTab = (tab, ...args) => {
      var _a, _b, _c;
      (_c = (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) == null ? void 0 : _b.setPageTab) == null || _c.call(_b, tab, ...args);
    }, getCurrentTab = () => {
      var _a, _b;
      if (!((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.getCurrentPageTab))
        return getCurrentPage();
      let tab = hg.utils.PageUtil.getCurrentPageTab() || "";
      return tab.length <= 0 ? getCurrentPage() : tab ? tab == null ? void 0 : tab.toLowerCase() : getCurrentPage();
    }, getCurrentSubtab = () => {
      let subtab = hg.utils.PageUtil.getCurrentPageSubTab();
      return !subtab || subtab.length <= 0 ? getCurrentTab() : subtab ? subtab == null ? void 0 : subtab.toLowerCase() : getCurrentTab();
    }, getCurrentDialog = () => {
      let overlay = document.querySelector("#overlayPopup");
      if (!overlay || !overlay.classList || overlay.classList.length <= 0)
        return null;
      let replaceMap = {
        jsDialogFixed: "",
        default: "",
        wide: "",
        ajax: "",
        overlay: "",
        treasureMapPopup: "map",
        itemViewPopup: "item",
        mouseViewPopup: "mouse",
        largerImage: "image",
        convertibleOpenViewPopup: "convertible",
        adventureBookPopup: "adventureBook",
        marketplaceViewPopup: "marketplace",
        giftSelectorViewPopup: "gifts",
        supportPageContactUsForm: "support",
        MHCheckout: "premiumShop"
      };
      return overlayType = overlay.classList.value.split(" ").map((cls) => replaceMap[cls] || cls).join(" ").trim(), overlayType === "Popup" ? !1 : overlayType;
    }, isCurrentPage = (targetPage = null, targetTab = null, targetSubtab = null, forceCurrentPage = null, forceCurrentTab = null, forceCurrentSubtab = null) => {
      if (!targetPage)
        return !1;
      let currentPage = forceCurrentPage || getCurrentPage();
      if (!targetTab)
        return currentPage === targetPage;
      let currentTab = forceCurrentTab || getCurrentTab();
      if (!targetSubtab)
        return currentPage === targetPage && currentTab === targetTab;
      let currentSubtab = forceCurrentSubtab || getCurrentSubtab();
      return currentSubtab === currentTab ? currentPage === targetPage && currentTab === targetTab : currentPage === targetPage && currentTab === targetTab && currentSubtab === targetSubtab;
    };
  }
});

// src/utils/location.js
var getCurrentLocation, getCurrentLocationName, getRelicHunterLocation, travelTo, init_location = __esm({
  "src/utils/location.js"() {
    init_data();
    init_elements();
    getCurrentLocation = () => ((user == null ? void 0 : user.environment_type) || "").toLowerCase(), getCurrentLocationName = () => (user == null ? void 0 : user.environment_name) || getCurrentLocation(), getRelicHunterLocation = () => {
      let cacheKey = "mh-improved-relic-hunter-location", cached = sessionGet(cacheKey);
      return cached && (cached = JSON.parse(cached)), cached && cached.expiry > Date.now() ? cached.data : fetch("https://rh-api.mouse.rip/", { headers: getHeaders() }).then((response) => response.json()).then((data) => {
        let expiry = Date.now() + 3e5;
        return sessionSet(cacheKey, JSON.stringify({ expiry, data })), data;
      }).catch((error) => {
        console.error(error);
      });
    }, travelTo = (location2) => {
      var _a, _b;
      let header = document.querySelector(".mousehuntHeaderView");
      if (header) {
        let existing = header.querySelector(".mh-improved-travel-message");
        existing && existing.remove(), makeElement("div", ["mh-improved-travel-message", "travelPage-map-message"], "Traveling...", header);
      }
      (_b = (_a = app == null ? void 0 : app.pages) == null ? void 0 : _a.TravelPage) != null && _b.travel && app.pages.TravelPage.travel(location2);
    };
  }
});

// src/utils/horn.js
var showHornMessage, init_horn = __esm({
  "src/utils/horn.js"() {
    init_elements();
    showHornMessage = (options2) => {
      let huntersHornView = document.querySelector(".huntersHornView__messageContainer");
      if (!huntersHornView)
        return;
      let settings2 = {
        title: options2.title || "Hunters Horn",
        text: options2.text || "This is a message from the Hunters Horn",
        button: options2.button || "OK",
        action: options2.action || (() => {
        }),
        dismiss: options2.dismiss || null,
        type: options2.type || "recent_linked_turn",
        classname: options2.classname || "",
        image: options2.image || null,
        imageLink: options2.imageLink || null,
        imageCallback: options2.imageCallback || null
      }, backdrop = document.querySelector(".huntersHornView__backdrop");
      backdrop && backdrop.classList.add("huntersHornView__backdrop--active");
      let gameInfo = document.querySelector(".mousehuntHud-gameInfo");
      gameInfo && gameInfo.classList.add("blur");
      let fragment = document.createDocumentFragment(), messageWrapper = makeElement("div", ["huntersHornView__message huntersHornView__message--active", settings2.classname]), message = makeElement("div", ["huntersHornMessageView", `huntersHornMessageView--${settings2.type}`]);
      makeElement("div", "huntersHornMessageView__title", settings2.title, message);
      let content = makeElement("div", "huntersHornMessageView__content");
      if (settings2.image) {
        let imgWrapper = makeElement("div", "huntersHornMessageView__friend"), img = makeElement("a", "huntersHornMessageView__friendProfilePic");
        settings2.imageLink ? img.href = settings2.imageLink : settings2.imageCallback ? img.addEventListener("click", settings2.imageCallback) : img.href = "#", img.style.backgroundImage = `url(${settings2.image})`, imgWrapper.append(img), content.append(imgWrapper);
      }
      makeElement("div", "huntersHornMessageView__text", settings2.text, content);
      let buttonSpacer = makeElement("div", "huntersHornMessageView__buttonSpacer"), button = makeElement("button", "huntersHornMessageView__action"), buttonLabel = makeElement("div", "huntersHornMessageView__actionLabel");
      if (makeElement("span", "huntersHornMessageView__actionText", settings2.button, buttonLabel), button.append(buttonLabel), button.addEventListener("click", () => {
        settings2.action && settings2.action(), messageWrapper.innerHTML = "", backdrop.classList.remove("huntersHornView__backdrop--active"), gameInfo.classList.remove("blur");
      }), buttonSpacer.append(button), content.append(buttonSpacer), message.append(content), settings2.dismiss) {
        let countdown = makeElement("button", ["huntersHornMessageView__countdown"]);
        makeElement("div", "huntersHornMessageView__countdownButtonImage", "", countdown);
        let 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: ${settings2.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);
      let existingMessages = huntersHornView.querySelector(".huntersHornView__message");
      existingMessages && existingMessages.remove(), fragment.append(messageWrapper), huntersHornView.append(fragment), settings2.dismiss && setTimeout(() => {
        let countdown = messageWrapper.querySelector(".huntersHornMessageView__countdown");
        countdown && countdown.classList.add("huntersHornMessageView__countdown--complete"), messageWrapper.innerHTML = "", backdrop.classList.remove("huntersHornView__backdrop--active"), gameInfo.classList.remove("blur");
      }, settings2.dismiss);
    };
  }
});

// src/utils/events.js
var requestCallbacks, onRequestHolder, onRequest, runCallbacks, overlayMutationObserver, overlayCallbacks, onOverlayChange, getDialogMapping, onDialogShow, dialogHideCallbacks, lastDialog, onDialogHide, pageChangeCallbacks, pageChangeObserver, onPageChange, onTravel, onTravelCallback, callbacks, hasAddedNavigationListener, onNavigation, addNavigationListeners, onActivation, onDeactivation, onTurn, onTrapChange, init_events = __esm({
  "src/utils/events.js"() {
    init_page();
    init_location();
    init_event_registry();
    init_horn();
    requestCallbacks = {}, onRequestHolder = !1, onRequest = (url = null, callback = null, skipSuccess = !1, ignore = [], priority = !1) => {
      if (!onRequestHolder) {
        let 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) => {
                (key === "*" || this.responseURL.includes(key)) && requestCallbacks[key].forEach((item) => {
                  item.callback && typeof item.callback == "function" && (item.skipSuccess || response != null && response.success) && item.callback(response, this._data);
                });
              });
            }
          }), Reflect.apply(req, this, arguments);
        };
        let send = XMLHttpRequest.prototype.send;
        XMLHttpRequest.prototype.send = function(data) {
          let params = new URLSearchParams(data);
          return this._data = Object.fromEntries(params), Reflect.apply(send, this, arguments);
        }, onRequestHolder = !0;
      }
      url = url === "*" ? "*" : `managers/ajax/${url}`, !ignore.includes(url) && callback && (requestCallbacks[url] || (requestCallbacks[url] = []), priority ? requestCallbacks[url].unshift({
        callback,
        skipSuccess
      }) : requestCallbacks[url].push({
        callback,
        skipSuccess
      }));
    }, runCallbacks = (settings2, parentNode, callbacks3) => (Object.keys(settings2).forEach((key) => {
      parentNode && parentNode.classList && parentNode.classList.contains(settings2[key].selector) ? (settings2[key].isVisible = !0, callbacks3[key] && callbacks3[key].show && callbacks3[key].show()) : settings2[key].isVisible && (settings2[key].isVisible = !1, callbacks3[key] && callbacks3[key].hide && callbacks3[key].hide());
    }), settings2), overlayMutationObserver = null, overlayCallbacks = [], onOverlayChange = (callbacks3) => {
      let overlayData = {
        item: { isVisible: !1, selector: "itemViewPopup" },
        mouse: { isVisible: !1, selector: "mouseViewPopup" },
        marketplace: { isVisible: !1, selector: "marketplaceViewPopup" }
      };
      if (overlayCallbacks.push(callbacks3), overlayMutationObserver)
        return;
      overlayMutationObserver = !0;
      let observer = new MutationObserver(() => {
        overlayCallbacks.forEach((callback) => {
          callback.change && callback.change();
          let overlayType2 = document.querySelector("#overlayPopup");
          if (overlayType2 && overlayType2.classList.length <= 0)
            return;
          let overlayBg = document.querySelector("#overlayBg");
          overlayBg && overlayBg.classList.length > 0 ? callback.show && callback.show() : callback.hide && callback.hide(), overlayData = runCallbacks(overlayData, overlayType2, callback);
        });
      }), observeTarget = document.querySelector("#overlayPopup");
      observeTarget && observer.observe(observeTarget, {
        attributes: !0,
        attributeFilter: ["class"]
      });
    }, getDialogMapping = () => ({
      treasureMapPopup: "map",
      itemViewPopup: "item",
      mouseViewPopup: "mouse",
      largerImage: "image",
      convertibleOpenViewPopup: "convertible",
      adventureBookPopup: "adventureBook",
      marketplaceViewPopup: "marketplace",
      giftSelectorViewPopup: "gifts",
      supportPageContactUsForm: "support",
      MHCheckout: "premiumShop"
    }), onDialogShow = (overlay = null, callback = null, once = !1) => {
      let identifier = callback.toString().replaceAll(/[^\w-]/gi, "");
      eventRegistry.addEventListener("js_dialog_show", () => {
        if (!activejsDialog)
          return;
        let 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;
        let dialogType = activejsDialog.getAttributes().className.replace("jsDialogFixed", "").replace("wide", "").replace("default", "").replaceAll("  ", " ").replaceAll(" ", ".").trim();
        if (dialogType.endsWith(".") && (dialogType = dialogType.slice(0, -1)), window.mhutils = window.mhutils ? __spreadProps(__spreadValues({}, window.mhutils), { lastDialog: { overlay: dialogType } }) : { lastDialog: { overlay: dialogType } }, lastDialog = dialogType, (!overlay || overlay === "all") && typeof callback == "function")
          return callback();
        let dialogMapping = getDialogMapping();
        if (typeof callback == "function" && (overlay === dialogType || overlay === dialogMapping[dialogType]))
          return callback();
      }, null, once, 0, identifier);
    }, dialogHideCallbacks = [], lastDialog = null, onDialogHide = (callback, overlay = null) => {
      let dialogMapping = getDialogMapping();
      overlay in dialogMapping && !dialogHideCallbacks.some((item) => item.callback === callback) ? dialogHideCallbacks.push({
        overlay: dialogMapping[overlay],
        callback
      }) : dialogHideCallbacks.some((item) => item.callback === callback) || dialogHideCallbacks.push({
        overlay: "all",
        callback
      }), eventRegistry.addEventListener("js_dialog_hide", () => {
        lastDialog && dialogHideCallbacks.forEach((item) => {
          (lastDialog === item.overlay || item.overlay === "all") && item.callback();
        });
      });
    }, pageChangeCallbacks = [], pageChangeObserver = null, onPageChange = (callbacks3) => {
      let tabData = {
        travel: { isVisible: !1, selector: "PageTravel" }
      };
      if (pageChangeCallbacks.push(callbacks3), pageChangeObserver)
        return;
      pageChangeObserver = !0;
      let observer = new MutationObserver(() => {
        pageChangeCallbacks.forEach((callback) => {
          callback.change && callback.change();
          let mhContainer = document.querySelector("#mousehuntContainer");
          mhContainer && mhContainer.classList.length > 0 && (tabData = runCallbacks(tabData, mhContainer, callback));
        });
      }), observeTarget = document.querySelector("#mousehuntContainer");
      observeTarget && observer.observe(observeTarget, {
        attributes: !0,
        attributeFilter: ["class"]
      });
    }, onTravel = (location2, options2) => {
      eventRegistry.addEventListener("travel_complete", () => onTravelCallback(location2, options2));
    }, onTravelCallback = (location2, options2) => {
      location2 && location2 !== getCurrentLocation() || (options2 != null && options2.shouldAddReminder && showHornMessage({
        title: options2.title || "",
        text: options2.text || "",
        button: options2.button || "Dismiss",
        action: options2.action || null
      }), options2.callback && options2.callback());
    }, callbacks = [], hasAddedNavigationListener = !1, onNavigation = (callback, options2 = {}) => {
      let defaults = {
        page: !1,
        tab: !1,
        subtab: !1,
        onLoad: !0,
        anyTab: !1,
        anySubtab: !1
      }, { page, tab, subtab, onLoad, anyTab, anySubtab } = Object.assign(defaults, options2), bypassMatch = !page;
      onLoad && (bypassMatch || isCurrentPage(
        page,
        anyTab ? getCurrentTab() : tab,
        anySubtab ? getCurrentSubtab() : subtab
      )) && callback(), callbacks.push({ callback, page, tab, subtab, bypassMatch }), hasAddedNavigationListener || (addNavigationListeners(), hasAddedNavigationListener = !0);
    }, addNavigationListeners = () => {
      eventRegistry.addEventListener("set_page", (e) => {
        var _a;
        let tabs = ((_a = e == null ? void 0 : e.data) == null ? void 0 : _a.tabs) || {}, currentTab = Object.keys(tabs).find((key) => tabs[key].is_active_tab), forceCurrentTab = currentTab == null ? void 0 : currentTab.type;
        callbacks.forEach(({ callback, page, tab, subtab, bypassMatch }) => {
          if (bypassMatch) {
            callback();
            return;
          }
          if (!subtab) {
            isCurrentPage(page, tab, !1, getCurrentPage(), forceCurrentTab) && callback();
            return;
          }
          if (currentTab != null && currentTab.subtabs && (currentTab == null ? void 0 : currentTab.subtabs.length) > 0) {
            let forceSubtab = currentTab.subtabs.find((searchTab) => searchTab.is_active_subtab).subtab_type;
            isCurrentPage(page, tab, subtab, getCurrentPage(), forceCurrentTab, forceSubtab) && callback();
          }
        });
      }), eventRegistry.addEventListener("set_tab", (e) => {
        callbacks.forEach(({ callback, page, tab, subtab, bypassMatch }) => {
          if (bypassMatch) {
            callback();
            return;
          }
          isCurrentPage(page, tab, subtab, getCurrentPage(), e.page_arguments.tab, e.page_arguments.sub_tab) && callback();
        });
      });
    }, onActivation = (module, callback) => {
      onEvent("mh-improved-settings-changed", ({ key, value }) => {
        key === module && value && callback();
      });
    }, onDeactivation = (module, callback) => {
      onEvent("mh-improved-settings-changed", ({ key, value }) => {
        key === module && !value && callback();
      });
    }, onTurn = (callback, delay = null) => {
      onRequest("turns/activeturn.php", () => {
        delay = delay || Math.floor(Math.random() * 1e3) + 1e3, setTimeout(callback, delay);
      }, !0);
    }, onTrapChange = (callback, opts) => {
      let options2 = Object.assign({
        runOnLoad: !0,
        runOnGetTrapComponents: !0
      }, opts);
      options2 != null && options2.runOnLoad && callback(), onRequest("users/changetrap.php", callback), options2 != null && options2.runOnGetTrapComponents && onRequest("users/gettrapcomponents.php", callback);
    };
  }
});

// src/utils/flags.js
var flags, settings, getFlag, getFlags, init_flags = __esm({
  "src/utils/flags.js"() {
    init_settings();
    flags = null, settings = {}, getFlag = (flag) => {
      if (flag in settings)
        return settings[flag];
      let value = getSetting(`experiments.${flag}`, getFlags().includes(flag));
      return settings[flag] = value, value;
    }, getFlags = () => (flags || (flags = getSetting("override-flags", "").toLowerCase().replaceAll(" ", "").split(",")), flags);
  }
});

// node_modules/humanize-duration/humanize-duration.js
var require_humanize_duration = __commonJS({
  "node_modules/humanize-duration/humanize-duration.js"(exports, module) {
    (function() {
      var assign = Object.assign || /** @param {...any} destination */
      function(destination) {
        for (var source, i = 1; i < arguments.length; i++) {
          source = arguments[i];
          for (var prop in source)
            has(source, prop) && (destination[prop] = source[prop]);
        }
        return destination;
      }, isArray = Array.isArray || function(arg) {
        return Object.prototype.toString.call(arg) === "[object Array]";
      }, 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";
        },
        ","
      ), 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");
          },
          ","
        ),
        am: language("\u12D3\u1218\u1275", "\u12C8\u122D", "\u1233\u121D\u1295\u1275", "\u1240\u1295", "\u1230\u12D3\u1275", "\u12F0\u1242\u1243", "\u1230\u12A8\u1295\u12F5", "\u121A\u120A\u1230\u12A8\u1295\u12F5"),
        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 ",
            _hideCountIf2: !0,
            _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) {
            return c % 10 === 2 || c % 10 === 3 || c % 10 === 4 ? "godine" : "godina";
          },
          function(c) {
            return c === 1 ? "mjesec" : c === 2 || c === 3 || c === 4 ? "mjeseca" : "mjeseci";
          },
          function(c) {
            return c % 10 === 1 && c !== 11 ? "tjedan" : "tjedna";
          },
          function(c) {
            return c === 1 ? "dan" : "dana";
          },
          function(c) {
            return c === 1 ? "sat" : c === 2 || c === 3 || c === 4 ? "sata" : "sati";
          },
          function(c) {
            var mod10 = c % 10;
            return (mod10 === 2 || mod10 === 3 || mod10 === 4) && (c < 10 || c > 14) ? "minute" : "minuta";
          },
          function(c) {
            var mod10 = c % 10;
            return mod10 === 5 || Math.floor(c) === c && c >= 10 && c <= 19 ? "sekundi" : mod10 === 1 ? "sekunda" : mod10 === 2 || mod10 === 3 || mod10 === 4 ? "sekunde" : "sekundi";
          },
          function(c) {
            return c === 1 ? "milisekunda" : c % 10 === 2 || c % 10 === 3 || c % 10 === 4 ? "milisekunde" : "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) {
            return c % 10 === 1 ? "leto" : c % 100 === 2 ? "leti" : c % 100 === 3 || c % 100 === 4 || Math.floor(c) !== c && c % 100 <= 5 ? "leta" : "let";
          },
          function(c) {
            return c % 10 === 1 ? "mesec" : c % 100 === 2 || Math.floor(c) !== c && c % 100 <= 5 ? "meseca" : c % 10 === 3 || c % 10 === 4 ? "mesece" : "mesecev";
          },
          function(c) {
            return c % 10 === 1 ? "teden" : c % 10 === 2 || Math.floor(c) !== c && c % 100 <= 4 ? "tedna" : c % 10 === 3 || c % 10 === 4 ? "tedne" : "tednov";
          },
          function(c) {
            return c % 100 === 1 ? "dan" : "dni";
          },
          function(c) {
            return c % 10 === 1 ? "ura" : c % 100 === 2 ? "uri" : c % 10 === 3 || c % 10 === 4 || Math.floor(c) !== c ? "ure" : "ur";
          },
          function(c) {
            return c % 10 === 1 ? "minuta" : c % 10 === 2 ? "minuti" : c % 10 === 3 || c % 10 === 4 || Math.floor(c) !== c && c % 100 <= 4 ? "minute" : "minut";
          },
          function(c) {
            return c % 10 === 1 ? "sekunda" : c % 100 === 2 ? "sekundi" : c % 100 === 3 || c % 100 === 4 || Math.floor(c) !== c ? "sekunde" : "sekund";
          },
          function(c) {
            return c % 10 === 1 ? "milisekunda" : c % 100 === 2 ? "milisekundi" : c % 100 === 3 || c % 100 === 4 || Math.floor(c) !== c ? "milisekunde" : "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: !0 }
        ),
        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 };
        return typeof decimal != "undefined" && (result.decimal = decimal), result;
      }
      function getArabicForm(c) {
        return c === 2 ? 1 : c > 2 && c < 11 ? 2 : 0;
      }
      function getPolishForm(c) {
        return c === 1 ? 0 : Math.floor(c) !== c ? 1 : c % 10 >= 2 && c % 10 <= 4 && !(c % 100 > 10 && c % 100 < 20) ? 2 : 3;
      }
      function getSlavicForm(c) {
        return Math.floor(c) !== c ? 2 : c % 100 >= 5 && c % 100 <= 20 || c % 10 >= 5 && c % 10 <= 9 || c % 10 === 0 ? 0 : c % 10 === 1 ? 1 : c > 1 ? 2 : 0;
      }
      function getCzechOrSlovakForm(c) {
        return c === 1 ? 0 : Math.floor(c) !== c ? 1 : c % 10 >= 2 && c % 10 <= 4 && c % 100 < 10 ? 2 : 3;
      }
      function getLithuanianForm(c) {
        return c === 1 || c % 10 === 1 && c % 100 > 20 ? 0 : Math.floor(c) !== c || c % 10 >= 2 && c % 100 > 20 || c % 10 >= 2 && c % 100 < 10 ? 1 : 2;
      }
      function getLatvianForm(c) {
        return c % 10 === 1 && c % 100 !== 11;
      }
      function has(obj, key) {
        return Object.prototype.hasOwnProperty.call(obj, key);
      }
      function getLanguage(options2) {
        var possibleLanguages = [options2.language];
        if (has(options2, "fallbacks"))
          if (isArray(options2.fallbacks) && options2.fallbacks.length)
            possibleLanguages = possibleLanguages.concat(options2.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(options2.languages, languageToTry))
            return options2.languages[languageToTry];
          if (has(LANGUAGES, languageToTry))
            return LANGUAGES[languageToTry];
        }
        throw new Error("No language found.");
      }
      function renderPiece(piece, language2, options2) {
        var unitName = piece.unitName, unitCount = piece.unitCount, spacer = options2.spacer, maxDecimalPoints = options2.maxDecimalPoints, decimal;
        has(options2, "decimal") ? decimal = options2.decimal : has(language2, "decimal") ? decimal = language2.decimal : decimal = ".";
        var digitReplacements;
        "digitReplacements" in options2 ? digitReplacements = options2.digitReplacements : "_digitReplacements" in language2 && (digitReplacements = language2._digitReplacements);
        var formattedCount, normalizedUnitCount = maxDecimalPoints === void 0 ? unitCount : Math.floor(unitCount * Math.pow(10, maxDecimalPoints)) / Math.pow(10, maxDecimalPoints), countStr = normalizedUnitCount.toString();
        if (language2._hideCountIf2 && unitCount === 2)
          formattedCount = "", spacer = "";
        else if (digitReplacements) {
          formattedCount = "";
          for (var i = 0; i < countStr.length; i++) {
            var char = countStr[i];
            char === "." ? formattedCount += decimal : formattedCount += digitReplacements[char];
          }
        } else
          formattedCount = countStr.replace(".", decimal);
        var languageWord = language2[unitName], word;
        return typeof languageWord == "function" ? word = languageWord(unitCount) : word = languageWord, language2._numberFirst ? word + spacer + formattedCount : formattedCount + spacer + word;
      }
      function getPieces(ms, options2) {
        var unitName, i, unitCount, msRemaining, units = options2.units, unitMeasures = options2.unitMeasures, largest = "largest" in options2 ? options2.largest : 1 / 0;
        if (!units.length) return [];
        var unitCounts = {};
        for (msRemaining = ms, i = 0; i < units.length; i++) {
          unitName = units[i];
          var unitMs = unitMeasures[unitName], isLast = i === units.length - 1;
          unitCount = isLast ? msRemaining / unitMs : Math.floor(msRemaining / unitMs), unitCounts[unitName] = unitCount, msRemaining -= unitCount * unitMs;
        }
        if (options2.round) {
          var unitsRemainingBeforeRound = largest;
          for (i = 0; i < units.length; i++)
            if (unitName = units[i], unitCount = unitCounts[unitName], unitCount !== 0 && (unitsRemainingBeforeRound--, unitsRemainingBeforeRound === 0)) {
              for (var j = i + 1; j < units.length; j++) {
                var smallerUnitName = units[j], smallerUnitCount = unitCounts[smallerUnitName];
                unitCounts[unitName] += smallerUnitCount * unitMeasures[smallerUnitName] / unitMeasures[unitName], unitCounts[smallerUnitName] = 0;
              }
              break;
            }
          for (i = units.length - 1; i >= 0; i--)
            if (unitName = units[i], unitCount = unitCounts[unitName], unitCount !== 0) {
              var rounded = Math.round(unitCount);
              if (unitCounts[unitName] = rounded, i === 0) break;
              var previousUnitName = units[i - 1], previousUnitMs = unitMeasures[previousUnitName], 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], unitCount && result.push({ unitName, unitCount });
        return result;
      }
      function formatPieces(pieces, options2) {
        var language2 = getLanguage(options2);
        if (!pieces.length) {
          var units = options2.units, smallestUnitName = units[units.length - 1];
          return renderPiece(
            { unitName: smallestUnitName, unitCount: 0 },
            language2,
            options2
          );
        }
        var conjunction = options2.conjunction, serialComma = options2.serialComma, delimiter;
        has(options2, "delimiter") ? delimiter = options2.delimiter : has(language2, "delimiter") ? delimiter = language2.delimiter : delimiter = ", ";
        for (var renderedPieces = [], i = 0; i < pieces.length; i++)
          renderedPieces.push(renderPiece(pieces[i], language2, options2));
        return !conjunction || pieces.length === 1 ? renderedPieces.join(delimiter) : pieces.length === 2 ? renderedPieces.join(conjunction) : renderedPieces.slice(0, -1).join(delimiter) + (serialComma ? "," : "") + conjunction + renderedPieces.slice(-1);
      }
      function humanizer4(passedOptions) {
        var result = function(ms, humanizerOptions) {
          ms = Math.abs(ms);
          var options2 = assign({}, result, humanizerOptions || {}), pieces = getPieces(ms, options2);
          return formatPieces(pieces, options2);
        };
        return assign(
          result,
          {
            language: "en",
            spacer: " ",
            conjunction: "",
            serialComma: !0,
            units: ["y", "mo", "w", "d", "h", "m", "s"],
            languages: {},
            round: !1,
            unitMeasures: {
              y: 315576e5,
              mo: 26298e5,
              w: 6048e5,
              d: 864e5,
              h: 36e5,
              m: 6e4,
              s: 1e3,
              ms: 1
            }
          },
          passedOptions
        );
      }
      var humanizeDuration2 = assign(humanizer4({}), {
        getSupportedLanguages: function() {
          var result = [];
          for (var language2 in LANGUAGES)
            has(LANGUAGES, language2) && language2 !== "gr" && result.push(language2);
          return result;
        },
        humanizer: humanizer4
      });
      typeof define == "function" && define.amd ? define(function() {
        return humanizeDuration2;
      }) : typeof module != "undefined" && module.exports ? module.exports = humanizeDuration2 : this.humanizeDuration = humanizeDuration2;
    })();
  }
});

// src/utils/humanizer.js
var import_humanize_duration, setupHumanizer, init_humanizer = __esm({
  "src/utils/humanizer.js"() {
    import_humanize_duration = __toESM(require_humanize_duration()), setupHumanizer = () => (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"
        }
      }
    }), import_humanize_duration.default);
  }
});

// src/utils/journal.js
var replaceJournalEntry, makeJournalEntry, getLatestJournalEntryId, addJournalEntry, init_journal = __esm({
  "src/utils/journal.js"() {
    init_db();
    init_location();
    replaceJournalEntry = (entry, opts = {}) => {
      let {
        classes = ["short"],
        image = !1,
        text = "Hello, world!",
        time = !1,
        location: location2 = !1,
        callback = () => {
        }
      } = opts, date = !1;
      time && location2 ? date = `${time} - ${location2}` : time ? date = time : location2 && (date = location2), entry.outerHTML = `<div class="entry ${classes.join(" ")}" data-entry-id="journal-entry-${opts.id}">
  ${image ? `<div class="journalimage"><img src="${image}" border="0"></div>` : ""}
  <div class="journalbody">
    ${date ? `<div class="journaldate">${date}</div>` : ""}
    <div class="journaltext">${text}</div>
  </div>
</div>`, callback(entry);
    }, makeJournalEntry = (opts = {}) => {
      if (document.querySelector(`.journalEntries .entry[data-entry-id="journal-entry-${opts.id}"]`))
        return;
      let entry = document.querySelector(`.journalEntries .entry${opts.before ? `[data-entry-id="${opts.before}"]` : ""}`);
      if (!entry)
        return;
      let newEntry = entry.cloneNode(!0);
      entry.before(newEntry), replaceJournalEntry(newEntry, opts);
    }, getLatestJournalEntryId = () => {
      let entry = [...document.querySelectorAll(".journalEntries .entry")].find((search) => search.getAttribute("data-entry-id"));
      return entry ? entry.getAttribute("data-entry-id") : 0;
    }, addJournalEntry = (..._0) => __async(void 0, [..._0], function* (opts = {}) {
      var _a;
      let previousEntryData = yield dbGet("data", `journal-entry-${opts.id}`), previousEntryId = previousEntryData ? (_a = previousEntryData.data) == null ? void 0 : _a.previous : null;
      if (!previousEntryId) {
        let data = {
          id: `journal-entry-${opts.id}`,
          previous: getLatestJournalEntryId()
        };
        if (!opts.noDate) {
          if (!opts.time) {
            let now = /* @__PURE__ */ new Date();
            opts.time = `${now.getHours()}:${now.getMinutes()} ${now.getHours() >= 12 ? "pm" : "am"}`;
          }
          opts.location || (opts.location = getCurrentLocationName());
        }
        makeJournalEntry(opts), yield dbSet("data", data);
      }
      document.addEventListener("journal-entry", (e) => {
        if (e.detail && e.detail.getAttribute("data-entry-id") === previousEntryId) {
          if (document.querySelector(`.journalEntries .entry[data-entry-id="journal-entry-${opts.id}"]`))
            return;
          makeJournalEntry(__spreadProps(__spreadValues(__spreadValues({}, opts), previousEntryData.data), {
            id: `journal-entry-${opts.id}`,
            before: previousEntryId
          }));
        }
      });
    });
  }
});

// src/utils/links.js
var addItemToGameInfoBar, getCleanSubmenuLabel, addSubmenuItem, removeSubmenuItem, addSubmenuDivider, addIconToMenu, removeIconFromMenu, replaceIconInMenu, init_links = __esm({
  "src/utils/links.js"() {
    init_elements();
    addItemToGameInfoBar = (options2) => {
      var _a;
      let settings2 = Object.assign({}, {
        label: "",
        href: "",
        class: "",
        callback: null,
        external: !1,
        title: ""
      }, options2), safeLabel = settings2.label.replaceAll(/[^\da-z]/gi, "_").toLowerCase();
      if (document.querySelector(`#mh-custom-topmenu-${safeLabel}`))
        return;
      let menu = document.querySelector(".mousehuntHud-gameInfo");
      if (!menu)
        return;
      let item = makeElement("a", ["mousehuntHud-gameInfo-item", "mousehuntHud-custom-menu-item"]);
      if (item.id = `mh-custom-topmenu-${safeLabel}`, item.title = settings2.title || settings2.label, item.href = settings2.href || "#", makeElement("div", "name", (_a = settings2.label) != null ? _a : "", item), settings2.class && item.classList.add(settings2.class), settings2.callback && item.addEventListener("click", settings2.callback), settings2.external) {
        let externalLinkIconWrapper = makeElement("div", "mousehuntHud-menu");
        makeElement("div", "external_icon", "", externalLinkIconWrapper), item.append(externalLinkIconWrapper);
      }
      menu.insertBefore(item, menu.firstChild);
    }, getCleanSubmenuLabel = (label) => label.toLowerCase().replaceAll(/[^\da-z]/g, "-"), addSubmenuItem = (options2) => {
      let settings2 = Object.assign({}, {
        id: null,
        menu: "kingdom",
        label: "",
        icon: "https://www.mousehuntgame.com/images/ui/hud/menu/special.png",
        href: "",
        class: "",
        callback: null,
        external: !1
      }, options2), menuTarget = document.querySelector(`.mousehuntHud-menu .${settings2.menu}`);
      if (!menuTarget)
        return;
      menuTarget.classList.contains("hasChildren") || menuTarget.classList.add("hasChildren");
      let hasSubmenu = !0, submenu = menuTarget.querySelector("ul");
      submenu || (hasSubmenu = !1, submenu = document.createElement("ul"));
      let item = makeElement("li", "custom-submenu-item"), label = settings2.label.length > 0 ? settings2.label : settings2.id, cleanLabel = getCleanSubmenuLabel(label), exists = document.querySelector(`#custom-submenu-item-${cleanLabel}`);
      if (exists && exists.remove(), item.id = settings2.id ? `custom-submenu-item-${settings2.id}` : `custom-submenu-item-${cleanLabel}`, settings2.class) {
        let classes = settings2.class.split(" ");
        item.classList.add(...classes);
      }
      let link = document.createElement("a");
      link.href = settings2.href || "#", settings2.callback && link.addEventListener("click", (e) => {
        e.preventDefault(), settings2.callback();
      });
      let icon = makeElement("div", "icon");
      icon.style = `background-image: url(${settings2.icon});`, link.append(icon), makeElement("div", "name", settings2.label, link), settings2.external && (makeElement("div", "external_icon", "", link), link.target = "_blank", link.rel = "noopener noreferrer"), item.append(link), submenu.append(item), hasSubmenu || menuTarget.append(submenu);
    }, removeSubmenuItem = (id) => {
      let item = document.querySelector(`#custom-submenu-item-${getCleanSubmenuLabel(id)}`);
      item && item.remove();
    }, addSubmenuDivider = (menu, className = "") => {
      addSubmenuItem({
        menu,
        id: `mh-improved-submenu-divider-${className}`,
        label: "",
        icon: "",
        href: "",
        class: `mh-improved-submenu-divider ${className}`
      });
    }, addIconToMenu = (opts) => {
      let menu = document.querySelector(".mousehuntHeaderView-gameTabs .mousehuntHeaderView-dropdownContainer");
      if (!menu)
        return;
      let settings2 = Object.assign({}, {
        id: "",
        classname: "",
        href: !1,
        title: "",
        text: "",
        action: null,
        position: "prepend"
      }, opts);
      settings2.classname || (settings2.classname = settings2.id);
      let icon = makeElement("a", ["menuItem", settings2.classname], settings2.text);
      if (icon.id = settings2.id, settings2.href && (icon.href = settings2.href, icon.title = settings2.title), settings2.action && icon.addEventListener("click", (e) => {
        settings2.action(e, icon);
      }), settings2.id) {
        let exists = document.querySelector(`#${settings2.id}`);
        if (exists) {
          exists.replaceWith(icon);
          return;
        }
      }
      settings2.position === "prepend" ? menu.prepend(icon) : settings2.position === "append" && menu.append(icon);
    }, removeIconFromMenu = (id) => {
      let icon = document.querySelector(`#${id}`);
      icon && icon.remove();
    }, replaceIconInMenu = (id, opts) => {
      removeIconFromMenu(id), addIconToMenu(opts);
    };
  }
});

// src/utils/maps.js
var mapper, mapData, mapModel, getMapData, setMapData, getLastMaptain, setLastMaptain, cacheFinishedMap, showTravelConfirmation, showTravelConfirmationForMice, showTravelConfirmationNoDetails, addMHCTData, getCachedValue, setCachedValue, getArEl, getHighestArText, getArForMouse, getArText, getHighestArForMouse, getLocationForMouse, init_maps = __esm({
  "src/utils/maps.js"() {
    init_db();
    init_data();
    init_location();
    init_global();
    init_elements();
    mapper = (key = !1) => {
      if (key) {
        let mapperData = getGlobal("mapper");
        return !mapperData || !mapperData[key] ? !1 : mapperData[key];
      }
      return getGlobal("mapper");
    }, mapData = () => {
      let m = mapper();
      return m ? m.mapData : {};
    }, mapModel = () => {
      let m = mapper();
      return m ? m.mapModel : {};
    }, getMapData = (mapId = !1, strict = !1) => {
      if (mapId !== !1) {
        let sessionMap = sessionGet(`mh-improved-map-cache-${mapId}`);
        if (sessionMap)
          return sessionMap;
      }
      if (strict)
        return !1;
      let localStorageMap = sessionGet("map-cache-last-map");
      return localStorageMap || !1;
    }, setMapData = (mapId, theMapData) => {
      sessionSet(`mh-improved-map-cache-${mapId}`, theMapData), sessionSet("map-cache-last-map", theMapData);
    }, getLastMaptain = () => sessionGet("last-maptain"), setLastMaptain = (id) => {
      sessionSet("last-maptain", id);
    }, cacheFinishedMap = () => __async(void 0, null, function* () {
      let completedMap = user.quests.QuestRelicHunter.maps.find((map) => map.is_complete);
      if (!(completedMap != null && completedMap.map_id))
        return;
      let data = getMapData(completedMap.map_id);
      if (!data)
        return;
      let maptain = data.hunters.find((hunter) => hunter.captain);
      setLastMaptain(maptain.user_id || "");
    }), showTravelConfirmation = (environment, theMapModel) => {
      if (!(environment != null && environment.id) || !(environment != null && environment.type))
        return;
      let environmentData = theMapModel.getEnvironmentById(environment.id), environmentGoals = theMapModel.getGoalsByEnvironment(environment.id), noun = environmentData.num_missing_goals === 1 ? "mouse" : "mice";
      showTravelConfirmationForMice({
        title: `Travel to ${environmentData.name}?`,
        description: `This area has ${environmentData.num_missing_goals} missing ${noun}.`,
        environment: environment.type,
        templateData: {
          environment: environmentData,
          goals: environmentGoals
        }
      });
    }, showTravelConfirmationForMice = ({ title, description, environment, templateData }) => {
      let dialog = new hg.views.TreasureMapDialogView();
      dialog.setTitle(title), dialog.setDescription(description), dialog.setContent(hg.utils.TemplateUtil.renderFromFile("TreasureMapDialogView", "travel", templateData)), dialog.setCssClass("confirm"), dialog.setContinueAction("Travel", () => {
        app.pages.TravelPage.travel(environment), setTimeout(() => {
          jsDialog().hide();
        }, 250);
      }), hg.controllers.TreasureMapController.showDialog(dialog);
    }, showTravelConfirmationNoDetails = (environment) => __async(void 0, null, function* () {
      let templateData = {
        environment: {
          name: environment.name || environment.id || "",
          id: environment.id,
          type: environment.id,
          thumb: environment.image || environment.thumb,
          header: environment.header || environment.image || environment.thumb,
          goals: environment.goals || [],
          num_completed_goals: 0,
          num_total_goals: 0,
          hunters: [],
          is_current_environment: getCurrentLocation() === environment.id,
          can_travel: !0,
          num_missing_goals: 0
        },
        goals: []
      };
      showTravelConfirmationForMice({
        title: `Travel to ${environment.name}?`,
        description: "",
        environment: environment.type,
        templateData
      });
    }), addMHCTData = (mouse, appendTo, type = "mouse") => __async(void 0, null, function* () {
      if (appendTo.querySelector(`#mhct-${mouse.unique_id}-${type}`))
        return;
      let mhctJson = yield getArForMouse(mouse.unique_id, type), mhctDiv = makeElement("div", "mhct-data");
      mhctDiv.id = `mhct-${mouse.unique_id}-${type}`;
      let header = makeElement("div", "mhct-title");
      makeElement("span", "mhct-title-text", type === "item" ? "Drop Rates" : "Attraction Rates", header);
      let mhctLink = makeElement("a", "mhct-link", "View on MHCT \u2192");
      if (mhctLink.target = "_mhct", !mouse.name) {
        let nameEl = document.querySelector(".treasureMapView-highlight-name");
        mouse.name = nameEl ? nameEl.innerText : mouse.unique_id;
      }
      if (mhctLink.href = `https://api.mouse.rip/mhct-redirect${type === "item" ? "-item" : ""}/${mouse.unique_id}`, header.append(mhctLink), mhctDiv.append(header), !mhctJson.slice)
        return;
      let environments5 = yield getData("environments");
      if (mhctJson.slice(0, 5).forEach((mhct) => {
        let mhctRow = makeElement("div", "mhct-row"), location2 = makeElement("div", "mhct-location");
        makeElement("span", "mhct-location-text", mhct.location, location2), mhct.stage && makeElement("span", "mhct-stage", mhct.stage, location2);
        let environment = environments5.find((env) => env.name === mhct.location);
        environment || mhctRow.classList.add("mhct-row-no-env"), mhctRow.append(location2), makeElement("div", "mhct-bait", mhct.cheese, mhctRow);
        let mhctRate = Number.parseInt(type === "item" ? mhct.drop_pct : mhct.rate / 100, 10).toFixed(1);
        makeElement("div", "mhct-rate", `${mhctRate}%`, mhctRow), mhctRow.addEventListener("click", () => {
          var _a, _b;
          if (environment && environment.id === getCurrentLocation() && ((_b = (_a = app == null ? void 0 : app.pages) == null ? void 0 : _a.CampPage) != null && _b.showTrapSelector)) {
            app.pages.CampPage.showTrapSelector("bait"), jsDialog().hide();
            return;
          }
          let travelEnvironment = mapper("mapData").environments.find((env) => env.type === environment.id);
          showTravelConfirmation(travelEnvironment, mapModel());
        }), mhctDiv.append(mhctRow);
      }), mhctJson.length === 0) {
        let mhctRow = makeElement("div", "mhct-row");
        makeElement("div", "mhct-no-data", "No data available", mhctRow), mhctDiv.append(mhctRow);
      }
      appendTo.append(mhctDiv);
    }), getCachedValue = (key) => __async(void 0, null, function* () {
      var _a;
      let value = yield dbGet("ar-cache", key);
      return (_a = value == null ? void 0 : value.data) != null && _a.value ? value.data.value : null;
    }), setCachedValue = (key, value) => __async(void 0, null, function* () {
      yield dbSet("ar-cache", { id: key, value });
    }), getArEl = (id, type = "mouse") => __async(void 0, null, function* () {
      let ar = yield getArText(id, type), arType = "location";
      if (!ar) {
        if (ar = yield getHighestArText(id, type), !ar || ar.length === 0)
          return makeElement("div", ["mh-ui-ar", "mh-ui-no-ar"], "?");
        arType = "highest";
      }
      let arDifficulty = "easy";
      ar >= 99 ? arDifficulty = "guaranteed" : ar >= 59 ? arDifficulty = "super-easy" : ar >= 49 ? arDifficulty = "easy" : ar >= 39 ? arDifficulty = "medium" : ar >= 27 ? arDifficulty = "hard" : ar >= 14 ? arDifficulty = "kinda-hard" : ar >= 5 ? arDifficulty = "super-hard" : ar >= 2 ? arDifficulty = "extreme" : arDifficulty = "impossible", ar.toString().slice(-3) === ".00" && (ar = ar.toString().slice(0, -3));
      let arEl = makeElement("div", ["mh-ui-ar", `mh-ui-ar-${arType}`, `mh-ui-ar-${arDifficulty}`], `${ar}%`);
      return arEl.title = `Attraction rate: ${ar}%`, arEl.setAttribute("data-ar", ar), arEl;
    }), getHighestArText = (id, type = "mouse") => __async(void 0, null, function* () {
      let highest = yield getHighestArForMouse(id, type);
      return highest != null ? highest : !1;
    }), getArForMouse = (id, type = "mouse") => __async(void 0, null, function* () {
      let mhctJson = [], cacheKey = `${type}-${id}`, cachedAr = yield getCachedValue(cacheKey);
      if (cachedAr)
        return cachedAr;
      let isItem = type === "item", mhctPath = isItem ? "mhct-item" : "mhct", mhctData = [], data = mapData() || {}, mapType = (data == null ? void 0 : data.map_type) || "", url = `https://api.mouse.rip/${mhctPath}/${id}`;
      mapType.toLowerCase().includes("halloween") && (url = `https://api.mouse.rip/${mhctPath}/${id}-hlw_22`);
      try {
        mhctData = yield fetch(url, { headers: getHeaders() });
      } catch (error) {
        console.error("Error fetching MHCT data:", error), yield new Promise((resolve) => setTimeout(resolve, 500));
        try {
          mhctData = yield fetch(url, { headers: getHeaders() });
        } catch (errorRetry) {
          return console.error("Error fetching MHCT data:", errorRetry), [];
        }
      }
      if (!mhctData.ok)
        return [];
      if (mhctJson = yield mhctData.json(), !mhctJson || mhctJson.length === 0)
        return [];
      if (isItem)
        for (let rate of mhctJson)
          rate.rate = Number.parseInt(rate.drop_pct * 100), delete rate.drop_ct;
      return mhctJson.error ? [] : (mhctJson = mhctJson.filter((rate) => rate.rate === 0 ? !1 : (rate.rate === 9999 && (rate.rate = 1e4), !0)), yield setCachedValue(cacheKey, mhctJson), mhctJson);
    }), getArText = (id, type = "mouse") => __async(void 0, null, function* () {
      let rates = yield getArForMouse(id, type);
      if (!rates || rates.length === 0)
        return !1;
      let rate = rates[0];
      return rate ? (rate.rate / 100).toFixed(2) : !1;
    }), getHighestArForMouse = (id, type = "mouse") => __async(void 0, null, function* () {
      let rates = yield getArForMouse(id, type);
      if (!rates || rates.length === 0 || Object.keys(rates).length === 0 && rates.constructor === Object || !rates.sort)
        return 0;
      rates.sort((a, b) => b.rate - a.rate);
      let rate = rates[0];
      return rate ? rate.rate / 100 : 0;
    }), getLocationForMouse = (mouse, type = "mouse") => __async(void 0, null, function* () {
      let environments5 = yield getData("environments"), rates = yield getArForMouse(mouse, type);
      if (!rates || rates.length === 0)
        return !1;
      let rate = rates[0];
      if (!rate)
        return !1;
      let originalName = rate.location, twistedMap = {
        "Twisted Garden": "Living Garden",
        "Sand Crypts": "Sand Dunes",
        "Cursed City": "Lost City"
      };
      twistedMap[rate.location] && (rate.location = twistedMap[rate.location]);
      let environment = environments5.find((env) => env.name === rate.location);
      return environment ? (environment.name = originalName, environment) : !1;
    });
  }
});

// src/utils/styles/page-error.css
var page_error_default, init_page_error = __esm({
  "src/utils/styles/page-error.css"() {
    page_error_default = `body.PageError .pageFrameView,body.PageLockError .pageFrameView{grid-template-rows:[page-start] auto [page-end];grid-template-columns:[first] auto [content-start] 400px [content-end] auto [last]}body.PageError .pageFrameView-column.right,body.PageLockError .pageFrameView-column.right{background:#bad4ed url(https://www.mousehuntgame.com/images/ui/backgrounds/app_frame_right.gif) repeat-y 0% 0%!important;border:none}body.PageError .pageFrameView-column.left,body.PageLockError .pageFrameView-column.left{background:#bad4ed url(https://www.mousehuntgame.com/images/ui/backgrounds/app_frame_left.gif) repeat-y 100% 0%!important;border:none}body.PageError,body.PageLockError{background:url(https://www.mousehuntgame.com/images/map/login-page/standard/1.jpg) no-repeat top center}body.PageError .pageFrameView-content,body.PageLockError .pageFrameView-content{min-height:calc(80vh - 110px);background:transparent}body.PageError .pageFrameView-footer,body.PageLockError .pageFrameView-footer{display:flex;flex-flow:row wrap;row-gap:20px;align-items:center;justify-content:center;background-color:#ffffffb3;transition:.3s}body.PageError .pageFrameView-footer-linksContainer,body.PageLockError .pageFrameView-footer-linksContainer{flex:0 0 100%}body.PageError .pageFrameView-footer a img,body.PageLockError .pageFrameView-footer a img{opacity:.4;transition:.3s;transform:scale(.8)}body.PageError .pageFrameView-footer-links.terms,body.PageLockError .pageFrameView-footer-links.terms{text-align:center}body.PageError .pageFrameView-footer a:hover img,body.PageLockError .pageFrameView-footer a:hover img{opacity:1;transform:scale(1)}body.PageError .maintenanceMessage:hover:after,body.PageLockError .maintenanceMessage:hover:after{transform:rotate(-3deg) scale(1.2)}body.PageError .pageFrameView-contentContainer,body.PageLockError .pageFrameView-contentContainer{background:none}body.PageError .container,body.PageLockError .container{background-color:transparent;box-shadow:none}@media screen and (min-width: 501px){body.PageError .pageFrameView,body.PageLockError .pageFrameView{grid-template-columns:[first] auto [content-start] 500px [content-end] auto [last]}}@media only screen and (min-width: 801px){body.PageError .pageFrameView,body.PageLockError .pageFrameView{grid-template-columns:[first] auto [content-start] 800px [content-end] auto [last]}}@media only screen and (max-width: 810px){body.PageError.noSidebar .pageFrameView,body.PageLockError.noSidebar .pageFrameView{background:none!important}}div[style*="margin:12px 0px 12px 0px; padding:12px; border:1px solid #ccc;"]{margin:10px!important;margin-top:20vh!important;background-color:#ffffffd9;border:2px solid #000!important}div[style*="float:left"]{width:230px;height:230px;background-image:url(https://i.mouse.rip/error-mouse.png)}div[style*="float:left"] img{display:none}.PageError div[style*="float:left"]{background:none}.PageError div[style*="float:left"] img{display:block;mix-blend-mode:darken}div[style*="margin:24px 0px 0px 230px;"]{display:flex;flex-direction:column;justify-content:space-evenly;float:none;height:190px}.PageLockError div[style*="float:left"]:hover{transform:translate(10px)}.PageLockError div[style*="float:left"]:active{transform:translate(20px)}
`;
  }
});

// src/utils/styles/errors.css
var errors_default, init_errors = __esm({
  "src/utils/styles/errors.css"() {
    errors_default = `.mousehunt-improved-error{position:fixed;bottom:50px;left:5%;z-index:20;display:flex;flex-direction:column;align-items:stretch;max-width:375px;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}textarea.mousehunt-improved-error-message{min-height:50px;font-size:11px;background-color:#f2c4c4;border-color:#cf7676}.mousehunt-improved-error-close{position:absolute;top:5px;right:5px;color:#fff;background-color:#9f2223;border:1px solid #4e2727;border-radius:1px}.mousehunt-improved-error-close:hover,.mousehunt-improved-error-close:focus{background-color:#c22}
`;
  }
});

// src/utils/styles/page-maintenance.css
var page_maintenance_default, init_page_maintenance = __esm({
  "src/utils/styles/page-maintenance.css"() {
    page_maintenance_default = `body.PageMaintenance .pageFrameView{grid-template-rows:[page-start] auto [page-end];grid-template-columns:[first] auto [content-start] 400px [content-end] auto [last]}body.PageMaintenance .pageFrameView-column.right{background:#bad4ed url(https://www.mousehuntgame.com/images/ui/backgrounds/app_frame_right.gif) repeat-y 0% 0%!important;border:none}body.PageMaintenance .pageFrameView-column.left{background:#bad4ed url(https://www.mousehuntgame.com/images/ui/backgrounds/app_frame_left.gif) repeat-y 100% 0%!important;border:none}body.PageMaintenance{background:url(https://www.mousehuntgame.com/images/map/login-page/standard/1.jpg) no-repeat top center}body.PageMaintenance .pageFrameView-content{min-height:calc(100vh - 110px);background:transparent}body.PageMaintenance .pageFrameView-footer{display:flex;flex-flow:row wrap;row-gap:20px;align-items:center;justify-content:center;background-color:#ffffffb3;transition:.3s}body.PageMaintenance .pageFrameView-footer-linksContainer{flex:0 0 100%}body.PageMaintenance .pageFrameView-footer a img{opacity:.4;transition:.3s;transform:scale(.8)}body.PageMaintenance .pageFrameView-footer-links.terms{text-align:center}body.PageMaintenance .pageFrameView-footer a:hover img{opacity:1;transform:scale(1)}body.PageMaintenance .maintenanceBody{position:relative;min-height:unset;background:transparent;transition:background-size .3s;animation:mh-improved-hue-rotate 20s 20s linear infinite}body.PageMaintenance .maintenanceMessage{background-color:transparent}body.PageMaintenance .maintenanceMessage:after{position:absolute;top:0;left:0;width:150px;height:150px;content:"";background:url(https://i.mouse.rip/maintenance-mousey.png) no-repeat center / contain;transition:.3s;transform-origin:center}body.PageMaintenance .maintenanceMessage:hover:after{transform:rotate(-3deg) scale(1.2)}body.PageMaintenance .maintenanceHeader{background-image:url(https://i.mouse.rip/maintenance.png)}@keyframes mh-improved-hue-rotate{0%{filter:hue-rotate(0deg)}50%{filter:hue-rotate(360deg)}to{filter:hue-rotate(0deg)}}body.PageMaintenance .maintenanceDebugInfo{position:absolute;right:10px;bottom:10px}body.PageMaintenance .pageFrameView-contentContainer{background:none}body.PageMaintenance .container{background-color:transparent;box-shadow:none}body.PageMaintenance .maintenanceContainer{background-color:#ffffffd9;border:1px solid #000;border-radius:5px;box-shadow:0 1px 3px #383838}@media screen and (min-width: 501px){body.PageMaintenance .pageFrameView{grid-template-columns:[first] auto [content-start] 500px [content-end] auto [last]}body.PageMaintenance .maintenanceMessage:after{width:175px;height:175px}}@media only screen and (min-width: 801px){body.PageMaintenance .pageFrameView{grid-template-columns:[first] auto [content-start] 800px [content-end] auto [last]}body.PageMaintenance .maintenanceMessage:after{top:-80px;left:-10px;width:300px;height:300px}}@media only screen and (max-width: 810px){body.PageMaintenance.noSidebar .pageFrameView{background:none!important}}
`;
  }
});

// src/utils/messages.js
var showErrorMessage, showSuccessMessage, showLoadingError, maybeDoMaintenance, showLoadingPopupError, showLoadingPopup, init_messages = __esm({
  "src/utils/messages.js"() {
    init_debug();
    init_elements();
    init_page_error();
    init_errors();
    init_page_maintenance();
    showErrorMessage = (options2) => {
      let {
        message,
        append,
        before = !1,
        after = !1,
        classname = [],
        type = "error"
      } = options2, typeClass = `mh-ui-${type}-message`, existing = document.querySelector(`.${typeClass}`);
      existing && existing.remove();
      let error = makeElement("div", [`mh-ui-${type}-message`, "mh-ui-fade", classname], message);
      append && (before ? append.before(error) : after ? append.after(error) : append.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 = (opts) => {
      opts.type = "success", showErrorMessage(opts);
    };
    hadAddedErrorStyles = !1;
    showLoadingError = (e) => {
      debug("Error loading MouseHunt Improved:", e);
      let errorElement = makeElement("div", "mousehunt-improved-error");
      if (makeElement("h1", "mousehunt-improved-error-title", "Error loading MouseHunt Improved", errorElement), e && e.message && e.stack) {
        let errorText = makeElement("textarea", "mousehunt-improved-error-message");
        errorText.value = `${e.message}

${e.stack}`, errorElement.append(errorText);
      }
      makeElement("p", "mousehunt-improved-error-message", '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>.', errorElement);
      let closeButton = makeElement("button", "mousehunt-improved-error-close", "Close");
      if (closeButton.addEventListener("click", () => {
        errorElement.remove();
      }), errorElement.append(closeButton), document.body.append(errorElement), hadAddedErrorStyles)
        return;
      let errorStylesEl = makeElement("style", "mh-improved-error-styles", errors_default);
      document.head.append(errorStylesEl), hadAddedErrorStyles = !0;
    }, maybeDoMaintenance = () => {
      if (document.querySelector("body.PageMaintenance")) {
        let maintenanceStylesEl = makeElement("style", "mh-improved-maintenance-styles", page_maintenance_default);
        document.head.append(maintenanceStylesEl);
      }
      let errorLockPage = document.querySelector("body.PageLockError"), errorPage = document.querySelector("body.PageError");
      if (errorLockPage || errorPage) {
        let errorPageStylesEl = makeElement("style", "mh-improved-error-page-styles", page_error_default);
        document.head.append(errorPageStylesEl);
      }
    }, showLoadingPopupError = (options2) => {
      let popup = new jsDialog();
      popup.setTemplate("error"), popup.setAttributes({ className: "error" }), popup.addToken("{*title*}", options2.title), popup.addToken("{*content*}", options2.content || ""), popup.show();
    }, showLoadingPopup = (title) => {
      let popup = new jsDialog();
      popup.setTemplate("loading"), popup.setAttributes({ className: "loading mh-improved-loading" }), popup.show();
      let element = document.querySelector("#overlayPopup .jsDialog .title");
      if (!element)
        return {
          popup,
          title: null,
          text: null,
          /**
           * Set the text of the loading popup.
           */
          setText: () => {
          },
          /**
           * Set the title of the loading popup.
           */
          setTitle: () => {
          },
          /**
           * Show the loading popup.
           */
          show: () => {
          },
          /**
           * Hide the loading popup.
           */
          hide: () => {
          }
        };
      element.textContent = title;
      let loadingText = makeElement("div", "loading-text", "", element);
      return {
        popup,
        title: element,
        text: loadingText,
        /**
         * Set the text of the loading popup.
         *
         * @param {string} newText The new text to set.
         */
        setText: (newText) => {
          loadingText.textContent = newText;
        },
        /**
         * Set the title of the loading popup.
         *
         * @param {string} newTitle The new title to set.
         */
        setTitle: (newTitle) => {
          element.textContent = newTitle;
        },
        /**
         * Show the loading popup.
         */
        show: () => {
          popup.show();
        },
        /**
         * Hide the loading popup.
         */
        hide: () => {
          popup.hide();
        }
      };
    };
  }
});

// src/utils/settings-markup.js
var saveSettingDirectAndToggleClass, addSettingsTab, addSettingsTabOnce, addSetting, makeToggle, makeSettingToggle, makeSettingRowSelect, makeSettingInput, makeSettingTextArea, makeSettingMultiToggle, makeSettingBlank, addSettingOnce, fadeInTimeout, fadeOutTimeout, removeTimeout, addSettingRefreshReminder, addSettingForModule, init_settings_markup = __esm({
  "src/utils/settings-markup.js"() {
    init_event_registry();
    init_page();
    init_settings();
    init_elements();
    init_events();
    init_messages();
    saveSettingDirectAndToggleClass = (node, key, value, identifier = "mh-utils-settings") => {
      node.parentNode.parentNode.classList.add("busy"), saveSettingDirect(key, value, identifier), doEvent2("mh-improved-settings-changed", {
        key,
        value,
        tab: identifier,
        type: "toggle"
      }), doEvent2(`mh-improved-settings-changed-${key}`, value), node.parentNode.parentNode.classList.remove("busy"), node.parentNode.parentNode.classList.add("completed"), setTimeout(() => {
        node.parentNode.parentNode.classList.remove("completed");
      }, 1e3);
    }, addSettingsTab = (identifier = "userscript-settings", name = "Userscript Settings") => (addSettingsTabOnce(identifier, name), onNavigation(() => addSettingsTabOnce(identifier, name), {
      page: "preferences"
    }), identifier), addSettingsTabOnce = (identifier = "userscript-settings", name = "Userscript Settings") => {
      if (getCurrentPage() !== "preferences" || document.querySelector(`#${identifier}`))
        return;
      let tabsContainer = document.querySelector(".mousehuntHud-page-tabHeader-container");
      if (!tabsContainer)
        return;
      let tabsContentContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
      if (!tabsContentContainer)
        return;
      identifier = identifier.replaceAll(/[^\w-]/gi, "");
      let 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;");
      let settingsTabText = document.createElement("span");
      settingsTabText.innerText = name, settingsTab.append(settingsTabText), tabsContainer.append(settingsTab);
      let settingsTabContent = document.createElement("div");
      if (settingsTabContent.classList.add("mousehuntHud-page-tabContent", "game_settings", identifier), settingsTabContent.setAttribute("data-tab", identifier), tabsContentContainer.append(settingsTabContent), identifier === getCurrentTab()) {
        let tab = document.querySelector(`#${identifier}`);
        tab && tab.click();
      }
    }, addSetting = (options2) => (onNavigation(() => addSettingOnce(options2), {
      page: "preferences"
    }), addSettingOnce(options2)), makeToggle = (toggleKey, toggleDefaultValue, toggleTab, settingRow = !1) => {
      let settingRowInputCheckbox = makeElement("div", "mousehuntSettingSlider"), currentSetting = getSettingDirect(toggleKey, null, toggleTab);
      return (currentSetting || currentSetting === null && toggleDefaultValue) && (settingRowInputCheckbox.classList.add("active"), settingRow && settingRow.classList.add("active")), settingRowInputCheckbox.onclick = (event) => {
        let isSettingActive = event.target.classList.contains("active");
        event.target.classList.toggle("active"), settingRow && settingRow.classList.toggle("active"), saveSettingDirectAndToggleClass(event.target, toggleKey, !isSettingActive, toggleTab);
      }, settingRowInputCheckbox;
    }, makeSettingToggle = ({ key, defaultValue, tab, settings: settings2 }) => {
      let settingRowInput = makeElement("div", "settingRow-action-inputContainer"), settingRowInputCheckbox = makeToggle(key, defaultValue, tab, settings2);
      return settingRowInput.append(settingRowInputCheckbox), settingRowInput;
    }, makeSettingRowSelect = ({ key, tab, defaultValue, settingSettings }) => {
      let settingRowInputWrapper = makeElement("div", "settingRow-action-inputContainer"), settingRowInput = makeElement("div", "settingRow-action-inputContainer"), settingRowInputDropdown = document.createElement("div");
      settingRowInputDropdown.classList.add("inputBoxContainer"), settingSettings.type === "multi-select" && (settingRowInputDropdown.classList.add("multiSelect"), settingRowInput.classList.add("multiSelect", "select"));
      let amount = 1;
      settingSettings.type === "multi-select" && settingSettings.number && (amount = settingSettings.number);
      let makeOption = (option, foundSelected, currentSetting, dValue, i) => {
        if (option.seperator)
          return {
            settingRowInputDropdownSelectOption: makeElement("hr"),
            foundSelected
          };
        let settingRowInputDropdownSelectOption = document.createElement("option");
        return settingRowInputDropdownSelectOption.value = option.value, settingRowInputDropdownSelectOption.textContent = option.name, settingRowInputDropdownSelectOption.disabled = option.disabled || !1, (currentSetting && currentSetting === option.value || !foundSelected && dValue && dValue[i] && dValue[i].value === option.value) && (settingRowInputDropdownSelectOption.selected = !0, foundSelected = !0), {
          settingRowInputDropdownSelectOption,
          foundSelected
        };
      };
      for (let i = 0; i < amount; i++) {
        let settingRowInputDropdownSelect = document.createElement("select");
        settingRowInputDropdownSelect.classList.add("inputBox"), settingSettings.type === "multi-select" && settingRowInputDropdownSelect.classList.add("multiSelect");
        let currentSetting = getSetting(`${key}-${i}`, null, tab), foundSelected = !1;
        settingSettings.options.forEach((option) => {
          if (option.value === "group") {
            let settingRowInputDropdownSelectOptgroup = document.createElement("optgroup");
            settingRowInputDropdownSelectOptgroup.label = option.name, option.options.forEach((optgroupOption) => {
              let result = makeOption(optgroupOption, foundSelected, currentSetting, defaultValue, i);
              foundSelected = result.foundSelected, settingRowInputDropdownSelectOptgroup.append(result.settingRowInputDropdownSelectOption);
            }), settingRowInputDropdownSelect.append(settingRowInputDropdownSelectOptgroup);
          } else {
            let result = makeOption(option, foundSelected, currentSetting, defaultValue, i);
            foundSelected = result.foundSelected, settingRowInputDropdownSelect.append(result.settingRowInputDropdownSelectOption);
          }
        }), settingRowInputDropdown.append(settingRowInputDropdownSelect);
        let timeout = null;
        settingRowInputDropdownSelect.onchange = (event) => {
          let parent = settingRowInputDropdownSelect.parentNode.parentNode.parentNode;
          parent.classList.add("inputDropdownWrapper"), parent.classList.add("busy"), saveSettingDirect(`${key}-${i}`, event.target.value, tab), doEvent2("mh-improved-settings-changed", {
            key: `${key}-${i}`,
            value: event.target.value,
            tab,
            type: "multi-select"
          }), parent.classList.remove("busy"), parent.classList.add("completed"), clearTimeout(timeout), timeout = setTimeout(() => {
            parent.classList.remove("completed");
          }, 1e3);
        }, settingRowInput.append(settingRowInputDropdown), settingRowInputWrapper.append(settingRowInput);
      }
      return settingRowInputWrapper;
    }, makeSettingInput = ({ key, tab, defaultValue }) => {
      let settingRowInput = makeElement("div", ["settingRow-action-inputContainer", "inputText"]), settingRowInputText = makeElement("input", "inputBox");
      settingRowInputText.value = getSettingDirect(key, defaultValue, tab);
      let inputSaveButton = makeElement("button", ["mousehuntActionButton", "tiny", "inputSaveButton"]);
      makeElement("span", "", "Save", inputSaveButton);
      let timeout = null;
      return inputSaveButton.addEventListener("click", (event) => {
        let 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), doEvent2("mh-improved-settings-changed", {
          key,
          value: settingRowInputText.value,
          tab,
          type: "input"
        }), parent.classList.remove("busy"), parent.classList.add("completed"), clearTimeout(timeout), timeout = setTimeout(() => {
          parent.classList.remove("completed");
        }, 1e3);
      }), settingRowInput.classList.add("inputText"), settingRowInput.append(settingRowInputText), settingRowInput.append(inputSaveButton), settingRowInput;
    }, makeSettingTextArea = ({ key, tab, defaultValue }) => {
      let settingRowInput = makeElement("div", ["settingRow-action-inputContainer", "textarea"]), settingRowInputText = makeElement("textarea", "inputBox");
      settingRowInputText.value = getSetting(key, defaultValue);
      let inputSaveButton = makeElement("button", ["mousehuntActionButton", "tiny", "inputSaveButton"]);
      makeElement("span", "", "Save", inputSaveButton);
      let timeout = null;
      return inputSaveButton.addEventListener("click", (event) => {
        let parent = event.target.parentNode.parentNode.parentNode;
        parent.classList.add("inputDropdownWrapper"), parent.classList.add("inputTextWrapper"), parent.classList.remove("completed"), parent.classList.add("busy"), saveSettingDirect(key, settingRowInputText.value, tab), doEvent2("mh-improved-settings-changed", {
          key,
          value: settingRowInputText.value,
          tab,
          type: "textarea"
        }), parent.classList.remove("busy"), parent.classList.add("completed"), clearTimeout(timeout), timeout = setTimeout(() => {
          parent.classList.remove("completed");
        }, 1e3), addSettingRefreshReminder(key);
      }), settingRowInput.append(settingRowInputText), settingRowInput.append(inputSaveButton), settingRowInput;
    }, makeSettingMultiToggle = ({ key, tab, settingSettings }) => {
      let multiToggleWrapper = makeElement("div", "multi-toggle"), multiToggleRow = makeElement("div", ["PagePreferences__settingsList", "multi-toggle-row"]);
      return settingSettings.options.forEach((option) => {
        let optionSettingRow = makeElement("div", "PagePreferences__settingsList"), optionSettingRowLabel = makeElement("div", "PagePreferences__settingLabel");
        makeElement("div", "PagePreferences__settingName", option.name, optionSettingRowLabel), optionSettingRow.append(optionSettingRowLabel);
        let optionSettingRowAction = makeElement("div", "PagePreferences__settingAction"), optionSettingRowInput = makeElement("div", "settingRow-action-inputContainer"), settingRowInputCheckbox = makeToggle(`${key}-${option.id}`, option.value, tab);
        optionSettingRowInput.append(settingRowInputCheckbox), optionSettingRowAction.append(optionSettingRowInput), optionSettingRow.append(optionSettingRowAction), multiToggleRow.append(optionSettingRow);
      }), multiToggleWrapper.append(multiToggleRow), multiToggleWrapper;
    }, makeSettingBlank = ({ section, key }) => {
      let action = makeElement("div", ["blank", "blankSetting"], "");
      return action.id = `${section.id}-${key}-blank`, action;
    }, addSettingOnce = (options2) => {
      let name = options2.name, key = options2.id, defaultValue = options2.default || null, description = options2.description || "", tab = "mousehunt-improved-settings", settingSettings = options2.subSettings || null, moduleType = options2.moduleType || null, container = document.querySelector(`.mousehuntHud-page-tabContent.${tab}`), originalContainer = container;
      if (!container)
        return !1;
      let section = {
        id: options2.module.id,
        name: options2.module.name || "",
        description: options2.module.description || "",
        subSetting: options2.module.subSetting || !1
      }, leftSide = container.querySelector(".PagePreferences__settingsLeft");
      leftSide || (leftSide = makeElement("div", "PagePreferences__settingsLeft"), container.append(leftSide), container.classList.add("two-column"));
      let rightSide = container.querySelector(".PagePreferences__settingsRight");
      if (rightSide || (rightSide = makeElement("div", "PagePreferences__settingsRight"), container.append(rightSide), container.classList.add("two-column")), moduleType && getSetting("experiments.new-settings-styles-columns", !1))
        switch (moduleType) {
          case "better":
          case "design":
          case "element-hiding":
          case "advanced":
            container = leftSide;
            break;
          case "feature":
          case "location-hud":
          case "beta":
            container = rightSide;
            break;
          default:
            container = originalContainer;
            break;
        }
      section.id = `${tab}-${section.id.replaceAll(/[^\w-]/gi, "")}`;
      let sectionExists = document.querySelector(`#${section.id}-wrapper`);
      if (!sectionExists) {
        let title = makeElement("div", "PagePreferences__section");
        title.id = section.id;
        let titleSection = makeElement("div", "PagePreferences__title");
        if (makeElement("h3", "PagePreferences__titleText", section.name, titleSection), title.append(titleSection), container.append(title), section.description) {
          let settingSubHeader = makeElement("h4", ["settings-subheader", "mh-utils-settings-subheader"], section.description);
          title.after(settingSubHeader);
        }
        let sectionWrapper = makeElement("div", "PagePreferences__sectionWrapper");
        sectionWrapper.id = `${section.id}-wrapper`, container.append(sectionWrapper), title.append(sectionWrapper), sectionExists = document.querySelector(`#${section.id}-wrapper`);
      }
      let keySafe = key.replaceAll(".", "-"), settingExists = document.querySelector(`#${section.id}-${keySafe}`);
      if (settingExists)
        return settingExists;
      let settings2 = makeElement("div", ["PagePreferences__settingsList"]);
      settings2.id = `${section.id}-${keySafe}`, section.subSetting ? settings2.classList.add("PagePreferences__subSetting") : settings2.classList.add(`PagePreferences__settingsList-${keySafe}`, `PagePreferences__settingsList-${section.id}`), settingSettings && settingSettings.type && settings2.classList.add(`PagePreferences__settingsList-${settingSettings.type}`);
      let settingRow = makeElement("div", "PagePreferences__setting"), settingRowLabel = makeElement("div", "PagePreferences__settingLabel"), settingName = makeElement("div", "PagePreferences__settingName"), settingNameText = makeElement("a", "PagePreferences__settingNameText", name);
      settingNameText.href = `#${section.id}-${keySafe}`, settingNameText.setAttribute("data-setting", key), settingNameText.setAttribute("data-tab", tab), settingNameText.setAttribute("data-default", JSON.stringify(defaultValue)), settingName.append(settingNameText), section.subSetting || settingNameText.addEventListener("click", (event) => {
        event.preventDefault(), navigator.clipboard.writeText(`${window.location.href}#${section.id}-${keySafe}`), showSuccessMessage({
          message: "Copied link to clipboard",
          append: settingNameText,
          after: !0,
          classname: "setting-link-copied"
        });
      });
      let defaultSettingText = makeElement("div", "PagePreferences__settingDefault");
      settingSettings && (settingSettings.type === "select" || settingSettings.type === "multi-select") ? defaultSettingText.textContent = defaultValue.map((item) => item.name).join(", ") : defaultSettingText.textContent = defaultValue ? "Enabled" : "Disabled", defaultSettingText.textContent = `Default setting: ${defaultSettingText.textContent}`;
      let settingDescription = makeElement("div", "PagePreferences__settingDescription");
      settingDescription.innerHTML = description, description.trim() === "" && settingDescription.classList.add("empty-description"), settingRowLabel.append(settingName), settingRowLabel.append(defaultSettingText), settingRowLabel.append(settingDescription);
      let settingRowAction = makeElement("div", "PagePreferences__settingAction");
      return settingSettings ? settingSettings.type === "select" || settingSettings.type === "multi-select" ? settingRowAction.append(makeSettingRowSelect({ key, tab, defaultValue, settingSettings })) : settingSettings.type === "input" ? settingRowAction.append(makeSettingInput({ key, tab, defaultValue })) : settingSettings.type === "textarea" ? settingRowAction.append(makeSettingTextArea({ key, tab, defaultValue })) : settingSettings.type === "multi-toggle" ? settingRowAction.append(makeSettingMultiToggle({ key, tab, settingSettings })) : settingSettings.type === "blank" ? settingRowAction.append(makeSettingBlank({ section, key })) : settingRowAction.append(makeSettingToggle({ key, defaultValue, tab, settings: settings2 })) : settingRowAction.append(makeSettingToggle({ key, defaultValue, tab, settings: settings2 })), settingRow.append(settingRowLabel), settingRow.append(settingRowAction), settings2.append(settingRow), sectionExists.append(settings2), doEvent2("mh-improved-setting-added-to-page", {
        name,
        key,
        defaultValue,
        description,
        section,
        tab,
        settings: settings2
      }), settings2;
    }, fadeInTimeout = null, fadeOutTimeout = null, removeTimeout = null, addSettingRefreshReminder = () => {
      let refreshMessage = document.querySelector("#mh-utils-settings-refresh-message");
      if (!refreshMessage) {
        let 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", newMessageEl.addEventListener("click", () => {
          window.location.reload();
        }), document.querySelector("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);
    };
    onEvent("mh-improved-settings-changed", addSettingRefreshReminder);
    addSettingForModule = (module) => __async(void 0, null, function* () {
      for (let submodule of module.modules) {
        let moduleSettingRow = null;
        if (!submodule.alwaysLoad && !submodule.beta && (moduleSettingRow = yield addSetting({
          moduleType: module.id,
          name: submodule.name,
          id: submodule.id,
          group: submodule.group,
          default: submodule.default,
          description: submodule.description,
          module
        })), submodule.settings) {
          let subSettingsGroup = yield submodule.settings(module);
          if (!subSettingsGroup)
            continue;
          for (let subSettings of subSettingsGroup) {
            let subSettingRow = yield addSetting({
              moduleType: module.id,
              name: subSettings.title,
              id: subSettings.id,
              group: submodule.group || !1,
              default: subSettings.default,
              description: subSettings.description,
              module: __spreadProps(__spreadValues({}, module), {
                subSetting: !0
              }),
              subSettings: subSettings.settings
            });
            moduleSettingRow && subSettingRow && moduleSettingRow.append(subSettingRow);
          }
        }
        doEvent2("mh-improved-settings-added", { module });
      }
    });
  }
});

// src/utils/styles.js
var addStylesDirect, addStyles, addModuleStyles, removeStyles, addHudStyles, removeHudStyles, addExternalStyles, init_styles = __esm({
  "src/utils/styles.js"() {
    init_settings();
    init_event_registry();
    addStylesDirect = (styles8, identifier = "mh-utils-custom-styles", once = !1) => {
      identifier = `mh-utils-${identifier}`;
      let existingStyles = document.querySelector(`#${identifier}`);
      if (existingStyles)
        return once || (existingStyles.innerHTML += styles8), existingStyles;
      let style = document.createElement("style");
      return style.id = identifier, style.innerHTML = styles8, document.head.append(style), style;
    }, addStyles = (styles8, module = !1, identifier = "mh-improved-styles") => {
      if (!module)
        throw new Error("Module ID is required for adding module styles.", module);
      let key = `${identifier}-${module}`, stylesEl = addModuleStyles(styles8, key, !0);
      return onEvent(`mh-improved-settings-changed-${module}`, (enabled) => {
        enabled ? stylesEl = addModuleStyles(styles8, key, !0) : stylesEl && (stylesEl.remove(), stylesEl = null);
      }), stylesEl;
    }, addModuleStyles = (styles8, identifier = "mh-improved-styles", replace2 = !1) => {
      let existingStyles = document.querySelector(`#${identifier}`);
      if (styles8 = Array.isArray(styles8) ? styles8.join(`
`) : styles8, existingStyles)
        return existingStyles.innerHTML = replace2 ? styles8 : existingStyles.innerHTML + styles8, existingStyles;
      let style = document.createElement("style");
      return style.id = identifier, style.innerHTML = styles8, document.head.append(style), style;
    }, removeStyles = (module = !1, identifier = "mh-improved-styles") => {
      if (!module)
        throw new Error("Module ID is required for adding module styles.", module);
      let key = `${identifier}-${module}`, stylesEl = document.querySelector(`#${key}`);
      stylesEl && stylesEl.remove();
    }, addHudStyles = (styles8) => __async(void 0, null, function* () {
      removeHudStyles(), addStyles(styles8, "mh-improved-styles-location-hud");
    }), removeHudStyles = () => {
      document.querySelectorAll(".mh-improved-styles-location-hud").forEach((style) => {
        style.remove();
      });
    }, addExternalStyles = (url) => __async(void 0, null, function* () {
      let identifier = url.split("/").pop().split(".").shift(), existingStyles = document.querySelector(`#${identifier}-external`);
      if (existingStyles)
        return existingStyles;
      let style = document.createElement("link");
      return style.id = `${identifier}-external`, style.rel = "stylesheet", style.href = `${url}?v=${mhImprovedVersion}-external`, getSetting("debug.disable-cache") && (style.href = `${style.href.replace("static.mouse.rip", "api.mouse.rip")}&${Date.now()}`), document.head.append(style), style;
    });
  }
});

// src/utils/templates.js
var replaceInTemplate, _templateRenderFromFile, hasExtendedRenderFromFile, onRenderCallbacks, onRender, extenderRenderFromFile, init_templates = __esm({
  "src/utils/templates.js"() {
    replaceInTemplate = (templateId, replacements2) => {
      let templateContent = hg.utils.TemplateUtil.getTemplate(templateId);
      replacements2.forEach(([find, replace2]) => {
        templateContent = templateContent.replace(find, replace2);
      }), hg.utils.TemplateUtil.addTemplate(templateId, templateContent);
    }, hasExtendedRenderFromFile = !1, onRenderCallbacks = {}, onRender = ({ group, layout = "layout", callback, before = !1, after = !1 }) => {
      hasExtendedRenderFromFile || (extenderRenderFromFile(), hasExtendedRenderFromFile = !0), onRenderCallbacks[group] || (onRenderCallbacks[group] = {}), onRenderCallbacks[group][layout] || (onRenderCallbacks[group][layout] = {
        before: [],
        after: []
      }), before && onRenderCallbacks[group][layout].before.push(callback), after && onRenderCallbacks[group][layout].after.push(callback);
    }, extenderRenderFromFile = () => {
      _templateRenderFromFile || (_templateRenderFromFile = hg.utils.TemplateUtil.renderFromFile, hg.utils.TemplateUtil.renderFromFile = (group, type, data) => {
        onRenderCallbacks[group] && onRenderCallbacks[group][type] && onRenderCallbacks[group][type].before && onRenderCallbacks[group][type].before.forEach((callback) => {
          callback(data);
        });
        let results = _templateRenderFromFile(group, type, data);
        return onRenderCallbacks[group] && onRenderCallbacks[group][type] && onRenderCallbacks[group][type].after && onRenderCallbacks[group][type].after.forEach((callback) => {
          results = callback(data, results);
        }), results;
      });
    };
  }
});

// src/utils/user.js
var getUserItems, getUserSetupDetails, normalizeTitle, isUserTitleAtLeast, getAnonymousUserHash, getUserTitle, getUserTitleShield, getUserData, init_user = __esm({
  "src/utils/user.js"() {
    init_page();
    getUserItems = (items5, forceUpdate = !1) => __async(void 0, null, function* () {
      return new Promise((resolve, reject2) => {
        try {
          hg.utils.UserInventory.getItems(items5, (resp) => {
            resolve(resp);
          }, (err) => {
            console.error("Error getting user items:", items5, err), reject2(err);
          }, forceUpdate);
        } catch (error) {
          console.error("Error getting user items:", items5, error), reject2(error);
        }
      });
    }), getUserSetupDetails = () => {
      let userObj = user, 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,
          cheeseEffect: userObj.trap_cheese_effect
        },
        bait: {
          id: Number.parseInt(userObj.bait_item_id, 10),
          name: userObj.bait_name,
          quantity: Number.parseInt(userObj.bait_quantity, 10),
          power: 0,
          powerBonus: 0,
          luck: 0,
          attractionBonus: 0
        },
        base: {
          id: Number.parseInt(userObj.base_item_id, 10),
          name: userObj.base_name,
          power: 0,
          powerBonus: 0,
          luck: 0,
          attractionBonus: 0
        },
        charm: {
          id: Number.parseInt(userObj.trinket_item_id, 10),
          name: userObj.trinket_name,
          quantity: Number.parseInt(userObj.trinket_quantity, 10),
          power: 0,
          powerBonus: 0,
          luck: 0,
          attractionBonus: 0
        },
        weapon: {
          id: Number.parseInt(userObj.weapon_item_id, 10),
          name: userObj.weapon_name,
          power: 0,
          powerBonus: 0,
          luck: 0,
          attractionBonus: 0
        },
        aura: {
          lgs: { active: !1, power: 0, powerBonus: 0, luck: 0 },
          lightning: { active: !1, power: 0, powerBonus: 0, luck: 0 },
          chrome: { active: !1, power: 0, powerBonus: 0, luck: 0 },
          slayer: { active: !1, power: 0, powerBonus: 0, luck: 0 },
          festive: { active: !1, power: 0, powerBonus: 0, luck: 0 },
          luckycodex: { active: !1, power: 0, powerBonus: 0, luck: 0 },
          riftstalker: { active: !1, power: 0, powerBonus: 0, luck: 0 }
        },
        location: {
          name: userObj.environment_name,
          id: userObj.environment_id,
          slug: userObj.environment_type
        }
      };
      if (getCurrentPage() !== "camp")
        return setup;
      let calculations = document.querySelectorAll(".campPage-trap-trapStat");
      return calculations && calculations.forEach((calculation) => {
        if (calculation.classList.length <= 1)
          return;
        let type = calculation.classList[1], math = calculation.querySelectorAll(".math .campPage-trap-trapStat-mathRow");
        math && math.forEach((row) => {
          var _a, _b;
          if (row.classList.contains("label"))
            return;
          let value = ((_a = row.querySelector(".campPage-trap-trapStat-mathRow-value")) == null ? void 0 : _a.innerText) || "0", name = (_b = row.querySelector(".campPage-trap-trapStat-mathRow-name")) == null ? void 0 : _b.innerText;
          if (!name)
            return;
          let tempType = type, isBonus = !1;
          if (value.includes("%") && (tempType = type + "Bonus", isBonus = !0), tempType = tempType.replace("_bonusBonus", "Bonus"), value = value.replace("%", ""), value = value.replace(",", ""), value = Number.parseInt(value * 100) / 100, tempType === "attractionBonus" && (value = value / 100), 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 (name === "Your trap has no cheese effect bonus.")
            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", ""), setup.aura[auraType] ? (setup.aura[auraType].active = !0, setup.aura[auraType].type = auraType) : setup.aura[auraType] = {
              active: !0,
              type: auraType,
              power: 0,
              powerBonus: 0,
              luck: 0
            }, value = Number.parseInt(value), isBonus && (value = value / 100), setup.aura[auraType][tempType] = value;
          }
        });
      }), setup;
    }, normalizeTitle = (title = "") => 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(), isUserTitleAtLeast = (title) => {
      let titles = [
        "novice",
        "recruit",
        "apprentice",
        "initiate",
        "journeyman",
        "master",
        "grandmaster",
        "legendary",
        "hero",
        "knight",
        "lord",
        "baron",
        "count",
        "duke",
        "grandduke",
        "archduke",
        "viceroy",
        "elder",
        "sage",
        "fable"
      ], titleIndex = titles.indexOf(normalizeTitle(user.title_name)), checkIndex = titles.indexOf(normalizeTitle(title));
      return titleIndex >= checkIndex;
    }, getAnonymousUserHash = () => __async(void 0, null, function* () {
      if (!(user != null && user.user_id))
        return "";
      try {
        let msgUint8 = new TextEncoder().encode(user.user_id.toString().trim()), hashBuffer = yield crypto.subtle.digest("SHA-256", msgUint8);
        return [...new Uint8Array(hashBuffer)].map((b) => b.toString(16).padStart(2, "0")).join("");
      } catch (error) {
        throw console.error("Error getting user hash:", error), error;
      }
    }), getUserTitle = () => {
      let title = user.title_name || "novice";
      return title.includes("/") && (title = title.split("/")[0]), title.toLowerCase().replaceAll("lady", "lord").replace("wo", "").replace("ess", "").replace("duch", "duke").trim();
    }, getUserTitleShield = (titleId = null) => {
      titleId || (titleId = getUserTitle());
      let shields = {
        recruit: "https://www.mousehuntgame.com/images/titles/3f1e44bbaa7138da4c326819e9f3f0a8.png",
        apprentice: "https://www.mousehuntgame.com/images/titles/6f4673dd2d9d1e98b4569667d702a775.png",
        initiate: "https://www.mousehuntgame.com/images/titles/e96387f7261b95c0eeab9291e4e594e1.png",
        journeyman: "https://www.mousehuntgame.com/images/titles/ad6875955f541159133c6d3798519f81.png",
        master: "https://www.mousehuntgame.com/images/titles/35ee6056a09037fb13a9195881875045.png",
        grandmaster: "https://www.mousehuntgame.com/images/titles/0da3761747914f497c16dc2051ba132d.png",
        legendary: "https://www.mousehuntgame.com/images/titles/fca35751046f4bcc972716ca484b6d61.png",
        hero: "https://www.mousehuntgame.com/images/titles/0567284d6e12aaaed35ca5912007e070.png",
        knight: "https://www.mousehuntgame.com/images/titles/398dca9a8c7703de969769491622ca32.png",
        lord: "https://www.mousehuntgame.com/images/titles/9a6acd429a9a3a4849ed13901288b0b8.png",
        baron: "https://www.mousehuntgame.com/images/titles/ea9c0ec2e6d3d81c14e61f5ce924d0e1.png",
        count: "https://www.mousehuntgame.com/images/titles/dd11711a25b80db90e0306193f2e8d78.png",
        duke: "https://www.mousehuntgame.com/images/titles/eb46ac1e8197b13299ab860f07d963db.png",
        grand_duke: "https://www.mousehuntgame.com/images/titles/87937fa96bbb3b2dd3225df883002642.png",
        archduke: "https://www.mousehuntgame.com/images/titles/043efe31de4f0f2e0ddca590fe829032.png",
        viceroy: "https://www.mousehuntgame.com/images/titles/e2e79f6f9201a4d4e7a89684fbb5356f.png",
        elder: "https://www.mousehuntgame.com/images/titles/0f3cf224bf98457f6b5bad91ab1c7bd2.png",
        sage: "https://www.mousehuntgame.com/images/titles/cb49e43c5e4460da7c09fe28ca4f44ce.png",
        fabled: "https://www.mousehuntgame.com/images/titles/5daba92a8d609834aa8b789f37544e08.png"
      };
      return titleId in shields ? shields[titleId] : !1;
    }, getUserData = () => __async(void 0, null, function* () {
      return (yield fetch("https://www.mousehuntgame.com/api/action/passiveturn")).json();
    });
  }
});

// src/utils/utils.js
function isAppleOS(_window = null) {
  if (!_window) {
    if (typeof window == "undefined")
      return !1;
    _window = window;
  }
  let { platform } = _window.navigator;
  return platform.includes("Mac") || ["iPad", "iPhone"].includes(platform);
}
var isApp, isUnsupportedFile, isiFrame, isLegacyHUD, isLoggedIn, isOverlayVisible, bodyClasses, addBodyClass, removeBodyClass, getTradableItems, requests, doRequest, sleep, hasMiniCRE, uppercaseFirstLetter, setMultipleTimeout, refreshPage, debounce, init_utils = __esm({
  "src/utils/utils.js"() {
    init_data();
    init_events();
    init_debug();
    init_page();
    init_flags();
    isApp = () => typeof app != "undefined" && typeof user != "undefined" && typeof hg != "undefined" && typeof eventRegistry != "undefined", isUnsupportedFile = (path = !1) => (path = path || window.location.pathname, path === "puzzleimage.php" ? !0 : path.match(/\.(jpeg|jpg|gif|png|svg|json|css|js)$/i)), isiFrame = () => window.self !== window.top, isLegacyHUD = () => {
      var _a, _b, _c;
      return getFlag("legacy-hud") || ((_c = (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) == null ? void 0 : _b.isLegacy) == null ? void 0 : _c.call(_b));
    }, isLoggedIn = () => user && user.user_id && getCurrentPage() !== "login", isOverlayVisible = () => typeof activejsDialog != "undefined" && (activejsDialog == null ? void 0 : activejsDialog.isVisible()), bodyClasses = { added: [], removed: [] }, addBodyClass = (className, force = !1) => {
      if (bodyClasses.removed.includes(className) || bodyClasses.added.includes(className)) {
        force && (bodyClasses.added.push(className), document.body.classList.add(className));
        return;
      }
      bodyClasses.added.push(className);
      let 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.added = bodyClasses.added.filter((c) => c !== className), bodyClasses.removed.push(className), document.body.classList.remove(className);
    }, getTradableItems = (valueKey = "all") => __async(void 0, null, function* () {
      let tradableItems = yield getData("items-tradable");
      return tradableItems.sort((a, b) => a.name.localeCompare(b.name)), valueKey === "all" ? tradableItems : tradableItems.map((item) => ({
        name: item.name,
        value: item[valueKey]
      }));
    }), requests = {}, doRequest = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (url, formData = {}, skipChecks = !1, skipOpts = {}) {
      var _a;
      if (!isLoggedIn() || typeof lastReadJournalEntryId == "undefined" || typeof user == "undefined" || !lastReadJournalEntryId || !user || !(user != null && user.unique_hash))
        return;
      let requestKey = Object.keys(formData).length ? `${url}-${JSON.stringify(formData)}` : url, timeRequested = Date.now();
      if (debuglog("utils-data", `Making request: ${requestKey} at ${timeRequested}`), requests[requestKey] && !skipChecks) {
        if (debuglog("utils-data", `Request already in progress: ${requestKey}`), requests[requestKey].in_progress)
          return new Promise((resolve) => {
            let timeout = setTimeout(() => __async(void 0, null, function* () {
              debuglog("utils-data", `Request timed out: ${requestKey}, starting new request`), clearInterval(interval);
              let newRequest = yield doRequest(url, formData, !0);
              resolve(newRequest);
            }), 2500), interval = setInterval(() => {
              debuglog("utils-data", `Checking if request is complete: ${requestKey}`), requests[requestKey].in_progress || (debuglog("utils-data", `Returning saved response: ${requestKey}`), clearInterval(interval), clearTimeout(timeout), resolve(requests[requestKey].response));
            }, 100);
          });
        if (requests[requestKey].time_requested > timeRequested - 350)
          return debuglog("utils-data", `Request already completed: ${requestKey}`), requests[requestKey].response;
      }
      debuglog("utils-data", `Starting request: ${requestKey}`), requests[requestKey] = {
        in_progress: !0,
        time_requested: timeRequested
      };
      let form = new FormData();
      skipOpts.skipSn || form.append("sn", "Hitgrab"), skipOpts.skipHgIsAjax || form.append("hg_is_ajax", 1), skipOpts.skipLastReadJournalEntryId || form.append("last_read_journal_entry_id", lastReadJournalEntryId != null ? lastReadJournalEntryId : 0), skipOpts.skipUh || form.append("uh", (_a = user == null ? void 0 : user.unique_hash) != null ? _a : ""), Object.keys(formData).forEach((key) => form.append(key, formData[key]));
      let requestBody = new URLSearchParams(form).toString(), response, attempts = 0;
      for (; !response && attempts < 3; )
        try {
          response = yield fetch(callbackurl ? `${callbackurl}${url}` : `https://www.mousehuntgame.com/${url}`, {
            method: "POST",
            body: requestBody,
            headers: {
              "Content-Type": "application/x-www-form-urlencoded"
            }
          });
        } catch (error) {
          attempts++, console.error(`Attempt ${attempts} failed. Retrying...`, error);
        }
      attempts >= 3 && console.error("Failed to fetch after maximum attempts");
      let data;
      try {
        data = yield response.json();
      } catch (error) {
        return console.error(`Error parsing response for ${url}:`, error, url, formData, response), !1;
      }
      return requests[requestKey] = {
        time_requested: timeRequested,
        response: data
      }, data;
    }), sleep = (ms, elapsed = 0) => __async(void 0, null, function* () {
      return new Promise((resolve) => setTimeout(resolve, ms - elapsed));
    });
    hasMiniCRE = () => {
      if (sessionGet("has-mini-cre"))
        return !0;
      if (getCurrentPage() !== "camp")
        return;
      let cre = document.querySelector(".min-luck-button");
      return sessionSet("has-mini-cre", !!cre), !!cre;
    }, uppercaseFirstLetter = (string) => string.charAt(0).toUpperCase() + string.slice(1), setMultipleTimeout = (fn, ms) => {
      (Array.isArray(ms) ? ms : [ms]).forEach((time) => setTimeout(fn, time));
    }, refreshPage = (delay = 0) => {
      setTimeout(() => {
        window.location.reload();
      }, delay);
    }, debounce = (func, delay = 100) => {
      let timeout;
      return (...args) => {
        clearTimeout(timeout), timeout = setTimeout(() => func(...args), delay);
      };
    };
  }
});

// src/utils/shared/trap-quantity.js
var getIdSelector, addQuantityToDisplay, addQuantityToTrapBrowserItem, addToTrapBrowserForSlugs, addToTrapBrowserForIds, addToTrapBrowserForBases, addQtyToTrapBrowser, onChangeTrap, options, addTrapQuantity, init_trap_quantity = __esm({
  "src/utils/shared/trap-quantity.js"() {
    init_utils2();
    getIdSelector = (itemId, bases) => (Array.isArray(bases) && (bases = bases.join("-")), `mh-improved-${itemId}-${bases}-counter`), addQuantityToDisplay = () => __async(void 0, null, function* () {
      options.forEach((opts) => __async(void 0, null, function* () {
        var _a;
        let bases = opts.baseIds, itemId = opts.itemId;
        if (getCurrentPage() !== "camp")
          return;
        let selector = getIdSelector(itemId, bases), existingCounter = document.querySelector(`.${selector}`);
        existingCounter && existingCounter.remove(), bases = bases.map((base) => Number.parseInt(base, 10));
        let userBase = Number.parseInt(user.base_item_id, 10);
        if (!bases.includes(userBase))
          return;
        let amount = yield cacheGet(`${itemId}-quantity`, !1);
        amount === !1 && (amount = ((_a = (yield getUserItems([itemId], !0))[0]) == null ? void 0 : _a.quantity) || 0, cacheSet(`${itemId}-quantity`, amount));
        let counter = document.querySelector(`.${selector}-text`);
        if (counter) {
          counter.textContent = amount;
          return;
        }
        let trapContainer = document.querySelector('.trapSelectorView__armedItem[data-item-classification="base"] .trapSelectorView__armedItemImage');
        if (!trapContainer)
          return;
        let newCounter = makeElement("div", ["trapSelectorView__armedItemQuantity", selector, "mh-improved-trap-quantity"]);
        makeElement("span", `${selector}-text`, amount.toLocaleString(), newCounter), trapContainer.append(newCounter);
      }));
    }), addQuantityToTrapBrowserItem = (el, itemId, base) => __async(void 0, null, function* () {
      var _a;
      if (!el || !itemId || !base)
        return;
      let selector = getIdSelector(itemId, base), qty = yield cacheGet(`${itemId}-quantity`, !1);
      qty === !1 && (qty = ((_a = (yield getUserItems([itemId], !0))[0]) == null ? void 0 : _a.quantity) || 0, cacheSet(`${itemId}-quantity`, qty)), qty = Number.parseInt(qty, 10);
      let exists = document.querySelector(`.${selector}-blueprint`);
      if (exists) {
        exists.textContent = qty.toLocaleString();
        return;
      }
      let counter = makeElement("div", "campPage-trap-itemBrowser-favorite-item-quantity");
      makeElement("span", ["campPage-trap-baitQuantity", `${selector}-blueprint`], qty.toLocaleString(), counter), el.append(counter);
    }), addToTrapBrowserForSlugs = () => __async(void 0, null, function* () {
      options.forEach((opts) => __async(void 0, null, function* () {
        opts.baseSlugs.forEach((base) => __async(void 0, null, function* () {
          let el = document.querySelector(`.campPage-trap-itemBrowser-item-image[data-item-type="${base}"]`);
          el && addQuantityToTrapBrowserItem(el, opts.itemId, base);
        }));
      }));
    }), addToTrapBrowserForIds = () => __async(void 0, null, function* () {
      options.forEach((opts) => __async(void 0, null, function* () {
        opts.baseIds.forEach((base) => __async(void 0, null, function* () {
          let faveEl = document.querySelector(`.campPage-trap-itemBrowser-favorite-item-image[data-item-id="${base}"]`);
          faveEl && addQuantityToTrapBrowserItem(faveEl, opts.itemId, base);
        }));
      }));
    }), addToTrapBrowserForBases = () => __async(void 0, null, function* () {
      addToTrapBrowserForSlugs(), addToTrapBrowserForIds();
    }), addQtyToTrapBrowser = (tab) => __async(void 0, null, function* () {
      if (tab !== "item_browser")
        return;
      onRequest("users/gettrapcomponents.php", addToTrapBrowserForBases), yield sleep(1e3), addToTrapBrowserForBases();
      let trapItems = document.querySelector(".campPage-trap-itemBrowser-items");
      if (!trapItems)
        return;
      new MutationObserver(addToTrapBrowserForBases).observe(trapItems, { childList: !0, attributes: !0, subtree: !0 });
    }), onChangeTrap = () => {
      document.querySelector('.trapSelectorView__blueprint.trapSelectorView__blueprint--active .trapSelectorView__browserStateParent--items[data-blueprint-type="base"]') && options.forEach((opts) => __async(void 0, null, function* () {
        addQtyToTrapBrowser("item_browser", opts);
      }));
    }, options = [], addTrapQuantity = (opts) => __async(void 0, null, function* () {
      !opts.itemId || !opts.baseIds || (options.push(opts), onRequest("users/changetrap.php", () => {
        onChangeTrap(), addQuantityToDisplay(), setTimeout(addQuantityToDisplay, 250);
      }), onEvent("camp_page_toggle_blueprint", (tab) => __async(void 0, null, function* () {
        return addQtyToTrapBrowser(tab);
      })), addQuantityToDisplay(), onNavigation(addQuantityToDisplay, { page: "camp" }), onTurn(addQuantityToDisplay, 250));
    });
  }
});

// src/utils/shared/open-all.js
var useConvertible, addOpenAllButOneButton, hasInitialized, openAllButOneSetting, openAllSetting, initOpenButtons, init_open_all = __esm({
  "src/utils/shared/open-all.js"() {
    init_utils2();
    useConvertible = (element) => {
      if (element.getAttribute("data-item-action") !== "all-but-one" && element.getAttribute("data-item-action") !== "all")
        return;
      let itemType = element.getAttribute("data-item-type");
      hg.views.ItemView.show(itemType);
      let interval = setInterval(() => {
        let quantityEl = document.querySelector(".itemView-action-convertForm"), maxQuantity = 1;
        quantityEl && quantityEl.innerText.includes("/") && (maxQuantity = Number.parseInt(quantityEl.innerText.split("/")[1].trim(), 10));
        let quantity = maxQuantity > 200 ? 200 : maxQuantity, quantityInput = document.querySelector(".itemView-action-convert-quantity");
        if (quantityInput) {
          clearInterval(interval), quantityInput.value = quantity;
          let useButton = document.querySelector(".itemView-action-convert-actionButton");
          useButton && useButton.click();
        }
      }, 100);
    }, addOpenAllButOneButton = () => {
      let convertibles = document.querySelectorAll('.inventoryPage-tagContent-tagGroup[data-tag="convertibles"] .inventoryPage-item.convertible[data-item-classification="convertible"]'), chests = document.querySelectorAll('.inventoryPage-tagContent-tagGroup[data-tag="treasure_chests"] .inventoryPage-item.convertible[data-item-classification="convertible"]');
      [...convertibles, ...chests].forEach((item) => {
        if (!item)
          return;
        let button = item.querySelector('.inventoryPage-item-button[data-item-action="single"]');
        if (!button)
          return;
        let itemType = item.getAttribute("data-item-type");
        if (!itemType || (/* @__PURE__ */ new Set([
          "kilohertz_processor_convertible"
        ])).has(itemType))
          return;
        let quantity = item.querySelector(".quantity");
        if (quantity) {
          if (openAllButOneSetting && quantity.textContent !== "1" && !item.querySelector('.inventoryPage-item-button[data-item-action="all-but-one"]')) {
            let newButton = button.cloneNode(!0);
            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"), newButton.addEventListener("click", (event) => {
              useConvertible(event.target);
            }), button.after(newButton);
          }
          if (openAllSetting && !item.querySelector('.inventoryPage-item-button[data-item-action="all"]')) {
            let newAllButton = button.cloneNode(!0);
            newAllButton.classList.add("open-all"), newAllButton.textContent = "All", newAllButton.value = "All", newAllButton.setAttribute("data-item-action", "all"), newAllButton.addEventListener("click", (event) => {
              useConvertible(event.target);
            }), button.after(newAllButton);
          }
        }
      });
    }, hasInitialized = !1, openAllButOneSetting = !0, openAllSetting = !0, initOpenButtons = () => {
      openAllButOneSetting = getSetting("open-all-but-one", !0), openAllSetting = getSetting("open-all", !0), (openAllButOneSetting || openAllSetting) && (hasInitialized || (hasInitialized = !0, onNavigation(addOpenAllButOneButton, {
        page: "inventory",
        tab: "special",
        anySubTab: !0
      })));
    };
  }
});

// src/utils/index.js
var utils_exports = {};
__export(utils_exports, {
  addBodyClass: () => addBodyClass,
  addEvent: () => addEvent,
  addExternalStyles: () => addExternalStyles,
  addHudStyles: () => addHudStyles,
  addIconToMenu: () => addIconToMenu,
  addItemToGameInfoBar: () => addItemToGameInfoBar,
  addJournalEntry: () => addJournalEntry,
  addMHCTData: () => addMHCTData,
  addSetting: () => addSetting,
  addSettingForModule: () => addSettingForModule,
  addSettingsTab: () => addSettingsTab,
  addStyles: () => addStyles,
  addStylesDirect: () => addStylesDirect,
  addSubmenuDivider: () => addSubmenuDivider,
  addSubmenuItem: () => addSubmenuItem,
  addTrapQuantity: () => addTrapQuantity,
  cacheDelete: () => cacheDelete,
  cacheFinishedMap: () => cacheFinishedMap,
  cacheGet: () => cacheGet,
  cacheSet: () => cacheSet,
  clearCaches: () => clearCaches,
  createPopup: () => createPopup,
  database: () => database,
  databaseDelete: () => databaseDelete,
  dbDelete: () => dbDelete,
  dbDeleteAll: () => dbDeleteAll,
  dbGet: () => dbGet,
  dbGetAll: () => dbGetAll,
  dbSet: () => dbSet,
  debounce: () => debounce,
  debug: () => debug,
  debuglog: () => debuglog,
  deleteSetting: () => deleteSetting,
  doEvent: () => doEvent2,
  doInternalEvent: () => doInternalEvent,
  doRequest: () => doRequest,
  getAnonymousUserHash: () => getAnonymousUserHash,
  getArEl: () => getArEl,
  getArForMouse: () => getArForMouse,
  getCurrentDialog: () => getCurrentDialog,
  getCurrentLocation: () => getCurrentLocation,
  getCurrentLocationName: () => getCurrentLocationName,
  getCurrentPage: () => getCurrentPage,
  getCurrentSubtab: () => getCurrentSubtab,
  getCurrentTab: () => getCurrentTab,
  getData: () => getData,
  getFlag: () => getFlag,
  getFlags: () => getFlags,
  getGlobal: () => getGlobal,
  getHeaders: () => getHeaders,
  getHighestArForMouse: () => getHighestArForMouse,
  getLastMaptain: () => getLastMaptain,
  getLocationForMouse: () => getLocationForMouse,
  getMapData: () => getMapData,
  getRelicHunterLocation: () => getRelicHunterLocation,
  getSetting: () => getSetting,
  getSettingDirect: () => getSettingDirect,
  getSettings: () => getSettings,
  getTradableItems: () => getTradableItems,
  getUserData: () => getUserData,
  getUserItems: () => getUserItems,
  getUserSetupDetails: () => getUserSetupDetails,
  getUserTitle: () => getUserTitle,
  getUserTitleShield: () => getUserTitleShield,
  hasMiniCRE: () => hasMiniCRE,
  initOpenButtons: () => initOpenButtons,
  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,
  makeJournalEntry: () => makeJournalEntry,
  makeLink: () => makeLink,
  makeMathButton: () => makeMathButton,
  makeMathButtons: () => makeMathButtons,
  makeMhButton: () => makeMhButton,
  makePage: () => makePage,
  makeProgressLogLink: () => makeProgressLogLink,
  makeTooltip: () => makeTooltip,
  mapData: () => mapData,
  mapModel: () => mapModel,
  mapper: () => mapper,
  maybeDoMaintenance: () => maybeDoMaintenance,
  onActivation: () => onActivation,
  onDeactivation: () => onDeactivation,
  onDialogHide: () => onDialogHide,
  onDialogShow: () => onDialogShow,
  onEvent: () => onEvent,
  onNavigation: () => onNavigation,
  onOverlayChange: () => onOverlayChange,
  onPageChange: () => onPageChange,
  onRender: () => onRender,
  onRequest: () => onRequest,
  onSettingsChange: () => onSettingsChange,
  onTrapChange: () => onTrapChange,
  onTravel: () => onTravel,
  onTurn: () => onTurn,
  refreshPage: () => refreshPage,
  removeBodyClass: () => removeBodyClass,
  removeHudStyles: () => removeHudStyles,
  removeIconFromMenu: () => removeIconFromMenu,
  removeStyles: () => removeStyles,
  removeSubmenuItem: () => removeSubmenuItem,
  replaceIconInMenu: () => replaceIconInMenu,
  replaceInTemplate: () => replaceInTemplate,
  replaceJournalEntry: () => replaceJournalEntry,
  saveSetting: () => saveSetting,
  saveSettingDirect: () => saveSettingDirect,
  sessionDelete: () => sessionDelete,
  sessionGet: () => sessionGet,
  sessionSet: () => sessionSet,
  sessionsDelete: () => sessionsDelete,
  setGlobal: () => setGlobal,
  setLastMaptain: () => setLastMaptain,
  setMapData: () => setMapData,
  setMultipleTimeout: () => setMultipleTimeout,
  setPage: () => setPage,
  setTab: () => setTab,
  setupHumanizer: () => setupHumanizer,
  showErrorMessage: () => showErrorMessage,
  showHornMessage: () => showHornMessage,
  showLoadingError: () => showLoadingError,
  showLoadingPopup: () => showLoadingPopup,
  showLoadingPopupError: () => showLoadingPopupError,
  showSuccessMessage: () => showSuccessMessage,
  showTravelConfirmation: () => showTravelConfirmation,
  showTravelConfirmationNoDetails: () => showTravelConfirmationNoDetails,
  sleep: () => sleep,
  toEscapedJSON: () => toEscapedJSON,
  toggleBlueprint: () => toggleBlueprint,
  travelTo: () => travelTo,
  updateCaches: () => updateCaches,
  uppercaseFirstLetter: () => uppercaseFirstLetter
});
var init_utils2 = __esm({
  "src/utils/index.js"() {
    init_blueprint();
    init_db();
    init_data();
    init_debug();
    init_draggable();
    init_elements();
    init_events();
    init_event_registry();
    init_flags();
    init_global();
    init_horn();
    init_humanizer();
    init_journal();
    init_links();
    init_location();
    init_maps();
    init_messages();
    init_page();
    init_settings();
    init_settings_markup();
    init_styles();
    init_templates();
    init_user();
    init_utils();
    init_trap_quantity();
    init_open_all();
  }
});

// src/modules/adblock/styles.css
var styles_default, init_styles2 = __esm({
  "src/modules/adblock/styles.css"() {
    styles_default = `.actionportfolio,.canShare .larryTip,.canShare,.communityGroupView-ad,.journalactions a.actionportfolio,.journalactions a[data-share-type=journal],.journalactions a[data-type=journal],.mousehuntHeaderView-gameBanner,.pageSidebarView .fb-page,.socialLink,.newsPostFacebookContainer,.travelShortcut.QuestSuperBrieFactory,.travelShortcut.QuestSchoolOfSorcery,*[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 init, adblock_default, init_adblock = __esm({
  "src/modules/adblock/index.js"() {
    init_utils2();
    init_styles2();
    init = () => __async(void 0, null, function* () {
      addStyles(styles_default, "adblock");
    }), adblock_default = {
      id: "adblock",
      name: "Adblock",
      type: "element-hiding",
      default: !1,
      description: "Hides advertisements for Feedback Friday, mobile apps, news ticker, etc.",
      load: init
    };
  }
});

// src/modules/better-gifts/settings/index.js
var settings_default, init_settings2 = __esm({
  "src/modules/better-gifts/settings/index.js"() {
    settings_default = () => __async(void 0, null, function* () {
      let orderOptions = [
        {
          name: "Newest to Oldest",
          value: "default"
        },
        {
          name: "Oldest to Newest",
          value: "reverse"
        }
      ], skipBadGiftOptions = [
        {
          name: "Skip all non-GOTD gifts",
          value: "skip"
        },
        {
          name: "Don't skip any gifts",
          value: "no-skip"
        },
        {
          seperator: !0
        },
        {
          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"
        }
      ];
      return [
        {
          id: "better-gifts.send-order",
          title: "Order to accept/send",
          default: [orderOptions[0]],
          description: "",
          settings: {
            type: "multi-select",
            number: 1,
            options: orderOptions
          }
        },
        {
          id: "better-gifts.ignore-bad-gifts",
          title: "Ignore gifts",
          default: [skipBadGiftOptions[0]],
          description: "",
          settings: {
            type: "multi-select",
            number: 1,
            options: skipBadGiftOptions
          }
        }
      ];
    });
  }
});

// src/modules/better-gifts/styles.css
var styles_default2, init_styles3 = __esm({
  "src/modules/better-gifts/styles.css"() {
    styles_default2 = `.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 .mh-gift-button{font-weight:400}#bulk-gifting-gift-buttons .mh-gift-buttons-accept{margin-right:5px}#bulk-gifting-gift-buttons .mh-gift-buttons-paid-gifts{margin-right:10px}.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-around}.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{scrollbar-color:#938f83 #e9e1c6;max-height:calc(75vh - 175px);overflow-y:auto}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift-description{display:flex;flex-direction:column-reverse;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}.mh-gift-buttons-clone-wrapper .giftSelectorView-friendRow-returnCost{bottom:3px}.giftSelectorView-content-leftBar>.giftSelectorView-content-leftBar-highlightBlock:before{position:absolute;inset:0;z-index:1;content:"";border-radius:10px 0 0 10px;box-shadow:-1px 4px 4px -3px #666}.giftSelectorView-content-leftBar>.giftSelectorView-content-leftBar-highlightBlock{position:relative}.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:35px}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift .itemImage{width:50px;height:50px;margin-bottom:5px}.giftSelectorView-gift .itemImage{width:80px;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{display:inline-block;width:auto;border-bottom:none}.giftSelectorView-inboxGiftOfTheDay{padding:5px 0;border-color:#d1d0cf}.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}.paidgift a.giftSelectorView-friendRow-action.return{text-indent:-70px}.giftSelectorView-friendRow-returnQuantity{width:30px}.giftSelectorView-gift.paidgift .giftSelectorView-gift-padding{box-shadow:0 0 1px #000 inset}.giftSelectorView-tabContent.hasSidebar .giftSelectorView-content-rightBar{border-bottom-left-radius:10px}.giftSelectorView-friendRow-sender{position:relative}.giftSelectorView-friendRow:hover{padding-bottom:5px;margin-bottom:7px;border-top-left-radius:0;border-bottom-left-radius:0;outline:1px solid #dfdfdf;box-shadow:none}.giftSelectorView-friend-image{top:-7px;left:-7px;width:33px;height:33px;border:1px solid #bdbdbd}.giftSelectorView-friend-image.paidgift{top:-11px;width:31px;height:31px}#giftSelectorView-inbox{border:1px solid #d1d0cf;box-shadow:0 3px 6px -3px #000}.giftSelectorView-inbox-footer-viewMore a{position:relative;font-weight:400;line-height:24px;text-shadow:0 0 1px #fff;background:none;border:none;border-radius:3px;box-shadow:none}.giftSelectorView-inbox-footer-viewMore{position:absolute;right:10px;width:135px;padding:0;font-size:12px;font-weight:700;line-height:30px;color:#000!important;text-align:center;background:#b3edff;border:1px solid #50549c;border-radius:5px;box-shadow:1px 1px 1px #eee}.giftSelectorView-inbox-footer-viewMore:hover{background-color:#b3f4ff;border-color:#000;box-shadow:0 0 5px #fff inset,1px 1px 1px #fff}.giftSelectorView-inbox-footer-viewMore:before{position:absolute;inset:40% 0 0;content:"";background:#b2e2ff;border-radius:5px;box-shadow:0 0 10px #7bf inset}.giftSelectorView-inbox-footer-viewMore:before:hover{background-color:#a5e2ff;box-shadow:0 0 10px #f0f4f7 inset}.giftSelectorView-inbox-footer{padding-bottom:18px;border-width:1px}.giftSelectorView-inbox-giftContainer .mousehuntActionButton.return.disabled,.giftSelectorView-inbox-giftContainer .mousehuntActionButton.claim.disabled{opacity:.5}.giftSelectorView-inbox-giftContainer .mousehuntActionButton.return.disabled:hover,.giftSelectorView-inbox-giftContainer .mousehuntActionButton.claim.disabled:hover{opacity:1}.giftSelectorView-friendRow-action.ignore{outline:1px solid #ededed;box-shadow:none}.giftSelectorView-friendRow-action.ignore:hover{background-color:#eee;outline-color:#c6c6c6}.giftSelectorView-friendRow-action.claim,.giftSelectorView-friendRow-action.return{box-sizing:border-box;outline:1px solid #e7e7e7}.giftSelectorView-friendRow-action.claim:hover,.giftSelectorView-friendRow-action.return:hover{box-shadow:0 0 1px #000 inset,0 -1px 1px #fff inset}.giftSelectorView-friendRow.new .giftSelectorView-friend-image:after{top:-4px;left:-4px;border-radius:4px;box-shadow:none}.mh-dark-mode #giftSelectorView-inbox,.mh-dark-mode .giftSelectorView-inboxGiftOfTheDay{border-color:#424242}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer:hover{background-color:#494949}.complete .giftSelectorView-inbox-gift-details{margin-right:150px;margin-left:0}.giftSelectorView-scroller{height:100%}.giftSelectorView-inbox-footer-label{margin-top:-30px;text-align:left}#overlayPopup.giftSelectorViewPopup #jsDialogClose{z-index:10}.giftSelectorView-friend-search{display:inline-block;width:auto}.giftSelectorView-friend-search-label{display:none}input.giftSelectorView-friend-search-input{max-width:130px}.giftSelectorView-content-viewState.selectFriends{position:relative}.giftSelectorView-tabContent[data-tab=friends] .giftSelectorView-content-viewState .giftSelectorView-friend-search{position:absolute;top:-30px;right:20px}.giftSelectorView-friend-group.favorite .giftSelectorView-friend-group-title{display:none}.giftSelectorView-hiddenFriendsContainer{margin-right:2px}.giftSelectorView-tabContent[data-tab=friends] .giftSelectorView-content-rightBar-padding{padding-bottom:0}
`;
  }
});

// src/modules/better-gifts/index.js
var getIgnoredGifts, claimGifts, makeAcceptButton, makeReturnButton, fixTypo, lineBreakGiftFooter, getButtons, makeButtons, getLimit, pickFriends, addSendButton, addRandomSendButton, _showTab, _selectGift, _updateGiftMultiplierQuantity, addGiftSwitcher, addButtonsToDropdown, addButtonsToPopup, main, init2, better_gifts_default, init_better_gifts = __esm({
  "src/modules/better-gifts/index.js"() {
    init_utils2();
    init_settings2();
    init_styles3();
    getIgnoredGifts = () => {
      let ignored = getSetting("better-gifts-settings.ignore-bad-gifts-0", "skip"), 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 = !1, retries = 0) => __async(void 0, null, function* () {
      if (hg.views.GiftSelectorView.show(), !document.querySelector(".giftSelectorView-tabContent.active .giftSelectorView-friendRow")) {
        retries <= 10 && setTimeout(() => {
          claimGifts(send, retries + 1);
        }, 250);
        return;
      }
      let gifts = hg.views.GiftSelectorView.getClaimableGiftsSortedByTime();
      getSetting("better-gifts.send-order-0", "default") === "reverse" && gifts.reverse();
      let ignoredGifts = getIgnoredGifts(), sendLimit = hg.views.GiftSelectorView.getNumSendableActionsRemaining(), claimLimit = hg.views.GiftSelectorView.getNumClaimableActionsRemaining();
      gifts = gifts.filter((gift) => !(gift.channel !== "gift" || ignoredGifts.includes(gift.item_type)));
      for (let gift of gifts) {
        let verb = send && sendLimit > 0 && gift.is_returnable ? "return" : "claim", giftEl = document.querySelector(`.giftSelectorView-friendRow[data-gift-id="${gift.gift_id}"] .giftSelectorView-friendRow-action.${verb}`);
        if (!giftEl)
          continue;
        let event = { target: giftEl };
        send && verb === "return" && sendLimit > 0 ? (hg.views.GiftSelectorView.selectReturnableGift(event, giftEl), sendLimit--, claimLimit--) : !send && verb === "claim" && claimLimit > 0 && (hg.views.GiftSelectorView.selectClaimableGift(giftEl), claimLimit--);
      }
      setTimeout(() => {
        let confirm2 = document.querySelector(".mousehuntActionButton.giftSelectorView-action-confirm.small");
        confirm2 && setTimeout(() => {
          hg.views.GiftSelectorView.submitConfirm(confirm2);
        }, 250);
      }, 500);
    }), makeAcceptButton = (buttonContainer, isTiny = !1) => {
      let acceptButton = makeElement("button", ["mh-gift-button", "mh-gift-buttons-accept", "mousehuntActionButton", "small"]);
      makeElement("span", "mousehuntActionButton-text", "Accept All", acceptButton), isTiny && acceptButton.classList.add("tiny");
      let acceptLimit = document.querySelector(".giftSelectorView-numClaimActionsRemaining");
      acceptLimit && acceptLimit.innerText === "0" ? acceptButton.classList.add("disabled") : acceptButton.addEventListener("click", () => {
        claimGifts();
      }), buttonContainer.append(acceptButton);
    }, makeReturnButton = (buttonContainer, isTiny = !1) => {
      let returnWrapper = makeElement("div", "mh-gift-buttons-return-wrapper"), returnButton = makeElement("button", ["mh-gift-button", "mh-gift-buttons-return", "mousehuntActionButton", "small"]);
      makeElement("span", "mousehuntActionButton-text", "Accept & Return All", returnButton), isTiny && returnButton.classList.add("tiny");
      let returnLimit = document.querySelector(".giftSelectorView-numSendActionsRemaining");
      returnLimit && returnLimit.innerText === "0" ? returnButton.classList.add("disabled") : returnButton.addEventListener("click", () => {
        claimGifts(!0);
      }), returnWrapper.append(returnButton), buttonContainer.append(returnWrapper);
    }, fixTypo = () => {
      onRender({
        group: "GiftSelectorView",
        callback: (data, results) => results.replaceAll("You can send 1 free gifts", "You can send 1 free gift").replaceAll("<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 = !1, isTiny = !1) => {
      let buttonContainer = document.createElement("div");
      return buttonContainer.id = "bulk-gifting-gift-buttons", className && buttonContainer.classList.add(className), makeAcceptButton(buttonContainer, isTiny), makeReturnButton(buttonContainer, isTiny), buttonContainer;
    }, makeButtons = () => {
      if (document.querySelector("#bulk-gifting-gift-buttons"))
        return;
      let buttonContainer = document.createElement("div");
      buttonContainer.id = "bulk-gifting-gift-buttons", makeAcceptButton(buttonContainer), makeReturnButton(buttonContainer);
      let giftFooter = document.querySelector(".giftSelectorView-inbox-footer");
      giftFooter && giftFooter.firstChild && giftFooter.insertBefore(buttonContainer, giftFooter.firstChild);
    }, getLimit = () => {
      let limitEl = document.querySelector(".giftSelectorView-tabContent.active .giftSelectorView-actionLimit.giftSelectorView-numSendActionsRemaining");
      return limitEl ? Number.parseInt(limitEl.innerText, 10) : 0;
    }, pickFriends = (friends, useRandom = !0) => {
      let selected = [], sent = 0;
      if (useRandom) {
        let bound = friends.length > 35 ? 35 : friends.length, firstRandom = Math.floor(Math.random() * bound);
        selected.push(firstRandom), sent++;
      }
      let limit = getLimit();
      for (; sent < limit && !(selected.length >= friends.length); ) {
        if (useRandom) {
          let random = Math.floor(Math.random() * friends.length);
          if (selected.includes(random))
            continue;
          selected.push(random);
        } else
          selected.push(sent);
        sent++, limit = getLimit();
      }
      selected.forEach((index) => {
        friends[index].click();
      }), getLimit() < 1 && document.querySelectorAll(".mh-gift-buttons").forEach((button) => {
        button.classList.add("disabled");
      });
    }, addSendButton = (className, text, selector, buttonContainer) => {
      let existing = document.querySelector(`.mh-gift-buttons-send-${className}`);
      existing && existing.remove();
      let sendButton = makeElement("button", ["mousehuntActionButton", "tiny", "mh-gift-buttons", `mh-gift-buttons-send-${className}`]);
      makeElement("span", "mousehuntActionButton-text", text, sendButton), getLimit() < 1 && sendButton.classList.add("disabled"), sendButton.addEventListener("click", () => {
        let friends = document.querySelectorAll(selector);
        if (friends.length) {
          if (sendButton.classList.contains("disabled")) {
            document.querySelectorAll(".giftSelectorView-friend.selected").forEach((friend) => {
              friend.click();
            }), document.querySelectorAll(".mh-gift-buttons.disabled").forEach((button) => {
              button.classList.remove("disabled");
            });
            return;
          }
          className === "faves" ? pickFriends(friends, !1) : pickFriends(friends);
        }
      }), buttonContainer.append(sendButton);
    }, addRandomSendButton = () => {
      let _selectGift2 = hg.views.GiftSelectorView.selectGift;
      hg.views.GiftSelectorView.selectGift = (gift) => {
        _selectGift2(gift);
        let title = document.querySelector(".giftSelectorView-tabContent.active .selectFriends .giftSelectorView-content-title");
        return title ? (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), !0) : !1;
      };
    }, addGiftSwitcher = () => {
      _showTab || _selectGift || _updateGiftMultiplierQuantity || (_showTab = hg.views.GiftSelectorView.showTab, _selectGift = hg.views.GiftSelectorView.selectGift, _updateGiftMultiplierQuantity = hg.views.GiftSelectorView.updateGiftMultiplierQuantity, hg.views.GiftSelectorView.showTab = (tabType, viewState, preserveVariables, preserveActions) => {
        _showTab(tabType, viewState, preserveVariables, preserveActions), hg.views.GiftSelectorView.updateGiftMultiplierQuantity = (input) => (input && input.hasAttribute("maxlength") && input.removeAttribute("maxlength"), _updateGiftMultiplierQuantity(input)), hg.views.GiftSelectorView.selectGift = (gift) => {
          _selectGift(gift);
          let giftContainer = document.querySelector(".giftSelectorView-tabContent.active.selectFriends .giftSelectorView-content-leftBar");
          if (!giftContainer)
            return !1;
          let existing = document.querySelector(".mh-gift-buttons-clone-wrapper");
          existing && existing.remove();
          let giftType = tabType === "send_free_gifts" ? "gift" : "paidgift", gifts = document.querySelectorAll(`.active .selectGift .giftSelectorView-scroller.giftSelectorView-giftContainer .giftSelectorView-gift.sendable.${giftType}`);
          if (!gifts.length)
            return !1;
          let cloneWrapper = makeElement("div", "mh-gift-buttons-clone-wrapper");
          return gifts.forEach((toClone) => {
            let clone = toClone.cloneNode(!0), giftWrap = makeElement("div", "giftSelectorView-content-leftBar-highlightBlock");
            giftWrap.append(clone), giftWrap.addEventListener("click", () => {
              document.querySelectorAll(".mh-gift-buttons-clone-selected").forEach((el) => {
                el.classList.remove("mh-gift-buttons-clone-selected");
              }), giftWrap.classList.add("mh-gift-buttons-clone-selected");
            }), cloneWrapper.append(giftWrap);
          }), giftContainer.append(cloneWrapper), !0;
        };
      });
    }, addButtonsToDropdown = () => {
      let buttonLink = document.querySelector("#hgbar_freegifts");
      buttonLink && buttonLink.addEventListener("click", () => {
        makeButtons();
      });
    }, addButtonsToPopup = () => {
      let actionRow = document.querySelector(".giftSelectorView-tabContentContainer .giftSelectorView-tabContent.active .giftSelectorView-actionContainer");
      if (!actionRow)
        return;
      let existing = document.querySelector(".mh-gift-buttons-send-popup");
      existing && existing.remove();
      let buttons = getButtons("mh-gift-buttons-send-popup", !0);
      actionRow.insertBefore(buttons, actionRow.firstChild);
    }, main = () => {
      onRequest("users/socialGift.php", makeButtons), addButtonsToDropdown(), onDialogShow("giftSelectorViewPopup", addButtonsToPopup), addRandomSendButton(), addGiftSwitcher(), fixTypo(), lineBreakGiftFooter();
    }, init2 = () => __async(void 0, null, function* () {
      addStyles(styles_default2, "better-gifts"), main(), onDeactivation("better-gifts", () => {
        document.querySelectorAll(".mh-gift-buttons").forEach((button) => {
          button.remove();
        });
      });
    }), better_gifts_default = {
      id: "better-gifts",
      name: "Better Gifts",
      type: "better",
      default: !0,
      description: "Quickly accept and return all your gifts as well as picking random friends to send to.",
      load: init2,
      settings: settings_default
    };
  }
});

// src/modules/better-inventory/modules/recipes/styles.css
var styles_default3, init_styles4 = __esm({
  "src/modules/better-inventory/modules/recipes/styles.css"() {
    styles_default3 = `.inventoryPage-item.full.recipe.known.reordered{max-height:38px;overflow:hidden;border-bottom:1px solid #ccc}.inventoryPage-item.full.recipe.known.reordered:hover{max-height:500px}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent{position:relative}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent-prefix-title{display:none}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent-prefix.clear-block{position:absolute;right:10px}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabHeader-container{margin-bottom:20px}
`;
  }
});

// src/modules/better-inventory/modules/recipes/recipes-me-conversion.json
var recipes_me_conversion_default, init_recipes_me_conversion = __esm({
  "src/modules/better-inventory/modules/recipes/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/modules/better-inventory/modules/recipes/recipes-to-reorder.json
var recipes_to_reorder_default, init_recipes_to_reorder = __esm({
  "src/modules/better-inventory/modules/recipes/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/modules/recipes/index.js
var cleanUpRecipeBook, showCraftWarning, warnOnBadCrafts, modifySmashableTooltip, moveRecipe, updateRecipesOnPage, recipes_default, init_recipes = __esm({
  "src/modules/better-inventory/modules/recipes/index.js"() {
    init_utils2();
    init_styles4();
    init_recipes_me_conversion();
    init_recipes_to_reorder();
    cleanUpRecipeBook = () => {
      let allTab = document.querySelector(".inventoryPage-tagDirectory-tag.all.hidden");
      allTab && allTab.classList.remove("hidden"), document.querySelectorAll(".mousehuntHud-page-subTabContent.recipe a.inventoryPage-tagDirectory-tag").forEach((tagLink) => {
        let tag = tagLink.getAttribute("data-tag");
        tagLink.removeAttribute("onclick"), tagLink.addEventListener("click", (e) => {
          app.pages.InventoryPage.showTagGroup(e.target), tagLink.classList.contains("updated") || (updateRecipesOnPage(tag), tagLink.classList.add("updated"));
        });
      });
    }, showCraftWarning = (text) => {
      let confirm2 = document.querySelector(".mousehuntActionButton.inventoryPage-confirmPopup-suffix-button.confirm");
      if (!confirm2)
        return;
      let existing = document.querySelector(".mhui-craft-warning-tooltip");
      existing && existing.remove();
      let tooltip = makeElement("div", "mhui-craft-warning-tooltip", text);
      confirm2.parentNode.append(tooltip);
    }, warnOnBadCrafts = (limit = 0) => {
      let confirm2 = document.querySelector(".mousehuntActionButton.inventoryPage-confirmPopup-suffix-button.confirm");
      if (!confirm2) {
        limit <= 3 && setTimeout(() => {
          warnOnBadCrafts(limit + 1);
        }, 250);
        return;
      }
      let type = confirm2.getAttribute("data-confirm-type");
      if (!type || !(type === "recipe" || type === "potion"))
        return;
      let popup = document.querySelector(".inventoryPage-confirmPopup");
      if (!popup)
        return;
      let recipe = popup.getAttribute("data-item-type");
      if (recipe) {
        if (type === "potion") {
          let consumed = document.querySelectorAll('.inventoryPage-confirmPopup-itemRow-quantity[data-source="consumed"]'), hasSB = !1;
          if (consumed.forEach((item) => {
            item.getAttribute("data-item-type") === "super_brie_cheese" && (hasSB = !0);
          }), !hasSB)
            return;
        }
        recipes_me_conversion_default.no.includes(recipe) ? showCraftWarning("This is not worth crafting using Magic Essence.") : 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 (getCurrentTab() !== "crafting" || getCurrentSubtab() !== "hammer")
        return;
      let items5 = document.querySelectorAll(".inventoryPage-item");
      items5 && items5.forEach((item) => __async(void 0, null, function* () {
        let tooltip = item.querySelector(".tooltip");
        if (!tooltip)
          return;
        let producedItem = item.getAttribute("data-produced-item");
        producedItem && (item.addEventListener("mouseleave", () => {
          item.classList.remove("new-tooltip-loading");
        }), 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];
          let itemType = item.getAttribute("data-item-type");
          producedItem.push(itemType), item.classList.add("new-tooltip-loading");
          let itemData = yield cacheGet(`smashable-${producedItem.join("-")}`);
          if (itemData || (itemData = yield getUserItems(producedItem), cacheSet(`smashable-${producedItem.join("-")}`, itemData)), !itemData || !itemData[0])
            return;
          let formattedParts = itemData.find((itemDataItem) => itemDataItem.type === itemType).formatted_parts;
          if (!formattedParts)
            return;
          let tooltipWrapper = makeElement("div", ["newTooltip", "tooltip"]);
          itemData.forEach((itemDataItem) => {
            let formattedPart = formattedParts.find((formattedPartItem) => formattedPartItem.type === itemDataItem.type);
            if (!formattedPart)
              return;
            let name = formattedPart.name, thumb = formattedPart.thumbnail_transparent || itemDataItem.thumbnail, quantity = formattedPart.quantity;
            if (itemDataItem.type === "gold_stat_item") {
              let quantityInt = Number.parseInt(quantity);
              quantity = quantityInt >= 1e6 ? `${Math.floor(quantityInt / 1e5) / 10}m` : quantity.toLocaleString();
            }
            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), item.classList.remove("new-tooltip-loading");
        })));
      }));
    }), moveRecipe = (type, recipesContainer) => {
      let recipeEl = document.querySelector(`.inventoryPage-item.recipe[data-produced-item="${type}"]`);
      recipeEl && (recipeEl.classList.add("reordered"), recipesContainer.append(recipeEl));
    }, updateRecipesOnPage = (type) => __async(void 0, null, function* () {
      if (!recipes_to_reorder_default[type] || type === "recommended")
        return;
      let recipesContainer = document.querySelector(`.inventoryPage-tagContent-tagGroup[data-tag="${type}"]`);
      if (!recipesContainer)
        return;
      let recipesModifying = [];
      if (document.querySelectorAll(".inventoryPage-tagContent-tagGroup.active .inventoryPage-item.recipe.known").forEach((recipe) => {
        let recipeId = recipe.getAttribute("data-item-type");
        recipesModifying.push(recipeId);
      }), recipesModifying.length === 0)
        return;
      let itemTypes = recipesModifying.map((recipe) => recipes_to_reorder_default[type][recipe]).filter(Boolean);
      type === "crafting_item" && itemTypes.push("geyser_draconic_weapon"), (yield getUserItems(itemTypes)).forEach((item) => {
        !item.quantity || item.quantity < 1 || (item.type === "geyser_draconic_weapon" ? (moveRecipe("draconic_geyser_chassis_crafting_item", recipesContainer), moveRecipe("draconic_geyser_chassis_i_crafting_item", recipesContainer)) : moveRecipe(item.type, recipesContainer));
      });
    }), recipes_default = () => __async(void 0, null, function* () {
      addStyles(styles_default3, "better-inventory-recipes"), onNavigation(cleanUpRecipeBook, {
        page: "inventory",
        tab: "crafting",
        subtab: "recipe"
      }), onNavigation(modifySmashableTooltip, {
        page: "inventory",
        tab: "crafting",
        subtab: "hammer"
      }), onEvent("js_dialog_show", warnOnBadCrafts), modifySmashableTooltip();
    });
  }
});

// src/modules/better-inventory/settings/index.js
var settings_default2, init_settings3 = __esm({
  "src/modules/better-inventory/settings/index.js"() {
    settings_default2 = () => __async(void 0, null, function* () {
      return [
        {
          id: "better-inventory.one-item-per-row",
          title: "Show one item per row",
          default: !0
        },
        {
          id: "better-inventory.larger-images",
          title: "Show larger images",
          default: !0
        },
        {
          id: "better-inventory.sort-inventory",
          title: "Sort inventory alphabetically",
          default: !0
        }
      ];
    });
  }
});

// src/modules/better-inventory/styles/double-width-item.css
var double_width_item_default, init_double_width_item = __esm({
  "src/modules/better-inventory/styles/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%}
`;
  }
});

// src/modules/better-inventory/styles/full-width-item.css
var full_width_item_default, init_full_width_item = __esm({
  "src/modules/better-inventory/styles/full-width-item.css"() {
    full_width_item_default = `.inventoryPage-item.full{width:100%}.inventoryPage-item-content-action span{display:block;margin-bottom:5px}.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}
`;
  }
});

// src/modules/better-inventory/styles/larger-images.css
var larger_images_default, init_larger_images = __esm({
  "src/modules/better-inventory/styles/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}
`;
  }
});

// src/modules/better-inventory/styles/styles.css
var styles_default4, init_styles5 = __esm({
  "src/modules/better-inventory/styles/styles.css"() {
    styles_default4 = `.inventoryPage-item.component .inventoryPage-item-imageContainer .itemImage{margin:0 auto;border:none;border-radius:0}.inventoryPage-item-content-action{margin:10px 0}.inventoryPage-item-content-description{height:auto;overflow:hidden 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-tagTitle{padding:0 0 10px;font-size:14px;font-weight:400}.mousehuntHud-page-subTabContent.hammer .inventoryPage-tagContent-listing{display:flex;flex-wrap:wrap;gap:5px 3px;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:hover .inventoryPage-item-margin{background-color:#e3e3e3;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{left:50%;display:flex;gap:10px;align-items:center;justify-content:center;width:auto;min-width:100px;padding:0;border:none;transform:translate(-50%)}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip .inventoryPage-item-margin{display:flex;flex-direction:column;align-items:center;background-color:transparent;border:none;box-shadow:none}.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{width:calc(33% - 3px);margin-right:3px}.inventoryPage-item-content-description-consumedItem-image{margin-left:0}.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;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;align-items:center;justify-content:space-around;height:40px;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:2px 4px;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}.inventoryPage-craftingTable-title{display:none}.mousehuntHud-page-subTabContent.crafting_table .inventoryPage-craftingTable{width:20%;background:#f6f3eb;border:1px solid #d3cecb;border-radius:3px;box-shadow:inset -1px 1px 3px #d3cecb}.mousehuntHud-page-subTabContent.crafting_table .inventoryPage-item.small .itemImage img{width:70px;height:70px}.mousehuntHud-page-subTabContent.crafting_table .mousehuntHud-page-subTabContent-margin{width:78%}.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;border:1px solid #ccc}.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:120px;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 img,.inventoryPage-craftingTable-slot-item .itemImage,.inventoryPage-craftingTable-slot-item .itemImage img{width:35px;height:35px}a.inventoryPage-item-larryLexicon.tsitu-lock-convertible{top:5px;right:5px!important;display:flex;align-items:center;justify-content:center;width:17px;height:17px!important;padding:2px;font-size:13px;border:1px solid #bebebe;border-radius:50%;opacity:.5}a.inventoryPage-item-larryLexicon.tsitu-lock-convertible:hover{opacity:1}.inventoryPage-tagContent-tagTitle.tsitu-lock-convertible{position:absolute;top:-10px;right:0}.inventoryPage-item.small.message_item .inventoryPage-item-margin{border-color:#48b0a9}.inventoryPage-item.small.message_item .inventoryPage-item-content-name{color:#368f89}.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;animation:.4s mh-improved-shake-light .7s 1}@media (prefers-reduced-motion: reduce){.mhui-craft-warning-tooltip{animation:none}}#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 .pageFrameView .itemViewStatBlock{border:none}.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{border-color:#ccc;border-radius:5px;box-shadow:0 1px 2px -2px #1f1f1f}.inventoryPage-item.small:hover .inventoryPage-item-margin,.inventoryPage-item.small:focus .inventoryPage-item-margin{background-color:#d8f0ff;border-color:#ccc;box-shadow:0 1px 2px -2px #1f1f1f}.mousehuntHud-page-subTabContent.trinket .mousehuntHud-page-subTabContent-prefix{display:none}.new-tooltip-loading:after{position:absolute;inset:1px;content:"";background:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif) center no-repeat,url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png) 0 0 repeat;border-radius:5px}.inventoryPage-item.small .tooltip{padding:10px}.inventoryPage-item-content-description-consumedItemContainer{margin-top:0}.crafting .recipe .inventoryPage-item-margin{padding-bottom:0}.crafting .recipe .inventoryPage-item .mousehuntActionButton{padding:2px;margin-top:-5px!important}.crafting .recipe .inventoryPage-item-name{margin-bottom:0}.mousehuntHud-page-subTabContent.crafting_table .inventoryPage-item .inventoryPage-item-margin{padding:0;margin:0}.inventoryPage-item-recipeOptions li.inactive{background:#ededed;opacity:.5}.inventoryPage-item-recipeOptions li.inactive:hover{opacity:1}.inventoryPage-item-recipeOptions li.selected{border-color:#fc6}.inventoryPage-item-recipeOptions li:hover,.inventoryPage-item-recipeOptions li.inactive:hover{border-color:#bbb}.inventoryPage-item.potion .inventoryPage-item-button{margin:5px 0 0 5px}.inventoryPage-item.small:hover .tooltip{max-width:250px}.inventoryPage-item.small:hover .tooltip .description{max-height:58px;overflow:hidden;text-overflow:ellipsis}.inventoryPage-item.small:hover .tooltip .inventoryPage-item-button{margin-top:10px}.inventoryPage-shieldExpiry{display:none}.search .inventoryPage-tagContent-tagTitle .inventoryPage-tagContent-name{padding-right:5px}
`;
  }
});

// src/modules/better-inventory/styles/tiny-group.css
var tiny_group_default, init_tiny_group = __esm({
  "src/modules/better-inventory/styles/tiny-group.css"() {
    tiny_group_default = `.tiny-item{display:grid;grid-template-columns:25px 2fr 1fr 1fr;place-items:center stretch}.tiny-item-image{width:20px;height:20px}.tiny-item .inventoryPage-item-button.button{padding:0;font-size:11px}.tiny-item .inventoryPage-item-content-action{justify-self:flex-end;margin:0}.tiny-item:nth-child(2n){background-color:#eee;border-radius:5px}.tiny-item:hover,.tiny-item:nth-child(2n):hover{background-color:#d8f0ff;border-radius:5px}.tiny-item-stats{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:4px}.tiny-item-action{position:relative;display:none;gap:5px;justify-self:center;margin-bottom:0}.tiny-item:hover .tiny-item-action{display:flex}.mousehuntActionButton.tiny.tiny-item-view{padding:1px 5px;margin-bottom:0}.inventoryPage-item .mousehuntActionButton.tiny.tiny-item-view{margin:0!important}.all-group .inventoryPage-tagContent-tagTitle:after{width:0;height:0;margin-left:5px;content:"";border-right:5px solid transparent;border-bottom:5px solid #999;border-left:5px solid transparent;transition:transform .15s}.all-group.toggled .inventoryPage-tagContent-tagTitle:after{transform:rotate(-180deg)}.tiny-item-action.busy:after{position:absolute;inset:0;display:block;content:"";background:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif) center no-repeat;background-color:#ffffff7f;border-radius:4px}
`;
  }
});

// src/modules/better-inventory/index.js
var setOpenQuantityOnClick, addOpenAllToConvertible, updateCollectibles, addArmButtonToCharms, sortInventoryItemsByName, resortInventory, addResortInventory, main2, init3, better_inventory_default, init_better_inventory = __esm({
  "src/modules/better-inventory/index.js"() {
    init_utils2();
    init_recipes();
    init_settings3();
    init_double_width_item();
    init_full_width_item();
    init_larger_images();
    init_styles5();
    init_tiny_group();
    setOpenQuantityOnClick = (attempts = 0) => {
      let 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") {
          let maxNum = e.target.innerText.split(" ").at(-1);
          maxNum = maxNum.replace("Submit", ""), maxNum = Number.parseInt(maxNum);
          let input = document.querySelector(".itemView-action-convert-quantity");
          input.value = maxNum;
        }
      });
    }, addOpenAllToConvertible = () => {
      let form = document.querySelector(".convertible .itemView-action-convertForm");
      if (!form || form.getAttribute("data-open-all-added"))
        return;
      form.setAttribute("data-open-all-added", !0);
      let formHTMLArray = form.innerHTML.split(" /");
      if (!formHTMLArray[1])
        return;
      let formHTMLArray2 = formHTMLArray[1].split("<a");
      if (!formHTMLArray2[1])
        return;
      let quantity = formHTMLArray2[0].trim(), newFormHTML = `${formHTMLArray[0]}/ <span class="open-all">${quantity}</span><a${formHTMLArray2[1]}`;
      form.innerHTML = newFormHTML, document.querySelector(".open-all").addEventListener("click", () => {
        let input = form.querySelector(".itemView-action-convert-quantity");
        input && (input.value = Number.parseInt(input.value, 10) > 200 ? 200 : Number.parseInt(input.value, 10));
      });
    }, updateCollectibles = () => {
      let collectibles = document.querySelectorAll(".mousehuntHud-page-subTabContent.collectible .inventoryPage-item.small");
      collectibles.length && collectibles.forEach((collectible) => {
        let type = collectible.getAttribute("data-item-type");
        if (!type)
          return;
        let name = collectible.getAttribute("data-name"), nameEl = collectible.querySelector(".inventoryPage-item-content-name span");
        name && nameEl && (nameEl.innerText = name), collectible.getAttribute("data-item-classification") !== "message_item" && (collectible.setAttribute("onclick", ""), collectible.addEventListener("click", (e) => {
          e.preventDefault(), hg.views.ItemView.show(type);
        }));
      });
    }, addArmButtonToCharms = () => {
      if (getCurrentPage() !== "inventory" || getCurrentTab() !== "traps" || getCurrentSubtab() !== "trinket")
        return;
      let charms = document.querySelectorAll(".inventoryPage-item.trinket");
      charms.length && charms.forEach((charm) => {
        if (charm.querySelector(".inventoryPage-item-imageContainer-action"))
          return;
        let actionContainer = charm.querySelector(".inventoryPage-item-imageContainer");
        if (!actionContainer)
          return;
        let armButton = makeElement("div", "inventoryPage-item-imageContainer-action");
        armButton.setAttribute("onclick", "app.pages.InventoryPage.armItem(this); return false;"), actionContainer.append(armButton);
      });
    }, sortInventoryItemsByName = (items5) => [...items5].sort((a, b) => {
      let aName = a.getAttribute("data-name") || "", bName = b.getAttribute("data-name") || "";
      return aName.localeCompare(bName);
    }).filter((item, index, self) => index === self.findIndex((t) => t.getAttribute("data-item-type") === item.getAttribute("data-item-type"))), resortInventory = () => {
      document.querySelectorAll(".mousehuntHud-page-tabContent.active .inventoryPage-tagContent-listing").forEach((list) => {
        let items5 = list.querySelectorAll(".inventoryPage-item");
        sortedItems = sortInventoryItemsByName(items5), sortedItems.forEach((item) => {
          let name = item.getAttribute("data-name"), nameEl = item.querySelector(".inventoryPage-item-content-name span");
          name && nameEl && (nameEl.innerText = name), list.append(item);
        });
      });
    }, addResortInventory = () => {
      onNavigation(() => {
        setTimeout(resortInventory, 250);
      }, {
        page: "inventory",
        anyTab: !0,
        anySubtab: !0
      }), onRequest("pages/page.php", (response, data) => {
        data.page_class === "Inventory" && setTimeout(resortInventory, 250);
      });
    }, main2 = () => {
      onOverlayChange({ item: { show: setOpenQuantityOnClick } }), getCurrentPage() === "item" && setOpenQuantityOnClick(), addOpenAllToConvertible(), updateCollectibles(), addArmButtonToCharms(), onNavigation(() => {
        addOpenAllToConvertible(), updateCollectibles(), addArmButtonToCharms();
      }, {
        page: "inventory"
      }), getSetting("better-inventory.sort-inventory", !0) && addResortInventory(), onEvent("js_dialog_show", addOpenAllToConvertible), recipes_default();
    }, init3 = () => __async(void 0, null, function* () {
      addStyles([
        styles_default4,
        getSetting("better-inventory.one-item-per-row", !0) ? full_width_item_default : double_width_item_default,
        getSetting("better-inventory.larger-images", !0) ? larger_images_default : "",
        getSetting("better-inventory.show-all-group", !1) ? tiny_group_default : ""
      ], "better-inventory"), main2();
    }), better_inventory_default = {
      id: "better-inventory",
      name: "Better Inventory",
      type: "better",
      default: !0,
      description: "Updates the inventory layout and styling.",
      load: init3,
      settings: settings_default2
    };
  }
});

// src/modules/better-item-view/modules/hover-item/styles.css
var styles_default5, init_styles6 = __esm({
  "src/modules/better-item-view/modules/hover-item/styles.css"() {
    styles_default5 = `#item-data-wrapper{position:absolute;z-index:999999;box-sizing:border-box;display:block;width:300px;height:100px;background:linear-gradient(#decebb 5%,#f0eddf 50%);border:1px solid #9a8872;border-radius:10px;box-shadow:0 1px 5px -1px #5e5e5e}.item-data-wrapper-loading{display:flex;align-items:flex-end;justify-content:center;height:90%;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif);background-repeat:no-repeat;background-position:center;background-size:55px}#item-data-wrapper .item-data{display:grid;grid-template-columns:90px 1fr;gap:10px;align-items:center;height:95px}#item-data-wrapper .item-image{height:80px;margin-left:10px;background-color:#fff;border:1px solid #25211e;border-radius:5px}#item-data-wrapper .item-text{display:flex;flex-direction:column;justify-content:space-around;height:80px;margin-right:10px}#item-data-wrapper .item-name{width:160px;font-size:12px;font-weight:900}
`;
  }
});

// src/modules/better-item-view/modules/hover-item/index.js
var fetchItemData, makeItemMarkup, makeLoadingMarkup, itemDataWrapper, main3, hover_item_default, init_hover_item = __esm({
  "src/modules/better-item-view/modules/hover-item/index.js"() {
    init_utils2();
    init_styles6();
    fetchItemData = (itemId) => __async(void 0, null, function* () {
      var _a;
      let itemDataRequest = yield doRequest("managers/ajax/users/userInventory.php", {
        action: "get_items",
        "item_types[]": itemId
      });
      return (_a = itemDataRequest == null ? void 0 : itemDataRequest.items) == null ? void 0 : _a[0];
    }), makeItemMarkup = (item) => {
      if (!item)
        return !1;
      let itemData = makeElement("div", "item-data"), itemImage = makeElement("img", "item-image");
      itemImage.src = item.thumbnail, itemData.append(itemImage);
      let itemText = makeElement("div", "item-text");
      makeElement("div", "item-name", item.name, itemText);
      let quantity = makeElement("div", "item-quanity");
      makeElement("span", "", "You own: ", quantity), makeElement("span", "", item.quantity.toLocaleString(), quantity), itemText.append(quantity);
      let description = makeElement("div", "item-description"), firstSentence = item.description.match(/[^!.?]+[!.?]/);
      return makeElement("div", "item-description-text", firstSentence ? firstSentence[0] : item.description, description), itemData.append(itemText), itemData;
    }, makeLoadingMarkup = (e) => {
      itemDataWrapper && itemDataWrapper.remove(), itemDataWrapper = makeElement("div", "item-data-wrapper"), itemDataWrapper.id = "item-data-wrapper", itemDataWrapper.innerHTML = '<span class="item-data-wrapper-loading">Loading...</span>', document.body.append(itemDataWrapper);
      let rect = e.target.getBoundingClientRect(), top = rect.top + window.scrollY, left = rect.left + window.scrollX, tooltipTop = top - itemDataWrapper.offsetHeight - 10;
      return tooltipTop < 0 && (tooltipTop = top + rect.height + 10), itemDataWrapper.style.top = `${tooltipTop}px`, itemDataWrapper.style.left = `${left - itemDataWrapper.offsetWidth / 2 + rect.width / 2}px`, itemDataWrapper;
    }, main3 = () => {
      let itemLinks = document.querySelectorAll('.journal .content .entry .journaltext a[onclick*="ItemView.show"]');
      itemLinks && itemLinks.forEach((link) => {
        let itemType = link.getAttribute("onclick").match(/'([^']+)'/)[1];
        link.setAttribute("onclick", `hg.views.ItemView.show('${itemType}'); return false;`);
        let timeoutId = null, isMouseOver = !1;
        link.addEventListener("mouseenter", (e) => __async(void 0, null, function* () {
          isMouseOver = !0, timeoutId && clearTimeout(timeoutId), timeoutId = setTimeout(() => __async(void 0, null, function* () {
            if (!isMouseOver)
              return;
            makeLoadingMarkup(e);
            let itemData = yield fetchItemData(itemType);
            if (itemData && itemDataWrapper && isMouseOver) {
              let markup = makeItemMarkup(itemData);
              itemDataWrapper.innerHTML = markup.outerHTML;
            }
          }), 500);
        })), link.addEventListener("mouseleave", () => {
          isMouseOver = !1, timeoutId && clearTimeout(timeoutId), itemDataWrapper && itemDataWrapper.remove();
        });
      });
    }, hover_item_default = () => {
      addStyles(styles_default5, "better-item-view-hover-item"), setTimeout(main3, 500), onRequest("*", () => {
        setTimeout(main3, 1e3);
      });
    };
  }
});

// src/modules/better-item-view/settings/index.js
var settings_default3, init_settings4 = __esm({
  "src/modules/better-item-view/settings/index.js"() {
    settings_default3 = () => __async(void 0, null, function* () {
      return [
        {
          id: "better-item-view.show-drop-rates",
          title: "Show drop rates",
          default: !0
        },
        {
          id: "better-item-view.show-item-hover",
          title: "Show item details on hover (in journal)",
          default: !0
        }
      ];
    });
  }
});

// src/modules/better-item-view/styles.css
var styles_default6, init_styles7 = __esm({
  "src/modules/better-item-view/styles.css"() {
    styles_default6 = `.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}.mouseview-has-mhct .mouse-ar-wrapper{display:grid;grid-template-columns:1fr 1fr 50px;gap:10px;place-items:center stretch;width:auto;padding:5px;margin:5px 0;font-size:12px}.mouseview-has-mhct .has-stages .mouse-ar-wrapper{grid-template-columns:1fr 1fr 1fr 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:flex-start}.itemViewContainer .itemViewStatBlock-stat-value{flex:1;text-align:left}.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{right:6px;z-index:1;border-top-right-radius:10px}#overlayPopup.itemViewPopup .itemView-header-classification{right:25px}.itemView-actionContainer{display:flex;flex-wrap:wrap;gap:10px}.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{width:200px;height:200px;margin-left:-15px;background-repeat:no-repeat;background-position:center;background-size:contain}.itemView-thumbnail.large{background-size:100%}input.itemView-action-convert-quantity{width:50px}.itemViewPopup .itemViewStatBlock-padding{flex-direction:column}.itemView-character .itemView-character-image{transition:all .4s ease-out;transform-origin:bottom}.itemView-character:hover .itemView-character-image{transform:scale(1.2) rotate(-10deg) translate(5px)}.itemView-header-classification{visibility:hidden}.itemView-header-classification span{visibility:visible}.itemViewStatBlock-stat{display:flex;align-items:center}.itemView-sidebar-checklistItem:nth-child(1),.itemView-sidebar-checklistItem:nth-child(2),.itemView-sidebar-checklistItem.checked{display:block}.itemView-sidebar-checklistItem{background:url(https://www.mousehuntgame.com/images/icons/bad_idea.png) 1px 4px no-repeat;background-size:14px}.itemView-partsContainer{display:flex;flex-direction:column;align-items:stretch;padding-top:15px;padding-bottom:10px;margin-top:15px;border-top:1px solid #666}.convertibleOpenView-item-imageContainer{margin-right:auto}.convertibleOpenView-itemContainer.num_items_1 .convertibleOpenView-item{gap:20px;width:100%}.itemView-obtainHint{margin-left:190px}.itemViewContainer iframe.socialLink-facebookLike{margin-right:5px}.convertibleOpenView-itemContainer{padding-top:10px;margin-top:0}.itemViewContainer.skin .itemView-thumbnail{background-size:cover}.inventoryPage-item.trinket .itemViewStatBlock.trinket .itemViewStatBlock-padding{overflow:hidden;border-radius:3px}.inventoryPage-item.trinket .itemViewStatBlock.trinket{border-top:none}.inventoryPage-item.trinket .itemViewStatBlock-stat{border-top:1px solid #ccc;border-bottom:none}
`;
  }
});

// src/modules/better-item-view/index.js
var getLinkMarkup, addLinks, updateItemView, shortenRecipeGoldHint, init4, better_item_view_default, init_better_item_view = __esm({
  "src/modules/better-item-view/index.js"() {
    init_utils2();
    init_hover_item();
    init_settings4();
    init_styles7();
    getLinkMarkup = (name, id) => makeLink("MHCT", `https://api.mouse.rip/mhct-redirect-item/${id}`, !0) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(name.replaceAll(" ", "_"))}`, !0), addLinks = (itemId) => {
      let title = document.querySelector(".itemView-header-name");
      if (!title)
        return;
      let currentLinks = document.querySelector(".mh-item-links");
      currentLinks && currentLinks.remove();
      let div = document.createElement("div");
      div.classList.add("mh-item-links"), div.innerHTML = getLinkMarkup(title.innerText, itemId), title.append(div);
      let values = document.querySelector(".mouseView-values"), desc = document.querySelector(".mouseView-descriptionContainer");
      values && desc && desc.insertBefore(values, desc.firstChild);
    }, updateItemView = () => __async(void 0, null, function* () {
      let itemView = document.querySelector(".itemViewContainer");
      if (!itemView)
        return;
      let itemId = itemView.getAttribute("data-item-id");
      if (!itemId)
        return;
      let sidebar = document.querySelector(".itemView-sidebar");
      if (sidebar) {
        let crafting = document.querySelector(".itemView-action.crafting_item");
        crafting && sidebar.append(crafting);
        let smashing = document.querySelector(".itemView-partsContainer");
        if (smashing) {
          if (sidebar.append(smashing), smashing.getAttribute("data-has-changed-title"))
            return;
          let smashingTitle = smashing.querySelector("b");
          smashingTitle && (smashingTitle.innerText = "Hunter's Hammer to get:", smashing.setAttribute("data-has-changed-title", "true"), smashing.innerHtml = smashing.innerHTML.replace("If you smash it, you'll get:", ""));
        }
      }
      let obtainHint = document.querySelector(".itemView-obtainHint"), description = document.querySelector(".itemView-description");
      if (obtainHint && description && description.after(obtainHint), itemView.classList.contains("base") || itemView.classList.contains("weapon") || itemView.classList.contains("skin")) {
        let thumbnailContainer = itemView.querySelector(".itemView-thumbnailContainer");
        if (thumbnailContainer) {
          let thumbnail = thumbnailContainer.querySelector(".itemView-thumbnail"), fullSize = thumbnailContainer.querySelector("a");
          thumbnail && fullSize && fullSize.getAttribute("data-image") && (thumbnail.style.backgroundImage = `url(${fullSize.getAttribute("data-image")})`, thumbnail.style.backgroundSize = "contain", itemView.classList.contains("base") && (thumbnail.style.backgroundPositionY = "-100px"));
        }
      }
      if (addLinks(itemId), !getSetting("better-item-view.show-drop-rates", !0))
        return;
      let id = Number.parseInt(itemId, 10);
      if ([
        2473,
        // Mina's gift
        823,
        // party charm
        803,
        // chrome charm
        420,
        // king's credits
        1980,
        // king's keys
        585
        // scrambles
      ].includes(id))
        return;
      let mhctJson = yield getArForMouse(itemId, "item");
      if (!mhctJson || mhctJson === void 0)
        return;
      itemView.classList.add("mouseview-has-mhct");
      let container = itemView.querySelector(".itemView-padding");
      if (!container)
        return;
      let arWrapper = makeElement("div", "ar-wrapper"), title = makeElement("div", "ar-header"), 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" rel="noopener noreferrer">MHCT</a>.'
      });
      let link = makeElement("a", "ar-link", "View on MHCT \u2192");
      link.href = `https://api.mouse.rip/mhct-redirect-item/${itemId}`, link.target = "_mhct", title.append(link), arWrapper.append(title);
      let itemsArWrapper = makeElement("div", "item-ar-wrapper"), hasStages = mhctJson.some((itemAr) => itemAr.stage);
      hasStages && itemsArWrapper.classList.add("has-stages"), mhctJson = mhctJson.filter((itemAr) => Number.parseInt(itemAr.drop_pct, 10) > 0).slice(0, 10), mhctJson.forEach((itemAr) => {
        let dropPercent = Number.parseInt(itemAr.drop_pct, 10).toFixed(2);
        if (dropPercent !== "0.00") {
          let itemArWrapper = makeElement("div", "mouse-ar-wrapper");
          makeElement("div", "location", itemAr.location, itemArWrapper), hasStages && makeElement("div", "stage", itemAr.stage, itemArWrapper), makeElement("div", "cheese", itemAr.cheese, itemArWrapper), makeElement("div", "rate", `${dropPercent}%`, itemArWrapper), itemsArWrapper.append(itemArWrapper);
        }
      }), mhctJson.length > 0 && (arWrapper.append(itemsArWrapper), container.append(arWrapper));
    }), shortenRecipeGoldHint = () => {
      ["layout", "content", "actions"].forEach((layout) => {
        onRender({
          group: "ItemView",
          layout,
          after: !0,
          callback: (data, results) => results.replaceAll("gold per piece", "gold each").replaceAll("One potion converts ", "")
        });
      });
    }, init4 = () => __async(void 0, null, function* () {
      addStyles(styles_default6, "better-item-view"), getSetting("better-item-view.show-item-hover", !0) && hover_item_default(), shortenRecipeGoldHint(), onNavigation(shortenRecipeGoldHint, {
        page: "inventory",
        tab: "potions"
      }), onOverlayChange({ item: { show: updateItemView } });
    }), better_item_view_default = {
      id: "better-item-view",
      name: "Better Items",
      type: "better",
      default: !0,
      description: "Updates the styles and shows drop rates, links to MHCT, and MH Wiki.",
      load: init4,
      settings: settings_default3
    };
  }
});

// src/modules/better-journal/utils.js
var callbacks2, hasAddedJournalEventListener, addJournalEventListener, onJournalEntry, utils_default, init_utils3 = __esm({
  "src/modules/better-journal/utils.js"() {
    callbacks2 = [], hasAddedJournalEventListener = !1, addJournalEventListener = () => {
      document.addEventListener("journal-entry", (e) => {
        for (let { callback } of callbacks2)
          callback(e.detail);
      });
    }, onJournalEntry = (callback, weight = 0) => {
      hasAddedJournalEventListener || (addJournalEventListener(), hasAddedJournalEventListener = !0), callbacks2.push({ callback, weight }), callbacks2.sort((a, b) => a.weight - b.weight);
    }, utils_default = onJournalEntry;
  }
});

// src/modules/better-journal/modules/journal-gold-and-points/styles.css
var styles_default7, init_styles8 = __esm({
  "src/modules/better-journal/modules/journal-gold-and-points/styles.css"() {
    styles_default7 = `.mh-ui-gold,.mh-ui-points{position:relative;margin-left:20px}.mh-ui-gold:after,.mh-ui-points:after{position:absolute;inset:-2px 0 0 -20px;width:18px;height:18px;content:"";background-image:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/dccbaeebbdfa745340ff9363749f35ba.png);background-position:center;background-size:contain}.mh-ui-points:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/eeebc1c32b4242b95f75041be7275980.png)}
`;
  }
});

// src/modules/better-journal/modules/journal-gold-and-points/index.js
var wrapGoldAndPoints, main4, journal_gold_and_points_default, init_journal_gold_and_points = __esm({
  "src/modules/better-journal/modules/journal-gold-and-points/index.js"() {
    init_utils2();
    init_utils3();
    init_styles8();
    wrapGoldAndPoints = (entry) => {
      if (entry.getAttribute("data-modified-points-gold") || (entry.setAttribute("data-modified-points-gold", !0), entry.querySelector(".mh-ui-points") || entry.querySelector(".mh-ui-gold")))
        return;
      let points = entry.innerHTML.match(/worth (.+?) points/i), gold = entry.innerHTML.match(/points and (.+?) gold/i);
      points && (entry.innerHTML = entry.innerHTML.replace(points[0], `worth <span class="mh-ui-points">${points[1]}</span> points`)), gold && (entry.innerHTML = entry.innerHTML.replace(gold[0], `points and <span class="mh-ui-gold">${gold[1]}</span> gold`));
    }, main4 = () => __async(void 0, null, function* () {
      addStyles(styles_default7, "better-journal-gold-and-points"), utils_default(wrapGoldAndPoints, 2e3);
    }), journal_gold_and_points_default = main4;
  }
});

// src/modules/better-journal/modules/journal-history/styles.css
var styles_default8, init_styles9 = __esm({
  "src/modules/better-journal/modules/journal-history/styles.css"() {
    styles_default8 = `.journal .content .entry .journalbody .journaldate{display:flex;justify-content:space-between}.history-timestamp{text-align:right}.journal-history-page-selector{position:absolute;top:28px;right:-50px;display:flex;gap:5px;align-items:center;padding:5px 10px;background-color:#eee;border:1px solid #5b5b5b;border-radius:0 0 10px 10px}.pagerView-section.current.page-selector{position:relative}.journal-history-page-selector .page-input{width:40px;text-align:center}.history-timestamp:after{display:none}
`;
  }
});

// src/modules/better-journal/modules/journal-history/index.js
var makeEntriesMarkup, doPageStuff, getAllEntries, lastDate, saveToDatabase, addPageSelector, getPager, doJournalHistory, doJournalHistoryRequest, doDelayedJournalHistory, maybeDoJournalHistory, pager, journalEntries, miceThumbs, journal_history_default, init_journal_history = __esm({
  "src/modules/better-journal/modules/journal-history/index.js"() {
    init_utils2();
    init_utils3();
    init_styles9();
    makeEntriesMarkup = (entries) => entries.map((entry) => {
      if (entry.data && (entry = entry.data), entry = {
        id: (entry == null ? void 0 : entry.id) || 0,
        timestamp: (entry == null ? void 0 : entry.timestamp) || 0,
        date: (entry == null ? void 0 : entry.date) || "0:00",
        location: (entry == null ? void 0 : entry.location) || "",
        text: (entry == null ? void 0 : entry.text) || "",
        type: (entry == null ? void 0 : entry.type) || [],
        image: (entry == null ? void 0 : entry.image) || ""
      }, (entry.type.includes("catchsuccess") || entry.type.includes("catchsuccessloot") || entry.type.includes("bonuscatchsuccess") || entry.type.includes("luckycatchsuccess") || entry.type.includes("bonuscatchsuccess")) && !entry.mouse) {
        let mouseLink = entry.text.match(/hg\.views\.MouseView\.show\('([^']+)'\)/);
        mouseLink && mouseLink[1] && (entry.mouse = mouseLink[1]);
      }
      let html = `<div class="${entry.type.join(" ")}" data-entry-id="${entry.id}" data-mouse-type="${entry.mouse || ""}">`;
      if (entry.mouse) {
        let mouseImages = miceThumbs.find((mouse) => mouse.type === entry.mouse);
        mouseImages && (html += `<div class="journalimage"><a onclick="hg.views.MouseView.show('${entry.mouse}'); return false;"><img src="${mouseImages.thumb}" border="0"></a></div>`);
      }
      entry.image && !entry.mouse && (html += `<div class="journalimage">${entry.image}</div>`);
      let timestamp = "";
      return entry.timestamp && (timestamp = new Date(entry.timestamp).toLocaleString("en-US", { month: "short", day: "numeric", year: "numeric" })), html += `<div class="journalbody">
      <div class="journalactions"></div>
      <div class="journaldate">${entry.date} - ${entry.location}<span class="history-timestamp">${timestamp}</span></div>
      <div class="journaltext">${entry.text}</div>
    </div>
  </div>`, html;
    }).join(""), doPageStuff = (page, event = null) => {
      if (page <= 6 || page > totalPages)
        return;
      event && (event.preventDefault(), event.stopPropagation());
      let journalEntriesForPage = journalEntries.slice((page - 1) * 12, page * 12), journalEntryContainer = document.querySelector("#journalContainer .journalEntries");
      !journalEntriesForPage.length || !journalEntryContainer || (journalEntryContainer.append(makeElement("div", "journal-history-entries", makeEntriesMarkup(journalEntriesForPage))), doEvent2("journal-history-entry-added", journalEntryContainer));
    }, getAllEntries = () => __async(void 0, null, function* () {
      return journalEntries.length || (journalEntries = yield dbGetAll("journal")), journalEntries.length ? (journalEntries = journalEntries.sort((a, b) => a.timestamp && b.timestamp ? b.timestamp - a.timestamp : a.id && b.id ? b.id - a.id : 0), journalEntries) : [];
    }), lastDate = "", saveToDatabase = (entry) => __async(void 0, null, function* () {
      var _a;
      if (getCurrentPage() !== "camp" && getCurrentPage() !== "journal")
        return;
      let entryId = Number.parseInt(entry.getAttribute("data-entry-id"), 10);
      if (!entryId)
        return;
      let entryText = entry.querySelector(".journalbody .journaltext");
      if (!entryText)
        return;
      let original = yield dbGet("journal", entryId);
      if (original && ((_a = original.data) != null && _a.text))
        return;
      let dateEl = entry.querySelector(".journaldate"), date = dateEl ? dateEl.innerText : lastDate;
      lastDate = date, date = date.split("-");
      let entryImage = entry.querySelector(".journalimage"), journalData = {
        id: entryId,
        timestamp: Date.now(),
        date: date[0] ? date[0].trim() : "0:00",
        location: date[1] ? date[1].trim() : "Unknown",
        text: entryText.innerHTML,
        type: [...entry.classList],
        mouse: entry.getAttribute("data-mouse-type") || null,
        image: entryImage ? entryImage.innerHTML : null
      };
      yield dbSet("journal", journalData);
    }), addPageSelector = () => {
      let current = document.querySelector(".pagerView-section.current");
      if (!current || current.classList.contains("page-selector"))
        return;
      current.classList.add("page-selector");
      let isShowing = !1;
      current.addEventListener("click", (event) => {
        if (isShowing) {
          if (event.target.classList.contains("page-selector")) {
            let pageSelector2 = document.querySelector(".journal-history-page-selector");
            pageSelector2 && pageSelector2.remove();
          }
          return;
        }
        isShowing = !0;
        let target = event.target, pageSelector = makeElement("div", "journal-history-page-selector"), pageInputLabel = makeElement("label", "page-input-label", "Go to page:");
        pageInputLabel.htmlFor = "page-input", pageSelector.append(pageInputLabel);
        let pageInput = makeElement("input", "page-input");
        pageInput.type = "number", pageInput.min = 1, pageInput.max = totalPages;
        let showPage = () => {
          getPager(), pager.showPage(Number.parseInt(pageInput.value, 10)), setTimeout(() => {
            pageSelector.remove(), isShowing = !1;
          }, 500);
        };
        pageInput.addEventListener("keydown", (evt) => {
          evt.key === 13 && showPage();
        });
        let pageSubmit = makeMhButton({
          text: "Go",
          size: "tiny",
          className: "page-submit",
          callback: showPage,
          appendTo: pageSelector
        });
        pageSelector.append(pageInput, pageSubmit), target.append(pageSelector), pageInput.focus();
      });
    }, getPager = () => {
      let journalPageLink = document.querySelector(".pagerView-nextPageLink.pagerView-link");
      if (journalPageLink)
        return pager = hg.views.JournalView.getPager(journalPageLink), pager;
    }, doJournalHistory = () => __async(void 0, null, function* () {
      if (!(getCurrentPage() === "camp" || getCurrentPage() === "journal"))
        return;
      let perPage = getCurrentPage() === "journal" ? 24 : 12, defaultPages = getCurrentPage() === "journal" ? 3 : 6;
      pager || getPager(), !(!pager || !pager.getTotalItems()) && (journalEntries = journalEntries.length ? journalEntries : yield getAllEntries(), totalPages = Math.ceil(journalEntries.length / perPage), totalPages = totalPages <= defaultPages ? defaultPages : totalPages, !(totalPages < 6) && (addPageSelector(), !(!pager || !pager.setTotalItems) && (pager.setTotalItems(totalPages * perPage), pager.enable(), pager.render())));
    }), doJournalHistoryRequest = () => {
      doJournalHistory(), pager || doJournalHistory(), pager && pager.getCurrentPage() > 6 && doPageStuff(pager.getCurrentPage());
    }, doDelayedJournalHistory = () => {
      setTimeout(doJournalHistory, 500), setTimeout(doJournalHistory, 1e3);
    }, maybeDoJournalHistory = () => {
      pager = null, (getCurrentPage() === "camp" || getCurrentPage() === "journal") && (doDelayedJournalHistory(), addEvent("ajax_response", doDelayedJournalHistory, { removeAfterFire: !0 }));
    }, journalEntries = [], miceThumbs = [], journal_history_default = () => __async(void 0, null, function* () {
      addStyles(styles_default8, "better-journal-journal-history"), miceThumbs = yield getData("mice-thumbnails"), doDelayedJournalHistory(), onRequest("pages/journal.php", doJournalHistoryRequest), onNavigation(maybeDoJournalHistory), utils_default(saveToDatabase, 1);
    });
  }
});

// src/modules/better-journal/modules/journal-icons-minimal/styles.css
var styles_default9, init_styles10 = __esm({
  "src/modules/better-journal/modules/journal-icons-minimal/styles.css"() {
    styles_default9 = `.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"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=scavenger_hunt_hint_stat_item"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]{position:relative;padding-left:20px;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,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=scavenger_hunt_hint_stat_item"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]:before{position:absolute;top:-3px;left:-2px;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)}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chrome_trinket"]:before{top:-4px;left:-3px;background-image:url(https://i.mouse.rip/upscaled/7d9f0e220db8280b84b8bffe39cd803e.png);background-size:22px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"]{padding-left:20px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"]:before{left:-4px;background-image:url(https://i.mouse.rip/upscaled/8331fe131377c15fcf5c4773bde1fd8f.png)}.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)}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=scavenger_hunt_hint_stat_item"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]{padding-left:17px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=scavenger_hunt_hint_stat_item"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]:before{left:-3px;background-image:url(https://www.mousehuntgame.com/images/items/stats/large/5da5d920ba95f944d4e5b37ae235685e.png)}.journal .entry.unstable_charm_trigger a[href*="https://www.mousehuntgame.com/item.php?item_type="]:before{display:none}.journal .entry.unstable_charm_trigger .journaltext a{padding-left:unset}
`;
  }
});

// src/modules/better-journal/modules/journal-icons/styles.css
var styles_default10, init_styles11 = __esm({
  "src/modules/better-journal/modules/journal-icons/styles.css"() {
    styles_default10 = `.entry.short.misc.custom.refine_pollutinum .journaltext a:before{display:none}.entry.short.misc.custom.refine_pollutinum .journaltext a{padding:0}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]:before{left:1px}.spring_hunt_charge_trinket_effect .journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chocolatium_stat_item"]:before,.spring_hunt_relic_hunter_egg_drop .journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=relic_hunter_egg_convertible"]:before{display:none}.spring_hunt_charge_trinket_effect .journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chocolatium_stat_item"],.spring_hunt_relic_hunter_egg_drop .journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=relic_hunter_egg_convertible"]{padding-left:unset}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=fulminas_gift_convertible"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=storm_egg_convertible"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=prize_credit_stat_item"]:before{left:0}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=fulminas_gift_convertible"]{padding-left:22px}
`;
  }
});

// src/modules/better-journal/modules/journal-icons/index.js
var journal_icons_default, init_journal_icons = __esm({
  "src/modules/better-journal/modules/journal-icons/index.js"() {
    init_utils2();
    init_styles10();
    init_styles11();
    journal_icons_default = () => __async(void 0, null, function* () {
      document.querySelector("#better-journal-icons") || (addStyles([styles_default10, styles_default9], "better-journal-icons"), addExternalStyles("https://static.mouse.rip/journal-icons.css"));
    });
  }
});

// src/modules/better-journal/modules/journal-icons-minimal/index.js
var journal_icons_minimal_default, init_journal_icons_minimal = __esm({
  "src/modules/better-journal/modules/journal-icons-minimal/index.js"() {
    init_utils2();
    init_styles10();
    journal_icons_minimal_default = () => __async(void 0, null, function* () {
      addStyles(styles_default9, "better-journal-icons-minimal");
    });
  }
});

// src/data/journal-item-colors.json
var journal_item_colors_default, init_journal_item_colors = __esm({
  "src/data/journal-item-colors.json"() {
    journal_item_colors_default = {
      scavenger_hunt_hint_stat_item: "#1e831e",
      map_clue_stat_item: "#1e831e",
      fulminas_gift_convertible: "#a012a0",
      chrome_trinket: "#8b9ec8",
      snowball_trinket: "#1f719e",
      ultimate_trinket: "#068987",
      front_cover_torn_page: "#7a5b2d",
      back_cover_torn_page: "#7a5b2d",
      gnawnia_torn_page: "#7a5b2d",
      dojo_torn_page: "#7a5b2d",
      deep_mouse_torn_page: "#7a5b2d",
      rift_notes_1_torn_page: "#7a5b2d",
      rift_notes_2_torn_page: "#7a5b2d",
      rift_notes_3_torn_page: "#7a5b2d",
      whisker_woods_rift_torn_page: "#7a5b2d",
      dark_magi_torn_page: "#7a5b2d",
      king_scarab_torn_page: "#7a5b2d",
      shattered_carmine_1_torn_page: "#7a5b2d",
      shattered_carmine_2_torn_page: "#7a5b2d",
      soapy_oasis_pattern_crafting_item: "#7a5b2d",
      soapy_phantasmic_pattern_crafting_item: "#7a5b2d",
      polluted_chrome_monstrobot_pattern_crafting_item: "#7a5b2d",
      noxious_school_of_sharks_pattern_crafting_item: "#7a5b2d",
      cursed_gold_stat_item: "#4d631a",
      temporal_plate_crafting_item: "#a66bc5",
      draconic_geyser_trap_crafting_item: "#ea4224",
      golden_goose_stat_item: "#e27a11",
      zugzwang_sock_collectible: "#493fac",
      washboard_base_blueprints_crafting_item: "#5792c0",
      repear_perch_blueprint_crafting_item: "#5792c0",
      polluted_base_blueprints_crafting_item: "#5792c0",
      summer_key_shard_crafting_item: "#388d18",
      spring_key_shard_crafting_item: "#a39600",
      winter_key_shard_crafting_item: "#51b2db",
      fall_key_shard_crafting_item: "#fc6617",
      minuscule_photo_album_message_item: "#af8146",
      frozen_sealed_bottle_message_item: "#7db9c8",
      corrupt_trident_collectible: "#f46a4f",
      ancient_amulet_collectible: "#fb9231",
      zugzwangs_leftover_rock: "#0cc1e8",
      ascended_elder_glasses_collectible: "#986787",
      contaminated_crumb_cake_collectible: "#a39800",
      red_button_collectible: "#eb1b22",
      rift_valour_supply_kit_convertible: "#03bfbf",
      crystallized_fossil_collectible: "#3f5edc",
      shufflers_kit_convertible: "#839a38",
      optic_receiver_collectible: "#020202",
      rare_map_dust_stat_item: "#8e8e48",
      calming_trinket: "#cc3015",
      baitkeep_trinket: "#50929c",
      teddy_bear_message_item: "#976d51",
      sandblasted_metal_crafting_item: "#af8146",
      valour_rift_tower_collectible: "#bc8625",
      folklore_companion_vol_1_3_collectible: "#a5b138",
      enchanted_page_collectible: "#83be89",
      fulmina_tooth_crafting_item: "#c598dc",
      bristle_woods_rift_theme_scrap_I_crafting_item: "#0060ff",
      bristle_woods_rift_theme_scrap_II_crafting_item: "#0060ff",
      bristle_woods_rift_theme_scrap_III_crafting_item: "#0060ff",
      burroughs_rift_theme_scrap_1_crafting_item: "#0060ff",
      burroughs_rift_theme_scrap_2_crafting_item: "#0060ff",
      burroughs_rift_theme_scrap_3_crafting_item: "#0060ff",
      chrome_theme_scrap_1_crafting_item: "#0060ff",
      chrome_theme_scrap_2_crafting_item: "#0060ff",
      chrome_theme_scrap_3_crafting_item: "#0060ff",
      labyrinth_theme_scrap_1_crafting_item: "#0060ff",
      labyrinth_theme_scrap_2_crafting_item: "#0060ff",
      labyrinth_theme_scrap_3_crafting_item: "#0060ff",
      labyrinth_theme_scrap_4_crafting_item: "#0060ff",
      labyrinth_theme_scrap_5_crafting_item: "#0060ff",
      labyrinth_theme_scrap_6_crafting_item: "#0060ff",
      lightning_slayer_theme_scrap_1_crafting_item: "#0060ff",
      lightning_slayer_theme_scrap_2_crafting_item: "#0060ff",
      lightning_slayer_theme_scrap_3_crafting_item: "#0060ff",
      living_garden_theme_scrap_1_crafting_item: "#0060ff",
      living_garden_theme_scrap_2_crafting_item: "#0060ff",
      living_garden_theme_scrap_3_crafting_item: "#0060ff",
      moussu_picchu_theme_scrap_1_crafting_item: "#0060ff",
      moussu_picchu_theme_scrap_2_crafting_item: "#0060ff",
      moussu_picchu_theme_scrap_3_crafting_item: "#0060ff",
      polluted_theme_scrap_1_crafting_item: "#0060ff",
      polluted_theme_scrap_2_crafting_item: "#0060ff",
      polluted_theme_scrap_3_crafting_item: "#0060ff",
      queso_theme_scrap_i_crafting_item: "#0060ff",
      queso_theme_scrap_ii_crafting_item: "#0060ff",
      queso_theme_scrap_iii_crafting_item: "#0060ff",
      regal_theme_half_one_crafting_item: "#0060ff",
      regal_theme_half_two_crafting_item: "#0060ff",
      relic_hunter_theme_scrap_1_crafting_item: "#0060ff",
      relic_hunter_theme_scrap_2_crafting_item: "#0060ff",
      relic_hunter_theme_scrap_3_crafting_item: "#0060ff",
      relic_hunter_theme_scrap_4_crafting_item: "#0060ff",
      relic_hunter_theme_scrap_9_crafting_item: "#0060ff",
      relic_hunter_theme_scrap_5_crafting_item: "#0060ff",
      relic_hunter_theme_scrap_6_crafting_item: "#0060ff",
      relic_hunter_theme_scrap_7_crafting_item: "#0060ff",
      relic_hunter_theme_scrap_8_crafting_item: "#0060ff",
      ggg_theme_scrap_2_crafting_item: "#0060ff",
      ggg_theme_scrap_3_crafting_item: "#0060ff",
      ggg_theme_scrap_1_crafting_item: "#0060ff"
    };
  }
});

// src/modules/better-journal/modules/journal-item-colors/index.js
var makeStyles, journal_item_colors_default2, init_journal_item_colors2 = __esm({
  "src/modules/better-journal/modules/journal-item-colors/index.js"() {
    init_utils2();
    init_journal_item_colors();
    makeStyles = () => Object.entries(journal_item_colors_default).map(([id, icon]) => `#overlayPopup.hunting_summary .lootContainer a[href="https://www.mousehuntgame.com/item.php?item_type=${id}"], .journal .entry a[href="https://www.mousehuntgame.com/item.php?item_type=${id}"] { color: ${icon}; }`).join(" "), journal_item_colors_default2 = () => __async(void 0, null, function* () {
      addStyles(makeStyles(), "better-journal-link-colors");
    });
  }
});

// src/modules/better-journal/modules/journal-list/styles.css
var styles_default11, init_styles12 = __esm({
  "src/modules/better-journal/modules/journal-list/styles.css"() {
    styles_default11 = `ul.better-journal-list{margin-left:15px;list-style:disc}.better-journal-list a:after{content:""!important}.journal .content .entry .journaltext .better-journal-list{line-height:16px}.journal .content .entry.bountifulBeanstalk-defeatedGiant .journaltext ul{margin-top:-15px;line-height:21px;list-style:disc}.journal .content .entry.bountifulBeanstalk-defeatedGiant .journaltext li{margin-left:20px}
`;
  }
});

// src/modules/better-journal/modules/journal-list/index.js
var classesToCheck, otherStrings, makeListItems, splitText, getItemsFromText, addClassesToLiAndUl, formatAsList, journal_list_default, init_journal_list = __esm({
  "src/modules/better-journal/modules/journal-list/index.js"() {
    init_utils2();
    init_utils3();
    init_styles12();
    classesToCheck = {
      loot: [
        "bonuscatchsuccess",
        "catchsuccess",
        "catchsuccessprize",
        "catchsuccessloot",
        "luckycatchsuccess",
        "catchsuccessprize"
      ],
      convertible: [
        "convertible_open"
      ],
      other: [
        "iceberg_defeated",
        "dailyreward",
        "kings_giveaway_bonus_prize_entry"
      ],
      hasListNeedsClasses: [
        "folkloreForest-bookClaimed"
      ]
    }, otherStrings = [
      "the following loot</b>",
      "Inside my chest was",
      "Inside I found",
      "I found",
      "I found</b>",
      "Inside, I found</b>",
      "Loyalty Chest and received:"
    ], makeListItems = (itemList) => {
      let list = makeElement("ul", "better-journal-list");
      return itemList.length === 0 || itemList.forEach((item) => {
        makeElement("li", "better-journal-list-item", item, list);
      }), list;
    }, splitText = (text) => text.split(/, (?=\d)| and (?=\d)/).map((item) => item.trim()).filter(Boolean), getItemsFromText = (type, text) => {
      let innerHTML = text.innerHTML, items5, list, newText;
      if (type === "loot")
        items5 = innerHTML.split(" that dropped "), items5.length >= 2 ? (list = splitText(items5[1]), newText = `${items5[0]} that dropped:`) : (items5 = innerHTML.split("<b>that dropped</b> "), items5.length >= 2 && (list = splitText(items5[1]), newText = `${items5[0]} that dropped:`));
      else if (type === "convertible") {
        if (items5 = innerHTML.split("I received "), items5.length >= 2) {
          let suffix = items5[1].split(" from "), suffixString = suffix[1];
          suffix.length >= 2 ? (suffixString.endsWith(".") && (suffixString = suffixString.slice(0, -1)), list = splitText(suffix[0]), newText = `I opened ${suffixString} and received:`) : (list = splitText(items5[1]), newText = "I received: ");
        }
      } else
        for (let string of otherStrings)
          if (innerHTML.includes(string)) {
            items5 = innerHTML.split(string), list = splitText(items5[1]), newText = `${items5[0]} ${string}: `;
            break;
          }
      return {
        list: list || [],
        newText: newText || innerHTML
      };
    }, addClassesToLiAndUl = (text) => {
      let list = text.querySelector("ul");
      list && (list.classList.add("better-journal-list"), list.querySelectorAll("li").forEach((li) => {
        li.classList.add("better-journal-list-item");
      }));
    }, formatAsList = (entry) => __async(void 0, null, function* () {
      if (entry.getAttribute("data-better-journal-processed"))
        return;
      let classes = new Set(entry.classList), type;
      entry.setAttribute("data-better-journal-processed", "true");
      let text = entry.querySelector(".journalbody .journaltext");
      if (!text)
        return;
      for (let [key, value] of Object.entries(classesToCheck))
        if (value.some((c) => classes.has(c))) {
          type = key;
          break;
        }
      if (type === "update") {
        addClassesToLiAndUl(text);
        return;
      }
      let { newText, list } = getItemsFromText(type, text);
      list.length > 0 && newText !== text.innerHTML && (text.innerHTML = newText, text.append(makeListItems(list)));
    }), journal_list_default = () => __async(void 0, null, function* () {
      addStyles(styles_default11, "better-journal-list"), utils_default(formatAsList, 3e3);
    });
  }
});

// src/modules/better-journal/modules/journal-replacements/styles.css
var styles_default12, init_styles13 = __esm({
  "src/modules/better-journal/modules/journal-replacements/styles.css"() {
    styles_default12 = `.itemtransaction p.mhi-x-entry{display:inline}.itemtransaction p.mhi-x-entry .dot,.entry.short.relicHunter_catch br{display:none}
`;
  }
});

// src/modules/better-journal/modules/journal-replacements/index.js
var replacements, replaceInEntry, updateLog, updateMouseImageLinks, updateItemLinks, shouldSkip, processEntry, journal_replacements_default, init_journal_replacements = __esm({
  "src/modules/better-journal/modules/journal-replacements/index.js"() {
    init_utils2();
    init_utils3();
    init_styles13();
    replacements = [
      // 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 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"],
      ["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"></span>'],
      ["Aura helped me find", "Aura found"],
      ["processed  added", "processed and added"],
      ["I have started a", "I started a"],
      [/an additional:<br>/i, "an additional "],
      ["<br></p><p>", "<p>"],
      ["<br><p>", "<p>"],
      [/<p class="mhi-x-entry"><span class="dot"> • <\/span>/g, "", "!shop_purchase"],
      [/(\d+?) x /gi, '<p class="mhi-x-entry"><span class="dot"> \u2022 </span>$1 x ', "!shop_purchase"],
      ["My Condensed Creativity created an additional ", "My Condensed Creativity created an additional: "],
      [/<p><\/p>/g, ""],
      ["I can view other recipe", '<p class="double">I can view other recipe'],
      ["Here is the loot summary from my infiltration of", "I looted the following from"],
      ["Trove. and received", "Trove and received"],
      ["Lucky me, a prize mouse wandered by and fell for my trap!", "A prize mouse fell into my trap!"],
      [/(\d+?,?\d*?) x /gi, " $1 ", "shop_purchase"],
      ["In a flash of light my", "My"],
      ["Dragon Slayer Cannon</a> found an additional ", "Dragon Slayer Cannon</a> found an extra "],
      ["I opened my harvest bin and retrieved the following yield: <br><br>From ", "I opened my harvest bin and retrieved the following yield from "],
      ["My Slayer Aura found 1 extra ", "My Slayer Aura found an extra "],
      ["Inside, I found", "I found"],
      ["Inside I found", "I found"],
      // Event stuff
      // SEH
      [/was.+chocolatonium.+trap!/i, ""],
      // SEH.
      ["A chocoholic", "I caught a bonus"],
      ["A chocolate-crazed", "I caught a bonus"],
      ["A voracious", "I caught a bonus"],
      ["A gluttonous", "I caught a bonus"],
      ["A hypoglycemic", "I caught a bonus"],
      ["A ravenous", "I caught a bonus"],
      ["A greedy", "I caught a bonus"],
      ["A hungry", "I caught a bonus"],
      ["A hyperactive", "I caught a bonus"],
      ["A sugar-induced", "I caught a bonus"],
      ["Eggstra Fondue extracted", "My Eggstra Fondue extracted"],
      ["Additionally my Eggstra Fondue also extracted", "And"],
      // KGA.
      ["Prize Pack!<br><br><b>", "Prize Pack!<b>"]
    ], replaceInEntry = (entry) => {
      if (entry.getAttribute("data-replaced"))
        return;
      let element = entry.querySelector(".journalbody .journaltext"), oldText = element.innerHTML;
      replacements.forEach((replacement) => __async(void 0, null, function* () {
        if (!Array.isArray(replacement) || replacement.length < 2)
          return;
        if (replacement.length === 3) {
          if (replacement[2].includes("!")) {
            if (entry.classList.contains(replacement[2].replace("!", "")))
              return;
          } else if (!entry.classList.contains(replacement[2]))
            return;
        }
        let newText = oldText.replace(replacement[0], replacement[1]);
        oldText !== newText && (element.innerHTML = newText, oldText = newText);
      })), entry.setAttribute("data-replaced", "true");
    }, updateLog = (entry) => {
      if (!entry.classList.contains("log_summary"))
        return;
      let link = entry.querySelector("td a");
      if (!link)
        return;
      link.classList.add("mh-ui-progress-log-link", "mousehuntActionButton", "small", "lightBlue");
      let span = document.createElement("span");
      span.innerText = "View Progress Log", link.innerText = "", link.append(span);
    }, updateMouseImageLinks = (entry) => {
      let mouseType = entry.getAttribute("data-mouse-type");
      if (!mouseType || entry.getAttribute("data-mouse-image-updated"))
        return;
      let mouseImageLink = entry.querySelector(".journalimage a[onclick]");
      mouseImageLink && (mouseImageLink.setAttribute("onclick", `hg.views.MouseView.show('${mouseType}'); return false;`), entry.setAttribute("data-mouse-image-updated", "true"));
    }, updateItemLinks = (entry) => {
      if (!entry.classList.contains("iceberg_defeated"))
        return;
      let itemLinks = entry.querySelectorAll('.journaltext a[href*="item.php"]');
      itemLinks && itemLinks.forEach((link) => {
        let itemType = link.href.match(/item\.php\?item_type=(\w+)/);
        itemType && itemType.length === 2 && link.addEventListener("click", (e) => {
          e.preventDefault(), hg.views.ItemView.show(itemType[1]);
        });
      });
    }, shouldSkip = (entry) => {
      let keepOriginalClasses = /* @__PURE__ */ new Set([
        "lunar_lantern",
        "valentines_matchmaker",
        "vending_machine_purchase",
        "fullyExplored",
        "folkloreForest-bookClaimed",
        "claimBooty"
      ]);
      return entry.classList ? [...entry.classList].some((c) => keepOriginalClasses.has(c)) : !0;
    }, processEntry = (entry) => __async(void 0, null, function* () {
      shouldSkip(entry) || (replaceInEntry(entry), updateLog(entry), updateMouseImageLinks(entry), updateItemLinks(entry));
    }), journal_replacements_default = () => __async(void 0, null, function* () {
      addStyles(styles_default12, "better-journal-replacements"), utils_default(processEntry, 500);
    });
  }
});

// src/modules/better-journal/modules/journal-styles/styles/backgrounds.css
var backgrounds_default, init_backgrounds = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/backgrounds.css"() {
    backgrounds_default = `.journal .content .entry{background-repeat:no-repeat}.journal .content .entry,.journal .content .entry.adventureBook-journal,.journal .content .entry.craft.newrecipe,.journal .content .entry.folkloreForest-bookClaimed,.journal .content .entry.aurora_base_trigger,.journal .content .entry.regulator_base_trigger,.journal .content .entry.short.misc.custom.denture_base_decay_trigger,.journal .content .entry.burroughs_rift.danger_zone,.journal .content .entry.burroughs_rift.regulator_base_trigger,.journal .content .entry.birthday_factory,.journal .content .entry.boiling_cauldron_potion_bonus.boon_potion_bonus,.journal .content .entry.desert_heater_base_trigger,.journal .content .iceberg_advance_prevented,.journal .content .entry.minigame_done,.journal .content .entry.minigame_start,.journal .content .entry.living_grove_base_trigger,.journal .content .entry.queso_geyser,.journal .content .entry.rift_valour.claim_loot,.journal .content .entry.slac_in_a_box_trigger.popped,.journal .content .entry.sunken_city.dive,.journal .content .entry.sunken_city.zone,.journal .content .train_station.load_supply_crates,.journal .content .train_station.minigame_done,.journal .content .train_station.minigame_start,.journal .content .train_station.phase_bridge_jump,.journal .content .train_station.prize_claimed,.journal .content .train_station.progress,.journal .content .train_station.raider_wave_defeated,.journal .content .train_station.stoke_furnace,.journal .content .train_station.train_done,.journal .content .train_station.train_leave,.journal .content .train_station.train_start,.journal .content .train_station.use_mouse_repellent,.journal .content .train_station.warehouse_manager_catch,.journal .content .train_station.warehouse_manager_done,.journal .content .train_station.phase_boarding,.journal .content .entry.winter_hunt_2013,.journal .content .entry.winter_hunt_2015,.journal .content .entry.winter_hunt_2016,.journal .content .entry.floatingIslands,.journal .content .entry.vegetation_base_trigger{background-position:10px center;background-size:50px}.journal .content .entry.minimalJournalImage,.journal .content .entry.labyrinthSmall.labyrinth-clue,.journal .content .entry.winterTaiga{background-position:10px center!important;background-size:50px!important}.journal .content .entry.bonuscatchfailure,.journal .content .entry.bonuscatchsuccess{background-position:left;background-size:cover}.journal .content .entry.minimalJournalImage{background-position:15px center!important;background-size:40px!important}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/date-hiding.css
var date_hiding_default, init_date_hiding = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/date-hiding.css"() {
    date_hiding_default = `.journal .content .entry.short.refine_pollutinum .journalbody .journaldate,.journal .content .entry.short.torch_charm_event .journalbody .journaldate,.journal .content .entry.short.unstable_charm_trigger .journalbody .journaldate,.journal .content .entry.short.tournamentpointswithloot .journalbody .journaldate,.journal .content .entry.short.tournamentpoints .journalbody .journaldate,.journal .content .entry.short.rift-bristlewoods-acolyteSandStolen .journalbody .journaldate,.journal .content .entry.short.rift-bristlewoods-lootBooster .journalbody .journaldate,.journal .content .entry.short.super_rift_vacuum_trigger .journalbody .journaldate,.journal .content .entry.short.queso_canyon_queso_pumped .journalbody .journaldate,.journal .content .entry.short.custom.chesla_trap_trigger .journalbody .journaldate,.journal .content .entry.short.wordCount.minimalJournal .journalbody .journaldate,.journal .content .entry.short.folkloreForest.folkloreForest-lootFuelBoost .journalbody .journaldate,.journal .content .entry.short.labyrinth.labyrinth-chooseDoor .journalbody .journaldate,.journal .content .entry.short.labyrinth.labyrinth-intersection .journalbody .journaldate,.journal .content .entry.short.labyrinth.labyrinth-scrambleDoors .journalbody .journaldate,.journal .content .entry.short.misc.custom.chesla_trap_trigger .journalbody .journaldate,.journal .content .entry.short.misc.custom.birthday_factory.claim_package .journaldate,.journal .content .entry.folkloreForest-tableOfContents.mythweaverIncrease .journaldate,.journal .content .entry.iceberg_advance .journalbody .journaldate,.journal .content .entry.iceberg_defeated .journalbody .journaldate,.journal .content .entry.iceberg_phase_change .journalbody .journaldate,.journal .content .entry.iceberg_advance_prevented.general .journalbody .journaldate,.journal .content .entry.spring_hunt_charge_trinket_effect .journalbody .journaldate,.journal .content .entry.harbour .journalbody .journaldate,.journal .content .entry.iceberg_drill .journalbody .journaldate,.journal .content .entry.short.desertstreak .journalbody .journaldate,.journal .content .entry.short.rift-whisker-woods-increase .journalbody .journaldate{display:none}.journal .content .log_summary.stats .journaldate,.journal .entry.birthday2018-anniversary-trap-trigger .journaldate,.journal .birthday2015-trayComplete-special .journaldate,.journal .train_station.progress .journaldate,.journal .entry.furoma_base_trigger .journaldate,.journal .entry.living_grove_base_trigger .journaldate,.journal .entry.desert_heater_base_trigger .journaldate,.journal .entry.queso_cannonstorm_base_trigger .journaldate,.journal .entry.aurora_base_trigger .journaldate,.journal .entry.timepiece_trigger .journaldate,.journal .entry.vegetation_base_trigger .journaldate,.journal .entry.electromagnetic_base_trigger .journaldate,.journal .entry.pirate_sleigh_trigger .journaldate,.journal .entry.slac_in_a_box_trigger .journaldate,.journal .entry.regulator_base_trigger .journaldate,.journal .entry.rift_mist_diffuser_trigger .journaldate,.journal .entry.spring_hunt_relic_hunter_egg_drop .journaldate,.journal .entry.denture_base_saved_trigger .journaldate,.journal .entry.denture_base_decay_trigger .journaldate,.journal .entry.printing_press_base_journal_entry .journaldate,.journal .entry.lunar_lantern .journaldate,.journal .entry.mousoleum .journaldate,.journal .entry.labyrinth-lantern .journaldat,.journal .entry.labyrinth-base-burnClue .journaldate,.journal .entry.labyrinth-clue .journaldate,.journal .entry.bountifulBeanstalk-goldenHarpStrings .journaldate,.journal .entry.riftFuroma-energyLost .journaldate{display:none!important}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/fullstop.css
var fullstop_default, init_fullstop = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/fullstop.css"() {
    fullstop_default = `.entry.short.log_summary.stats .fullstop{display:none}.journal .entry .journaltext br:after{content:" "}.journal .entry .journaltext br:last-child,.journal .content .entry .journaltext>br:last-of-type,.journal .content .entry .journaltext>br:first-of-type{display:none}.journal .content .entry .journaltext>br+br:last-of-type,.journal .content .entry.floatingIslands.fullyExplored .journaltext br,.journal .content .entry.floatingIslands.defeatedEnemy .journaltext br,.journal .content .entry.folkloreForest-plantClaimed .journaltext br,.journal .content .entry.folkloreForest-lootFuelBoost .journaltext br,.journal .content .entry.relicHunter_complete .journaltext br:first-of-type,.journal .content .entry.folkloreForest-bookClaimed .journaltext br:first-of-type,.journal .content .entry.folkloreForest-bookClaimed .journaltext br:last-of-type,.journal .content .entry.harbour br{display:block}.journal .content .entry.floatingIslands.fullyExplored .journaltext br:first-of-type{display:none}.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:""}.entry.torch_charm_event .journaltext a:last-of-type:after,.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.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.birthday_factory.enter_room b:after,.entry.potionuse .journaltext span:last-of-type:after,.entry.labyrinth-clue.labyrinth-clue-good .journaltext:after,.entry.donationComplete .journaltext a:last-of-type:after{display:inline;content:"."}.journaltext .better-journal-list a.lucky:last-of-type:after,.journaltext .better-journal-list a.item:last-of-type:after,.journaltext .better-journal-list a.loot:last-of-type:after,.entry.alchemists_cookbook_base_bonus .journaltext .loot:last-of-type:after,.entry.short.dailyreward a:last-of-type:after,.entry.short.log_summary.stats .journaltext .loot:last-of-type:after,.entry.convertible_open .journaltext .item:last-of-type:after,.entry.short.craft.convertible_open .journaltext .item:last-of-type:after,.entry.short.supplytransferitem .journaltext #friend-data-wrapper a:after,.entry.folkloreForest-plantClaimed .journaltext a:last-of-type:after,.entry.folkloreForest-forewordFarm.folkloreForest-plantStarted .journaltext a:after,.entry.short.craft.convertible_open a.item:after{display:none;content:""}.entry.floatingIslands.fullyExplored .journaltext .item:last-of-type:after{content:""}.journaltext .lucky:last-of-type:after,.journaltext .lucky:after{display:none}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/general.css
var general_default, init_general = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/general.css"() {
    general_default = `.journalEntries{background-color:#f1f1f1}.journal .content{padding:0 5px}.journal .content .entry .journalbody{margin-top:3px;margin-bottom:3px;margin-left:75px}.journal .content .entry.minimalJournal .journalbody{margin-left:10px}.journal .content .entry{position:relative;padding:6px 3px 6px 0;border:1px solid #5b5b5b;border-bottom:none;transition:box-shadow .1s}.journal .content .entry .journalimage{position:absolute;top:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:55px;height:auto;margin:10px 0 0 10px}.shop_purchase .journal .content .entry .journalimage{margin:15px 0 0 10px}.journal .content .entry .journalimage a:hover,.journal .content .entry .journalimage a:focus{overflow:visible}.journal .content .entry .journalimage a{display:inline-block;width:59px;height:59px;overflow:hidden}.journal .content .entry a:hover img,.journal .content .entry a:focus img{filter:brightness(1.1)}.journal .content .entry .journalbody .journaltext{margin-right:5px;line-height:20px}.journal .content .entry .journaltext b{font-weight:400}.journal .content .entry .journaltext p:first-of-type{margin-top:0}.journal .content .entry .journaltext>*{line-height:24px}.journal .content .entry .journalbody .journaldate{display:inline-block;width:calc(100% - 10px);padding-top:5px;padding-bottom:3px;margin-bottom:5px;font-size:11px;font-weight:400;border-bottom:1px solid rgb(0 0 0 / 30%)}.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"}.journalContainer .pagerView-container{border:1px solid #5b5b5b;border-right:none;border-left:none}.journalContainer .pagerView-link{border:none}.journal .content .entry a:hover img{border:1px solid #6db8ca;outline:1px solid #90d3e4;box-shadow:0 0 6px -2px #e3e31f}.journal .content .entry .journaltext p:last-of-type{margin-bottom:0}.journal .content .entry .journaltext .decoration{margin-right:65px}.journal .content .entry .journaltext .decoration:after{position:absolute;top:0;left:0;display:block;width:28px;height:28px;content:"";background:url(https://www.mousehuntgame.com/images/items/trinkets/large/430b05beed99ba1995f5ab78e394f5d6.png) no-repeat;background-size:contain}.journal .content .entry .journalbody .journalactions{position:absolute;right:5px;float:none}.journal .content .entry .journaltext p.double{margin-top:1em}.jsingle.journal .content .log_summary table{margin:0 auto}.journal .content .entry.minimalJournalImage .journalbody .journaldate{display:none}p.mhi-x-entry{display:block;padding:0;margin:0;line-height:22px!important}.journal .content .entry:hover{box-shadow:inset 0 0 5px #0006}.journal .content .entry.craft.item{padding-bottom:10px}.journal .content .entry.out_of_candles{background-color:#bd7f89}.journal .content .entry.desert_heater_base_trigger.fail{background-image:url(https://i.mouse.rip/upscaled/flameshard_crafting_item.png);background-blend-mode:luminosity}.journal .content .entry.alchemists_cookbook_base_bonus{background-position:10px}.journal .content .entry.electromagnetic_base_trigger:after{display:none}.journal .content .entry.halloween-special-loot,.journal .content .entry.halloween2019_shot_supplies{padding-left:0}.journal .content .entry.outofsuperbriebutton{margin-left:0}.journal .content .entry.pirate_sleigh_trigger{background:#4fa9e6}.journal .content .entry.queso_cannonstorm_base_trigger.fail{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/fe36041df0bec6dcc887ce67feefc4c8.png)}.journal .content .entry.short.queso_canyon_queso_pumped .journalbody{margin-left:85px}.journal .content .entry.valentines_matchmaker{padding-left:0;margin-left:0;background-position:center;background-size:cover}.journal .entry.luckycatchsuccess .journalimage:after,.journal .entry.short.misc.custom.donationComplete br:last-of-type,.journal .content .entry.short.relicHunter_complete .journaltext>br+br:last-of-type,.journal .entry.short.relicHunter_complete br:nth-of-type(2),.journal .entry.vegetation_base_trigger:after{display:none}.journal .content .entry.vending_machine_purchase{background-position:top,bottom,center;background-size:contain}.journal .content .entry .journaltext,.journal .content .entry .journaltext p{font-size:11px}.journal.jdouble .content .entry:last-child{border-bottom:1px solid #5b5b5b}.journal.jdouble .leftcol{border:none}.journal.jdouble .rightcol{margin-left:10px;border:none}.journal.jdouble .journalEntries{display:flex;padding:10px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/progress-log.css
var progress_log_default, init_progress_log = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/progress-log.css"() {
    progress_log_default = `.journal .entry.log_summary .journalbody{margin-left:10px}.journal .entry.log_summary .journaltext b{display:block;width:30%;padding-top:.5em;padding-bottom:5px;margin:0 auto;font-weight:900;border-bottom:1px solid #c6c6c6}.mh-ui-progress-log-link{display:block;width:50%;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}.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;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{margin-bottom:5px;font-size:1.5em}.reportSubtitle{font-size:1.125em}.journal .content .entry.log_summary .journaltext>table{line-height:initial}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/aura.css
var aura_default, init_aura = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/aura.css"() {
    aura_default = `.journal .content .entry.spookyAuraActivated{background-color:#9df327}.entry.short.misc.custom.anniversaryAuraActivated i{font-size:10px}.entry.short.misc.custom.anniversaryAuraActivated br:nth-of-type(3){display:none}.entry.short.misc.custom.minimalJournalImage.relicHunter_slayer_aura_relic_bonus .journaltext{line-height:25px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/badge.css
var badge_default, init_badge = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/badge.css"() {
    badge_default = `.journal .content .entry.badge{z-index:1;margin-bottom:-1px;background:linear-gradient(135deg,#eee,#c6d8ee 50%);border:1px solid #5b5b5b;transition:transform .3s ease-in-out}.journal .content .entry.badge:hover{z-index:99;background-blend-mode:luminosity;border:1px solid #5b5b5b;box-shadow:0 5px 5px -5px #000;transform:scale(1.1)}.journal .content .entry.badge:hover,.journal .content .entry.badge{animation:mh-improved-glow 1s 2}.journal .content .entry.badge .journalimage{width:80px;height:80px;margin:0}.journal .content .entry.badge .journalimage img{width:65px;transition:.3s ease-in-out}@media (prefers-reduced-motion: reduce){.journal .content .entry.badge,.journal .content .entry.badge:hover{transform:none;animation:none}.journal .content .entry.badge .journalimage img{transform:none}}.entry.short.badge.better-journal-styles-badge-bronze{background:linear-gradient(135deg,#eee,#f6b584 80%)}.entry.short.badge.better-journal-styles-badge-silver{background:linear-gradient(135deg,#eee,#c6d8ee 50%)}.entry.short.badge.better-journal-styles-badge-gold{background:linear-gradient(135deg,#eee,#fff24e 80%)}.entry.short.badge.better-journal-styles-badge-platinum{background:linear-gradient(135deg,#eee,#c3b8ff 80%)}.entry.short.badge.better-journal-styles-badge-diamond{background:linear-gradient(135deg,#eee,#8bdae9 80%)}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/crafting.css
var crafting_default, init_crafting = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/crafting.css"() {
    crafting_default = `.journal .entry.craft.item{min-height:70px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/draw-winner.css
var draw_winner_default, init_draw_winner = __esm({
  "src/modules/better-journal/modules/journal-styles/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) no-repeat -130px 0;animation:donationShimmer 5s infinite}@media (prefers-reduced-motion: reduce){.journal .entry.drawwinner,.journal .entry.drawwinner:after{animation:none}}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/events.css
var events_default, init_events2 = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/events.css"() {
    events_default = `.journal .entry.ronza_chrome_voucher_claim{background-color:#cae5e8;background-image:url(https://www.mousehuntgame.com/images/items/stats/large/a3be8c11176c289f6c79068cbe813968.png)}.journal .entry.halloween-candy{background-color:#f1b7dc}.journal .entry.lunar_lantern{background-color:#ffd0b3;border:1px solid #5b5b5b;border-bottom:none}.entry.short.misc.custom.chocolateshop_reward_claimed{background-color:#e7cdaa}.spring_hunt_charge_trinket_effect .journalimage img{width:30px}.journal .entry.spring_hunt_charge_trinket_effect{display:flex;align-items:center;min-height:35px;padding-bottom:6px}.journal .entry.spring_hunt_charge_trinket_effect .journalimage{margin:0}.journal .entry.chocolateshop_item_purchased{background-repeat:repeat}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/kga.css
var kga_default, init_kga = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/kga.css"() {
    kga_default = `.journal .content .entry.kings_giveaway_bonus_prize_entry .journalimage,.journal .content .entry.kings_giveaway_vault_prize_entry .journalimage{height:60px;margin-top:30px;background:none;border:none}.journal .content .entry.kings_giveaway_vault_prize_entry{background:linear-gradient(180deg,#ebaff8,#edd1f3,#ebaff8)}.journal .content .entry.kings_giveaway_vault_prize_entry br:nth-of-type(3),.journal .content .entry.kings_giveaway_vault_prize_entry br:nth-of-type(4){display:none}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/larry-gift.css
var larry_gift_default, init_larry_gift = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/larry-gift.css"() {
    larry_gift_default = `.entry.short.misc.custom.larryGift:after{position:absolute;top:20px;right:-5px;display:block;width:61px;height:61px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/onboarding/info_arrow_larry.png);filter:opacity(.4) saturate(.3);background-repeat:no-repeat;background-position:10px;background-size:contain;transition:filter .2s;transform:scaleX(-1) rotate(-5deg);transform-origin:center}.entry.short.misc.custom.larryGift:hover:after{filter:opacity(1) saturate(1)}.entry.short.misc.custom.larryGift .journalbody{margin-right:45px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/maps.css
var maps_default, init_maps2 = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/maps.css"() {
    maps_default = `.journal .entry.relicHunter_complete .journaltext b{font-weight:700}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/other.css
var other_default, init_other = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/other.css"() {
    other_default = `.journal .relicHunter_slayer_aura_relic_bonus{background-image:url(https://www.mousehuntgame.com/images/items/collectibles/large/a6e804d0d9eeb22ff01660a144521ff1.png);background-repeat:no-repeat;background-size:45px!important}.journal .entry.generic_falure,.journal .entry.pollutinum_stolen{background:#ffbfbf}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/popup.css
var popup_default, init_popup = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/popup.css"() {
    popup_default = `#OnboardArrow.onboardPopup.top .canShare .larryTip{bottom:48px;display:flex;flex-flow:column wrap;height:30px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/rank-up.css
var rank_up_default, init_rank_up = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/rank-up.css"() {
    rank_up_default = `.journal .entry.titlechange{overflow:hidden;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;background-blend-mode:luminosity;transition:.3s ease-in}.journal .content .titlechange .titlechangeheader{border-bottom:none}.journal .entry.titlechange .journalbody .journaldate{width:auto;max-width:185px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.journal .entry.titlechange:hover{z-index:99;background-blend-mode:luminosity;border:1px solid #5b5b5b;box-shadow:0 5px 5px -5px #000;transform:scale(1.1)}.journal .entry.titlechange:after{position:absolute;inset:0;pointer-events:none;content:"";background:url(https://www.mousehuntgame.com/images/ui/journal/donation_shimmer.png) no-repeat -130px 0;filter:hue-rotate(123deg);transition:all .3s;animation:donationShimmer 5s infinite}@media screen and (prefers-reduced-motion: reduce){.journal .entry.titlechange:after{animation:none}}.journal .content .titlechange .journalimage img,.journal .content .titlechange .journalimage{width:60px;filter:drop-shadow(0 1px 2px #3e93a3)}.journal .content .titlechange .journalimage{margin-top:5px;margin-left:5px}.journal .entry.titlechange .journalbody{text-shadow:0 0 1px #70c9da}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/social-gift.css
var social_gift_default, init_social_gift = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/social-gift.css"() {
    social_gift_default = `.journal .entry.socialGift.socialGift-send .journalbody .journaltext{min-height:40px;max-height:60px;padding-right:10px;padding-left:80px;margin-right:-2px;margin-bottom:-4px;margin-left:-75px;overflow-y:auto;box-shadow:inset 0 -20px 15px -16px #999}.socialGift.socialGift-send .journaltext #friend-data-wrapper{display:none}.journal .entry.socialGift-send{padding-bottom:0}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/tournaments.css
var tournaments_default, init_tournaments = __esm({
  "src/modules/better-journal/modules/journal-styles/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}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/base/alchemist-cookbook.css
var alchemist_cookbook_default, init_alchemist_cookbook = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/base/alchemist-cookbook.css"() {
    alchemist_cookbook_default = `.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}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/base/ssdb.css
var ssdb_default, init_ssdb = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/base/ssdb.css"() {
    ssdb_default = `.journal .content .entry.short.misc.custom.denture_base_decay_trigger{background-blend-mode:lighten}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/bonus.css
var bonus_default, init_bonus = __esm({
  "src/modules/better-journal/modules/journal-styles/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{top:10px;right:12px;left:unset;content:"BONUS"}.journal .content .bonuscatchsuccess:before,.journal .content .bonuscatchfailure:before{display:none}.journal .content .bonuscatchfailure:after{background-color:#cb0e01}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/failure.css
var failure_default, init_failure = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/failure.css"() {
    failure_default = `.journal .content .entry.catchfailure{background-color:#f2f2f2;background-position:0;background-size:75px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/lucky.css
var lucky_default, init_lucky = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/lucky.css"() {
    lucky_default = `.journal .entry.luckycatchsuccess .journalimage:after{background:none}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/prize.css
var prize_default, init_prize = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/catch/prize.css"() {
    prize_default = `.journal .content .catchsuccessprize{background-color:#7dea7d}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/birthday.css
var birthday_default, init_birthday = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/birthday.css"() {
    birthday_default = `.journal .content .entry.vending_machine_purchase{padding:6px 6px 10px 0;background-repeat:no-repeat,no-repeat,repeat;background-position:top,bottom,center;background-size:contain}.journal .content .entry.vending_machine_purchase .journalimage{position:relative;display:block;width:unset;height:unset;margin:10px 0 0 6px;background-color:#2a2a2f;box-shadow:0 0 2px -1px #43434b}.journal .content .entry.vending_machine_purchase .journalimage img{width:55px;height:55px}.journal .content .entry.vending_machine_purchase .journalbody{margin:0 0 0 70px}.journal .content .entry.vending_machine_purchase .journaldate{display:none}.journal .content .entry.vending_machine_purchase .journaltext{margin-top:16px;font-size:10px;font-weight:900;line-height:12px}.journal .content .entry.vending_machine_purchase .journaltext>br+br:last-of-type,.journal .content .entry.vending_machine_purchase .journaltext br{display:block!important}.journal .content .entry.vending_machine_purchase .journaltext>div{position:relative;font-size:11px;font-weight:400;line-height:18px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/brift.css
var brift_default, init_brift = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/brift.css"() {
    brift_default = `.journal .entry.burroughs_rift.danger_zone{background-color:#ccdfe2;background-position:10px center;background-size:59px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/bwrift.css
var bwrift_default, init_bwrift = __esm({
  "src/modules/better-journal/modules/journal-styles/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;padding-left:45px;margin:5px 5px 5px 10px;white-space:normal}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/floating-islands.css
var floating_islands_default, init_floating_islands = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/floating-islands.css"() {
    floating_islands_default = `.journal .entry.floatingIslands.dirigibleTravel{max-height:103px;overflow-y:auto}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/folklore-forest.css
var folklore_forest_default, init_folklore_forest = __esm({
  "src/modules/better-journal/modules/journal-styles/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{display:flex;align-items:center;justify-content:center;min-height:40px;background-color:#fff9ee;box-shadow:inset 0 0 9px -2px #a78f77}.journal .entry.folkloreForest-tableOfContents.wordCount .journaltext{max-width:275px;margin:0 auto;font-size:11px}.journal .entry.folkloreForest-tableOfContents.wordCount:after{position:absolute;top:10px;left:2px;width:37px;height:37px;color:#d9bb92;content:"";background-image:url(https://www.mousehuntgame.com/images/folklore_forest_upgrades/golden_quill_thumb.png);background-repeat:no-repeat;background-size:cover;mix-blend-mode:luminosity}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/frift.css
var frift_default, init_frift = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/frift.css"() {
    frift_default = `.journal .content .entry.riftFuroma{position:relative}.journal .content .entry.riftFuroma-energyLost .journalbody{margin-left:80px}.journal .content .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);filter:grayscale(1);background-repeat:no-repeat;background-position:0 -100px;background-size:110%;mix-blend-mode:luminosity}.journal .content .entry.riftFuroma-energyLost .journaltext{display:flex;align-items:center;min-height:54px}.journal .content .entry.riftFuroma-retreat{background-color:#f4c3b2}.journal .content .entry.riftFuroma-energyLost{min-height:60px}.journal .content .entry.riftFuroma-enterPagoda,.journal .content .entry.riftFuroma-unlockBattery{background-color:#f3b782}.journal .content .entry.riftFuroma-exitPagoda{background-color:#e3bfb4}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/frox.css
var frox_default, init_frox = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/frox.css"() {
    frox_default = `.journal .entry.fortRox-nightJournal,.journal .entry.fortRox-nightDone{max-height:100px;overflow-y:auto}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/garden.css
var garden_default, init_garden = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/garden.css"() {
    garden_default = `.journal .content .entry.minigame_start.yellow_drops{background-color:#fffd97;background-blend-mode:darken}.journal .content .entry.minigame_start.red_drops{background-color:#ffaf98;background-blend-mode:darken}.journal .content .entry.minigame_start.orange_drops{background-color:#ffde97;background-blend-mode:darken}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/halloween.css
var halloween_default, init_halloween = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/halloween.css"() {
    halloween_default = `.journal .entry.gloomyGreenwood-incense{background-color:#ffc277}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/harbour.css
var harbour_default, init_harbour = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/harbour.css"() {
    harbour_default = `.entry.harbour.catch{background-color:#d2ba96}.journal .content .entry.harbour .journaltext b{display:block}.mh-dark .journal .content .entry.harbour.claimBooty br{display:none}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/iceberg.css
var iceberg_default, init_iceberg = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/iceberg.css"() {
    iceberg_default = `.journal .content .iceberg_advance,.journal .content .iceberg_pushback,.journal .content .iceberg_pushback_prevented,.journal .entry.riftFuroma{font-style:inherit}.journal .content .iceberg_advance .journalbody,.journal .content .iceberg_pushback .journalbody,.journal .content .iceberg_pushback_prevented .journalbody{font-size:11px}.journal .content .iceberg_advance_prevented.general{background-color:#a6d1ee;background-position:10px}.journal .content .iceberg_advance,.journal .content .iceberg_advance_prevented,.journal .content .iceberg_pushback,.journal .content .iceberg_pushback_prevented{padding-bottom:6px}.entry.short.iceberg_phase_change .journaltext{display:flex;align-items:center}.journal .content .entry.iceberg_defeated .journaltext>br{display:block}.journal .content .entry.iceberg_phase_change .journalbody .journaltext{line-height:23px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/labyrinth.css
var labyrinth_default, init_labyrinth = __esm({
  "src/modules/better-journal/modules/journal-styles/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}.journal .content .entry.ancient-stealth .journalbody{margin-left:85px}.journal .content .entry.ancient-stealth .journaldate{display:none}.journal .entry.labyrinth-intersection{background-color:#acc8dc}.journal .entry.ancient-stealth{padding:1px 0}.entry.short.misc.custom.labyrinth.labyrinth-exitMaze li{padding:0;line-height:1.6}.entry.short.misc.custom.labyrinth.labyrinth-exitMaze br{display:block}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/mousoleum.css
var mousoleum_default, init_mousoleum = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/mousoleum.css"() {
    mousoleum_default = `.journal .content .entry.mousoleum.creepy_coffin_trigger,.journal .content .entry.mousoleum.repair_wall,.journal .content .entry.mousoleum.damage_wall{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/d764ca82aa14f187f9796e1e5334e20c.png)}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/queso.css
var queso_default, init_queso = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/queso.css"() {
    queso_default = `.journal .entry.queso_geyser.wild_tonic_disabled{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/8e292ff717bd65936d2c96707aa77de0.png);background-blend-mode:darken}.journal .entry.queso_canyon_queso_pumped{background-image:url(https://www.mousehuntgame.com/images/items/bait/transparent_thumb/06c81c66b0f21f2a8b6a2b989f40bd8d.png);background-position:10px -5px}.journal .entry.queso_canyon_queso_pumped .journalbody{margin-left:65px}.journal .entry.queso_cannonstorm_base_trigger .journalimage img{width:50px;padding-left:0}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/toxic-spill.css
var toxic_spill_default, init_toxic_spill = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/toxic-spill.css"() {
    toxic_spill_default = `.entry.short.misc.custom.refine_pollutinum{display:flex;align-items:center;height:45px;background-color:#7f7;background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/af9ffb2d0655dbf62a5e4a086515bb23.png);background-position:10px;background-size:50px}.entry.short.misc.custom.torch_charm_event .refine_pollutinum{width:55px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/vrift.css
var vrift_default, init_vrift = __esm({
  "src/modules/better-journal/modules/journal-styles/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:#8fe5ff}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/wwrift.css
var wwrift_default, init_wwrift = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/location/wwrift.css"() {
    wwrift_default = `.journal .content .entry.short.rift-whisker-woods-increase .journalbody{margin:0 30px;font-size:10px;text-align:center}.journal .content .entry.rift-whisker-woods-catch-miniboss{background-color:#d8d479}.journal .content .entry.rift-whisker-woods-catch-boss{background-color:#fac75f}.journal .content .entry.rift-whisker-woods-increase-high{background-color:#e3d981}.journal .content .entry.rift-whisker-woods-increase-miniboss{background-color:#ffba4e}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/gilded.css
var gilded_default, init_gilded = __esm({
  "src/modules/better-journal/modules/journal-styles/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:#f5def9}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/rift-vacuum.css
var rift_vacuum_default, init_rift_vacuum = __esm({
  "src/modules/better-journal/modules/journal-styles/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}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/torch.css
var torch_default, init_torch = __esm({
  "src/modules/better-journal/modules/journal-styles/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}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/ultimate.css
var ultimate_default, init_ultimate = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/ultimate.css"() {
    ultimate_default = `.journal .content .ultimate_pop,.journal .content .ultimate_intact{position:relative;background-color:#49eec2;background-size:60px}.journal .content .ultimate_intact{animation:mh-improved-glow .8s ease-in-out 1}.journal .content .ultimate_pop{animation:mh-improved-dim .8s ease-in-out 1}@media (prefers-reduced-motion: reduce){.journal .content .ultimate_intact,.journal .content .ultimate_pop{animation:none}}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/charm/unstable.css
var unstable_default, init_unstable = __esm({
  "src/modules/better-journal/modules/journal-styles/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}.jsingle.journal .entry.short.misc.custom.unstable_charm_trigger .journaltext{max-width:580px}.entry.short.misc.custom.unstable_charm_trigger .journalimage{width:45px;margin-top:0}.journal .entry.short.misc.custom.unstable_charm_trigger .journalimage img{width:40px;height:40px}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/mouse/glazy.css
var glazy_default, init_glazy = __esm({
  "src/modules/better-journal/modules/journal-styles/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}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/mouse/stuck-snowball.css
var stuck_snowball_default, init_stuck_snowball = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/mouse/stuck-snowball.css"() {
    stuck_snowball_default = `.journal .entry.stuck_snowball_catch{background:#a5d6fb}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/styles/custom-entries/mouse/valentines.css
var valentines_default, init_valentines = __esm({
  "src/modules/better-journal/modules/journal-styles/styles/custom-entries/mouse/valentines.css"() {
    valentines_default = `.journal .content .entry.valentines_matchmaker{background-position:left;animation:mh-improved-background-slide 240s ease-in-out infinite}@media (prefers-reduced-motion: reduce){.journal .content .entry.valentines_matchmaker{animation:none}}
`;
  }
});

// src/modules/better-journal/modules/journal-styles/index.js
var imported, styles, addBadgeClass, updateRankUpIcon, journal_styles_default, init_journal_styles = __esm({
  "src/modules/better-journal/modules/journal-styles/index.js"() {
    init_utils2();
    init_utils3();
    init_backgrounds();
    init_date_hiding();
    init_fullstop();
    init_general();
    init_progress_log();
    init_aura();
    init_badge();
    init_crafting();
    init_draw_winner();
    init_events2();
    init_kga();
    init_larry_gift();
    init_maps2();
    init_other();
    init_popup();
    init_rank_up();
    init_social_gift();
    init_tournaments();
    init_alchemist_cookbook();
    init_ssdb();
    init_bonus();
    init_failure();
    init_lucky();
    init_prize();
    init_birthday();
    init_brift();
    init_bwrift();
    init_floating_islands();
    init_folklore_forest();
    init_frift();
    init_frox();
    init_garden();
    init_halloween();
    init_harbour();
    init_iceberg();
    init_labyrinth();
    init_mousoleum();
    init_queso();
    init_toxic_spill();
    init_vrift();
    init_wwrift();
    init_gilded();
    init_rift_vacuum();
    init_torch();
    init_ultimate();
    init_unstable();
    init_glazy();
    init_stuck_snowball();
    init_valentines();
    imported = [backgrounds_default, date_hiding_default, fullstop_default, general_default, progress_log_default, aura_default, badge_default, crafting_default, draw_winner_default, events_default, kga_default, larry_gift_default, maps_default, other_default, popup_default, rank_up_default, social_gift_default, tournaments_default, alchemist_cookbook_default, ssdb_default, bonus_default, failure_default, lucky_default, prize_default, birthday_default, brift_default, bwrift_default, floating_islands_default, folklore_forest_default, frift_default, frox_default, garden_default, halloween_default, harbour_default, iceberg_default, labyrinth_default, mousoleum_default, queso_default, toxic_spill_default, vrift_default, wwrift_default, gilded_default, rift_vacuum_default, torch_default, ultimate_default, unstable_default, glazy_default, stuck_snowball_default, valentines_default], styles = imported, addBadgeClass = (entry) => {
      if (!entry || !entry.classList.contains("badge"))
        return;
      let badgeType = entry.querySelector(".journalimage img");
      if (!badgeType)
        return;
      let badgeTypeClass = badgeType.src.replace("https://www.mousehuntgame.com/images/ui/crowns/crown_", "").replace(".png", "").trim();
      entry.classList.add(`better-journal-styles-badge-${badgeTypeClass}`);
      let content = entry.querySelector(".journaltext");
      content && (content.innerHTML = content.innerHTML.replace("I can view my trophy crowns on my", "").replace('<a href="https://www.mousehuntgame.com/hunterprofile.php?tab=kings_crowns">hunter profile</a>', "").replace("<br>", "").replace(".", "").trim());
    }, updateRankUpIcon = (entry) => {
      if (!entry.classList.contains("titlechange"))
        return;
      let rankUp = entry.querySelector(".journalimage img");
      if (!rankUp)
        return;
      let shield = getUserTitleShield(getUserTitle());
      shield && (rankUp.src = shield);
    }, journal_styles_default = () => __async(void 0, null, function* () {
      addStyles(styles, "better-journal-styles"), utils_default(addBadgeClass, 4e3), utils_default(updateRankUpIcon, 4e3);
    });
  }
});

// src/modules/better-journal/modules/journal-tags/styles.css
var styles_default13, init_styles14 = __esm({
  "src/modules/better-journal/modules/journal-tags/styles.css"() {
    styles_default13 = `.journal .content .catchsuccessloot:after,.journal .content .attractionfailure:after,.journal .content .catchfailure:after,.journal .content .luckycatchsuccess:after,.journal .content .passive:after,.journal .content .linked:after{position:absolute;top:10px;right:12px;left:unset;z-index:1;padding:1px 3px;font-size:9px;font-weight:700;line-height:11px;color:#fff;text-transform:uppercase;content:"";background:#53891b;border-radius:3px;opacity:0;transition:.2s}.journal .content .catchsuccessloot:hover:after,.journal .content .attractionfailure:hover:after,.journal .content .catchfailure:hover:after,.journal .content .luckycatchsuccess:hover:after,.journal .content .passive:hover:after,.journal .content .linked:hover:after{opacity:1}.journal .content .bonuscatchsuccess:after,.journal .content .bonuscatchfailure:after{opacity:0;transition:opacity .3s}.journal .content .bonuscatchsuccess:hover:after,.journal .content .bonuscatchfailure:hover:after{opacity:1}.journal .content .catchsuccessloot:after{content:"Catch";background:#53891b}.journal .content .catchfailure:after{content:"FTC";background:#891b1b}.journal .content .linked:after{content:"Friend"}.journal .content .luckycatchsuccess:after{content:"Lucky";background-color:#4ac338}.journal .content .passive:after{content:"Trap Check"}.journal .content .attractionfailure:after{content:"FTA";background:#959595}.journal .content .linked.attractionfailure:after{content:"Friend \\b7  FTA"}.journal .content .linked.catchfailure:after{content:"Friend \\b7  FTC"}.journal .content .linked.luckycatchsuccess:after{content:"Friend \\b7  Lucky"}.journal .content .passive.attractionfailure:after{content:"Trap Check \\b7  FTA"}.journal .content .passive.catchfailure:after{content:"Trap Check \\b7  FTC"}
`;
  }
});

// src/modules/better-journal/modules/journal-tags/index.js
var journal_tags_default, init_journal_tags = __esm({
  "src/modules/better-journal/modules/journal-tags/index.js"() {
    init_utils2();
    init_styles14();
    journal_tags_default = () => __async(void 0, null, function* () {
      addStyles(styles_default13, "journal-tags");
    });
  }
});

// src/modules/better-journal/styles/list-and-icons.css
var list_and_icons_default, init_list_and_icons = __esm({
  "src/modules/better-journal/styles/list-and-icons.css"() {
    list_and_icons_default = `.journal .content .entry .journaltext .better-journal-list{line-height:21px}
`;
  }
});

// src/modules/better-journal/styles/styles.css
var styles_default14, init_styles15 = __esm({
  "src/modules/better-journal/styles/styles.css"() {
    styles_default14 = `.journal .entry .journalbody .journaltext p{margin:0}.journaltext .lucky:after{width:14px;height:14px;background-image:url(https://www.mousehuntgame.com/images/ui/camp/trap/stat_luck.png);background-size:cover}
`;
  }
});

// src/modules/better-journal/settings/index.js
var settings_default4, init_settings5 = __esm({
  "src/modules/better-journal/settings/index.js"() {
    settings_default4 = () => __async(void 0, null, function* () {
      return [
        {
          id: "better-journal.styles",
          title: "Journal styles",
          default: !0
        },
        {
          id: "better-journal.replacements",
          title: "Journal text replacements",
          default: !0
        },
        {
          id: "better-journal.icons",
          title: "Show loot icons"
        },
        {
          id: "better-journal.icons-minimal",
          title: "Show loot icons (minimal)"
        },
        {
          id: "better-journal.list",
          title: "Show loot as list"
        },
        {
          id: "better-journal.gold-and-points",
          title: "Show gold and points icons",
          default: !0
        },
        {
          id: "better-journal.item-colors",
          title: "Unique item colors (Map clues, Ful'Mina's gifts, etc.)",
          default: !0
        },
        {
          id: "better-journal.journal-tags",
          title: "Show hunt type on hover",
          default: !1
        },
        {
          id: "better-journal.journal-history",
          title: "Journal History",
          default: !0
        }
      ];
    });
  }
});

// src/modules/better-journal/index.js
var init5, better_journal_default, init_better_journal = __esm({
  "src/modules/better-journal/index.js"() {
    init_utils2();
    init_journal_gold_and_points();
    init_journal_history();
    init_journal_icons();
    init_journal_icons_minimal();
    init_journal_item_colors2();
    init_journal_list();
    init_journal_replacements();
    init_journal_styles();
    init_journal_tags();
    init_list_and_icons();
    init_styles15();
    init_settings5();
    init5 = () => __async(void 0, null, function* () {
      addStyles(styles_default14, "better-journal");
      let enabled = {
        styles: getSetting("better-journal.styles", !0),
        list: getSetting("better-journal.list", !1),
        icons: getSetting("better-journal.icons"),
        iconsMinimal: getSetting("better-journal.icons-minimal"),
        replacements: getSetting("better-journal.replacements", !0),
        goldAndPoints: getSetting("better-journal.gold-and-points", !0),
        itemColors: getSetting("better-journal.item-colors", !0),
        history: getSetting("better-journal.journal-history", !0),
        tags: getSetting("better-journal.journal-tags", !0)
      }, modules = [
        { enabled: enabled.styles, load: journal_styles_default },
        { enabled: enabled.list, load: () => {
          journal_list_default(), (enabled.icons || enabled.iconsMinimal) && addStyles(list_and_icons_default, "better-journal-list-and-icons");
        } },
        { enabled: enabled.icons, load: () => {
          journal_icons_default(), journal_icons_minimal_default();
        } },
        { enabled: enabled.iconsMinimal, load: () => {
          enabled.icons || journal_icons_minimal_default();
        } },
        { enabled: enabled.replacements, load: journal_replacements_default },
        { enabled: enabled.goldAndPoints, load: journal_gold_and_points_default },
        { enabled: enabled.itemColors, load: journal_item_colors_default2 },
        { enabled: enabled.history, load: journal_history_default },
        { enabled: enabled.tags, load: journal_tags_default }
      ];
      for (let module of modules)
        module.enabled && module.load();
    }), better_journal_default = {
      id: "better-journal",
      name: "Better Journal",
      type: "better",
      default: !0,
      description: "Modify the journal text, layout, and styling.",
      load: init5,
      settings: settings_default4
    };
  }
});

// src/modules/better-kings-reward/styles.css
var styles_default15, init_styles16 = __esm({
  "src/modules/better-kings-reward/styles.css"() {
    styles_default15 = `.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}
`;
  }
});

// src/modules/better-kings-reward/index.js
var initiateKingsReward, startKingsReward, continueOnKingsReward, init6, better_kings_reward_default, init_better_kings_reward = __esm({
  "src/modules/better-kings-reward/index.js"() {
    init_utils2();
    init_styles16();
    initiateKingsReward = () => {
      let reward = document.querySelector(".huntersHornMessageView huntersHornMessageView--puzzle .huntersHornMessageView__action");
      reward && reward.click();
    }, startKingsReward = () => {
      let rewardStart = document.querySelector(".huntersHornMessageView--puzzle .huntersHornMessageView__action");
      rewardStart && rewardStart.click(), setTimeout(() => {
        let puzzle = document.querySelector(".puzzleView__code");
        puzzle && puzzle.focus();
      }, 500);
    }, continueOnKingsReward = (req) => {
      if (req.success && req.puzzle_reward) {
        let resume = document.querySelector(".puzzleView__resumeButton");
        resume && resume.click();
      }
    }, init6 = () => __async(void 0, null, function* () {
      addStyles(styles_default15, "better-kings-reward"), onRequest("turns/activeturn.php", initiateKingsReward, !0), onRequest("users/puzzle.php", continueOnKingsReward, !0), onRequest("*", startKingsReward), startKingsReward();
    }), better_kings_reward_default = {
      id: "better-kings-reward",
      name: "Better King's Reward",
      type: "better",
      default: !0,
      description: "Updates the style of the King's Reward slightly, automatically closes the success message",
      load: init6
    };
  }
});

// src/modules/better-maps/settings/index.js
var settings_default5, init_settings6 = __esm({
  "src/modules/better-maps/settings/index.js"() {
    settings_default5 = () => __async(void 0, null, function* () {
      return [
        {
          id: "better-maps.default-to-sorted",
          title: "Default to Sorted tab"
        },
        {
          id: "better-maps.show-sidebar-goals",
          title: "Show map goals in sidebar"
        }
      ];
    });
  }
});

// src/modules/better-maps/modules/helper.js
var openMiniMap, makeMenuItem, helper_default, init_helper = __esm({
  "src/modules/better-maps/modules/helper.js"() {
    init_utils2();
    openMiniMap = (mapId) => __async(void 0, null, function* () {
      let t = (yield doRequest("managers/ajax/users/treasuremap.php", {
        action: "map_info",
        map_id: mapId
      })).treasure_map, mappedGoals = t.goals.mouse.map((m) => `<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(""), mappedHunters = t.hunters.map((h) => `<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(""), mappedEnvironments = t.environments.map((e) => `<div class="environment">
    ${e.name} (${e.type})
    <div class="thumb">${e.thumb}</div>
    <div class="header">${e.header}</div>
  </div>`).join("");
      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">
      ${mappedGoals}
    </div>
  </div>
  <div class="row">
    <div class="title">
      hunters
    </div>
    <div class="value">
      ${mappedHunters}
    </div>
  </div>
  <div class="row">
    <div class="title">
      environments
    </div>
    <div class="value">
      ${mappedEnvironments}
    </div>
  </div>
  </div>`,
        className: "mh-improved-map-helper-popup",
        show: !0
      });
    }), makeMenuItem = () => {
      var _a, _b, _c, _d, _e, _f, _g, _h;
      removeSubmenuItem("mh-improved-map-helper");
      let mapId = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.default_map_id;
      mapId && 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",
        /**
         * Open the mini map.
         *
         * @return {void}
         */
        callback: () => openMiniMap(mapId)
      });
    }, helper_default = () => {
      makeMenuItem(), onRequest("*", makeMenuItem);
    };
  }
});

// src/modules/better-maps/modules/toggle-ar.js
var addArDataToMap, toggleAr, clickArToggle, maybeClickArToggle, isAdding, addArToggle, removeArToggle, init_toggle_ar = __esm({
  "src/modules/better-maps/modules/toggle-ar.js"() {
    init_utils2();
    addArDataToMap = (mapData3) => __async(void 0, null, function* () {
      var _a, _b;
      let type = "mouse";
      ((_a = mapData3 == null ? void 0 : mapData3.goals) == null ? void 0 : _a.mouse.length) === 0 && (type = "item");
      let mice = ((_b = mapData3 == null ? void 0 : mapData3.goals) == null ? void 0 : _b[type]) || [];
      if (!mice || mice.length === 0)
        return;
      let goals = document.querySelectorAll(".treasureMapView-goals-groups");
      if (goals && goals.length > 0) {
        let hasAdded = !1;
        if (goals.forEach((goal) => {
          goal.classList.contains("mh-ui-ar-hidden") && (goal.classList.remove("mh-ui-ar-hidden"), hasAdded = !0);
        }), hasAdded)
          return;
      }
      mice.forEach((mouse) => __async(void 0, null, function* () {
        let mouseEl = document.querySelector(`.treasureMapView-goals-group-goal[data-unique-id="${mouse.unique_id}"]`);
        if (!mouseEl || mouseEl.classList.contains("complete"))
          return;
        let name = mouseEl.querySelector(".treasureMapView-goals-group-goal-name");
        if (!name)
          return;
        let existingArEl = name.querySelectorAll(".mh-ui-ar");
        existingArEl.length > 0 && existingArEl.forEach((el) => {
          el.remove();
        });
        let arEl = yield getArEl(mouse.unique_id, type);
        arEl && (name.append(arEl), mouseEl.setAttribute("data-mh-ui-ar", !0));
      }));
    }), toggleAr = () => __async(void 0, null, function* () {
      let mapView = document.querySelector(".treasureMapView");
      if (!mapView)
        return;
      let toggle = mapView.querySelector(".mh-ui-toggle-ar-button");
      if (!toggle)
        return;
      toggle.classList.add("disabled");
      let text = toggle.querySelector(".toggle-ar-text");
      if (!text)
        return;
      let arText = "AR", arTitle = "Attraction Rates";
      mapView.classList.toString().includes("scavenger") && (arText = "DR", arTitle = "Drop Rates"), mapView.classList.contains("mh-ui-ar-showing") ? (mapView.classList.remove("mh-ui-ar-showing"), mapView.classList.add("mh-ui-ar-hidden"), text.innerText = `Show ${arText}`, toggle.title = `Show ${arTitle}`) : (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");
    }), clickArToggle = () => {
      let mapView = document.querySelector(".treasureMapView");
      if (!mapView)
        return;
      let toggle = mapView.querySelector(".mh-ui-toggle-ar-button");
      toggle && toggle.click();
    }, maybeClickArToggle = () => {
      let mapView = document.querySelector(".treasureMapView");
      if (!mapView)
        return;
      let toggle = mapView.querySelector(".mh-ui-toggle-ar-button");
      if (!toggle)
        return;
      let showing = mapView.classList.contains("mh-ui-ar-showing"), currentButtonState = toggle.querySelector(".toggle-ar-text").innerText.replace("AR", "").replace("DR", "").trim();
      (showing && currentButtonState !== "Hide" || !showing && currentButtonState !== "Show") && clickArToggle();
    }, isAdding = !1, addArToggle = (tab = "goals") => __async(void 0, null, function* () {
      let mapView = document.querySelector(".treasureMapView");
      if (!mapView || isAdding && tab === isAdding)
        return;
      isAdding = tab;
      let exists = document.querySelector(".mh-ui-toggle-ar-button");
      if (exists) {
        exists.classList.remove("hidden"), tab === "goals" && mapView.classList.contains("mh-ui-ar-showing") && addArDataToMap(mapper("mapData")), isAdding = !1;
        return;
      }
      let wrapper = document.querySelector(".treasureMapRootView-subTabRow");
      if (!wrapper) {
        isAdding = !1;
        return;
      }
      let toggle = makeElement("button", ["mousehuntActionButton", "tiny", "mh-ui-toggle-ar-button"]), arText = "AR", arTitle = "Attraction Rates";
      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(), isAdding = !1;
    }), removeArToggle = () => {
      let toggle = document.querySelector(".mh-ui-toggle-ar-button");
      toggle && toggle.classList.add("hidden");
    };
  }
});

// src/modules/better-maps/modules/highlighting.js
var areaHighlightingVrift, areaHighlightingFrox, areaHighlightingFloatingIslands, areaHighlightingSchoolOfSorcery, getProfilePic, addProfilePicToCurrentFloor, highlighting_default, init_highlighting = __esm({
  "src/modules/better-maps/modules/highlighting.js"() {
    init_utils2();
    areaHighlightingVrift = () => {
      if (getCurrentLocation() !== "rift_valour")
        return !1;
      let currentFloorState = (user.quests.QuestRiftValour.floor || 0) % 8;
      user.quests.QuestRiftValour.is_at_eclipse ? (currentFloorState = "eclipse", user.enviroment_atts.active_augmentations.tu && (currentFloorState = "eclipse-uu")) : user.quests.QuestRiftValour.state === "farming" && (currentFloorState = "outside");
      let floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-vrift-${currentFloorState}`);
      return floorCategory ? (floorCategory.classList.add("mouse-category-current-floor"), !0) : !1;
    }, areaHighlightingFrox = () => {
      if (getCurrentLocation() !== "fort_rox")
        return !1;
      let mapArea = "day";
      if (user.quests.QuestFortRox) {
        let phase = user.quests.QuestFortRox.current_phase || "day";
        phase === "day" ? mapArea = "day" : phase === "dawn" ? mapArea = "dawn" : phase === "night" && (mapArea = "night");
      }
      let floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-${mapArea}`);
      return floorCategory ? (floorCategory.classList.add("mouse-category-current-floor"), !0) : !1;
    }, areaHighlightingFloatingIslands = () => {
      var _a, _b;
      if (getCurrentLocation() !== "floating_islands")
        return !1;
      let fiAtts = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) || {}, islandType = "";
      fiAtts.is_high_tier_island ? islandType = "hai" : fiAtts.is_low_tier_island ? islandType = "lai" : fiAtts.is_vault_island && (islandType = "sp");
      let islandPowerType = {
        arcn: "arcane",
        frgttn: "forgotten",
        hdr: "hydro",
        shdw: "shadow",
        drcnc: "draconic",
        law: "law",
        phscl: "physical",
        tctcl: "tactical"
      }[fiAtts.island_power_type] || "", floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-esp-${islandPowerType}`);
      if (!floorCategory)
        return !1;
      floorCategory.classList.add("mouse-category-current-floor");
      let floorSubCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-esp-${islandPowerType} .mouse-subcategory-${islandType}`);
      return floorSubCategory && floorSubCategory.classList.add("mouse-subcategory-current-floor"), !0;
    }, areaHighlightingSchoolOfSorcery = () => {
      var _a, _b, _c, _d, _e;
      if (getCurrentLocation() !== "school_of_sorcery" || !((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestSchoolOfSorcery) != null && _b.in_course))
        return !1;
      let powerType = ((_e = (_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestSchoolOfSorcery) == null ? void 0 : _d.current_course) == null ? void 0 : _e.power_type) || "", bait = user.bait_item_id || 0, baitIds = {
        114: "sb",
        3703: "aac",
        3704: "mmc"
      };
      if (!powerType || !baitIds[bait])
        return !1;
      let floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-sos-${powerType}-${baitIds[bait]}`);
      return floorCategory ? (floorCategory.classList.add("mouse-category-current-floor"), !0) : !1;
    }, getProfilePic = () => __async(void 0, null, function* () {
      var _a, _b;
      let 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* () {
      if (document.querySelector("#mh-mapper-current-floor-profile-pic"))
        return;
      let profPic = yield getProfilePic(), 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 {
  background-image: url(${profPic});
}`, document.body.append(styleElement);
    }), highlighting_default = () => {
      let data = mapData();
      if (!data)
        return;
      let mapType = data.map_type, existing = document.querySelector(".mouse-category-current-floor");
      existing && existing.classList.remove("mouse-category-current-floor");
      let added = !1;
      switch (mapType) {
        case "sky_palace":
          added = areaHighlightingFloatingIslands();
          break;
        case "fort_rox":
          added = areaHighlightingFrox();
          break;
        case "valour_rift":
          added = areaHighlightingVrift();
          break;
        case "school_of_sorcery":
          added = areaHighlightingSchoolOfSorcery();
          break;
        default:
          break;
      }
      added && addProfilePicToCurrentFloor();
    };
  }
});

// src/data/map-groups.json
var map_groups_default, 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",
              "root_rummager",
              "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",
            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",
            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: "/items/bait/large/bb0fe6fa6f55e5ccb1f98dea058409e0.png",
            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: "/items/bait/large/65fd19bf5b16dcaa6b3cfebd2f55348c.png",
            color: "#f9a645",
            mice: [
              "sprit_light",
              "gordborg",
              "pumpkin_hoarder",
              "trick",
              "treat",
              "chainsaw",
              "maize_harvester"
            ]
          }
        ]
      },
      halloween_trick_2021: {
        categories: [
          {
            name: "Bonefort",
            id: "bonefort",
            icon: "/items/bait/large/e6ac92f19a6ac930aad02e317cf8e6e8.png",
            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: "/items/bait/large/04d69ccc7a5b1578cdf90b9651fb2315.png",
            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: "/items/bait/large/fe9d538d1a811bdb787b78aa1526ee50.png",
            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: "/items/stats/large/680f6a68612ca9181a90b5719b20ef78.png",
            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: "/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg",
            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: "/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg",
            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: "/environments/15d8d9d837b22b31707d06f412b78e0d.jpg",
            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: "/items/stats/large/680f6a68612ca9181a90b5719b20ef78.png",
            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: "/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg",
            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: "/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg",
            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: "/environments/15d8d9d837b22b31707d06f412b78e0d.jpg",
            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: "/items/stats/large/680f6a68612ca9181a90b5719b20ef78.png",
            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: "/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg",
            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: "/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg",
            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: "/environments/15d8d9d837b22b31707d06f412b78e0d.jpg",
            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"
          }
        ]
      },
      lunar_new_year_list: {
        categories: [
          {
            name: "Standard",
            id: "anywhere",
            icon: "/items/stats/large/2b92cfc72df4733942a9d7f63d1f3378.png",
            color: "#b9d1ff",
            mice: [
              "costumed_dog",
              "costumed_dragon",
              "costumed_horse",
              "costumed_monkey",
              "costumed_ox",
              "costumed_pig",
              "costumed_rabbit",
              "costumed_rat",
              "costumed_rooster",
              "costumed_sheep",
              "costumed_snake",
              "costumed_tiger"
            ]
          },
          {
            name: "Dumpling",
            id: "dumpling",
            icon: "/items/bait/large/f4c3ee4bb9aba29938223172a791650b.png",
            color: "#ffefb9",
            mice: [
              "calligraphy",
              "dumpling_chef",
              "red_envelope"
            ]
          },
          {
            name: "Nian Gao'da",
            id: "ngd",
            icon: "/items/bait/large/d4813a69fff0b714f79976a726b7ce66.png",
            color: "#ffa4a4",
            mice: [
              "red_candle"
            ]
          }
        ]
      },
      birthday_f_list: {
        categories: [
          {
            name: "Mixing Room",
            id: "mixing-room",
            icon: "/ui/events/birthday_factory/item_mixing_rod.png",
            color: "#0aebdd",
            mice: [
              "force_fighter_blue",
              "force_fighter_green",
              "force_fighter_pink",
              "force_fighter_red",
              "force_fighter_yellow",
              "super_fighterbot_megasupreme"
            ]
          },
          {
            name: "Pumping Room",
            id: "pumping-room",
            icon: "/ui/events/birthday_factory/item_pressurized_pump.png",
            color: "#fca00a",
            mice: [
              "reality_restitch",
              "time_punk",
              "time_tailor",
              "time_thief",
              "time_plumber"
            ]
          },
          {
            name: "Break Room",
            id: "break-room",
            icon: "/ui/events/birthday_factory/item_circuit_breaker.png",
            color: "#ea8cab",
            mice: [
              "breakdancer",
              "fromager_mouse",
              "dance_party",
              "dance_boss",
              "para_para_dancer"
            ]
          },
          {
            name: "QA Room",
            id: "qa-room",
            icon: "/ui/events/birthday_factory/item_quality_cog.png",
            color: "#fbabff",
            mice: [
              "cupcake_candle_thief",
              "cupcake_cutie",
              "sprinkley_sweet",
              "cupcake_camo",
              "cupcake_runner"
            ]
          },
          {
            name: "Any Room",
            id: "any-room",
            icon: "/items/bait/large/39a63a48084383a7eb07d64c74357544.png",
            color: "#ffeeca",
            mice: [
              "buckethead",
              "present",
              "pintail",
              "dinosuit",
              "sleepwalker",
              "terrible_twos",
              {
                mouse: "factory_technician",
                subcategory: "frc"
              },
              {
                mouse: "cheesy_party",
                subcategory: "sb"
              }
            ]
          }
        ],
        subcategories: [
          {
            id: "frc",
            name: "Factory Repair Charm"
          },
          {
            id: "sb",
            name: "SUPER|brie+"
          }
        ]
      },
      birthday_2019_gilded: {
        categories: [
          {
            name: "Mixing Room",
            id: "mixing-room",
            icon: "/ui/events/birthday_factory/item_mixing_rod.png",
            color: "#0aebdd",
            mice: [
              "force_fighter_blue",
              "force_fighter_green",
              "force_fighter_pink",
              "force_fighter_red",
              "force_fighter_yellow",
              "super_fighterbot_megasupreme"
            ]
          },
          {
            name: "Pumping Room",
            id: "pumping-room",
            icon: "/ui/events/birthday_factory/item_pressurized_pump.png",
            color: "#fca00a",
            mice: [
              "reality_restitch",
              "time_punk",
              "time_tailor",
              "time_thief",
              "time_plumber"
            ]
          },
          {
            name: "Break Room",
            id: "break-room",
            icon: "/ui/events/birthday_factory/item_circuit_breaker.png",
            color: "#ea8cab",
            mice: [
              "breakdancer",
              "fromager_mouse",
              "dance_party",
              "dance_boss",
              "para_para_dancer"
            ]
          },
          {
            name: "QA Room",
            id: "qa-room",
            icon: "/ui/events/birthday_factory/item_quality_cog.png",
            color: "#fbabff",
            mice: [
              "cupcake_candle_thief",
              "cupcake_cutie",
              "sprinkley_sweet",
              "cupcake_camo",
              "cupcake_runner"
            ]
          },
          {
            name: "Any Room",
            id: "any-room",
            icon: "/items/bait/large/39a63a48084383a7eb07d64c74357544.png",
            color: "#ffeeca",
            mice: [
              "buckethead",
              "present",
              "pintail",
              "dinosuit",
              "sleepwalker",
              "terrible_twos",
              {
                mouse: "factory_technician",
                subcategory: "frc"
              },
              {
                mouse: "cheesy_party",
                subcategory: "sb"
              }
            ]
          }
        ],
        subcategories: [
          {
            id: "frc",
            name: "Factory Repair Charm"
          },
          {
            id: "sb",
            name: "SUPER|brie+"
          }
        ]
      },
      birthday_2021_gilded_party_size: {
        categories: [
          {
            name: "Mixing Room",
            id: "mixing-room",
            icon: "/ui/events/birthday_factory/item_mixing_rod.png",
            color: "#0aebdd",
            mice: [
              "force_fighter_blue",
              "force_fighter_green",
              "force_fighter_pink",
              "force_fighter_red",
              "force_fighter_yellow",
              "super_fighterbot_megasupreme"
            ]
          },
          {
            name: "Pumping Room",
            id: "pumping-room",
            icon: "/ui/events/birthday_factory/item_pressurized_pump.png",
            color: "#fca00a",
            mice: [
              "reality_restitch",
              "time_punk",
              "time_tailor",
              "time_thief",
              "time_plumber"
            ]
          },
          {
            name: "Break Room",
            id: "break-room",
            icon: "/ui/events/birthday_factory/item_circuit_breaker.png",
            color: "#ea8cab",
            mice: [
              "breakdancer",
              "fromager_mouse",
              "dance_party",
              "dance_boss",
              "para_para_dancer"
            ]
          },
          {
            name: "QA Room",
            id: "qa-room",
            icon: "/ui/events/birthday_factory/item_quality_cog.png",
            color: "#fbabff",
            mice: [
              "cupcake_candle_thief",
              "cupcake_cutie",
              "sprinkley_sweet",
              "cupcake_camo",
              "cupcake_runner"
            ]
          },
          {
            name: "Any Room",
            id: "any-room",
            icon: "/items/bait/large/39a63a48084383a7eb07d64c74357544.png",
            color: "#ffeeca",
            mice: [
              "buckethead",
              "present",
              "pintail",
              "dinosuit",
              "sleepwalker",
              "terrible_twos",
              {
                mouse: "factory_technician",
                subcategory: "frc"
              },
              {
                mouse: "cheesy_party",
                subcategory: "sb"
              }
            ]
          }
        ],
        subcategories: [
          {
            id: "frc",
            name: "Factory Repair Charm"
          },
          {
            id: "sb",
            name: "SUPER|brie+"
          }
        ]
      },
      bountiful_beanstalk: {
        categories: [
          {
            name: "Beanstalk",
            id: "beanstalk",
            icon: "",
            color: "#45890e",
            mice: [
              "budrich_thornborn",
              "leafton_beanwell",
              "herbaceous_bravestalk",
              {
                mouse: "vinneus_stalkhome",
                subcategory: "boss"
              }
            ]
          },
          {
            name: "Dungeon",
            id: "dungeon",
            icon: "",
            color: "#919ac7",
            mice: [
              "peaceful_prisoner",
              "diminutive_detainee",
              "smug_smuggler",
              {
                mouse: "cell_sweeper",
                subcategory: "beanster"
              },
              {
                mouse: "jovial_jailor",
                subcategory: "beanster"
              },
              {
                mouse: "lethargic_guard",
                subcategory: "beanster"
              },
              {
                mouse: "gate_keeper",
                subcategory: "lavish"
              },
              {
                mouse: "key_master",
                subcategory: "royal"
              },
              {
                mouse: "wrathful_warden",
                subcategory: "royal"
              },
              {
                mouse: "dungeon_master",
                subcategory: "boss"
              }
            ]
          },
          {
            name: "Ballroom",
            id: "ballroom",
            icon: "",
            color: "#e0b1b2",
            mice: [
              "whimsical_waltzer",
              "sassy_salsa_dancer",
              "baroque_dancer",
              {
                mouse: "obstinate_oboist",
                subcategory: "beanster"
              },
              {
                mouse: "peevish_piccoloist",
                subcategory: "beanster"
              },
              {
                mouse: "sultry_saxophonist",
                subcategory: "beanster"
              },
              {
                mouse: "violent_violinist",
                subcategory: "lavish"
              },
              {
                mouse: "chafed_cellist",
                subcategory: "lavish"
              },
              {
                mouse: "treacherous_tubaist",
                subcategory: "royal"
              },
              {
                mouse: "malevolent_maestro",
                subcategory: "boss"
              }
            ]
          },
          {
            name: "Great Hall",
            id: "great-hall",
            icon: "",
            color: "#d68d0a",
            mice: [
              "clumsy_cupbearer",
              "plotting_page",
              "scheming_squire",
              {
                mouse: "vindictive_viscount",
                subcategory: "beanster"
              },
              {
                mouse: "baroness_von_bean",
                subcategory: "beanster"
              },
              {
                mouse: "cagey_countess",
                subcategory: "beanster"
              },
              {
                mouse: "dastardly_duchess",
                subcategory: "lavish"
              },
              {
                mouse: "malicious_marquis",
                subcategory: "lavish"
              },
              {
                mouse: "pernicious_prince",
                subcategory: "royal"
              },
              {
                mouse: "mythical_giant_king",
                subcategory: "boss"
              }
            ]
          }
        ],
        subcategories: [
          {
            id: "beanster",
            name: "Beanster"
          },
          {
            id: "Lavish",
            name: "Lavish Beanster"
          },
          {
            id: "royal",
            name: "Royal Beanster"
          },
          {
            id: "boss",
            name: "Boss"
          }
        ]
      },
      m1k_solo: {
        categories: [
          {
            name: "Folklore Forest",
            id: "folklore-forest",
            color: "#98dca4",
            mice: [
              "architeuthulhu_of_the_abyss",
              "monstrous_midge",
              "mythweaver"
            ]
          },
          {
            name: "Rift",
            id: "rift",
            color: "#98ccdc",
            mice: [
              "rift_hapless",
              "rift_big_bad_burroughs",
              "rift_black_widow"
            ]
          },
          {
            name: "Queso",
            id: "queso",
            color: "#ffa123",
            mice: [
              "geyser_eruption_dragon_wildfire",
              "queso_river_boss"
            ]
          },
          {
            name: "Other",
            id: "other",
            color: "#dc98bf",
            mice: [
              "crystal_behemoth",
              "ful_mina_mountain_queen"
            ]
          }
        ]
      },
      school_of_sorcery: {
        categories: [
          {
            name: "Arcane SB",
            id: "sos-arcane-sb",
            icon: "/powertypes/arcane.png",
            color: "#16dfad",
            mice: [
              "perpetual_detention",
              "broomstick_bungler",
              "misfortune_teller",
              {
                mouse: "sleep_starved_scholar",
                subcategory: "final"
              }
            ]
          },
          {
            name: "Arcane AAC",
            id: "sos-arcane-aac",
            icon: "/items/bait/large/9aaaf078b9706175e2cb9dac11a121a8.png",
            color: "#16dfad",
            mice: [
              "arcana_overachiever",
              "invisible_fashionista",
              "enchanted_chess_club_champion",
              {
                mouse: "class_clown",
                subcategory: "final"
              }
            ]
          },
          {
            name: "Arcane MMC",
            id: "sos-arcane-mmc",
            icon: "/items/bait/large/a44cd2c22f720fd979d53d06d39a5f57.png",
            color: "#16dfad",
            mice: [
              "illustrious_illusionist",
              "featherlight",
              "constructively_critical_artist",
              {
                mouse: "tyrannical_thaumaturge",
                subcategory: "final"
              }
            ]
          },
          {
            name: "Shadow SB",
            id: "sos-shadow-sb",
            icon: "/powertypes/shadow.png",
            color: "#c7abde",
            mice: [
              "mixing_mishap",
              "uncoordinated_cauldron_carrier",
              "bookworm",
              {
                mouse: "cheat_sheet_conjurer",
                subcategory: "final"
              }
            ]
          },
          {
            name: "Shadow AAC",
            id: "sos-shadow-aac",
            icon: "/items/bait/large/9aaaf078b9706175e2cb9dac11a121a8.png",
            color: "#c7abde",
            mice: [
              "classroom_keener",
              "audacious_alchemist",
              "prestigious_prestidigitator",
              {
                mouse: "celestial_summoner",
                subcategory: "final"
              }
            ]
          },
          {
            name: "Shadow MMC",
            id: "sos-shadow-mmc",
            icon: "/items/bait/large/a44cd2c22f720fd979d53d06d39a5f57.png",
            color: "#c7abde",
            mice: [
              "classroom_disrupter",
              "teleporting_truant",
              "magical_multitasker",
              {
                mouse: "data_devourer",
                subcategory: "final"
              }
            ]
          },
          {
            name: "Boss",
            id: "sos-boss",
            icon: "/ui/hud/school_of_sorcery/exam_icon.png",
            color: "linear-gradient(64deg, #c7abde 10%, #c7abde 50%, #16dfad 90%)",
            mice: [
              "arcane_sorcerer",
              "shadow_sorcerer",
              {
                mouse: "mythical_master_sorcerer",
                subcategory: "final"
              }
            ]
          }
        ],
        subcategories: [
          {
            id: "final",
            name: "Final Exam"
          }
        ]
      }
    };
  }
});

// src/modules/better-maps/modules/tab-sorted.js
var getMouseDataForMap, makeMouseDiv, makeSortedPageWrapper, makeSortedMiceList, makeScavengerSortedPage, makeGenericSortedPage, moveTabToBody, processSortedTabClick, addSortedMapTab, showSortedTab, hideSortedTab, init_tab_sorted = __esm({
  "src/modules/better-maps/modules/tab-sorted.js"() {
    init_utils2();
    init_toggle_ar();
    init_highlighting();
    init_map_groups();
    getMouseDataForMap = (currentMapData, type = "mouse") => {
      let unsortedMice = [];
      currentMapData.goals[type] && (unsortedMice = currentMapData.goals[type]);
      let caughtMice = [];
      currentMapData.hunters.forEach((hunter) => {
        caughtMice = [...caughtMice, ...hunter.completed_goal_ids[type]];
      }), unsortedMice = unsortedMice.filter((mouse) => !caughtMice.includes(mouse.unique_id));
      let categories = [];
      map_groups_default[currentMapData.map_type] && map_groups_default[currentMapData.map_type].categories && (categories = map_groups_default[currentMapData.map_type].categories);
      let subcategories = [];
      return map_groups_default[currentMapData.map_type] && map_groups_default[currentMapData.map_type].subcategories && (subcategories = map_groups_default[currentMapData.map_type].subcategories), {
        unsortedMice,
        categories,
        subcategories,
        getMouseDataForMap
      };
    }, makeMouseDiv = (mouse, type = "mouse") => __async(void 0, null, function* () {
      let 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);
      let mouseData = makeElement("div", "mouse-data"), mouseImage = makeElement("img", "mouse-image");
      mouseImage.src = type === "mouse" ? mouse.small : mouse.thumb, mouseImage.alt = mouse.name, mouseData.append(mouseImage), makeElement("div", "mouse-name", mouse.name, mouseData);
      let mouseAr = yield getArEl(mouse.unique_id, type);
      mouseAr && mouseData.append(mouseAr), mouseDiv.append(mouseData);
      let mouseExtraInfoWrapper = makeElement("div", "mouse-mhct-extra-info-wrapper"), mouseExtraInfo = makeElement("div", "mouse-extra-info");
      if (Array.isArray(mouse.environment_ids)) {
        let locationText = makeElement("div", "location-text-wrapper");
        makeElement("span", "location-text", "Found in ", locationText), mouse.environment_ids.forEach((environmentID, index) => {
          let environment = mapData().environments.find((env) => env.id === environmentID);
          if (environment) {
            let locationLink = makeElement("a", "mouse-location-link", environment.name);
            locationLink.title = `Travel to ${environment.name}`, locationLink.setAttribute("data-environment-id", environment.id), locationLink.addEventListener("click", () => {
              showTravelConfirmationNoDetails(environment);
            }), index !== 0 && locationText.append(document.createTextNode(", ")), locationText.append(locationLink);
          }
        }), mouseExtraInfo.append(locationText);
      }
      if (mouse.weaknesses) {
        let weakness = makeElement("div", "mouse-weakness");
        mouse.weaknesses.forEach((weaknessType) => {
          if (weaknessType.power_types.length === 0)
            return;
          let weaknessTypeDiv = makeElement("div", "weakness-type");
          makeElement("div", "weakness-name", weaknessType.name, weaknessTypeDiv);
          let powerTypes = makeElement("div", "power-types");
          weaknessType.power_types.forEach((pType) => {
            let 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);
      }
      return mouseExtraInfoWrapper.append(mouseExtraInfo), mouseDiv.append(mouseExtraInfoWrapper), mouseDiv.addEventListener("click", () => __async(void 0, null, function* () {
        if (mouseDiv.classList.contains("mouse-container-selected")) {
          mouseDiv.classList.remove("mouse-container-selected");
          return;
        }
        addMHCTData(mouse, mouseExtraInfo, type);
        let addClass2 = !mouseDiv.classList.contains("mouse-container-selected"), allSelected = document.querySelectorAll(".mouse-container-selected");
        allSelected && allSelected.forEach((selected) => {
          selected.classList.remove("mouse-container-selected");
        }), addClass2 && mouseDiv.classList.add("mouse-container-selected");
      })), mouseDiv;
    }), makeSortedPageWrapper = () => {
      let sortedPage = makeElement("div", "sorted-page");
      return makeElement("div", ["sorted-loading", "mousehuntPage-loading", "active"], "", sortedPage), makeElement("div", "sorted-page-content", "", sortedPage), sortedPage;
    }, makeSortedMiceList = () => __async(void 0, null, function* () {
      let currentMapData = getMapData(mapData().map_id), { unsortedMice, categories, subcategories } = getMouseDataForMap(currentMapData), target = document.querySelector(".sorted-page-content");
      if (!target)
        return;
      let categoriesWrapper = makeElement("div", "mouse-category-container");
      for (let category of categories) {
        let categoryID = category.id, categoryWrapper = makeElement("div", "mouse-category-wrapper");
        categoryWrapper.classList.add(`mouse-category-${categoryID}`, "mouse-category-wrapper-hidden");
        let categoryHeader = makeElement("div", "mouse-category-header");
        category.color && (categoryWrapper.style.background = category.color);
        let iconTitleWrapper = makeElement("div", "mouse-category-icon-title-wrapper");
        if (category.icon) {
          let categoryIcon = makeElement("img", "mouse-category-icon");
          categoryIcon.src = category.icon.indexOf("/") === 0 ? `https://www.mousehuntgame.com/images${category.icon}` : category.icon, iconTitleWrapper.append(categoryIcon);
        }
        let 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);
        let categoryMice = makeElement("div", "mouse-category-mice"), addToSubCat = [];
        category.mice.sort((a, b) => a.name < b.name ? -1 : 1);
        for (let mouse of category.mice) {
          let hasSubCat = !1, mouseType = mouse;
          typeof mouse == "object" && mouse.subcategory && (hasSubCat = mouse.subcategory, mouseType = mouse.mouse);
          let mouseIndex = unsortedMice.findIndex((unsortedMouse) => unsortedMouse.type === mouseType);
          if (mouseIndex === -1)
            continue;
          let mouseDiv = yield makeMouseDiv(unsortedMice[mouseIndex]);
          hasSubCat ? (addToSubCat[hasSubCat] || (addToSubCat[hasSubCat] = []), addToSubCat[hasSubCat].push(mouseDiv)) : categoryMice.append(mouseDiv), categoryWrapper.append(categoryMice), unsortedMice.splice(mouseIndex, 1), categoryWrapper.classList.remove("mouse-category-wrapper-hidden");
        }
        for (let subcategory of subcategories)
          if (addToSubCat[subcategory.id] && addToSubCat[subcategory.id].length > 0) {
            let subcategoryWrapper = document.createElement("div");
            subcategoryWrapper.classList.add("mouse-subcategory-wrapper", `mouse-subcategory-${subcategory.id}`), subcategory.color && (subcategoryWrapper.style.backgroundColor = subcategory.color);
            let currentSubCat = map_groups_default[currentMapData.map_type].subcategories.find((subCat) => subCat.id === subcategory.id), subcategoryHeader = makeElement("div", "mouse-subcategory-header");
            makeElement("div", "mouse-subcategory-title", currentSubCat.name, subcategoryHeader), subcategoryWrapper.append(subcategoryHeader);
            let 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) {
        let unsortedWrapper = makeElement("div", "mouse-category-wrapper");
        unsortedWrapper.classList.add("mouse-category-unsorted");
        let unsortedHeader = makeElement("div", "mouse-category-header"), unsortedTitle = makeElement("div", "mouse-category-title", "Unsorted");
        unsortedHeader.append(unsortedTitle), unsortedWrapper.append(unsortedHeader);
        let unsortedMiceDiv = makeElement("div", "mouse-category-mice");
        for (let mouse of unsortedMice) {
          let mouseDiv = yield makeMouseDiv(mouse);
          unsortedMiceDiv.append(mouseDiv);
        }
        unsortedWrapper.append(unsortedMiceDiv), categoriesWrapper.append(unsortedWrapper);
      }
      target.append(categoriesWrapper);
    }), makeScavengerSortedPage = (isNormal, target) => __async(void 0, null, function* () {
      target.classList.add("scavenger-sorted-page"), target.classList.add("treasureMapView-block"), target.setAttribute("data-scavenger-sorted-by", "none"), target.setAttribute("data-scavenger-sort-direction", "descending");
      let sortMice = (direction = "descending") => {
        let container = target.querySelector(".sorted-page-content");
        if (!container)
          return;
        let mice = target.querySelectorAll(".mouse-container");
        if (!mice)
          return;
        let miceArray = [...mice];
        miceArray.sort((a, b) => {
          let aAr = 0, bAr = 0, aArEl = a.querySelector(".mh-ui-ar");
          aArEl && (aAr = aArEl.getAttribute("data-ar") || 0);
          let bArEl = b.querySelector(".mh-ui-ar");
          return bArEl && (bAr = bArEl.getAttribute("data-ar") || 0), direction === "ascending" ? aAr - bAr : bAr - aAr;
        }), mice.forEach((mouse) => {
          mouse.remove();
        });
        let locationHeaders = container.querySelectorAll(".scavenger-location-wrapper");
        locationHeaders && locationHeaders.forEach((header) => {
          header.remove();
        }), miceArray.forEach((mouse) => {
          container.append(mouse);
        });
      }, environments5 = yield getData("environments");
      if (!environments5)
        return;
      let sortMiceIntoLocations = (direction = "descending") => __async(void 0, null, function* () {
        let container = target.querySelector(".sorted-page-content");
        if (!container)
          return;
        let mice = target.querySelectorAll(".mouse-container");
        if (!mice)
          return;
        let miceByLocation = {}, locations = {};
        for (let mouse of mice) {
          let mouseId = mouse.getAttribute("data-mouse-id"), location2 = yield getLocationForMouse(mouseId, isNormal ? "mouse" : "item");
          locations[location2.id] = location2;
          let locationId = location2.id;
          miceByLocation[locationId] || (miceByLocation[locationId] = []), miceByLocation[locationId].push(mouse);
        }
        mice.forEach((mouse) => {
          mouse.remove();
        });
        let locationHeaders = document.querySelectorAll(".scavenger-location-wrapper");
        locationHeaders && locationHeaders.forEach((header) => {
          header.remove();
        }), Object.keys(miceByLocation).sort((a, b) => miceByLocation[b].length - miceByLocation[a].length).forEach((location2) => {
          let locationWrapper = makeElement("div", ["treasureMapView-goals-groups", "scavenger-location-wrapper"]), header = makeElement("div", ["treasureMapView-block-content-heading", "scavenger-location-header"]), locationContent = makeElement("div", "scavenger-location-content"), environment = environments5.find((env) => env.id === location2);
          if (locations[environment == null ? void 0 : environment.id] && (environment.name = locations[environment.id].name), environment) {
            if (environment.image) {
              let headerImage = makeElement("div", ["treasureMapView-block-content-heading-image", "scavenger-location-icon"]);
              headerImage.style.backgroundImage = `url(${environment.image})`, header.append(headerImage);
            }
            if (environment.name) {
              let envLink = makeElement("a", "scavenger-location-name", environment.name);
              envLink.title = `Travel to ${environment.name}`, envLink.setAttribute("data-environment-id", location2), envLink.addEventListener("click", () => {
                showTravelConfirmation(environment, mapModel());
              }), header.append(envLink), makeElement("span", "scavenger-location-count", ` (${miceByLocation[location2].length})`, header);
            }
          }
          locationWrapper.append(header), miceByLocation[location2].forEach((mouse) => {
            direction === "ascending" ? locationContent.prepend(mouse) : locationContent.append(mouse);
          }), locationWrapper.append(locationContent), container.append(locationWrapper);
        });
      }), toggleSortDirection = () => __async(void 0, null, function* () {
        let currentDirection = target.getAttribute("data-scavenger-sort-direction"), currentSort2 = target.getAttribute("data-scavenger-sorted-by"), newDirection = currentDirection === "descending" ? "ascending" : "descending";
        target.setAttribute("data-scavenger-sort-direction", newDirection), yield sortMice(newDirection), currentSort2 === "location" && (yield sortMiceIntoLocations(newDirection));
      }), toggleSortType = () => __async(void 0, null, function* () {
        let currentSort2 = target.getAttribute("data-scavenger-sorted-by"), currentDirection = target.getAttribute("data-scavenger-sort-direction");
        currentSort2 === "location" ? (target.setAttribute("data-scavenger-sorted-by", "none"), sortMice(currentDirection)) : (target.setAttribute("data-scavenger-sorted-by", "location"), yield sortMiceIntoLocations(currentDirection));
      }), toggleWrapper = makeElement("div", "scavenger-toggle-wrapper"), toggleByLocation = makeElement("button", ["scavenger-toggle-button", "mousehuntActionButton", "tiny"]);
      makeElement("span", "scavenger-toggle-text", "Sort by Location", toggleByLocation), toggleByLocation.addEventListener("click", () => __async(void 0, null, function* () {
        toggleByLocation.classList.add("disabled"), yield toggleSortType(), toggleByLocation.classList.remove("disabled");
      })), toggleWrapper.append(toggleByLocation);
      let toggleByDropRate = makeElement("button", ["scavenger-toggle-button", "mousehuntActionButton", "tiny"]);
      makeElement("span", "scavenger-toggle-text", isNormal ? "Sort by Attraction Rate" : "Sort by Drop Rate", toggleByDropRate), toggleByDropRate.addEventListener("click", () => __async(void 0, null, function* () {
        toggleByDropRate.classList.add("disabled"), yield toggleSortDirection(), toggleByDropRate.classList.remove("disabled");
      })), toggleWrapper.append(toggleByDropRate);
      let sortedContainer = document.querySelector("#sorted-mice-container");
      sortedContainer ? sortedContainer.prepend(toggleWrapper) : target.prepend(toggleWrapper), target.setAttribute("data-scavenger-sorted-by", "location"), target.setAttribute("data-scavenger-sort-direction", "descending"), yield sortMiceIntoLocations("descending"), yield toggleSortType();
    }), makeGenericSortedPage = (isNormal, sortedPage) => __async(void 0, null, function* () {
      let target = document.querySelector(".sorted-page-content");
      if (!target)
        return;
      let currentMapData = getMapData(mapData().map_id), type = isNormal ? "mouse" : "item";
      target.classList.add("treasureMapView-block-content", "scavenger-sorted-page");
      let { unsortedMice } = getMouseDataForMap(currentMapData, type), sortedUnsorted = yield Promise.all(
        unsortedMice.map((mouse) => __async(void 0, null, function* () {
          let ar = yield getHighestArForMouse(mouse.unique_id, type);
          return __spreadProps(__spreadValues({}, mouse), {
            ar
          });
        }))
      );
      sortedUnsorted.sort((a, b) => a.ar > b.ar ? -1 : 1);
      for (let mouse of sortedUnsorted) {
        let mouseDiv = yield makeMouseDiv(mouse, type);
        target.append(mouseDiv);
      }
      yield makeScavengerSortedPage(isNormal, sortedPage);
    }), moveTabToBody = () => {
      let sortedMiceContainer = document.querySelector("#sorted-mice-container");
      if (!sortedMiceContainer)
        return;
      let body = document.querySelector("body");
      body && body.append(sortedMiceContainer);
    }, processSortedTabClick = () => __async(void 0, null, function* () {
      if (document.querySelector(".treasureMapRootView-subTab.sorted-map-tab.active"))
        return;
      let otherTabs = document.querySelectorAll(".treasureMapRootView-subTab:not(.sorted-map-tab)");
      otherTabs && otherTabs.forEach((tab) => {
        tab.removeEventListener("click", moveTabToBody), tab.addEventListener("click", moveTabToBody);
      });
      let currentMapData = mapData();
      if (!currentMapData || !currentMapData.goals)
        return;
      let activeTab = document.querySelector(".treasureMapRootView-subTab.active");
      activeTab && activeTab.classList.remove("active");
      let sortedTab = document.querySelector(".treasureMapRootView-subTab.sorted-map-tab");
      sortedTab && sortedTab.classList.add("active");
      let mapContainer = document.querySelector(".treasureMapView-blockWrapper");
      if (!mapContainer)
        return;
      let leftBlock = mapContainer.querySelector(".treasureMapView-leftBlock");
      leftBlock && (leftBlock.style.display = "none");
      let rightBlock = mapContainer.querySelector(".treasureMapView-rightBlock");
      rightBlock && (rightBlock.style.display = "none");
      let existing = document.querySelector("#sorted-mice-container");
      existing && existing.remove();
      let sortedMiceContainer = document.createElement("div");
      sortedMiceContainer.id = "sorted-mice-container";
      let sortedPage = makeSortedPageWrapper();
      sortedMiceContainer.append(sortedPage), mapContainer.append(sortedMiceContainer), map_groups_default[currentMapData.map_type] ? yield makeSortedMiceList() : currentMapData.is_scavenger_hunt ? yield makeGenericSortedPage(!1, sortedPage) : yield makeGenericSortedPage(!0, sortedPage);
      let loading = document.querySelector(".sorted-loading");
      loading && loading.remove(), highlighting_default();
    }), addSortedMapTab = () => {
      let mapTabs = document.querySelector(".treasureMapRootView-subTabContainer");
      if (!mapTabs || mapTabs.length <= 0 || mapTabs.querySelector(".sorted-map-tab"))
        return !1;
      let sortedTab = makeElement("a", "treasureMapRootView-subTab sorted-map-tab", "Sorted");
      sortedTab.setAttribute("data-type", "sorted"), sortedTab.addEventListener("click", processSortedTabClick);
      let divider = makeElement("div", "treasureMapRootView-subTab-spacer");
      return mapTabs.insertBefore(divider, mapTabs.children[0]), mapTabs.insertBefore(sortedTab, mapTabs.children[0]), !0;
    }, showSortedTab = () => {
      processSortedTabClick(), addArToggle("sorted");
    }, hideSortedTab = () => {
      removeArToggle();
    };
  }
});

// src/modules/better-maps/modules/consolation-prizes.js
var consolation_prizes_default, init_consolation_prizes = __esm({
  "src/modules/better-maps/modules/consolation-prizes.js"() {
    init_utils2();
    consolation_prizes_default = () => __async(void 0, null, function* () {
      let consolationButton = document.querySelector(".treasureMapView-consolationPrize-message");
      if (!consolationButton || !mapData().has_consolation_prizes || !mapData().consolation_prizes)
        return;
      let existing = document.querySelector(".mh-mapper-consolation-prizes");
      existing && existing.remove();
      let prizeWrapper = makeElement("div", "mh-mapper-consolation-prizes"), prizes = mapData().consolation_prizes || [];
      for (let prize of prizes) {
        let prizeDiv = makeElement("div", "mh-mapper-consolation-prize"), 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, getItemLinkMarkup, addMouseLinksToMap, addClassesToGroups, moveLeaveButton, addQuickInvite, addSidebarToggle, showGoalsTab, hideGoalsTab, init_tab_goals = __esm({
  "src/modules/better-maps/modules/tab-goals.js"() {
    init_utils2();
    init_toggle_ar();
    init_consolation_prizes();
    getLinkMarkup2 = (name, mouseType) => {
      name = name.replaceAll(" ", "_");
      let nameMouse = `${name}_Mouse`.replaceAll("_Mouse_Mouse", "_Mouse");
      return makeLink("MHCT AR", `https://api.mouse.rip/mhct-redirect/${mouseType}`) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(nameMouse.replaceAll(" ", "_"))}`, !0);
    }, getItemLinkMarkup = (name) => (name = name.replace(" ", "_"), makeLink("MHCT DR", `hhttps://api.mouse.rip/mhct-redirect-item/${name}`, !0) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(name.replaceAll(" ", "_"))}`, !0)), addMouseLinksToMap = () => __async(void 0, null, function* () {
      let overlay = document.querySelector("#overlayPopup");
      if (!(overlay && overlay.classList.contains("treasureMapPopup")))
        return;
      let mouseIcon = document.querySelectorAll(".treasureMapView-goals-group-goal");
      if (!mouseIcon || mouseIcon.length === 0)
        return;
      let mapViewClasses = document.querySelector(".treasureMapView");
      if (!mapViewClasses)
        return;
      let type = "mouse";
      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();
        type === "item" && (mouseType = mouse.getAttribute("data-unique-id")), mouse.addEventListener("click", () => __async(void 0, null, function* () {
          let title = document.querySelector(".treasureMapView-highlight-name");
          if (!title || (title.classList.add("mh-ui-mouse-links-map-name"), title.addEventListener("click", () => {
            type === "item" ? hg.views.ItemView.show(mouseType) : type === "mouse" && hg.views.MouseView.show(mouseType);
          }), title.setAttribute("data-mouse-id", mouseType), document.querySelector(`#mh-ui-mouse-links-map-${mouseType}-${type}`)))
            return;
          if (type === "mouse") {
            let div = makeElement("div", "mh-ui-mouse-links-map");
            div.id = `mh-ui-mouse-links-map-${mouseType}-${type}`, div.innerHTML = getLinkMarkup2(title.innerText, mouseType);
            let envs = document.querySelector(".treasureMapView-highlight-environments");
            envs && envs.parentNode.insertBefore(div, envs.nextSibling);
          } else if (type === "item") {
            let div = makeElement("div", "mh-ui-mouse-links-map");
            div.id = `mh-ui-mouse-links-map-${mouseType}-${type}`, div.innerHTML = getItemLinkMarkup(mouseType);
            let desc = document.querySelector(".treasureMapView-highlight-description");
            desc && desc.prepend(div);
          }
          let appendMHCTto = document.querySelector(".treasureMapView-highlight-weaknessContainer");
          appendMHCTto || (appendMHCTto = document.querySelector(".mh-ui-mouse-links-map"));
          let existingArs = document.querySelectorAll(".mh-ui-mouse-links-map-ars");
          existingArs && existingArs.length > 0 && existingArs.forEach((ar) => ar.remove());
          let container = document.querySelector(".treasureMapView-highlight.goal.active");
          if (!container)
            return;
          let 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), arsEl.innerHTML !== "" && (container.classList.add("has-mhct-ars"), container.append(arsEl));
        }));
      });
    }), addClassesToGroups = (mapData3) => {
      document.querySelectorAll(".treasureMapView-goals-groups").forEach((group) => {
        let title = group.querySelector(".treasureMapView-block-content-heading");
        if (!title || title.classList.contains("mh-ui-goals-group-completed-title"))
          return;
        let 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 = "", count2 = group.querySelector(".treasureMapView-block-content-heading-count");
        if (count2 && (group.setAttribute("data-mouse-count", count2.innerText.replace("(", "").replace(")", "")), countText = count2.innerText), !completed)
          return;
        let hunterName = title.innerText.replace(countText, "").replace(" found these mice:", "").replace(" found this mouse:", "").trim(), hunter = mapData3.hunters.find((h) => h.name.trim() === hunterName);
        if (!hunter) {
          let image2 = group.querySelector(".treasureMapView-block-content-heading-image");
          if (!image2)
            return;
          let url = image2.getAttribute("style").replace("background-image:url(", "").replace("background-image: url(", "").replace(");", "");
          hunter = mapData3.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
        }), !hunter)
          return;
        let image = group.querySelector(".treasureMapView-block-content-heading-image");
        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);
        }));
        let replacementTitle = makeElement("div", "treasureMapView-block-content-heading");
        image && replacementTitle.append(image);
        let nameLink = makeElement("a", "mh-ui-goals-group-completed-title", hunter.name);
        nameLink.setAttribute("data-snuid", hunter.sn_user_id), nameLink.addEventListener("click", (e) => {
          var _a, _b;
          e.preventDefault(), (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.showHunterProfile && hg.utils.PageUtil.showHunterProfile(hunter.sn_user_id);
        }), replacementTitle.append(nameLink), makeElement("span", "mh-ui-goals-group-completed-text", " found these mice:", replacementTitle), count2 && replacementTitle.append(count2), title.replaceWith(replacementTitle);
      });
    }, moveLeaveButton = () => __async(void 0, null, function* () {
      let leaveButton = document.querySelector(".treasureMapView-mapLeaveContainer .treasureMapView-leaveMapButton");
      if (!leaveButton)
        return;
      let actions = document.querySelector(".treasureMapView-mapMenu-group-actions");
      if (!actions || document.querySelector(".mh-ui-leave-map-button"))
        return;
      let clone = leaveButton.cloneNode(!0);
      clone.classList.add("mh-ui-leave-map-button"), clone.classList.remove("lightBlue"), clone.addEventListener("click", () => {
        leaveButton.click();
      }), actions.insertBefore(clone, actions.firstChild);
    }), addQuickInvite = (mapData3) => __async(void 0, null, function* () {
      let sidebar = document.querySelector(".treasureMapView-rightBlock.treasureMapView-goalSidebar");
      if (!sidebar)
        return;
      let existing = document.querySelector(".mh-ui-quick-invite");
      if (existing && existing.remove(), !(mapData3 != null && mapData3.is_owner))
        return;
      let mapId = mapData3 == null ? void 0 : mapData3.map_id;
      if (!mapId)
        return;
      let inviteWrapper = makeElement("div", "mh-ui-quick-invite-wrapper"), inviteInput = makeElement("input", "mh-ui-quick-invite-input");
      inviteInput.type = "number", inviteInput.placeholder = "Hunter ID", inviteWrapper.append(inviteInput);
      let inviteButton = makeElement("div", ["mousehuntActionButton", "tiny", "mh-ui-quick-invite"]);
      makeElement("span", "", "Invite", inviteButton);
      let indicators = makeElement("div", "mh-ui-quick-invite-indicators"), spinner = makeElement("div", ["mh-ui-quick-invite-indicator", "mh-ui-quick-invite-spinner", "hidden"]), success = makeElement("div", ["mh-ui-quick-invite-indicator", "mh-ui-quick-invite-success", "hidden"]);
      indicators.append(spinner), indicators.append(success), inviteWrapper.append(indicators);
      let inviteError = (message) => (debuglog("better-maps", `Invite error: ${message}`), inviteInput.disabled = !1, inviteButton.classList.remove("disabled"), spinner.classList.add("hidden"), showErrorMessage({
        message,
        append: inviteWrapper
      }), !1), inviteAction = () => __async(void 0, null, function* () {
        var _a, _b, _c, _d, _e, _f, _g;
        if (inviteButton.classList.contains("disabled"))
          return;
        inviteInput.disabled = !0, inviteButton.classList.add("disabled"), spinner.classList.remove("hidden");
        let hunterId = Number.parseInt(inviteInput.value, 10);
        if (!hunterId)
          return inviteError("Invalid hunter ID");
        if ((_a = mapData3 == null ? void 0 : mapData3.hunters) != null && _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, 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}`);
          let getFriendData = yield doRequest("managers/ajax/pages/friends.php", {
            action: "community_search_by_id",
            user_id: hunterId
          });
          if (getFriendData != null && getFriendData.success && ((_b = getFriendData == null ? void 0 : getFriendData.friend) != null && _b.sn_user_id)) {
            snuid = (_c = getFriendData == null ? void 0 : getFriendData.friend) == null ? void 0 : _c.sn_user_id;
            let maps = (_f = (_e = (_d = getFriendData == null ? void 0 : getFriendData.friend.user_interactions) == null ? void 0 : _d.actions) == null ? void 0 : _e.send_map_invite) == null ? void 0 : _f.maps, canAccept = maps.length > 0 && ((_g = maps[0]) == null ? void 0 : _g.is_allowed);
            friendData[hunterId] = {
              snuid: snuid || !1,
              canAccept: canAccept || !1
            }, 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}`);
        let invited = yield doRequest("managers/ajax/users/treasuremap.php", {
          action: "send_invites",
          map_id: mapId,
          "snuids[]": snuid
        });
        if (invited && (invited != null && invited.success))
          debuglog("better-maps", `Successfully invited hunter ${hunterId} to map ${mapId}`), inviteInput.value = "", inviteInput.disabled = !1, 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) => {
        e.key === "Enter" && inviteAction();
      }), inviteWrapper.append(inviteButton), sidebar.insertBefore(inviteWrapper, sidebar.firstChild);
    }), addSidebarToggle = () => __async(void 0, null, function* () {
      let mapView = document.querySelector(".treasureMapView");
      if (!mapView)
        return;
      let rightBlock = mapView.querySelector(".treasureMapView-rightBlock");
      if (!rightBlock)
        return;
      let leftBlock = mapView.querySelector(".treasureMapView-leftBlock");
      if (!leftBlock || mapView.querySelector(".mh-ui-goals-sidebar-toggle"))
        return;
      let toggle = makeElement("a", "mh-ui-goals-sidebar-toggle");
      sessionGet("better-maps-sidebar-toggled", !1) === "open" ? (toggle.classList.remove("open"), toggle.classList.add("closed"), toggle.setAttribute("data-state", "closed"), toggle.setAttribute("title", "Show Sidebar"), mapView.classList.add("mh-ui-goals-sidebar-toggled"), rightBlock.classList.add("hidden"), leftBlock.classList.add("full-width")) : (toggle.classList.remove("closed"), toggle.classList.add("open"), toggle.setAttribute("data-state", "open"), toggle.setAttribute("title", "Hide Sidebar"), mapView.classList.remove("mh-ui-goals-sidebar-toggled"), rightBlock.classList.remove("hidden"), leftBlock.classList.remove("full-width")), toggle.addEventListener("click", () => {
        let isToggled = toggle.getAttribute("data-state");
        sessionSet("better-maps-sidebar-toggled", isToggled), isToggled === "open" ? (toggle.setAttribute("data-state", "closed"), toggle.setAttribute("title", "Show Sidebar"), toggle.classList.remove("open"), toggle.classList.add("closed"), mapView.classList.add("mh-ui-goals-sidebar-toggled"), rightBlock.classList.add("hidden"), leftBlock.classList.add("full-width")) : (toggle.setAttribute("data-state", "open"), toggle.setAttribute("title", "Hide Sidebar"), toggle.classList.remove("closed"), toggle.classList.add("open"), mapView.classList.remove("mh-ui-goals-sidebar-toggled"), rightBlock.classList.remove("hidden"), leftBlock.classList.remove("full-width"));
      }), leftBlock.append(toggle);
    }), showGoalsTab = (mapData3) => __async(void 0, null, function* () {
      addArToggle(), addMouseLinksToMap(), consolation_prizes_default(), addClassesToGroups(mapData3), moveLeaveButton(), addQuickInvite(mapData3), addSidebarToggle();
    }), hideGoalsTab = () => {
      removeArToggle();
    };
  }
});

// src/modules/better-maps/modules/tab-hunters.js
var makeUserTableLoading, makeUserTable, getInvitedHunterData, getUserData2, removeEmptyHunterSlotsFromList, getLeftHunters, modifyButtons, fixPluralInvites, showHuntersTab, init_tab_hunters = __esm({
  "src/modules/better-maps/modules/tab-hunters.js"() {
    init_utils2();
    makeUserTableLoading = (id, title, appendTo) => {
      let wrapper = makeElement("div", "treasureMapView-block-title", title);
      wrapper.id = `hunters-loading-${id}-title`, appendTo.append(wrapper);
      let loading = makeElement("div", "treasureMapView-block");
      loading.id = `hunters-loading-${id}-block`;
      let loadingWrapper = makeElement("div", "treasureMapView-allyTable", ""), row = makeElement("div", "treasureMapView-allyRow", "");
      makeElement("div", ["mousehuntPage-loading", "active"], "", row), loadingWrapper.append(row), loading.append(loadingWrapper), appendTo.append(loading);
    }, makeUserTable = (hunters, id, title, appendTo) => __async(void 0, null, function* () {
      let loadingTitle = document.querySelector(`#hunters-loading-${id}-title`), loadingBlock = document.querySelector(`#hunters-loading-${id}-block`);
      if (loadingTitle && loadingTitle.remove(), loadingBlock && loadingBlock.remove(), document.querySelector(`#hunters-${id}`))
        return;
      let wrapper = makeElement("div", ["mh-ui-custom-map-block", "treasureMapView-block-title"], title.replace("#count#", hunters.length));
      wrapper.id = `hunters-${id}`, appendTo.append(wrapper);
      let block = makeElement("div", "treasureMapView-block");
      block.id = `hunters-${id}-block`;
      let blockContent = makeElement("div", "treasureMapView-block-content"), 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 (id === "requests") {
          let declineAction = `<a class="treasureMapDialogView-deleteInviteRequest reject-invite-request mh-mapper-invite-request-action" data-snuid="${hunter.sn_user_id}" data-snuid="100000830940163">X</a>`, 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}`;
        }
        let markup = `<div class="treasureMapView-allyCell favourite"></div>
    <div class="treasureMapView-allyCell image" data-snuid="${hunter.sn_user_id}">
      <div class="treasureMapView-hunter" data-snuid="${hunter.sn_user_id}">
        <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), id === "requests" && document.querySelectorAll(".mh-mapper-invite-request-action").forEach((button) => {
        button.addEventListener("click", () => {
          let snuid = Number.parseInt(button.dataset.snuid, 10);
          button.classList.contains("accept-invite-request") ? hg.utils.TreasureMapUtil.acceptInviteRequests(mapper("mapData").map_id, [snuid], () => {
          }, () => {
          }) : 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)
        return yield getUserData2(invited);
      let batches = [];
      for (let i = 0; i < invited.length; i += 12)
        batches.push(invited.slice(i, i + 12));
      let hunters = [];
      for (let batch_ of batches) {
        let batch = yield getUserData2(batch_);
        hunters.push(...batch);
      }
      return hunters;
    }), getUserData2 = (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* () {
      let emptySlots = document.querySelectorAll(".treasureMapView-allyCell.name");
      if (emptySlots.length) {
        let shouldRemove = !1;
        emptySlots.forEach((slot) => {
          (slot.textContent === "The map owner can invite more hunters." || slot.textContent === "Click to invite a friend.") && (shouldRemove && shouldRemove.parentNode.remove(), slot.parentNode.classList.add("hunters-last-slot"), shouldRemove = slot);
        });
      }
    }), getLeftHunters = (mapData3) => {
      let huntersLeft = [];
      return mapData3.hunters.forEach((hunter) => {
        hunter.is_active || huntersLeft.push(hunter);
      }), huntersLeft;
    }, modifyButtons = () => {
      [
        {
          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"
        }
      ].forEach((button) => {
        let el = document.querySelector(button.selector);
        if (el) {
          el.classList.add("tiny");
          let text = el.querySelector("span");
          text && (text.textContent = button.text);
        }
      });
    }, fixPluralInvites = () => {
      let invitesEl = document.querySelector(".treasureMapView-numInvitesSent");
      invitesEl && invitesEl.textContent === "1 invites sent." && (invitesEl.innerHTML = invitesEl.innerHTML.replace("invites", "invite"));
    }, showHuntersTab = (mapData3) => __async(void 0, null, function* () {
      var _a;
      modifyButtons(), removeEmptyHunterSlotsFromList(), fixPluralInvites();
      let leftBlock = document.querySelector(".treasureMapView-leftBlock");
      if (!leftBlock)
        return;
      let huntersLeft = getLeftHunters(mapData3);
      if (huntersLeft.length && makeUserTable(huntersLeft, "left", `Hunters that have left map (${huntersLeft.length || 0})`, leftBlock), mapData3.invited_hunters.length) {
        makeUserTableLoading("invited", `Invited hunters (${mapData3.invited_hunters.length || 0})`, leftBlock);
        let invitedData = yield getInvitedHunterData(mapData3.invited_hunters);
        makeUserTable(invitedData, "invited", "Invited hunters (#count#)", leftBlock);
      }
      if (((_a = mapData3.invite_requests) == null ? void 0 : _a.length) > 0) {
        makeUserTableLoading("requests", `Invite Requests (${mapData3.invite_requests.length || 0})`, leftBlock);
        let requestData = yield getInvitedHunterData(mapData3.invite_requests);
        makeUserTable(requestData, "requests", "Invite Requests (#count)", leftBlock);
      }
    });
  }
});

// src/modules/better-maps/modules/community.js
var getMapData2, updateListing, debug2, community_default, init_community = __esm({
  "src/modules/better-maps/modules/community.js"() {
    init_utils2();
    getMapData2 = (mapId, forceUpdate = !1) => __async(void 0, null, function* () {
      return new Promise((resolve) => {
        hg.utils.TreasureMapUtil.getMapInfo(mapId, (resp) => {
          resolve(resp);
        }, () => {
          resolve([]);
        }, forceUpdate);
      });
    }), updateListing = (mapId) => __async(void 0, null, function* () {
      let mapData3, mapEl = document.querySelector(`.treasureMapListingsTableView-row[data-map-id="${mapId}"]`);
      if (!mapEl)
        return;
      mapEl.classList.add("mh-improved-map-listing-highlight");
      let mapsData = yield getData("community-map-data", {}), oldIds = /* @__PURE__ */ new Set();
      if (mapsData && mapsData.old && (oldIds = new Set(mapsData.old)), oldIds.has(mapId)) {
        mapEl.remove();
        return;
      }
      if (mapEl.innerText.includes("Loading")) {
        let observer = new MutationObserver(() => __async(void 0, null, function* () {
          if (mapEl.innerText.includes("Loading")) {
            yield sleep(500);
            return;
          }
          observer.disconnect(), yield updateListing(mapId);
        }));
        observer.observe(mapEl, {
          childList: !0,
          subtree: !0
        });
        return;
      }
      let cachedData = yield dbGet("cache", `map-listing-cache-${mapId}`);
      if (cachedData)
        mapData3 = cachedData.data.mapData;
      else {
        if (mapData3 = yield getMapData2(mapId), yield sleep(500), !mapData3 || !mapData3.treasure_map || !mapData3.treasure_map.hunters)
          return;
        mapData3 = mapData3.treasure_map, dbSet("cache", {
          id: `map-listing-cache-${mapId}`,
          mapData: mapData3
        });
      }
      let captain = mapData3.hunters.find((hunter) => hunter.captain === !0);
      if (!captain)
        return;
      let lastActive = captain == null ? void 0 : captain.last_active_formatted, captainEl = mapEl.querySelector(".treasureMapListingsTableView-owner");
      if (captainEl) {
        let lastActiveWrapper = makeElement("div", ["mh-improved-map-listing-last-active-wrapper", "treasureMapView-ally-lastActive"]);
        captain.is_online && lastActiveWrapper.classList.add("online"), makeElement("div", "mh-improved-map-listing-last-active", captain.last_active_formatted, lastActiveWrapper), captainEl.append(lastActiveWrapper);
      }
      if (lastActive.includes("week") || lastActive.includes("month") || lastActive.includes("year")) {
        mapEl.remove();
        return;
      }
      (mapData3.max_hunters - 1 === mapData3.hunters.length || mapData3.invite_requests.length > 15) && mapEl.classList.add("mh-improved-map-listing-full"), mapEl.classList.remove("mh-improved-map-listing-highlight");
    }), debug2 = (response, data) => __async(void 0, null, function* () {
      if (data.action !== "get_listings" || !response.treasure_map_listings)
        return;
      let listingMapIds = response.treasure_map_listings.map((listing) => listing == null ? void 0 : listing.map_id), hideMhct = addStyles("#mhhh_flash_message_div { display: none !important; }", "hide-mhct");
      for (let mapId of listingMapIds)
        yield updateListing(mapId);
      hideMhct.remove();
    }), community_default = () => {
      onRequest("users/treasuremap.php", debug2);
    };
  }
});

// src/modules/better-maps/modules/scrolls.js
var updateScrollContent, maybeLockAndHide, updateScrollsMarkup, updateFromClick, updateFromRequest, scrolls_default, init_scrolls = __esm({
  "src/modules/better-maps/modules/scrolls.js"() {
    init_utils2();
    updateScrollContent = (scroll) => {
      let content = scroll.querySelector(".treasureMapInventoryView-scrollCase-content");
      if (!content)
        return;
      let matches = content.innerHTML.match(/<b>• (.*?)<\/b>/g);
      if (matches && matches.length > 1) {
        let replacements2 = matches.map((match) => match.replaceAll(/<b>• (.*?)<\/b>/g, "$1")), last = replacements2.pop();
        replacements2 = replacements2.map((replacement, index) => index < replacements2.length - 1 ? replacement + "," : replacement + ", and"), replacements2.push(last);
        let replacementIndex = 0;
        content.innerHTML = content.innerHTML.replaceAll(/<b>• (.*?)<\/b>/g, () => replacements2[replacementIndex++]);
      }
      let auras = [], aurasEl = content.querySelectorAll(".treasureMapInventoryView-scrollCase-aura");
      aurasEl.length && (auras = [...aurasEl]);
      let textDiv = makeElement("div", "scroll-text"), aurasDiv = makeElement("div", "scroll-auras");
      [...content.childNodes].forEach((node) => {
        node.nodeType === Node.TEXT_NODE || node.tagName === "B" || node.tagName === "BR" ? textDiv.append(node) : auras.includes(node) && aurasDiv.append(node);
      }), content.append(textDiv), content.append(aurasDiv), aurasEl.length && aurasEl.forEach((aura) => {
        let title = aura.querySelector("b");
        title && (title.textContent = title.textContent.replace("Opening this map's reward will give hunters ", "This map's reward gives you ")), aura.innerHTML = aura.innerHTML.replace("This special Trap Aura", "This ").replace("with the chance at the following additional loot:", "with the chance of ").replace("- Chrome Theme Scrap II", "Chrome Theme Scrap II").replace("- Chrome Charms", " and Chrome Charms.");
      });
    }, maybeLockAndHide = (scroll, action, scrollType) => {
      var _a, _b;
      let lockAndHide = getSetting("inventory-lock-and-hide.items", {});
      lockAndHide = __spreadValues({
        locked: [],
        hidden: [],
        lockedTypes: [],
        hiddenTypes: []
      }, lockAndHide);
      let locked = (_a = lockAndHide == null ? void 0 : lockAndHide.lockedTypes) == null ? void 0 : _a.includes(scrollType), hidden = (_b = lockAndHide == null ? void 0 : lockAndHide.hiddenTypes) == null ? void 0 : _b.includes(scrollType);
      if (locked) {
        scroll.classList.add("locked"), action.classList.add("disabled");
        let actionButton = action.querySelector(".mousehuntActionButton");
        actionButton && actionButton.classList.add("disabled");
      }
      hidden && scroll.classList.add("hidden");
    }, updateScrollsMarkup = () => {
      let scrolls = document.querySelectorAll(".treasureMapInventoryView-scrollCase");
      scrolls.length && scrolls.forEach((scroll) => {
        let action = scroll.querySelector(".treasureMapInventoryView-scrollCase-action");
        if (!action)
          return;
        let button = action.querySelector(".mousehuntActionButton");
        if (button) {
          let scrollType = button.getAttribute("data-item-type");
          scrollType && maybeLockAndHide(scroll, action, scrollType);
        }
        updateScrollContent(scroll);
      });
    }, updateFromClick = () => __async(void 0, null, function* () {
      let _showInventory2 = hg.controllers.TreasureMapController.showInventory;
      hg.controllers.TreasureMapController.showInventory = (data) => {
        _showInventory2(data), updateScrollsMarkup();
      };
    }), updateFromRequest = (response, data) => {
      (data == null ? void 0 : data.action) === "get_inventory" && updateScrollsMarkup();
    }, scrolls_default = () => __async(void 0, null, function* () {
      updateFromClick(), onRequest("users/treasuremap.php", updateFromRequest);
    });
  }
});

// src/modules/better-maps/modules/shops.js
var updateShopsMarkup, updateFromClick2, updateFromRequest2, shops_default, init_shops = __esm({
  "src/modules/better-maps/modules/shops.js"() {
    init_utils2();
    updateShopsMarkup = () => __async(void 0, null, function* () {
      let shopsNodeList = document.querySelectorAll(".treasureMapShopsView-shopItems .treasureMapPopup-shop");
      if (!shopsNodeList.length)
        return;
      let shops = [...shopsNodeList];
      shops.sort((a, b) => {
        let aName = a.querySelector(".treasureMapPopup-shop-environment").textContent.trim().toLowerCase(), bName = b.querySelector(".treasureMapPopup-shop-environment").textContent.trim().toLowerCase();
        return aName.localeCompare(bName);
      });
      let currentLocation = getCurrentLocation();
      shops = shops.sort((shop) => (shop.querySelector(".treasureMapPopup-shop-environment").getAttribute("data-environment-type") || "") === currentLocation ? -1 : 0);
      let shopContainer = document.querySelector(".treasureMapShopsView-shopItems");
      for (; shopContainer.firstChild; )
        shopContainer.firstChild.remove();
      shops.forEach((shop) => {
        shopContainer.append(shop);
        let environmentEl = shop.querySelector(".treasureMapPopup-shop-environment");
        if (!environmentEl)
          return;
        let heading = environmentEl.querySelector(".treasureMapView-block-content-heading");
        if (!heading)
          return;
        let container = environmentEl.querySelector(".treasureMapPopup-shop-environmentItems");
        if (!container)
          return;
        environmentEl.classList.contains("active") || container.classList.add("hidden"), heading.addEventListener("click", () => {
          container.classList.toggle("hidden");
        });
        let scrolls = container.querySelectorAll(".treasureMapInventoryView-scrollCase");
        scrolls.length && scrolls.forEach((scroll) => {
          let action = scroll.querySelector(".treasureMapInventoryView-scrollCase-action");
          if (!action)
            return;
          let button = action.querySelector(".mousehuntActionButton");
          if (!button)
            return;
          let mapType = button.getAttribute("data-item-type");
          mapType && debug("mapType", mapType);
        });
      });
    }), updateFromClick2 = () => __async(void 0, null, function* () {
      let _showShops = hg.controllers.TreasureMapController.showShops;
      hg.controllers.TreasureMapController.showShops = (data) => {
        _showShops(data), updateShopsMarkup();
      };
    }), updateFromRequest2 = (response, data) => {
      (data == null ? void 0 : data.action) === "get_shops" && updateShopsMarkup();
    }, shops_default = () => __async(void 0, null, function* () {
      updateFromClick2(), onRequest("users/treasuremap.php", updateFromRequest2);
    });
  }
});

// src/modules/better-maps/modules/sidebar.js
var getCompletedGoals, addMapToSidebar, refreshMap, refreshSidebar, shouldRefresh, timeoutFive, timeoutTen, refreshSidebarAfterTurn, mapData2, miceThumbs2, itemThumbs, sidebar_default, init_sidebar = __esm({
  "src/modules/better-maps/modules/sidebar.js"() {
    init_utils2();
    getCompletedGoals = () => {
      var _a, _b, _c, _d;
      let goals = mapData2 != null && mapData2.is_scavenger_hunt ? (_a = mapData2 == null ? void 0 : mapData2.goals) == null ? void 0 : _a.item : (_b = mapData2 == null ? void 0 : mapData2.goals) == null ? void 0 : _b.mouse;
      if (!goals)
        return [];
      let completedGoals = [], hunters = (mapData2 == null ? void 0 : mapData2.hunters) || [];
      for (let hunter of hunters) {
        let completed = mapData2 != null && mapData2.is_scavenger_hunt ? (_c = hunter == null ? void 0 : hunter.completed_goal_ids) == null ? void 0 : _c.item : (_d = hunter == null ? void 0 : hunter.completed_goal_ids) == null ? void 0 : _d.mouse;
        completed && completedGoals.push(...completed);
      }
      return goals = goals.filter((goal) => !completedGoals.includes(goal.unique_id)).sort((a, b) => a.name.localeCompare(b.name)), goals;
    }, addMapToSidebar = () => __async(void 0, null, function* () {
      var _a, _b, _c;
      let sidebar = document.querySelector(".pageSidebarView .pageSidebarView-block");
      if (!sidebar)
        return;
      let mapId = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.default_map_id) || !1;
      if (!mapId)
        return;
      mapData2 = sessionGet(`mh-improved-map-cache-${mapId}`), mapData2 || (yield refreshMap());
      let mapSidebar = makeElement("div", "mh-improved-map-sidebar"), title = makeElement("h3", "mh-improved-map-sidebar-title", ((_c = mapData2 == null ? void 0 : mapData2.name) == null ? void 0 : _c.replaceAll("Treasure Map", "")) || "Map");
      title.addEventListener("click", () => __async(void 0, null, function* () {
        mapSidebar.classList.add("loading"), yield refreshMap(), yield addMapToSidebar(), setTimeout(() => {
          mapSidebar.classList.remove("loading");
        }, 1e3);
      })), mapSidebar.append(title);
      let goals = getCompletedGoals(mapData2), goalsEl = makeElement("div", "mh-improved-map-sidebar-goals");
      for (let goal of goals) {
        let goalEl = makeElement("div", "mh-improved-map-sidebar-goal"), goalImage = makeElement("div", "mh-improved-map-sidebar-goal-image"), thumbnail = mapData2.is_scavenger_hunt ? itemThumbs.find((thumb) => thumb.type === goal.type) : miceThumbs2.find((thumb) => thumb.type === goal.type);
        goalImage.style.backgroundImage = thumbnail ? `url(${thumbnail.thumb})` : `url(${goal.large})`, goalEl.append(goalImage), makeElement("div", "mh-improved-map-sidebar-goal-name", goal.name, goalEl), ((goal == null ? void 0 : goal.environment_ids) || []).includes(user == null ? void 0 : user.environment_id) && goalEl.classList.add("mh-improved-map-sidebar-goal-active"), goalEl.addEventListener("click", () => {
          mapData2.is_scavenger_hunt ? hg.views.ItemView.show(goal.type) : hg.views.MouseView.show(goal.type);
        }), goalsEl.append(goalEl);
      }
      mapSidebar.append(goalsEl);
      let existing = document.querySelector(".mh-improved-map-sidebar");
      existing ? existing.replaceWith(mapSidebar) : sidebar.append(mapSidebar);
    }), refreshMap = () => __async(void 0, null, function* () {
      var _a, _b;
      let mapId = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.default_map_id) || !1;
      if (!mapId)
        return !1;
      let newMapData;
      try {
        newMapData = yield doRequest("managers/ajax/users/treasuremap.php", {
          action: "map_info",
          map_id: mapId
        });
      } catch (error) {
        return console.error("Error refreshing map:", error), !1;
      }
      if (!(newMapData && (newMapData != null && newMapData.treasure_map)))
        return !1;
      setMapData(mapId, newMapData.treasure_map);
      let currentMapData = sessionGet(`mh-improved-map-cache-${mapId}`);
      if (currentMapData && mapData2 && mapData2.treasure_map) {
        let currentGoals = getCompletedGoals(currentMapData), newGoals = getCompletedGoals(newMapData.treasure_map);
        currentGoals.length !== newGoals.length && (yield addMapToSidebar());
      } else
        yield addMapToSidebar();
      return mapData2 = newMapData.treasure_map, newMapData;
    }), refreshSidebar = () => __async(void 0, null, function* () {
      if (!(yield refreshMap())) {
        shouldRefresh = !1;
        return;
      }
      addMapToSidebar();
    }), shouldRefresh = !0, refreshSidebarAfterTurn = () => {
      clearTimeout(timeoutFive), clearTimeout(timeoutTen), shouldRefresh && (timeoutFive = setTimeout(refreshSidebar, 5 * 60 * 1e3), timeoutTen = setTimeout(refreshSidebar, 10 * 60 * 1e3));
    }, sidebar_default = () => __async(void 0, null, function* () {
      miceThumbs2 = yield getData("mice-thumbnails"), itemThumbs = yield getData("item-thumbnails"), addMapToSidebar(), onTravel(null, { callback: addMapToSidebar }), onTurn(() => {
        refreshSidebar(), refreshSidebarAfterTurn();
      }, 1e3);
    });
  }
});

// src/modules/better-maps/styles/general.css
var general_default2, 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,.treasureMapView-block>.treasureMapView-block-content{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:360px}.max_hunters_10 .rewards .treasureMapView-mapMenu-group-content{max-width:200px}.rewards .treasureMapView-mapMenu-auraIcon{width:33px;height:33px;margin-top:-10px}.treasureMapView-mapMenu.max_hunters_8 .treasureMapView-mapMenu-auraIcon,.treasureMapView-mapMenu.max_hunters_9 .treasureMapView-mapMenu-auraIcon,.treasureMapView-mapMenu.max_hunters_10 .treasureMapView-mapMenu-aura-name .treasureMapView-mapMenu-auraIcon,.treasureMapView-mapMenu.max_hunters_10 .treasureMapView-mapMenu-auraIcon{width:44px;height:44px}.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:60px}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}.treasureMapView-block-content-heading{margin:10px 0 5px}.treasureMapInventoryView-scrollCase{align-items:center;padding:10px;margin:5px;background-color:#ffffffa6;border:1px solid rgb(150 150 150 / 50%);border-radius:5px}.mh-dark-mode .treasureMapInventoryView-scrollCase{color:#000;background-color:#32323240;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=bountiful_beanstalk]{background-color:#94f05a}.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}.treasureMapInventoryView-scrollCase-name{padding-bottom:5px}.mapper-self img{border-radius:50%;outline:2px solid #73ddff}.treasureMapView-block-title.mh-ui-scavenger-hunt-title,.treasureMapView-block.treasureMapView-scavengerHunt{display:none}.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;outline:1px solid #ffe298;box-shadow:none}.mh-mapper-consolation-prizes{display:flex;flex-direction:column}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}input.treasureMapView-block-search-text{height:18px;font-size:12px;border:1px solid #ccc}.treasureMapRootView-subTabRow{align-items:center}.treasureMapView-highlight{padding:0;border-radius:6px;outline:1px solid #505050;box-shadow:0 2px 3px -1px #292929,0 2px 10px -2px #ababab}.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{padding:6px;margin:-1px}.mh-ui-environments-block .treasureMapView-block-content.halfHeight{max-height:unset}.treasureMapView-goals-group-goal{width:calc(33% - 5px);margin:3px 5px 3px 0}.treasureMapView-highlight .treasureMapView-goals-group-goal{width:auto}.treasureMapView-goals-group-goal.notAvailable{opacity:.5}.treasureMapView-goals-group-goal.notAvailable.m400.mouse,.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{top:12px;left:7px;width:21px;height:21px}.treasureMapView-mapLeaveContainer{margin-top:5px}.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;margin-top:-20px;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;border-radius:3px}.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;background:transparent;border:1px solid #ccc;border-radius:3px}.treasureMapView-block-search{right:0;bottom:13px}.treasureMapInventoryView .treasureMapView-block-title,.treasureMapShopsView .treasureMapView-block-title{height:0;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}.treasureMapView-block.treasureMapView-reward.mh-ui-we-did-it-block{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{top:0!important;display:flex;flex-direction:column;place-content:flex-start space-around;align-items:center}.mh-ui-multiple-maps .treasureMapTooltipView.active{top:35px!important}.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}.incomplete .treasureMapView-goals-group-goal-padding{overflow:visible}.treasureMapView-goals-group-goal-image{width:34px;height:100%;border-radius:5px}.treasureMapView-goals-group-goal.landscape .treasureMapView-goals-group-goal-image{height:48px;background-position:center}.treasureMapView-goals-group-goal.complete.landscape .treasureMapView-goals-group-goal-image{height:33px}.treasureMapView-goals-group-goal:hover:before,.treasureMapView-goals-group-goal.sticky:before{inset:-1px;outline:1px solid #ccc;box-shadow:none}.treasureMapView-goals-group-goal.item{width:calc(20% - 5px);padding:5px 0}.full-width .treasureMapView-goals-group-goal{width:calc(14% - 5px)}.treasureMapView-goals-group-goal:hover:before{background-color:#ececec}.treasureMapView-goals-group-goal:hover .treasureMapView-goals-group-goal-image{mix-blend-mode:multiply}.treasureMapView-highlight.environment{top:25px;right:175px;left:unset;width:45%}.treasureMapView-highlight-environments{max-height:126px;margin-left:10px;overflow-y:auto}.treasureMapView-scoreboard-table .treasureMapView-block-row:hover{background-color:#eee}.treasureMapView-previewBar{padding-left:15px;margin:0;background:#d9ffbf}.treasureMapView-previewBar:before{position:absolute;top:0;right:0;display:block;width:100px;height:40px;content:"";background:#d9ffbf url(https://www.mousehuntgame.com/images/ui/elements/larry_circle_large.gif) 0 -16px no-repeat;background-size:90px;transform:scaleX(-1)}.treasureMapView-previewBar-content{display:flex;justify-content:space-between;margin-right:100px}.treasureMapView-previewBar .mousehuntActionButton[onclick*="hg.controllers.TreasureMapController.showCommunity();"]{display:none}.treasureMapView-previewBar-padding{display:flex;align-items:center}.treasureMapView-previewBar-actions{display:flex;flex-direction:row;align-items:center}.treasureMapView-mapMenu-group:first-child .treasureMapView-mapMenu-group-title{margin-bottom:15px}.mh-improved-map-listing-last-active-wrapper{display:flex;align-items:center;margin-left:10px}.mh-improved-map-listing-full{opacity:.5}.treasureMapPopup-mapInvite .treasureMapInventoryView-scrollCase{padding:0;margin:5px 0;border:none}.treasureMapView-block-content.tall.treasureMapInvitesView-inviteList{padding:5px}.treasureMapPopup-mapInvite .treasureMapView-block-content-heading{margin:0}.treasureMapPopup-mapInvite{padding:5px}.treasureMapView-scoreboard{border-radius:3px}.treasureMapView-scoreboard .treasureMapView-block-cell.rank{padding-left:2px}.treasureMapInventoryView .treasureMapView-blockWrapper .treasureMapView-leftBlock .treasureMapView-block{padding:0;border:none}.treasureMapInventoryView .treasureMapView-blockWrapper .treasureMapView-block-content-heading{margin:10px 10px 5px;border:none}.treasureMapInventoryView-scrollCase-content br+br{display:none}.treasureMapInventoryView-scrollCase-content{line-height:15px}.treasureMapInventoryView-scrollCase-content br+br+b{display:inline-block}.treasureMapView-block-title.mh-ui-maps-title,.treasureMapView-block-title.mh-ui-map-scrolls-title,.treasureMapView-block-title.mh-ui-scroll-shop-title{display:none}.treasureMapShopsView .treasureMapView-block-search{bottom:10px}.treasureMapTooltipView-hunterText-state.captain{position:absolute;top:5px;left:5px;visibility:hidden}.treasureMapTooltipView-hunterText-state.captain:after{position:absolute;top:0;left:0;width:18px;height:16px;visibility:visible;content:"";background:url(https://www.mousehuntgame.com/images/ui/tournaments/captain_icon.png?asset_cache_version=3) no-repeat 50% 50% / contain}.treasureMapTooltipView-hunterText-state.upgrader{position:absolute;top:5px;right:5px;visibility:hidden}.treasureMapTooltipView-hunterText-state.upgrader:after{position:absolute;top:0;right:0;width:16px;height:16px;visibility:visible;content:"";background:#ffb615;border-radius:50%}.treasureMapView-hunter-wrapper .quickSendWrapper{top:60px!important;left:30px}.treasureMapTooltipView{height:40px}.treasureMapDialogView.wide.limitHeight.confirm .treasureMapDialogView-description{display:none}.treasureMapDialogView.wide.limitHeight.confirm .treasureMapDialogView-header{margin-bottom:0}.treasureMapDialogView-chest-item-padding:before{box-shadow:1px 1px 2px -1px #333}.mh-ui-environments-block .treasureMapView-block-content:first-child,.treasureMapView-block.mh-ui-listed-maps-block,.treasureMapView-block-title.mh-ui-listed-maps-title{display:none}.item .treasureMapView-highlight-description{max-height:80px;overflow-y:auto}.treasureMapInventoryView-relicHunter-hint{justify-content:center}.treasureMapInventoryView .treasureMapView-blockWrapper.tall{margin-left:0}.treasureMapInventoryView-scrollCase-action.has-link{display:flex;flex-direction:column;gap:10px;align-items:stretch;text-align:center}.treasureMapInventoryView-scrollCase-content .scroll-text{max-height:60px;overflow:auto}#overlayPopup.treasureMapPopup #jsDialogClose{z-index:12}.treasureMapTooltipView.active:after{bottom:-19px}.treasureMapTooltipView.active:before{bottom:-20px}
`;
  }
});

// src/modules/better-maps/styles/helper.css
var helper_default2, 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}
`;
  }
});

// src/modules/better-maps/styles/hunters.css
var hunters_default, 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);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);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{display:none}.treasureMapView-mapMenu-group-invite{display:flex;flex-direction:column;gap:10px}.treasureMapView-inviteModeDescription{margin-bottom:5px}.treasureMapView-hunter-wrapper.mousehuntTooltipParent{padding-top:20px;margin-top:-10px}.mh-mapper-invite-request-action{padding:0 10px}
`;
  }
});

// src/modules/better-maps/styles/map-ar.css
var map_ar_default, 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;gap:3px;align-items:flex-start;justify-content:center}.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-kinda-hard{background-color:#fe964d;border-color:#c57a40}.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}
`;
  }
});

// src/modules/better-maps/styles/mhct.css
var mhct_default, init_mhct = __esm({
  "src/modules/better-maps/styles/mhct.css"() {
    mhct_default = `.mhct-data{display:none}.mouse-container-selected .mhct-data{display:block}.treasureMapView-highlight.goal.sticky .mh-ui-mouse-links-map-ars .mhct-data{display:block;margin-top:1px}.mhct-title{display:none;padding:10px;margin-bottom:10px;font-size:12px;border-bottom:1px solid #dedede}.mhct-row{display:grid;grid-template-columns:3fr 3fr 1fr;column-gap:4px;place-items:center stretch;padding:4px;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,.treasureMapView-highlight.environment .mh-ui-mouse-links-map-ars{display:none}.sticky .mh-ui-mouse-links-map-ars{display:block}.mh-ui-mouse-links-map-ars .mhct-data{position:relative;display:flex;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{display:flex;align-items:center;height:100%;font-size:13px}.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;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}.treasureMapView-highlight-content{border-bottom-right-radius:0;border-bottom-left-radius:0}.mh-ui-mouse-links-map-ars .mhct-title,.mh-ui-mouse-links-map-ars .mhct-data{border-top-left-radius:0;border-top-right-radius:0}.mh-ui-mouse-links-map-ars .mhct-row:last-child{border-bottom-right-radius:6px;border-bottom-left-radius:6px}
`;
  }
});

// src/modules/better-maps/styles/overlays.css
var overlays_default, init_overlays = __esm({
  "src/modules/better-maps/styles/overlays.css"() {
    overlays_default = `#overlayPopup.treasureMapPopup .jsDialog.top{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogWideTop.png)}#overlayPopup.treasureMapPopup .jsDialog.background{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogWideContent.png)}#overlayPopup.treasureMapPopup .jsDialog.bottom{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogWideBottom.png)}.treasureMapDialogView{left:49%}
`;
  }
});

// src/modules/better-maps/styles/scroll-shop.css
var scroll_shop_default, init_scroll_shop = __esm({
  "src/modules/better-maps/styles/scroll-shop.css"() {
    scroll_shop_default = `.treasureMapPopup-shop .treasureMapView-block-content-heading{padding:10px;margin:0;border-color:transparent}.treasureMapInventoryView-scrollCase:first-of-type{margin-top:0}.treasureMapPopup-shop-environment{padding-bottom:0;margin-bottom:5px;border:1px solid rgb(0 0 0 / 12%);border-radius:3px}.treasureMapShopsView .treasureMapView-leftBlock{width:99%;height:600px}.treasureMapShopsView .treasureMapView-rightBlock{display:none}.treasureMapPopup-shop{margin-bottom:10px;background-color:#fbfbfb;border-radius:3px}.treasureMapPopup-shop-environment.active:before{box-shadow:none}.treasureMapView-block-content.treasureMapShopsView-shopItems{padding:0}.treasureMapShopsView .treasureMapView-blockWrapper .treasureMapView-leftBlock>.treasureMapView-block{height:calc(100% - 18px);overflow-y:auto;border:none}.treasureMapInventoryView-scrollCase-content div[style="border: 1px red dotted; padding: 5px; font-size: 10px;"]{display:none}b[style="color:red; font-size: 14px;"],b[style="color:red; font-size: 14px;"]+br{display:none}
`;
  }
});

// src/modules/better-maps/styles/sidebar.css
var sidebar_default2, init_sidebar2 = __esm({
  "src/modules/better-maps/styles/sidebar.css"() {
    sidebar_default2 = `.pageSidebarView{padding-left:10px}.pageFrameView-column.right{border-left-width:10px}.pageFrameView-column.left{border-right-width:10px}.pageFrameView{grid-template-columns:[first] auto [content-start] 760px [sidebar] 210px [content-end] auto [last]}.mh-improved-map-sidebar{padding:0;margin:5px 0 15px;border:1px solid #ddedff}.mh-improved-map-sidebar-title{position:relative;padding:5px;font-size:11px;text-align:center;background-color:#ddedff}.mh-improved-map-sidebar-title:hover{cursor:pointer}.mh-improved-map-sidebar-goals{display:flex;flex-direction:column}.mh-improved-map-sidebar-goal{display:flex;gap:5px;align-items:center;justify-content:flex-start;padding:1px 5px}.mh-improved-map-sidebar-goal-image{width:20px;height:20px;background-size:cover;border-radius:3px;box-shadow:inset 0 0 0 1px #fff}.mh-improved-map-sidebar-goal-name{font-size:10px}.mh-improved-map-sidebar-goal:hover{cursor:pointer;background-color:#eee}.mh-improved-map-sidebar-goal-active{background-color:#fdfbcc}.mh-improved-map-sidebar-title:after{position:absolute;top:2px;right:0;box-sizing:border-box;display:block;width:17px;height:17px;padding:9px;margin:1px;content:"";background:url(https://www.mousehuntgame.com/images/ui/puzzle/refresh.png) no-repeat center center / contain;border-radius:50%;opacity:.3}.mh-improved-map-sidebar-title:hover:after{opacity:1}.loading .mh-improved-map-sidebar-title:after{animation:mh-improved-spin 1s linear infinite}@media (prefers-reduced-motion: reduce){.loading .mh-improved-map-sidebar-title:after{animation:none}}.mh-improved-map-sidebar-goal-has-hunter:after{position:absolute;top:3px;right:4px;width:15px;height:15px;content:"";background-size:contain;border:1px solid #808080;border-radius:50%}
`;
  }
});

// src/modules/better-maps/styles/sorted-map.css
var sorted_map_default, 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}
`;
  }
});

// src/modules/better-maps/styles/sorted.css
var sorted_default, 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 rgb(25 25 25 / 35%)}#sorted-mice-container .mouse-container-selected .mouse-mhct-extra-info-wrapper{position:fixed;z-index:10;display:block;width:350px;padding:10px 5px;margin:-5px -10px;background-color:#eaeaea;border:1px solid #a8a8a8;border-radius:3px;box-shadow:0 10px 15px #0000007f;transform:translate(-75px,-5px)}#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 rgb(0 0 0 / 25%)}#sorted-mice-container .scavenger-sorted-page .mouse-image{outline:none}.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%)}#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;justify-content: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{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-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);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 rgb(0 0 0 / 60%)}.mhct-row.mhct-row-no-env{cursor:not-allowed}.scavenger-location-content,.sorted-page-content.generic-sorted-page{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 30px}.scavenger-location-content .mh-ui-ar{margin-left:5px}.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}.treasureMapView-leftBlock{position:relative}.mh-ui-goals-sidebar-toggle{position:absolute;top:10px;right:20px;width:15px;height:15px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" width="28" fill="currentColor"><path d="M4 0h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4zm0 2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4zm7.828 8L8.293 6.464A1 1 0 0 1 9.707 5.05l4.243 4.243a1 1 0 0 1 0 1.414L9.707 14.95a1 1 0 1 1-1.414-1.414L11.828 10z"></path></svg>');background-repeat:no-repeat;background-size:100%;opacity:.5}.mh-ui-goals-sidebar-toggle.closed{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" width="28" fill="currentColor"><path d="M4 2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H4zm0-2h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"></path><path d="M8.414 9H14a1 1 0 1 1 0 2H8.414l2.536 2.536a1 1 0 0 1-1.414 1.414l-4.243-4.243a.997.997 0 0 1 0-1.414L9.536 5.05a1 1 0 1 1 1.414 1.414L8.414 9z"></path></svg>')}.mh-ui-goals-sidebar-toggle:hover{opacity:1}.treasureMapView-leftBlock.full-width{width:100%}.full-width .treasureMapView-goals-group-goal{width:calc(20% - 5px)}.scavenger-toggle-wrapper{display:flex;gap:10px;justify-content:flex-start;margin-bottom:20px}.sorted-page[data-scavenger-sorted-by=none] .sorted-page-content.treasureMapView-block-content.scavenger-sorted-page{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 30px}
`;
  }
});

// src/modules/better-maps/styles/userscripts.css
var userscripts_default, 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}
`;
  }
});

// src/modules/better-maps/index.js
var imported2, styles2, updateMapClasses, updateBlockContent, addBlockClasses, interceptMapRequest, initMapper, intercept, clearStickyMouse, updateRelicHunterHint, _showInventory, relicHunterUpdate, addClearCacheTimeout, init7, better_maps_default, init_better_maps = __esm({
  "src/modules/better-maps/index.js"() {
    init_utils2();
    init_settings6();
    init_helper();
    init_tab_sorted();
    init_tab_goals();
    init_tab_hunters();
    init_community();
    init_scrolls();
    init_shops();
    init_sidebar();
    init_general2();
    init_helper2();
    init_hunters();
    init_map_ar();
    init_mhct();
    init_overlays();
    init_scroll_shop();
    init_sidebar2();
    init_sorted_map();
    init_sorted();
    init_userscripts();
    imported2 = [general_default2, helper_default2, hunters_default, map_ar_default, mhct_default, overlays_default, scroll_shop_default, sidebar_default2, sorted_map_default, sorted_default, userscripts_default], styles2 = imported2, updateMapClasses = () => {
      var _a, _b, _c;
      let map = document.querySelector(".treasureMapRootView");
      map && map.classList && (((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.maps) == null ? void 0 : _c.length) >= 2 ? map.classList.add("mh-ui-multiple-maps") : map.classList.remove("mh-ui-multiple-maps"));
    }, updateBlockContent = (block, type) => {
      type === "environments" && [...block.querySelectorAll(".treasureMapView-environment")].sort((a, b) => a.innerText.localeCompare(b.innerText)).forEach((env) => {
        block.append(env);
      });
    }, addBlockClasses = () => {
      let rightBlocks = document.querySelectorAll(".treasureMapView-rightBlock > div"), leftBlocks = document.querySelectorAll(".treasureMapView-leftBlock > div"), blocks = [...rightBlocks, ...leftBlocks], prevBlockType = "";
      blocks.forEach((block) => {
        if (block.classList.contains("treasureMapView-block-title")) {
          let blockType = block.innerText.trim().toLowerCase().replaceAll(" ", "-").replaceAll(/[^a-z-]/g, "").replace("--", "-").replace("goalssearch", "goals");
          block.classList.add(`mh-ui-${blockType}-title`), updateBlockContent(block, `${blockType}-title`), prevBlockType = blockType;
        } else
          block.classList.add(`mh-ui-${prevBlockType}-block`), updateBlockContent(block, prevBlockType);
      });
    }, interceptMapRequest = (mapId) => {
      if (sessionSet("map-refreshed", Date.now()), !mapId)
        return !1;
      let init81 = (mapData3) => (setGlobal("mapper", {
        mapData: mapData3,
        mapModel: new hg.models.TreasureMapModel(mapData3)
      }), doEvent2("mapper_loaded", mapData3), data), data = getMapData(mapId, !0);
      return data ? init81(data) : !1;
    }, initMapper = (map) => {
      if (!map || !map.map_id || !map.map_type)
        return;
      let content = document.querySelector(".treasureMapRootView-content");
      if (content && content.classList.contains("loading")) {
        let observer = new MutationObserver((mutations, mObserver) => {
          mutations.forEach((mutation) => {
            mutation.type === "attributes" && mutation.attributeName === "class" && !mutation.target.classList.contains("loading") && (mObserver.disconnect(), initMapper(map));
          });
        }), rootOfChanges = document.querySelector(".treasureMapRootView");
        observer.observe(rootOfChanges, {
          attributes: !0,
          childList: !0,
          subtree: !0
        });
      }
      addSortedMapTab(), document.querySelectorAll(".treasureMapRootView-subTab").forEach((tab) => {
        tab.addEventListener("click", () => {
          addBlockClasses(), doEvent2("map_tab_click", map), doEvent2(`map_${tab.getAttribute("data-type")}_tab_click`, map);
        });
      }), getSetting("better-maps.default-to-sorted", !1) ? map.can_claim_reward || map.is_complete || doEvent2("map_sorted_tab_click", map) : doEvent2("map_show_goals_tab_click", map), addBlockClasses();
    }, intercept = () => {
      let parentShowMap = hg.controllers.TreasureMapController.showMap;
      hg.controllers.TreasureMapController.showMap = (id = !1) => {
        var _a, _b;
        parentShowMap(id);
        let 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;
          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("users/treasuremap.php", (data) => {
        data.treasure_map && data.treasure_map.map_id && setMapData(data.treasure_map.map_id, data.treasure_map);
      }, !0), onRequest("board/board.php", (data) => {
        data.treasure_map && data.treasure_map.map_id && setMapData(data.treasure_map.map_id, data.treasure_map);
      }, !0);
    }, clearStickyMouse = () => {
      let sticky = document.querySelector(".treasureMapView-highlight");
      sticky && (sticky.classList.remove("sticky"), sticky.classList.remove("active"));
      let mapGroupGoal = document.querySelectorAll(".treasureMapView-goals-group-goal");
      mapGroupGoal && mapGroupGoal.forEach((goal) => {
        goal.classList.remove("sticky");
      });
    }, updateRelicHunterHint = () => __async(void 0, null, function* () {
      let relicHunter = document.querySelector(".treasureMapInventoryView-relicHunter-hint");
      if (!relicHunter)
        return !1;
      if (relicHunter.getAttribute("data-travel-button-added"))
        return !0;
      relicHunter.setAttribute("data-travel-button-added", !0);
      let hint = relicHunter.innerText.trim(), relicHunterHints = yield getData("relic-hunter-hints"), key = !1;
      if (Object.keys(relicHunterHints).forEach((k) => {
        relicHunterHints[k].includes(hint) && (key = k);
      }), !key)
        return !0;
      environments = yield getData("environments");
      let environment = environments.find((e) => e.id === key);
      if (!environment)
        return !0;
      let hintWrapper = document.querySelector(".treasureMapInventoryView-relicHunter");
      hintWrapper || (hintWrapper = relicHunter), makeElement("div", "treasureMapInventoryView-relicHunter-hintSuffix", `... in ${environment.article}.`, hintWrapper);
      let travelButton = makeElement("div", ["mousehuntActionButton", "small"]);
      return makeElement("span", "", "Travel", travelButton), travelButton.addEventListener("click", () => {
        hg.utils.User.travel(environment.id);
      }), hintWrapper.append(travelButton), !0;
    }), relicHunterUpdate = () => {
      _showInventory || (_showInventory = hg.controllers.TreasureMapController.showInventory, hg.controllers.TreasureMapController.showInventory = () => {
        _showInventory();
        let tries = 0, interval = setInterval(() => __async(void 0, null, function* () {
          tries++, ((yield updateRelicHunterHint()) || tries > 5) && clearInterval(interval);
        }), 250);
      });
    }, addClearCacheTimeout = () => {
      let clearCacheTimeout;
      onDialogShow("map", () => __async(void 0, null, function* () {
        document.querySelectorAll(".treasureMapRootView-header-navigation-item").forEach((tab) => {
          let classes = [...tab.classList];
          classes.includes("active") && doEvent2("map_navigation_tab_click", classes.find((c) => c !== "treasureMapRootView-header-navigation-item").trim()), tab.addEventListener("click", () => {
            doEvent2("map_navigation_tab_click", classes.find((c) => c !== "treasureMapRootView-header-navigation-item" && c !== "active").trim());
          });
        }), clearCacheTimeout = setTimeout(() => {
          clearTimeout(clearCacheTimeout), hg.controllers.TreasureMapController.clearMapCache();
        }, 30 * 1e3);
      }));
    }, init7 = () => __async(void 0, null, function* () {
      addStyles(styles2, "better-maps"), 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(), addClearCacheTimeout(), relicHunterUpdate(), scrolls_default(), shops_default(), getSetting("better-maps.community") && community_default(), getSetting("experiments.better-maps-helper") && helper_default(), !getSetting("no-sidebar") && getSetting("better-maps.show-sidebar-goals", !0) && sidebar_default();
      let clearCacheTimeout;
      onDialogShow("map", () => __async(void 0, null, function* () {
        document.querySelectorAll(".treasureMapRootView-header-navigation-item").forEach((tab) => {
          let classes = [...tab.classList];
          classes.includes("active") && doEvent2("map_navigation_tab_click", classes.find((c) => c !== "treasureMapRootView-header-navigation-item").trim()), tab.addEventListener("click", () => {
            doEvent2("map_navigation_tab_click", classes.find((c) => c !== "treasureMapRootView-header-navigation-item" && c !== "active").trim());
          });
        }), clearCacheTimeout = setTimeout(() => {
          clearTimeout(clearCacheTimeout), hg.controllers.TreasureMapController.clearMapCache();
        }, 10 * 1e3);
      })), onEvent("map_navigation_tab_click", () => {
        addBlockClasses(), updateMapClasses();
      }), onRequest("users/treasuremap.php", () => {
        addBlockClasses(), updateMapClasses();
      });
    }), better_maps_default = {
      id: "better-maps",
      name: "Better Maps",
      type: "better",
      default: !0,
      description: "Adds a number of features to maps, including showing attracting rates, a sorted tab that categorizes a variety of maps, and showing more information on the Hunters tab.",
      load: init7,
      settings: settings_default5
    };
  }
});

// src/modules/better-marketplace/settings/index.js
var settings_default6, init_settings7 = __esm({
  "src/modules/better-marketplace/settings/index.js"() {
    settings_default6 = () => __async(void 0, null, function* () {
      return [
        {
          id: "better-marketplace.search-all",
          title: "Default to showing all items in search",
          default: !1
        },
        {
          id: "better-marketplace.small-images",
          title: "Smaller images",
          default: !1
        }
      ];
    });
  }
});

// src/modules/better-marketplace/modules/small-images/styles.css
var styles_default16, init_styles17 = __esm({
  "src/modules/better-marketplace/modules/small-images/styles.css"() {
    styles_default16 = `.marketplaceView-table-image .marketplaceView-itemImage{width:40px;height:40px;min-height:unset}
`;
  }
});

// src/modules/better-marketplace/modules/small-images/index.js
var small_images_default, init_small_images = __esm({
  "src/modules/better-marketplace/modules/small-images/index.js"() {
    init_utils2();
    init_styles17();
    small_images_default = () => __async(void 0, null, function* () {
      addStyles(styles_default16, "better-marketplace-small-images");
    });
  }
});

// src/modules/better-marketplace/styles.css
var styles_default17, init_styles18 = __esm({
  "src/modules/better-marketplace/styles.css"() {
    styles_default17 = `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}.marketplaceHome-blockItem.small .marketplaceView-favouriteButton:hover{right:3px;bottom:-6px}.marketplaceView-item-imageContainer .marketplaceView-favouriteButton:hover,.marketplaceView-table-image .marketplaceView-favouriteButton:hover{right:1px;bottom:-4px;border:none;outline:2px solid #ccc}.marketplaceHome-block.favourites .marketplaceView-favouriteButton:hover{right:5px;bottom:-4px;border:none;outline:2px solid #ccc}.marketplaceView-item-imageContainer:hover .marketplaceView-favouriteButton.disabled{display:none}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}.marketplaceView-table-chartImage{position:absolute;top:0;right:-30px;bottom:0;height:49px;opacity:.5}.marketplaceView-table-name:hover .marketplaceView-table-chartImage{opacity:1}td.marketplaceView-table-name{position:relative}.marketplaceView-header-search-dropdown .select2-search{margin-top:5px}.marketplaceHome-block-statTitle{display:flex;gap:3px;align-items:center}.marketplaceHome-block-statTitle .marketplaceHome-block-viewAll{top:unset;display:block;vertical-align:middle}.marketplaceView h1{border:none}.marketplaceView-browse-filter label{display:flex;align-items:center}.marketplaceView-item-rightBlock .mousehuntCharacterGuideBox-content li{background-position-y:-2px}
`;
  }
});

// src/modules/better-marketplace/index.js
var initSearch, modifySearch, waitForSearchReady, autocloseClaim, getLinkMarkup3, overloadShowItem, waitForFooterReady, addChartToCategories, _showBrowseCategory, _showBrowser, replaceShowBrowseCategory, originalSelect, newSelect, init8, better_marketplace_default, init_better_marketplace = __esm({
  "src/modules/better-marketplace/index.js"() {
    init_utils2();
    init_settings7();
    init_small_images();
    init_styles18();
    initSearch = (searchInputDOM) => {
      let blankOpt = document.createElement("option");
      blankOpt.value = "", blankOpt.text = "", blankOpt.disabled = !0, blankOpt.selected = !0, blankOpt.hidden = !0, searchInputDOM.prepend(blankOpt), searchInputDOM = $(".marketplaceView-header-search"), searchInputDOM.select2({
        formatResult: hg.views.MarketplaceView.formatSelect2Result,
        formatSelection: hg.views.MarketplaceView.formatSelect2Result,
        dropdownAutoWidth: !1,
        placeholder: "Search for items\u2026",
        minimumInputLength: 0,
        dropdownCssClass: "marketplaceView-header-search-dropdown",
        width: "resolve"
      }).on("change", () => {
        !searchInputDOM.prop("disabled") && searchInputDOM.val() && hg.views.MarketplaceView.showItem(
          searchInputDOM.val(),
          "view",
          !1,
          !1,
          !0
        );
      });
    }, modifySearch = (opts) => __async(void 0, null, function* () {
      let searchContainer = document.querySelector(".marketplaceView-header-searchContainer");
      if (!searchContainer)
        return;
      let searchInputDOM = $(".marketplaceView-header-search");
      searchInputDOM.select2("destroy"), originalSelect === null && (originalSelect = document.querySelector(".marketplaceView-header-search").cloneNode(!0), originalSelect.classList.remove("marketplaceView-header-search"));
      let itemsToRemove = yield getData("marketplace-hidden-items");
      if (opts.forEach((opt) => {
        (!opt.value || opt.value === "" || itemsToRemove.some((item) => item.id === opt.value || item.name === opt.text)) && opt.remove();
      }), initSearch(searchInputDOM), newSelect = document.querySelector("select.marketplaceView-header-search"), !newSelect)
        return;
      let toggleSearch = makeElement("input", "mhui-marketplace-search-toggle");
      toggleSearch.setAttribute("type", "checkbox");
      let label = makeElement("label", "mhui-marketplace-search-toggle");
      label.setAttribute("for", "mhui-marketplace-search-toggle"), label.append(toggleSearch), label.append(document.createTextNode("Search all items"));
      let defaultToAll = getSetting("better-marketplace.search-all");
      toggleSearch.checked = defaultToAll, 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");
        let currentOpts = document.querySelector(".marketplaceView-header-search");
        toggleSearch.checked ? (currentOpts.innerHTML = originalSelect.innerHTML, currentOpts.value = originalSelect.value) : (currentOpts.innerHTML = newSelect.innerHTML, currentOpts.value = newSelect.value), initSearch(searchInputDOM);
      }), searchContainer.append(label);
    }), waitForSearchReady = (attempts = 0) => {
      let opts = document.querySelectorAll(".marketplaceView-header-search option"), timeoutPending = !1;
      if (opts.length === 0) {
        attempts < 10 && (timeoutPending = setTimeout(() => waitForSearchReady(attempts + 1), 300));
        return;
      }
      timeoutPending && clearTimeout(timeoutPending), setTimeout(() => {
        modifySearch(opts);
      }, 300);
    }, autocloseClaim = (resp) => {
      var _a, _b;
      if (!(resp && resp.success))
        return;
      let journalEntry = (_b = (_a = resp == null ? void 0 : resp.journal_markup[0]) == null ? void 0 : _a.render_data) == null ? void 0 : _b.css_class;
      !journalEntry || journalEntry === "" || (journalEntry.includes("marketplace_claim_listing") || journalEntry.includes("marketplace_complete_listing") || journalEntry.includes("marketplace_cancel_listing")) && setTimeout(() => hg.views.MarketplaceView.hideDialog(), 0);
    }, getLinkMarkup3 = (name, id) => makeLink("MHCT", `https://api.mouse.rip/mhct-redirect-item/${id}`, !0) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(name.replaceAll(" ", "_"))}`, !0), overloadShowItem = () => {
      let originalShowItem = hg.views.MarketplaceView.showItem;
      hg.views.MarketplaceView.showItem = (itemId, action, defaultQuantity, defaultUnitPriceWithTariff, force) => {
        let actionButton = document.querySelector(".marketplaceView-item-actionType .marketplaceView-listingType");
        actionButton && actionButton.addEventListener("click", () => {
          let actionType = actionButton.classList.contains("buy") ? "sell" : "buy";
          originalShowItem(itemId, actionType, defaultQuantity, defaultUnitPriceWithTariff, force);
        }), originalShowItem(itemId, action, defaultQuantity, defaultUnitPriceWithTariff, force);
        let actions = document.querySelector(".marketplaceView-item-titleActions");
        if (!actions)
          return;
        let existing = document.querySelector(".mh-improved-marketplace-item-title-actions");
        existing && existing.remove();
        let itemName = document.querySelector(".marketplaceView-item-titleName");
        itemName = itemName ? itemName.textContent.trim() : "";
        let buttons = makeElement("div", "mh-improved-marketplace-item-title-actions", getLinkMarkup3(itemName, itemId));
        actions.insertBefore(buttons, actions.firstChild);
      };
    }, waitForFooterReady = (attempts = 0) => {
      let opts = document.querySelectorAll(".marketplaceView-table-listing-quantity"), timeoutPending = !1;
      if (!(opts && opts.length > 0)) {
        attempts < 10 && (timeoutPending = setTimeout(() => updateQuantityButtons(attempts + 1), 300));
        return;
      }
      timeoutPending && clearTimeout(timeoutPending), setTimeout(() => {
        opts.forEach((order) => {
          order.addEventListener("click", () => {
            let quantity = order.textContent.trim();
            hg.views.MarketplaceView.setOrderQuantity(quantity);
          });
        });
      }, 300);
    }, addChartToCategories = () => __async(void 0, null, function* () {
      document.querySelectorAll(".marketplaceView-table tr").forEach((item) => {
        let itemId = item.getAttribute("data-item-id");
        if (!itemId)
          return;
        let name = item.querySelector(".marketplaceView-table-name");
        if (!name || item.querySelector(".marketplaceView-table-chartImage"))
          return;
        let chartImage = makeElement("img", "marketplaceView-table-chartImage");
        chartImage.src = `https://markethunt-chart.mouse.rip/${itemId}.png?small`, name.append(chartImage);
      });
    }), _showBrowseCategory = null, _showBrowser = null, replaceShowBrowseCategory = () => {
      _showBrowseCategory || (_showBrowseCategory = hg.views.MarketplaceView.showBrowseCategory, hg.views.MarketplaceView.showBrowseCategory = (category) => {
        _showBrowseCategory(category), addChartToCategories();
      }, _showBrowser = hg.views.MarketplaceView.showBrowser, hg.views.MarketplaceView.showBrowser = (category) => {
        _showBrowser(category), addChartToCategories();
      });
    }, originalSelect = null, newSelect = null, init8 = () => __async(void 0, null, function* () {
      addStyles(styles_default17, "better-marketplace"), getSetting("better-marketplace.small-images") && small_images_default(), onOverlayChange({
        marketplace: {
          /**
           * Run when the marketplace is shown.
           */
          show: () => {
            waitForSearchReady(), overloadShowItem(), getSetting("better-marketplace.show-chart-images") && replaceShowBrowseCategory();
          }
        }
      }), onRequest("users/marketplace.php", autocloseClaim), onRequest("users/marketplace.php", waitForFooterReady, !0);
    }), better_marketplace_default = {
      id: "better-marketplace",
      name: "Better Marketplace",
      type: "better",
      default: !0,
      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_default6
    };
  }
});

// src/modules/better-mice/modules/hover-mice/styles.css
var styles_default18, init_styles19 = __esm({
  "src/modules/better-mice/modules/hover-mice/styles.css"() {
    styles_default18 = `#mouse-data-wrapper{position:absolute;z-index:999999;box-sizing:border-box;display:block;width:300px;height:100px;background:linear-gradient(#decebb 5%,#f0eddf 50%);border:1px solid #9a8872;border-radius:10px;box-shadow:0 1px 5px -1px #5e5e5e}.mouse-data-wrapper-loading{display:flex;align-items:flex-end;justify-content:center;height:90%;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif);background-repeat:no-repeat;background-position:center;background-size:55px}#mouse-data-wrapper .mouse-data{display:grid;grid-template-columns:90px 1fr;gap:10px;align-items:center;height:95px}#mouse-data-wrapper .mouse-image{height:80px;margin-left:10px;border:1px solid #25211e;border-radius:5px}#mouse-data-wrapper .mouse-text{display:flex;flex-direction:column;justify-content:space-around;height:80px;margin-right:10px}#mouse-data-wrapper .mouse-name{width:160px;font-size:12px;font-weight:900}.mouse-catch-stats{display:grid;grid-template-columns:2fr 3fr;gap:0 20px;font-size:10px}.mouse-catch-stats div{display:flex;flex-direction:row;align-items:center;justify-content:space-between;line-height:1.5}#mouse-data-wrapper .mouse-data.crown:after{position:absolute;top:7px;right:5px;width:30px;height:30px;content:"";background-size:cover}#mouse-data-wrapper .mouse-data.crown.bronze:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_bronze.png)}#mouse-data-wrapper .mouse-data.crown.silver:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_silver.png)}#mouse-data-wrapper .mouse-data.crown.gold:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_gold.png)}#mouse-data-wrapper .mouse-data.crown.platinum:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_platinum.png)}#mouse-data-wrapper .mouse-data.crown.diamond:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_diamond.png)}
`;
  }
});

// src/modules/better-mice/modules/hover-mice/index.js
var fetchMouseData, makeMouseMarkup, makeLoadingMarkup2, mouseDataWrapper, main5, hover_mice_default, init_hover_mice = __esm({
  "src/modules/better-mice/modules/hover-mice/index.js"() {
    init_utils2();
    init_styles19();
    fetchMouseData = (mouseId) => __async(void 0, null, function* () {
      var _a;
      let mouseDataRequest = yield doRequest("managers/ajax/mice/getstat.php", {
        action: "get_mice",
        "mouse_types[]": mouseId
      });
      return (_a = mouseDataRequest == null ? void 0 : mouseDataRequest.mice) == null ? void 0 : _a[0];
    }), makeMouseMarkup = (mouse) => {
      if (!mouse)
        return !1;
      let mouseData = makeElement("div", "mouse-data");
      mouse.crown && mouse.crown !== "none" && mouseData.classList.add("crown", mouse.crown);
      let mouseImage = makeElement("img", "mouse-image");
      mouse.square && (mouseImage.src = mouse.square), mouseData.append(mouseImage);
      let mouseText = makeElement("div", "mouse-text");
      mouse.name && makeElement("div", "mouse-name", mouse.name, mouseText);
      let catchStats = makeElement("div", "mouse-catch-stats"), catches = makeElement("div", "mouse-catches");
      makeElement("span", "", "Catches: ", catches), makeElement("span", "", mouse.num_catches_formatted || 0, catches), catchStats.append(catches);
      let avgWeight = makeElement("div", "mouse-avg-weight");
      makeElement("span", "", "Avg: ", avgWeight), makeElement("span", "", mouse.avg_weight || "0z", avgWeight), catchStats.append(avgWeight);
      let misses = makeElement("div", "mouse-misses");
      makeElement("span", "", "Misses: ", misses), makeElement("span", "", mouse.num_misses_formatted || 0, misses), catchStats.append(misses);
      let heaviest = makeElement("div", "mouse-heaviest");
      return makeElement("span", "", "Heaviest: ", heaviest), makeElement("span", "", mouse.heaviest_catch || "0z", heaviest), catchStats.append(heaviest), mouseText.append(catchStats), mouseData.append(mouseText), mouseData;
    }, makeLoadingMarkup2 = (e) => {
      mouseDataWrapper && mouseDataWrapper.remove(), mouseDataWrapper = makeElement("div", "mouse-data-wrapper"), mouseDataWrapper.id = "mouse-data-wrapper", mouseDataWrapper.innerHTML = '<span class="mouse-data-wrapper-loading">Loading...</span>', document.body.append(mouseDataWrapper);
      let rect = e.target.getBoundingClientRect(), top = rect.top + window.scrollY, left = rect.left + window.scrollX, tooltipTop = top - mouseDataWrapper.offsetHeight - 10;
      return tooltipTop < 0 && (tooltipTop = top + rect.height + 10), mouseDataWrapper.style.top = `${tooltipTop}px`, mouseDataWrapper.style.left = `${left - mouseDataWrapper.offsetWidth / 2 + rect.width / 2}px`, mouseDataWrapper;
    }, main5 = () => {
      let miceLinks = document.querySelectorAll('.journal .content .entry .journaltext a[onclick*="MouseView.show"]');
      miceLinks && miceLinks.forEach((link) => {
        let mouseType = link.getAttribute("onclick").match(/'([^']+)'/)[1];
        link.setAttribute("onclick", `hg.views.MouseView.show('${mouseType}'); return false;`);
        let timeoutId = null, isMouseOver = !1;
        link.addEventListener("mouseenter", (e) => __async(void 0, null, function* () {
          isMouseOver = !0, timeoutId && clearTimeout(timeoutId), timeoutId = setTimeout(() => __async(void 0, null, function* () {
            if (!isMouseOver)
              return;
            makeLoadingMarkup2(e);
            let mouseData = yield fetchMouseData(mouseType);
            if (mouseData && mouseDataWrapper && isMouseOver) {
              let markup = makeMouseMarkup(mouseData);
              mouseDataWrapper.innerHTML = markup.outerHTML;
            }
          }), 500);
        })), link.addEventListener("mouseleave", () => {
          isMouseOver = !1, timeoutId && clearTimeout(timeoutId), mouseDataWrapper && mouseDataWrapper.remove();
        });
      });
    }, hover_mice_default = () => {
      addStyles(styles_default18, "better-mice-hover-mice"), setTimeout(main5, 500), onRequest("*", () => {
        setTimeout(main5, 1e3);
      });
    };
  }
});

// src/modules/better-mice/modules/mouse-page/index.js
var makeKingsCrownsTab, makeKingsCrownsTabContentContent, makeMouseCrownSection, makeKingsCrownsTabContent, addKingsCrownsToMicePage, parseImperialWeight, getSetRowValue, sortStats, addSortButton, getSelectorPrefix, addSortingToCat, hasAddedSortingTabClickListeners, addSortingTabClickListeners, clickCurrentTab, addSortingToStatsPage, mouse_page_default, init_mouse_page = __esm({
  "src/modules/better-mice/modules/mouse-page/index.js"() {
    init_utils2();
    makeKingsCrownsTab = () => {
      let tabContainer = document.querySelector(".mousehuntHud-page-tabHeader-container");
      if (!tabContainer)
        return !1;
      let existingTab = document.querySelector(".mousehuntHud-page-tabHeader.kings-crowns-tab");
      if (existingTab)
        return existingTab;
      let kingsCrownsTab = makeElement("a", ["mousehuntHud-page-tabHeader", "groups", "kings-crowns-tab"]);
      return 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), kingsCrownsTab;
    }, makeKingsCrownsTabContentContent = () => {
      if (document.querySelector(".mousehuntHud-page-tabContent.kings_crowns"))
        return;
      let tabContentContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
      if (!tabContentContainer)
        return;
      let 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);
      let 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 = !1, subheader = !1) => {
      let wrapper = makeElement("div", ["kings-crown-section", "mouseCrownsView-group", type]);
      if (header) {
        let headerDiv = makeElement("div", "mouseCrownsView-group-header");
        makeElement("div", ["mouseCrownsView-crown", type], "", headerDiv);
        let name = makeElement("div", "mouseCrownsView-group-header-name");
        makeElement("b", !1, header, headerDiv), subheader && makeElement("div", "mouseCrownsView-group-header-subtitle", subheader, name), headerDiv.append(name), wrapper.append(headerDiv);
      }
      let list = makeElement("div", "mouseCrownsView-group-mice");
      return mice.forEach((mouse) => {
        if (!mouse.id)
          return;
        let 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;"), mouse.landscape && mouseWrapper.classList.add("landscape");
        let innerWrapper = makeElement("div", "mouseCrownsView-group-mouse-padding"), 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);
        let label = makeElement("div", "mouseCrownsView-group-mouse-label"), nameWrapper = makeElement("span", !1, "");
        makeElement("div", "mouseCrownsView-group-mouse-name", mouse.name, nameWrapper), label.append(nameWrapper), innerWrapper.append(label);
        let favoriteButton = makeElement("div", "mouseCrownsView-group-mouse-favouriteButton");
        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), wrapper;
    }, makeKingsCrownsTabContent = () => __async(void 0, null, function* () {
      var _a, _b, _c, _d;
      makeKingsCrownsTabContentContent();
      let crowns = [], cachedCrowns = sessionGet("kings-crowns"), cachedCrownsTime = sessionGet("kings-crowns-time");
      if (cachedCrowns && cachedCrownsTime && Date.now() - cachedCrownsTime < 3e5)
        crowns = JSON.parse(cachedCrowns);
      else {
        let crownsReq = yield doRequest("managers/ajax/pages/page.php", {
          page_class: "HunterProfile",
          "page_arguments[tab]": "kings_crowns",
          "page_arguments[sub_tab]": !1
        });
        if (crowns = ((_d = (_c = (_b = (_a = crownsReq == null ? void 0 : crownsReq.page) == null ? void 0 : _a.tabs) == null ? void 0 : _b.kings_crowns) == null ? void 0 : _c.subtabs[0]) == null ? void 0 : _d.mouse_crowns) || [], crowns.length <= 0)
          return;
        sessionSet("kings-crowns", crowns), sessionSet("kings-crownsTime", Date.now());
      }
      let tabInnerContent = document.querySelector(".mousehuntHud-page-tabContent.kings_crowns");
      if (tabInnerContent) {
        if (crowns.favourite_mice_count > 0) {
          let favorites = makeMouseCrownSection("favorites", crowns.favourite_mice), existingFavorites = tabInnerContent.querySelector(".mouseCrownsView-group.favorites");
          existingFavorites ? existingFavorites.replaceWith(favorites) : tabInnerContent.append(favorites);
        }
        crowns.badge_groups.forEach((group) => {
          var _a2, _b2;
          if (group.mice.length === 0)
            return;
          group.name = ((_a2 = group == null ? void 0 : group.name) == null ? void 0 : _a2.length) > 0 ? group.name : "No", group.catches = ((_b2 = group == null ? void 0 : group.catches) == null ? void 0 : _b2.length) > 0 ? group.catches : "0";
          let section = makeMouseCrownSection(group.type, group.mice, `${group.name} Crown (${group.count})`, `Earned at ${group.catches} catches`), existingSection = tabInnerContent.querySelector(`.mouseCrownsView-group.${group.type}`);
          existingSection ? existingSection.replaceWith(section) : tabInnerContent.append(section);
        });
      }
    }), addKingsCrownsToMicePage = () => __async(void 0, null, function* () {
      makeKingsCrownsTab(), makeKingsCrownsTabContent();
    }), parseImperialWeight = (weightText) => {
      let lbsSplit = weightText.innerText.split("lb."), lbs = lbsSplit.length > 1 ? lbsSplit[0] : 0, ozSplit = weightText.innerText.split("oz."), oz = ozSplit.length > 1 ? ozSplit[0] : 0;
      return Number.parseInt(lbs) * 16 + Number.parseInt(oz);
    }, getSetRowValue = (row, type) => {
      let value = 0;
      if (value = row.getAttribute(`data-sort-value-${type}`), value)
        return Number.parseInt(value);
      let valueText = row.querySelector(`${getSelectorPrefix()} .mouseListView-categoryContent-subgroup-mouse-stats.${type}`);
      return type === "average_weight" || type === "heaviest_catch" ? valueText.innerText.includes("lb") || valueText.innerText.includes("oz") ? value = parseImperialWeight(valueText) : valueText.innerText.includes("kg") ? value = valueText.innerText.replace("kg.", "") : value = 0 : value = valueText.innerText && valueText.innerText.replaceAll(",", "") || 0, row.setAttribute(`data-sort-value-${type}`, value), Number.parseInt(value);
    }, sortStats = (type, reverse = !1) => {
      reverse = !reverse;
      let rows = document.querySelectorAll(`${getSelectorPrefix()} .active  .mouseListView-categoryContent-subgroup-mouse:not(:first-child)`);
      !rows.length || !document.querySelector(`${getSelectorPrefix()} .active  .mouseListView-categoryContent-subgroup-mouse:first-child`) || (rows.forEach((row) => {
        getSetRowValue(row, type);
      }), rows = [...rows].sort((a, b) => {
        let aVal = getSetRowValue(a, type), bVal = getSetRowValue(b, type);
        if (aVal === bVal || type === "name") {
          let aNameEl = a.querySelector(".mouseListView-categoryContent-subgroup-mouse-stats.name");
          if (!aNameEl)
            return 0;
          let bNameEl = b.querySelector(".mouseListView-categoryContent-subgroup-mouse-stats.name");
          if (!bNameEl)
            return 0;
          let aName = aNameEl.innerText, bName = bNameEl.innerText;
          return aName === bName ? 0 : aName > bName ? 1 : -1;
        }
        return aVal > bVal ? 1 : -1;
      }), reverse && (rows = rows.reverse()), rows.forEach((row) => {
        row.parentNode.append(row);
      }));
    }, addSortButton = (elements, type) => {
      elements.forEach((el) => {
        let sortButton = makeElement("div", ["sort-button", "unsorted"], "");
        el.addEventListener("click", () => {
          if (el.parentNode.querySelectorAll(".sort-button").forEach((button) => {
            button !== sortButton && (button.classList.remove("reverse"), button.classList.add("unsorted"));
          }), 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, !0);
        }), el.append(sortButton);
      });
    }, getSelectorPrefix = () => {
      let currentTab = getCurrentTab(), currentSubtab = getCurrentSubtab();
      return currentTab === currentSubtab && (currentSubtab = !1), `.mousehuntHud-page-subTabContent.active${currentSubtab ? `.${currentSubtab}` : ""}`;
    }, addSortingToCat = (cat, retries = 0) => {
      let cats = [
        "name",
        "catches",
        "misses",
        "average_weight",
        "heaviest_catch"
      ], selector = `${getSelectorPrefix()} .mouseListView-categoryContent-category[data-category="${cat}"]`, 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) => {
        let els = category.querySelectorAll(`${getSelectorPrefix()} .mouseListView-categoryContent-category.all.active .mouseListView-categoryContent-subgroup-mouse.header .mouseListView-categoryContent-subgroup-mouse-stats.${mCat}`);
        els.length && addSortButton(els, mCat);
      }), category.setAttribute("data-added-sorting", !0);
      let rows = category.querySelectorAll(`${getSelectorPrefix()} .mouseListView-categoryContent-subgroup-mouse:not(:first-child)`);
      rows.length && rows.forEach((row) => {
        let catches = row.querySelector(`${getSelectorPrefix()} .mouseListView-categoryContent-subgroup-mouse-stats.catches`);
        if (!catches)
          return;
        let value = catches.innerText && catches.innerText.replaceAll(",", "") || 0;
        value >= 2500 ? row.classList.add("crown", "diamond") : value >= 1e3 ? row.classList.add("crown", "platinum") : value >= 500 ? row.classList.add("crown", "gold") : value >= 100 ? row.classList.add("crown", "silver") : value >= 10 && row.classList.add("crown", "bronze");
      });
    }, hasAddedSortingTabClickListeners = !1, addSortingTabClickListeners = () => {
      if (hasAddedSortingTabClickListeners)
        return;
      hasAddedSortingTabClickListeners = !0;
      let _categoryClickHandler = hg.views.MouseListView.categoryClickHandler;
      hg.views.MouseListView.categoryClickHandler = (el) => {
        _categoryClickHandler(el), addSortingToCat(el.getAttribute("data-category"));
      };
    }, clickCurrentTab = () => {
      let 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();
    }, mouse_page_default = () => __async(void 0, null, function* () {
      var _a, _b;
      if (getCurrentPage() === "adversaries" && getCurrentTab() === "kings_crowns") {
        addKingsCrownsToMicePage();
        let tab = document.querySelector(".mousehuntHud-page-tabHeader.kings-crowns-tab");
        tab && ((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.onclickPageTabHandler) && 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"
      }), onEvent("set_tab", () => {
        getCurrentTab() === "your_stats" && addSortingToStatsPage();
      }), onNavigation(addSortingToStatsPage, {
        page: "hunterprofile",
        tab: "mice",
        subtab: "group"
      }), onNavigation(addSortingToStatsPage, {
        page: "hunterprofile",
        tab: "mice",
        subtab: "location"
      });
    });
  }
});

// src/modules/better-mice/settings/index.js
var settings_default7, init_settings8 = __esm({
  "src/modules/better-mice/settings/index.js"() {
    settings_default7 = () => __async(void 0, null, function* () {
      return [
        {
          id: "better-mice.show-attraction-rates",
          title: "Show attraction rates",
          default: !0
        },
        {
          id: "better-mice.show-mouse-hover",
          title: "Show mice details on hover (in journal)"
        },
        {
          id: "better-mice.show-sidebar",
          title: "Show available mice in sidebar",
          default: !0
        }
      ];
    });
  }
});

// src/modules/better-mice/modules/sidebar/styles.css
var styles_default19, init_styles20 = __esm({
  "src/modules/better-mice/modules/sidebar/styles.css"() {
    styles_default19 = `.mh-improved-mice-sidebar{padding:0;margin:5px 0 15px;border:1px solid #ddedff}.mh-improved-mice-sidebar-title{position:relative;padding:5px;font-size:11px;text-align:center;background-color:#ddedff}.mh-improved-mice-sidebar-list{display:flex;flex-direction:column}.mh-improved-mice-sidebar-mouse{display:flex;gap:5px;align-items:center;justify-content:flex-start;padding:1px 5px}.mh-improved-mice-sidebar-mouse-image{width:20px;height:20px;background-size:cover;border-radius:3px;box-shadow:inset 0 0 0 1px #fff}.mh-improved-mice-sidebar-mouse-name{font-size:10px}.mh-improved-mice-sidebar-mouse:hover{cursor:pointer;background-color:#eee}
`;
  }
});

// src/modules/better-mice/modules/sidebar/index.js
var updateSidebarListFromMiceEff, updateSidebarList, sidebar_default3, init_sidebar3 = __esm({
  "src/modules/better-mice/modules/sidebar/index.js"() {
    init_utils2();
    init_styles20();
    updateSidebarListFromMiceEff = (data) => __async(void 0, null, function* () {
      return yield updateSidebarList(data, !0);
    }), updateSidebarList = (data = null, isFromMiceEff = !1) => __async(void 0, null, function* () {
      let sidebar = document.querySelector(".pageSidebarView .pageSidebarView-block");
      if (!sidebar)
        return;
      (!data || !isFromMiceEff) && (data = yield doRequest("managers/ajax/users/getmiceeffectiveness.php"));
      let groups2 = (data == null ? void 0 : data.effectiveness) || {}, mice = Object.values(groups2).reduce((acc, group) => [...acc, ...group.mice], []), existingList = document.querySelector(".mh-improved-mice-sidebar-list");
      if (!mice) {
        existingList && existingList.remove();
        return;
      }
      let miceSidebar = makeElement("div", "mh-improved-mice-sidebar");
      makeElement("h3", "mh-improved-mice-sidebar-title", "Available Mice", miceSidebar);
      let miceContainer = makeElement("div", "mh-improved-mice-sidebar-list");
      if (mice.forEach((mouse) => {
        let mouseEl = makeElement("div", "mh-improved-mice-sidebar-mouse");
        mouseEl.addEventListener("click", () => {
          hg.views.MouseView.show(mouse == null ? void 0 : mouse.type);
        });
        let mouseImage = makeElement("div", "mh-improved-mice-sidebar-mouse-image");
        mouseImage.style.backgroundImage = `url(${mouse == null ? void 0 : mouse.thumb})`, mouseEl.append(mouseImage), makeElement("div", "mh-improved-mice-sidebar-mouse-name", mouse.name, mouseEl), miceContainer.append(mouseEl);
      }), existingList) {
        existingList.replaceWith(miceContainer);
        return;
      }
      miceSidebar.append(miceContainer);
      let mapSidebar = document.querySelector(".pageSidebarView-block .mh-improved-map-sidebar");
      if (mapSidebar) {
        mapSidebar.before(miceSidebar);
        return;
      }
      let existing = document.querySelector(".mh-improved-mice-sidebar");
      if (existing) {
        existing.replaceWith(miceSidebar);
        return;
      }
      sidebar.append(miceSidebar);
    }), sidebar_default3 = () => __async(void 0, null, function* () {
      getSetting("no-sidebar") || (addStyles(styles_default19, "better-mice-sidebar"), updateSidebarList(), onRequest("users/getmiceeffectiveness.php", updateSidebarListFromMiceEff, !0), onRequest("users/changetrap.php", updateSidebarList, !0));
    });
  }
});

// src/modules/better-mice/styles.css
var styles_default20, init_styles21 = __esm({
  "src/modules/better-mice/styles.css"() {
    styles_default20 = `.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{font-size:11px}.mh-ui-mouse-links-map .mousehuntActionButton.tiny{margin:3px}.mouseView-movedContainer{display:flex;flex-flow:row wrap;gap:10px}.mouseview-has-mhct .mouseView-weaknessContainer{display:flex;flex-direction:column;align-items:center;width:90px}.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:155px}.mouseview-has-mhct .mouseView-statsContainer-block-padding{display:flex;flex-direction:column;align-items:center;min-width:125px;padding:10px 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:1fr 1fr 50px;gap:10px;place-items:center stretch;width:auto;padding:5px;margin:5px 0;font-size:12px}.mouseview-has-mhct .has-stages .mouse-ar-wrapper{grid-template-columns:1fr 1fr 1fr 50px}.mouseview-has-mhct .mouse-ar-wrapper div{padding:0 2px;font-size:12px}.mouseview-has-mhct .mouse-ar-wrapper div.rate{font-size:13px}.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{line-height:1.5}.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 ease-in}.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 .showLargeImage .mouseView-image:hover{transform:scale(1)}.mouseViewPopup .mouseView-image{margin-bottom:10px;transition:.2s ease-in}.mouseViewPopup .mouseView-descriptionContainer{display:grid;grid-template-columns:4fr 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:2px;align-items:center;width:auto;padding:2px 3px;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}.mouseview-relicHunter{display:flex;align-items:center;justify-content:space-around;width:100%;padding:10px;font-size:15px;background-color:#edd1f3;border-radius:10px}.mouseListView-categoryContent-subgroup-mouse-stats.catches,.mouseListView-categoryContent-subgroup-mouse-stats.misses{width:13%}.mouseListView-categoryContent-subgroup-mouse-stats.average_weight,.mouseListView-categoryContent-subgroup-mouse-stats.heaviest_catch{width:15%;text-align:center}.mouseListView-categoryContent-subgroup-mouse-stats.name{width:44%}.mouseListView-categoryContent-subgroup-mouse-thumb-name{width:auto}.mouseListView-categoryContent-filter-option:hover{color:#fff;background:#344562}.mouseListView-categoryContent-filter-option{margin-left:5px}.mouseView .mouseView-imageContainer a.custom-favorite-button{opacity:0;transition:.2s ease-in}.mouseView .mouseView-imageContainer:hover a.custom-favorite-button{opacity:1}.mouseListView-category-name{padding-left:20px}#overlayPopup.mouseViewPopup #jsDialogClose{right:6px}
`;
  }
});

// src/modules/better-mice/index.js
var getLinkMarkup4, addLinks2, isFavorite, addFavoriteButton, addMinluck, addWisdom, updateMouseView, _original, replaceShowMouseImage, main6, wisdoms, minlucks, init9, better_mice_default, init_better_mice = __esm({
  "src/modules/better-mice/index.js"() {
    init_utils2();
    init_hover_mice();
    init_mouse_page();
    init_settings8();
    init_sidebar3();
    init_styles21();
    getLinkMarkup4 = (name, id) => makeLink("MHCT AR", `https://api.mouse.rip/mhct-redirect/${id}`) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${encodeURIComponent(name.replaceAll(" ", "_"))}`, !0), addLinks2 = (id) => {
      let title = document.querySelector(".mouseView-title");
      if (!title)
        return;
      let currentLinks = document.querySelector(".mh-ui-mouse-links");
      currentLinks && currentLinks.remove();
      let div = document.createElement("div");
      div.classList.add("mh-ui-mouse-links"), div.innerHTML = getLinkMarkup4(title.innerText, id), title.parentNode.insertBefore(div, title);
      let values = document.querySelector(".mouseView-values"), desc = document.querySelector(".mouseView-descriptionContainer");
      values && desc && desc.insertBefore(values, desc.firstChild);
    }, isFavorite = (mouseId) => __async(void 0, null, function* () {
      var _a, _b, _c, _d, _e;
      let favorites = yield doRequest("managers/ajax/pages/page.php", {
        page_class: "HunterProfile",
        "page_arguments[tab]": "kings_crowns",
        "page_arguments[sub_tab]": !1,
        "page_arguments[snuid]": window.user.sn_user_id
      });
      return (_e = (_d = (_c = (_b = (_a = favorites == null ? void 0 : 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 && _e.favourite_mice.length ? favorites.page.tabs.kings_crowns.subtabs[0].mouse_crowns.favourite_mice.some((mouse) => mouse.id && mouse.id === Number.parseInt(mouseId, 10)) : !1;
    }), addFavoriteButton = (mouseId, mouseView) => __async(void 0, null, function* () {
      let state = yield isFavorite(mouseId), fave = yield makeFavoriteButton({
        target: mouseView,
        size: "large",
        isSetting: !1,
        state,
        /**
         * Save the favorite state when the button is clicked.
         */
        onChange: () => {
          doRequest("managers/ajax/mice/mouse_crowns.php", {
            action: "toggle_favourite",
            user_id: window.user.user_id,
            mouse_id: mouseId
          });
        }
      }), mouseviewImage = mouseView.querySelector(".mouseView-imageContainer");
      mouseviewImage ? mouseviewImage.append(fave) : mouseView.append(fave);
    }), addMinluck = (mouseId, mouseView) => __async(void 0, null, function* () {
      let appendTo = mouseView.querySelector(".mouseView-contentContainer");
      if (!appendTo)
        return;
      let minluckContainer = makeElement("div", "minluck-container"), 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);
      let minluckList = makeElement("ul", "minluck-list");
      minlucks || (minlucks = yield getData("minlucks"));
      let minluck = minlucks.find((m) => m.id === Number.parseInt(mouseId, 10)), mouseMinlucks = (minluck == null ? void 0 : minluck.minlucks) || {};
      Object.keys(mouseMinlucks).forEach((powerType) => {
        if (!mouseMinlucks[powerType] || mouseMinlucks[powerType] === "\u221E")
          return;
        let minluckItem = makeElement("li", "minluck-item"), 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* () {
      let values = mouseView.querySelector(".mouseView-values");
      if (!values)
        return;
      wisdoms || (wisdoms = yield getData("wisdom"));
      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* () {
      let mouseView = document.querySelector("#overlayPopup .mouseView");
      if (!mouseView)
        return;
      let mouseId = mouseView.getAttribute("data-mouse-id");
      if (!mouseId || !mouseView.querySelector(".mouseView-title"))
        return;
      let catchesEl = document.querySelectorAll(".mouseView-statsContainer-block-padding td abbr");
      catchesEl && catchesEl.length > 0 && catchesEl.forEach((el) => {
        let catchesNumber = el.getAttribute("title").replace(" Catches", "").replace(" catches", "").replace(" Misses", "").replace(" misses", "").trim();
        catchesNumber && (el.innerText = catchesNumber);
      }), addLinks2(mouseId), addFavoriteButton(mouseId, mouseView), addMinluck(mouseId, mouseView), addWisdom(mouseId, mouseView), mouseView.classList.add("mouseview-has-mhct");
      let group = document.querySelector(".mouseView-group");
      if (group) {
        group.classList.add("mouseview-title-group");
        let descContainer = document.querySelector(".mouseView-descriptionContainer");
        descContainer && (descContainer.childNodes.length > 1 ? descContainer.insertBefore(group, descContainer.childNodes[1]) : descContainer.append(group));
      }
      let groupTitle = mouseView.querySelector(".mouseView-group.mouseview-title-group");
      if (groupTitle) {
        let newHtml = groupTitle.innerHTML.replace("Group: ", ""), subGroups = newHtml.split("(");
        subGroups.length > 1 ? (newHtml = `<span class="mouseview-group">${subGroups[0]}</span><span class="mouseview-subgroup">(${subGroups[1]}</span>`, groupTitle.classList.add("mouseview-title-group-has-subgroup")) : newHtml = `<span class="mouseview-group">${newHtml}</span>`, groupTitle.innerHTML = newHtml;
      }
      let container = mouseView.querySelector(".mouseView-contentContainer");
      if (!container)
        return;
      let imageContainer = mouseView.querySelector(".mouseView-imageContainer");
      if (imageContainer) {
        let movedContainer = makeElement("div", "mouseView-movedContainer"), statsContainer = mouseView.querySelector(".mouseView-statsContainer");
        statsContainer && movedContainer.append(statsContainer);
        let weaknessContainer = mouseView.querySelector(".mouseView-weaknessContainer");
        if (weaknessContainer && (movedContainer.append(weaknessContainer), weaknessContainer.querySelectorAll(".mouseView-categoryContent-subgroup-mouse-weaknesses-padding").forEach((w) => {
          w.querySelector(".mouseView-weakness") || (w.classList.add("mouseview-weakness-empty"), w.classList.add("hidden"));
        })), Number.parseInt(mouseId, 10) === 401) {
          let location2 = yield getRelicHunterLocation();
          if (location2 && location2.name) {
            let relicHunterBox = makeElement("div", ["mouseview-relicHunter", "mouseview-relicHunter"]);
            makeElement("div", "hint", location2.name, relicHunterBox);
            let button = makeElement("div", ["mousehuntActionButton", "small"]);
            makeElement("span", "", "Travel", button), button.addEventListener("click", () => {
              app.pages.TravelPage.travel(location2.id), setPage("Camp");
            }), relicHunterBox.append(button), movedContainer.append(relicHunterBox);
          }
        }
        imageContainer.append(movedContainer);
      }
      if (!getSetting("better-mice.show-attraction-rates", !0))
        return;
      let arWrapper = makeElement("div", "ar-wrapper"), title = makeElement("div", "ar-header"), 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" rel="noopener noreferrer">MHCT</a>.'
      });
      let link = makeElement("a", "ar-link", "View on MHCT \u2192");
      link.href = `https://api.mouse.rip/mhct-redirect/${mouseId}`, link.target = "_mhct", title.append(link), arWrapper.append(title);
      let mhctJson = yield getArForMouse(mouseId, "mouse");
      if (!mhctJson || mhctJson === void 0 || mhctJson.length === 0 || "error" in mhctJson)
        return;
      mhctJson = mhctJson.slice(0, 15);
      let miceArWrapper = makeElement("div", "mice-ar-wrapper"), hasStages = mhctJson.some((mouseAr) => mouseAr.stage);
      hasStages && miceArWrapper.classList.add("has-stages");
      let calculateWidths = (weights) => {
        weights = __spreadValues({
          average: 0.8,
          median: 0.5,
          max: 0.4,
          shortest: 0.9,
          location: 0.4,
          stage: 0.6,
          cheese: 0.6,
          keyWidth: 10
        }, weights);
        let availableWidth = 390 - 10 * 3 - (hasStages ? 10 : 0), calculateLengths = (key) => {
          let keyLengths = mhctJson.map((mouseAr) => {
            var _a;
            return ((_a = mouseAr[key]) == null ? void 0 : _a.length) || 0;
          }).filter((l) => l > 0);
          keyLengths.sort((a, b) => a - b);
          let avgLength = keyLengths.reduce((a, b) => a + b, 0) / keyLengths.length, medianLength = keyLengths.length % 2 === 0 ? (keyLengths[keyLengths.length / 2 - 1] + keyLengths[keyLengths.length / 2]) / 2 : keyLengths[Math.floor(keyLengths.length / 2)];
          return {
            avg: avgLength * weights.keyWidth,
            median: medianLength * weights.keyWidth,
            max: Math.max(...keyLengths) * weights.keyWidth,
            shortest: Math.min(...keyLengths) * weights.keyWidth
          };
        }, lengths = {
          location: calculateLengths("location"),
          stage: hasStages ? calculateLengths("stage") : { avg: 1, median: 1, max: 1, shortest: 1 },
          cheese: calculateLengths("cheese")
        }, weightedWidths = {
          location: (lengths.location.avg * weights.average + lengths.location.max * weights.max + lengths.location.median * weights.median + lengths.location.shortest * weights.shortest) * weights.location,
          stage: hasStages ? (lengths.stage.avg * weights.average + lengths.stage.max * weights.max + lengths.stage.median * weights.median + lengths.stage.shortest * weights.shortest) * weights.stage : 0,
          cheese: (lengths.cheese.avg * weights.average + lengths.cheese.max * weights.max + lengths.cheese.median * weights.median + lengths.cheese.shortest * weights.shortest) * weights.cheese
        }, totalWeightedWidth = weightedWidths.location + weightedWidths.stage + weightedWidths.cheese, calculateOptimalWidth = (key) => {
          let optimalWidth = weightedWidths[key] / totalWeightedWidth * availableWidth;
          return Math.floor(optimalWidth);
        };
        return {
          locationWidth: calculateOptimalWidth("location"),
          stageWidth: hasStages ? calculateOptimalWidth("stage") : 0,
          cheeseWidth: calculateOptimalWidth("cheese")
        };
      }, locationWidth, stageWidth, cheeseWidth;
      if (!getFlag("better-mice.new-ar-widths")) {
        let widths = calculateWidths();
        locationWidth = widths.locationWidth, stageWidth = widths.stageWidth, cheeseWidth = widths.cheeseWidth;
      }
      mhctJson.forEach((mouseAr) => {
        let mouseArWrapper = makeElement("div", "mouse-ar-wrapper");
        getFlag("better-mice.new-ar-widths") || (mouseArWrapper.style.gridTemplateColumns = hasStages ? `${locationWidth}px ${stageWidth}px ${cheeseWidth}px 50px` : `${locationWidth}px ${cheeseWidth}px 50px`), makeElement("div", "location", mouseAr.location, mouseArWrapper), hasStages && makeElement("div", "stage", mouseAr.stage ? mouseAr.stage.replace("/", " / ").replace("  /  ", " / ") : "", mouseArWrapper), makeElement("div", "cheese", mouseAr.cheese, mouseArWrapper), makeElement("div", "rate", `${(mouseAr.rate / 100).toFixed(2)}%`, mouseArWrapper), miceArWrapper.append(mouseArWrapper);
      }), mhctJson.length > 0 && (arWrapper.append(miceArWrapper), container.append(arWrapper));
    }), replaceShowMouseImage = () => {
      _original || (_original = hg.views.MouseCrownsView.showMouseImage, hg.views.MouseCrownsView.showMouseImage = (element) => {
        let type = element.getAttribute("data-mouse-type");
        if (type) {
          hg.views.MouseView.show(type);
          return;
        }
        _original(element);
      });
    }, main6 = () => __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",
        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",
        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",
        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",
        href: "https://www.mousehuntgame.com/adversaries.php?tab=kings_crowns"
      });
    }), init9 = () => __async(void 0, null, function* () {
      addStyles(styles_default20, "better-mice"), main6(), mouse_page_default(), getSetting("better-mice.show-mouse-hover", !0) && hover_mice_default(), getSetting("better-mice.show-mice-sidebar", !0) && sidebar_default3(), replaceShowMouseImage();
    }), better_mice_default = {
      id: "better-mice",
      name: "Better Mice",
      type: "better",
      default: !0,
      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,
      settings: settings_default7
    };
  }
});

// src/modules/better-quests/settings/index.js
var settings_default8, init_settings9 = __esm({
  "src/modules/better-quests/settings/index.js"() {
    settings_default8 = () => __async(void 0, null, function* () {
      return [{
        id: "better-quests.m400-helper",
        title: "M400 Helper",
        default: !0,
        description: 'Adds a "Travel to next step" button to the M400 quest'
      }];
    });
  }
});

// src/modules/better-quests/modules/m400/index.js
var renderButton, main7, m400_default, init_m400 = __esm({
  "src/modules/better-quests/modules/m400/index.js"() {
    init_utils2();
    renderButton = (location2) => {
      let title = document.querySelector(".campPage-quests-title");
      if (!title)
        return;
      let existingButton = document.querySelector("#mh-improved-m400-travel");
      existingButton && existingButton.remove();
      let button = makeElement("div", ["mousehuntActionButton", "tiny", "mh-m400-travel", `mh-m400-travel-${location2}`]);
      button.id = "mh-improved-m400-travel", location2 === getCurrentLocation() && button.classList.add("disabled"), makeElement("span", "mousehuntActionButton-text", "Travel to next step", button), button.setAttribute("data-location", location2), button.addEventListener("click", (e) => {
        let clickedLocation = e.target.getAttribute("data-location");
        if (!clickedLocation) {
          let parent = e.target.parentElement;
          if (!parent)
            return;
          clickedLocation = parent.getAttribute("data-location");
        }
        travelTo(clickedLocation), setPage("Camp", null, () => {
        });
      }), title.append(button);
    }, main7 = () => __async(void 0, null, function* () {
      var _a, _b, _c;
      if (!document.querySelector(".campPage-quests-title") || !(((_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)))
        return;
      let container = document.querySelector(".campPage-quests-container");
      if (!container)
        return;
      container.classList.add("mh-m400-quest");
      let allTasks = document.querySelectorAll(".campPage-quests-objective-container");
      if (!allTasks)
        return;
      let taskNames = document.querySelectorAll(".campPage-quests-objective-task");
      taskNames && taskNames.forEach((task) => {
        let newText = task.innerText.replaceAll("Collect 1 Piece of M400 Intel", "Collect Intel");
        task.innerText = newText;
      });
      let last = [...allTasks].reverse().find((task) => !task.classList.contains("locked") && !task.classList.contains("complete"));
      if (!last)
        return;
      let objective = last.querySelector(".campPage-quests-objective-task");
      if (!objective)
        return;
      let location2 = objective.innerText.split(" in ");
      if (location2.length === 1 && (location2 = objective.innerText.split(" from ")), location2.length === 1)
        return;
      location2 = location2[1].replace("Mice", "").replace("the ", "").trim();
      let locations = yield getData("m400-locations"), locationKey = Object.keys(locations).find((key) => locations[key].includes(location2));
      locationKey && renderButton(locationKey);
    }), m400_default = () => __async(void 0, null, function* () {
      main7(), onNavigation(main7, {
        page: "camp"
      });
    });
  }
});

// src/modules/better-quests/styles.css
var styles_default21, init_styles22 = __esm({
  "src/modules/better-quests/styles.css"() {
    styles_default21 = `#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{display:flex;flex-direction:column;align-items:center;width:50px}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .image img{width:40px;height:40px;margin:0}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content b{display:block;padding:5px 0;font-size:12px;color:#000}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content{display:block;width:auto;padding:0;margin-left:10px;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:grid;grid-template-columns:1fr 5fr 2fr;place-items:center;align-items:start;padding-bottom:10px}#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}.mh-ui-assignment-meta,.mh-ui-assignment-price{display:flex;flex-direction:column;align-items:center}.mh-ui-assignment-meta-wrapper{display:grid;grid-template-columns:1fr 1fr;gap:9px;place-items:center stretch}.mh-ui-assignment-wiki-button{grid-column:span 2;text-align:center}.mh-ui-assignment-price-value{font-size:13px;font-weight:900}#overlayPopup.zugzwangsLibraryQuestShopPopup .questResources{padding:5px 0}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .image img.disabled[src=""]{display:none}.questLink .mousehuntActionButton.lightBlue{padding:2px 8px;margin-left:-4px;font-size:12px;font-weight:100}.mh-ui-assignment-price-label{text-decoration:underline;text-decoration-color:#ccc}.mh-ui-assignment-details-summary{padding:5px 0;font-size:12px;color:#000}#overlayPopup.zugzwangsLibraryQuestShopPopup .questResources .mh-ui-quest-resources:hover{cursor:pointer;background-color:#dfdfdf;border-radius:6px;box-shadow:-1px 1px 0 3px #dfdfdf}h4.mh-ui-assignment-details-title{padding:3px 0;font-size:13px;text-decoration:underline}ul.mh-ui-assignment-details-task-list{margin-left:20px;line-height:1.5;list-style:disc}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .image,.mh-ui-assignment-meta-wrapper{margin-top:10px}.mh-ui-assignment-details-task-title{margin:3px 0}#overlayPopup.zugzwangsLibraryQuestShopPopup #jsDialogAjaxPrefix{border:none}
`;
  }
});

// src/data/library-assignments.json
var library_assignments_default, init_library_assignments = __esm({
  "src/data/library-assignments.json"() {
    library_assignments_default = {
      library_intro_research_assignment_convertible: {
        name: "Catalog Library Mice",
        cost: 0,
        rewardPoints: 20,
        rewards: ["Yellow Tome of Wisdom", "Wealth Charms"],
        assignments: [
          {
            name: "Catalog Library Assignment",
            tasks: [
              {
                title: "All seven of the following:",
                text: [
                  "1 Bookborn Mouse",
                  "1 Effervescent Mouse",
                  "1 Explorator Mouse",
                  "1 Flutterby Mouse",
                  "1 Infiltrator Mouse",
                  "1 Pocketwatch Mouse",
                  "1 Walker Mouse"
                ]
              }
            ]
          }
        ]
      },
      library_research_assignment_convertible: {
        name: "Library Research",
        cost: 20,
        rewardPoints: 30,
        rewards: ["Yellow Tome of Wisdom", "Green Tome of Wisdom", "Purple Tome of Wisdom", "Wealth Charms"],
        assignments: [
          {
            name: "Library Mice Assignment",
            tasks: [
              {
                title: "Two of the following:",
                text: [
                  "1 Bookborn Mouse",
                  "1 Flutterby Mouse",
                  "1 Steam Grip Mouse",
                  "1 Tome Sprite Mouse",
                  "1 Scribe Mouse"
                ]
              },
              {
                title: "Three of the following:",
                text: [
                  "2 Effervescent Mice",
                  "2 Explorator Mice",
                  "2 Infiltrator Mice",
                  "2 Pocketwatch Mice",
                  "2 Walker Mice"
                ]
              }
            ]
          },
          {
            name: "Library Power Type Assignment",
            tasks: [
              {
                title: "Three of the following:, with at least one task for both trap power types",
                text: [
                  "1 Effervescent Mouse using a Physical trap",
                  "1 Infiltrator Mouse using a Physical trap",
                  "1 Scribe Mouse using a Physical trap",
                  "1 Steam Grip Mouse using a Physical trap",
                  "1 Walker Mouse using a Physical trap",
                  "3 Explorator Mice using a Physical trap",
                  "3 Pocketwatch Mice using a Physical trap",
                  "1 Bookborn Mouse using a Tactical trap",
                  "1 Flutterby Mouse using a Tactical trap",
                  "2 Effervescent Mice using a Tactical trap",
                  "2 Infiltrator Mice using a Tactical trap",
                  "2 Walker Mice using a Tactical trap"
                ]
              }
            ]
          }
        ]
      },
      zugzwang_research_assignment_convertible: {
        name: "Zugzwang Research",
        cost: 50,
        rewardPoints: 80,
        rewards: [
          "Blue Tome of Wisdom",
          "Wealth Charms",
          "Amplifier Charms",
          "Rook Crumble Charms",
          "Spellbook Charms",
          "Mystic Curd",
          "Technic Cheese Mould"
        ],
        assignments: [
          {
            name: "Seasonal Garden Assignment",
            tasks: [
              {
                title: "Two of the following:",
                text: [
                  "10 mice in the Seasonal Garden using a Tactical trap",
                  "10 mice in the Seasonal Garden using Luck Charm",
                  "20 mice in the Seasonal Garden",
                  "20 mice in the Seasonal Garden using Power Charm",
                  "30 mice in the Seasonal Garden using Lucky Power Charm",
                  "30 mice in the Seasonal Garden using Bamboozler Base",
                  "40 mice in the Seasonal Garden"
                ]
              },
              {
                title: "Three of the following: (Winter)",
                text: [
                  "1 Winter Mage Mouse using Ancient Spear Gun",
                  "2 Frostbite Mice",
                  "3 Penguin Mice using a Hydro trap"
                ]
              },
              {
                title: "Three of the following: (Spring)",
                text: [
                  "1 Derpicorn Mice using a Tactical trap",
                  "1 Vinetail Mouse",
                  "3 Hydrophobe Mice using Aqua Base",
                  "3 Tanglefoot Mice using a Physical trap"
                ]
              },
              {
                title: "Three of the following: (Summer)",
                text: [
                  "1 Summer Mage Mouse",
                  "3 Firefly Mice using Horrific Venus Mouse Trap",
                  "3 Monarch Mice using a Tactical trap",
                  "3 Stinger Mice"
                ]
              },
              {
                title: "Three of the following: (Fall)",
                text: [
                  "1 Fall Familiar Mouse",
                  "1 Harvester Mouse",
                  "1 Whirleygig Mice using a Tactical trap",
                  "1 Fall Familiar Mouse",
                  "1 Harvester Mouse",
                  "1 Whirleygig Mice using a Tactical trap",
                  "4 Harvest Harrier Mice",
                  "4 Pumpkin Head Mice using a Shadow trap"
                ]
              }
            ]
          },
          {
            name: "Mystic King Assignment",
            tasks: [
              {
                title: "One of the following:",
                text: ["10 Mice in the Seasonal Garden using a Tactical trap", "30 Mice in the Seasonal Garden"]
              },
              {
                title: "One of the following:",
                text: [
                  "1 Mouse in the Seasonal Garden using Zugzwang's First Move",
                  "10 Mice in the Seasonal Garden using the Bamboozler Base",
                  "10 Mice in the Seasonal Garden using Zugzwang's Last Move"
                ]
              },
              {
                title: "One of the following:",
                text: ["8 Mystic Pawns", "8 Mystic Pawns using Wooden Base with Target"]
              },
              {
                title: "One of the following:",
                text: ["2 Mystic Knight Mice", "2 Mystic Bishop Mice"]
              },
              {
                title: "",
                text: ["1 Mystic King Mouse"]
              }
            ]
          },
          {
            name: "Technic King Assignment",
            tasks: [
              {
                title: "One of the following:",
                text: ["10 Mice in the Seasonal Garden using a Tactical trap", "30 Mice in the Seasonal Garden"]
              },
              {
                title: "One of the following:",
                text: [
                  "1 Mouse in the Seasonal Garden using Zugzwang's First Move",
                  "10 Mice in the Seasonal Garden using the Bamboozler Base",
                  "10 Mice in the Seasonal Garden using Zugzwang's Last Move"
                ]
              },
              {
                title: "One of the following:",
                text: ["8 Technic Pawns", "8 Technic Pawns using Wooden Base with Target"]
              },
              {
                title: "One of the following:",
                text: ["2 Technic Knight Mice", "2 Technic Bishop Mice"]
              },
              {
                text: ["1 Technic King Mouse"]
              }
            ]
          }
        ]
      },
      furoma_research_assignment_convertible: {
        name: "Furoma Research",
        cost: 130,
        rewardPoints: 90,
        rewards: [
          "Purple Tome of Wisdom",
          "Wealth Charms",
          "Token of the Cheese Belt",
          "Token of the Cheese Claw",
          "Token of the Cheese Fang",
          "Master Belt Shard",
          "Master Claw Shard",
          "Master Fang Shard",
          "Rumble Cheese",
          "Maki Cheese",
          "Onyx Stone"
        ],
        assignments: [
          {
            name: "Furoma Assignment",
            tasks: [
              {
                title: "One of the following:",
                text: [
                  "3 Mice in the Training Grounds using Zugzwang's Last Move",
                  "15 Archer Mice in the Training Grounds",
                  "40 Mice in the Training Grounds using Bamboozler Base",
                  "50 Mice using a Tactical trap"
                ]
              },
              {
                title: "One of the following:",
                text: ["3 Kung Fu Mice in the Dojo", "3 Ninja Mice in the Dojo", "3 Samurai Mice in the Dojo"]
              },
              {
                title: "One of the following:",
                text: [
                  "1 Diamond Mice in the Dojo using Power Charm",
                  "1 Gold Mouse in the Dojo using Luck Charm",
                  "1 Hapless Mouse in the Dojo",
                  "10 Hapless Mice",
                  "10 Hapless Mice using Bamboozler Base"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "1 Student of the Cheese Belt Mouse using Maki Cheese",
                  "1 Student of the Cheese Fang Mouse using Maki Cheese",
                  "1 Student of the Cheese Claw Mouse using Maki Cheese",
                  "3 Students of the Cheese Belt Mouse",
                  "3 Students of the Cheese Fang Mouse",
                  "3 Students of the Cheese Claw Mouse",
                  "1 Master of the Dojo Mouse"
                ]
              }
            ]
          },
          {
            name: "Pagoda Assignment",
            tasks: [
              {
                title: "One of the following:",
                text: [
                  "6 Students of the Cheese Belt Mouse",
                  "1 Students of the Cheese Belt Mouse using Zugzwang's Last Move"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "6 Students of the Cheese Fang Mice",
                  "1 Students of the Cheese Fang Mice using Zugzwang's Last Move"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "6 Students of the Cheese Claw Mouse",
                  "1 Students of the Cheese Claw Mice using Zugzwang's Last Move"
                ]
              },
              { text: ["1 Masters of the Cheese Belt Mouse"] },
              { text: ["1 Masters of the Cheese Fang Mouse"] },
              { text: ["1 Masters of the Cheese Claw Mouse"] },
              {
                title: "One of the following:",
                text: [
                  "1 Master of the Dojo Mouse",
                  "1 Master of the Dojo Mouse using Ambush (Ninja Ambush Trap cannot be used to complete this task)",
                  "1 Master of the Dojo Mouse using Zugzwang's First Move"
                ]
              }
            ]
          },
          {
            name: "Dojo Sensei Assignment",
            tasks: [
              {
                title: "One of the following:",
                text: [
                  "2 Students of the Cheese Belt Mouse using Onyx Mallet",
                  "2 Students of the Cheese Fang Mouse using Onyx Mallet",
                  "2 Students of the Cheese Claw Mouse using Onyx Mallet"
                ]
              },
              { text: ["8 Masters of the Cheese Belt Mouse"] },
              { text: ["8 Masters of the Cheese Fang Mouse"] },
              { text: ["8 Masters of the Cheese Claw Mouse"] },
              {
                title: "One of the following:",
                text: [
                  "2 Masters of the Dojo Mouse",
                  "2 Masters of the Dojo Mouse using Ambush (Ninja Ambush Trap cannot be used to complete this task)",
                  "2 Masters of the Dojo Mouse using Zugzwang's First Move"
                ]
              },
              { text: ["1 Dojo Sensei"] }
            ]
          }
        ]
      },
      adv_zugzwang_research_assignment_convertible: {
        name: "Advanced Zugzwang Research",
        cost: 150,
        rewardPoints: 150,
        rewards: [
          "Purple Tome of Wisdom",
          "Wealth Charms",
          "Amplifier Charms",
          "Rook Crumble Charms",
          "Spellbook Charms",
          "Checkmate cheese",
          "Mystic Curd",
          "Technic Cheese Mould"
        ],
        assignments: [
          {
            name: "Mystic Amplifier Assignment",
            tasks: [
              {
                title: "One of the following:",
                text: [
                  "30 Mice in the Seasonal Garden using a Tactical trap",
                  "30 Mice in the Seasonal Garden using Zugzwang's First Move",
                  "8 Mystic Pawns using Mystic Pawn Pincher"
                ]
              },
              {
                title: "One of the following:",
                text: ["1 Mystic Queen using Checkmate Cheese", "1 Mystic King using Checkmate Cheese", "1 Chess Master"]
              }
            ],
            info: "More Info: MouseHunt Info Page"
          },
          {
            name: "Technic Amplifier Assignment",
            tasks: [
              {
                title: "One of the following:",
                text: [
                  "30 Mice in the Seasonal Garden using a Tactical trap",
                  "30 Mice in the Seasonal Garden using Zugzwang's First Move",
                  "8 Technic Pawns using Technic Pawn Pincher"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "1 Technic Queen using Checkmate Cheese",
                  "1 Technic King using Checkmate Cheese",
                  "1 Chess Master"
                ]
              }
            ]
          },
          {
            name: "Advanced Amplifier Assignment",
            tasks: [
              {
                title: "One of the following:",
                text: [
                  "30 Mice in the Seasonal Garden using Spellbook Base",
                  "30 Mice in the Seasonal Garden using Zugzwang's First Move"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "1 Mystic King Mouse using Checkmate Cheese",
                  "1 Mystic King Mouse using Blackstone Pass Trap and Checkmate Cheese"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "1 Technic King Mouse using Checkmate Cheese",
                  "1 Technic King Mouse using Obvious Ambush Trap and Checkmate Cheese",
                  "1 Chess Master"
                ]
              }
            ]
          }
        ]
      },
      zurreal_trap_research_convertible: {
        name: "Zurreal Trap Research",
        cost: 900,
        rewardPoints: 400,
        assignments: [
          {
            name: "",
            tasks: [
              {
                title: "All ten of the following:",
                text: [
                  "Collect 1 Desert Travel Almanac from Centaur Mice (in the Great Gnarled Tree or Lagoon)",
                  "Collect 1 Encyclopedia Gnawnia from Master Burglar Mice in the Town of Gnawnia",
                  "Collect 6 Luscious Lumbers in the Training Grounds (from Kung Fu, Monk, and Samurai mouse)",
                  "Collect 1 Mesh Netting in S.S. Huntington IV (from Leviathan and Squeaken mouse)",
                  "Collect 3 Ectoplasmic Essence from Ghost Mice in the Mousoleum",
                  "Collect 3 Warp Nails from Realm Rippers (in the Forbidden Grove)",
                  "Collect 3 Runestones from Stonework Warrior Mice (in the Jungle of Dread with Magical Havarti)",
                  "Collect 1 Draconic Book from Whelpling Mice (in Dracano)",
                  "Collect 1 Lich Jewel in the Balack's Cove (from Balack the Banished, Derr Lich, Elub Lich and Nerg Lich mouse)",
                  "Craft 1 Zurreal's Folly"
                ]
              }
            ]
          }
        ]
      },
      library_m400_bait_assignment_convertible: {
        name: "M400 Bait Research Assignment",
        cost: 1500,
        rewardPoints: 200,
        assignments: [
          {
            name: "",
            tasks: [
              {
                title: "Collect 2 Aged Grape Juice from one of the following:",
                text: [
                  "Derr Lich Mice",
                  "Dojo Sensei Mice",
                  "Draconic Warden Mice",
                  "Elub Lich Mice",
                  "Ethereal Librarian Mice",
                  "Gate Guardian Mice",
                  "Keeper Mice",
                  "Market Guard Mice",
                  "Market Thief Mice",
                  "Master Burglar Mice",
                  "Mystic Bishop Mice",
                  "Nerg Lich Mice",
                  "Pie Thief Mice",
                  "Prospector Mice",
                  "Pygmy Wrangler Mice",
                  "Ruffian Mice",
                  "Saloon Gal Mice",
                  "Strawberry Hotcakes Mice",
                  "Swarm of Pygmy Mice",
                  "Technic Bishop Mice",
                  "Terra Mice"
                ]
              },
              {
                title: "Collect 3 Cheddar Powder from one of the following:",
                text: [
                  "Burglar Mice",
                  "Calalilly Mice",
                  "Effervescent Mice",
                  "Ethereal Thief Mice",
                  "Granite Mice",
                  "Lasso Cowgirl Mice",
                  "Lumberjack Mice",
                  "Master of the Cheese Belt Mice",
                  "Polar Bear Mice",
                  "Quesodillo Mice",
                  "Snow Slinger Mice"
                ]
              },
              {
                title: "Collect 3 Gooey Gruyere Curds from one of the following:",
                text: [
                  "Ethereal Enchanter Mice",
                  "Glass Blower Mice",
                  "Kung Fu Mice",
                  "Master of the Cheese Claw Mice",
                  "Samurai Mice",
                  "Sand Pilgrim Mice",
                  "Shopkeeper Mice",
                  "Snow Soldier Mice",
                  "Thistle Mice",
                  "Walker Mice",
                  "Zombie Mice"
                ]
              },
              {
                title: "Collect 3 Microchip Curds from one of the following:",
                text: [
                  "Archer Mice",
                  "Bark Mice",
                  "Bionic Mice",
                  "Ethereal Engineer Mice",
                  "Knight Mice",
                  "Limestone Miner Mice",
                  "Master of the Cheese Fang Mice",
                  "Page Mice",
                  "Phalanx Mice",
                  "Pocketwatch Mice",
                  "Ravenous Zombie Mice",
                  "Spiky Devil Mice",
                  "Stealth Mice",
                  "Tumbleweed Mice"
                ]
              },
              {
                title: "Collect 1 Nuclear Garlic from one of the following:",
                text: [
                  "Blacksmith Mice",
                  "Dunehopper Mice",
                  "Gorgon Mice",
                  "Lambent Crystal Mice",
                  "Lycan Mice",
                  "Mage Weaver Mice",
                  "Master of the Dojo Mice",
                  "Monster Mice",
                  "Pyrite Mice",
                  "Realm Ripper Mice",
                  "Shroom Mice",
                  "Tome Sprite Mice",
                  "Whelpling Mice"
                ]
              }
            ]
          }
        ]
      },
      library_m400_assignment_convertible: {
        name: "M400 Hunting Research Assignment",
        cost: 1900,
        rewardPoints: 300,
        assignments: [
          {
            name: "",
            tasks: [
              {
                title: "One of the following:",
                text: [
                  "Collect intel from Grunt Mice in the Derr Dunes",
                  "Collect intel from Guardian Mice in the Derr Dunes",
                  "Collect intel from Lycan Mice in the Catacombs",
                  "Collect intel from Renegade Mice in the Derr Dunes",
                  "Collect intel from Seer Mice in the Derr Dunes",
                  "Collect intel from Terror Knight Mice in the Catacombs",
                  "Collect intel from Trailblazer Mice in the Derr Dunes",
                  "Collect intel in the Seasonal Garden"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "Collect intel from Prospector Mice in the Claw Shot City",
                  "Collect intel from Ruffian Mice in the Claw Shot City",
                  "Collect intel from Sand Colossus Mice in the Sand Crypts",
                  "Collect intel from Scarab Mice in the Sand Crypts",
                  "Collect intel from Serpentine Mice in the Sand Crypts",
                  "Collect intel in the Iceberg"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "Collect intel from Conjurer Mice in the Nerg Plains",
                  "Collect intel from Conqueror Mice in the Nerg Plains",
                  "Collect intel from Defender Mice in the Nerg Plains",
                  "Collect intel from Finder Mice in the Nerg Plains",
                  "Collect intel from Master of the Cheese Belt Mice in the Meditation Room",
                  "Collect intel from Master of the Cheese Claw Mice in the Meditation Room",
                  "Collect intel from Master of the Cheese Fang Mice in the Meditation Room",
                  "Collect intel from Mystic Mice in the Elub Shore",
                  "Collect intel from Pack Mice in the Elub Shore",
                  "Collect intel from Pathfinder Mice in the Nerg Plains",
                  "Collect intel from Protector Mice in the Elub Shore",
                  "Collect intel from Scout Mice in the Elub Shore",
                  "Collect intel from Vanquisher Mice in the Elub Shore"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "Collect intel from Buccaneer Mice in the S.S. Huntington IV",
                  "Collect intel from Captain Mice in the S.S. Huntington IV",
                  "Collect intel from Ninja Mice in the Training Grounds",
                  "Collect intel in the Fiery Warpath"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "Collect intel from Cavalier Mice in the King's Gauntlet",
                  "Collect intel from Chipper Mice in the Slushy Shoreline",
                  "Collect intel from Master Burglar Mice in the Bazaar",
                  "Collect intel from Snow Slinger Mice in the Slushy Shoreline",
                  "Collect intel from Snow Sniper Mice in the Slushy Shoreline",
                  "Collect intel from Snow Soldier Mice in the Slushy Shoreline",
                  "Collect intel from Yeti Mice in the Slushy Shoreline"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "Collect intel from Grubling Herder Mice in the Sand Dunes",
                  "Collect intel from Magma Carrier Mice in the Jungle of Dread",
                  "Collect intel from Primal Mice in the Jungle of Dread",
                  "Collect intel from Sand Pilgrim Mice in the Sand Dunes",
                  "Collect intel from Stonework Warrior Mice in the Jungle of Dread"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "Collect intel from Barkshell Mice in the Twisted Garden",
                  "Collect intel from Camofusion Mice in the Twisted Garden",
                  "Collect intel from Cursed Librarian Mice in the Cursed City",
                  "Collect intel from Cursed Enchanter Mice in the Cursed City",
                  "Collect intel from Essence Collector Mice in the Lost City",
                  "Collect intel from Essence Guardian Mice in the Cursed City",
                  "Collect intel from Ethereal Enchanter Mice in the Lost City",
                  "Collect intel from Ethereal Librarian Mice in the Lost City",
                  "Collect intel from Thorn Mice in the Twisted Garden",
                  "Collect intel from Twisted Hotcakes Mice in the Twisted Garden"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "Collect intel from Bark Mice in the Living Garden",
                  "Collect intel from Blacksmith Mice in the Muridae Market",
                  "Collect intel from Camoflower Mice in the Living Garden",
                  "Collect intel from Mage Weaver Mice in the Muridae Market",
                  "Collect intel from Market Guard Mice in the Muridae Market",
                  "Collect intel from Realm Ripper Mice in the Forbidden Grove",
                  "Collect intel from Spice Merchant Mice in the Muridae Market",
                  "Collect intel from Strawberry Hotcakes Mice in the Living Garden",
                  "Collect intel from Thistle Mice in the Living Garden"
                ]
              },
              {
                title: "One of the following:",
                text: [
                  "Collect intel from Bionic Mice in the Meadow",
                  "Collect intel from Derr Lich Mice in the Balack's Cove",
                  "Collect intel from Draconic Warden Mice in the Dracano",
                  "Collect intel from Elub Lich Mice in the Balack's Cove",
                  "Collect intel from Gate Guardian Mice in the Acolyte Realm",
                  "Collect intel from Master of the Dojo Mice in the Pinnacle Chamber",
                  "Collect intel from Mystic Knight Mice in the Zugzwang\u2019s Tower",
                  "Collect intel from Sorcerer Mice in the Acolyte Realm",
                  "Collect intel from Technic Knight Mice in the Zugzwang\u2019s Tower"
                ]
              },
              {
                title: "1 M400 using Fusion Fondue"
              }
            ]
          }
        ]
      }
    };
  }
});

// src/modules/better-quests/index.js
var questAssignments, updateObjectiveFooterDisplay, addQuestsTab, addQuestTabEventListener, addResearchSmashWarning, moveErrorText, removeSmashText, updateAssignmentList, modifyAvailableQuestsPopup, checkForQuestSmash, restoreQuestTabAfterSmash, m400IfEnabled, main8, init10, better_quests_default, init_better_quests = __esm({
  "src/modules/better-quests/index.js"() {
    init_utils2();
    init_settings9();
    init_m400();
    init_styles22();
    init_library_assignments();
    questAssignments = /* @__PURE__ */ new Set([
      "charming_study_hween2014_assignment_quest_item",
      "double_run_advanced_research_quest",
      "extra_spooky_hween2014_assignment_quest_item",
      "furoma_research_quest_item",
      "hg_letter_research_quest_item",
      "lab_monster_1_quest_item",
      "library_adv_hween2013_research_quest_item",
      "library_catalog_quest_item",
      "library_hween2013_research_quest_item",
      "library_m400_bait_research_quest_item",
      "library_m400_research_quest_item",
      "library_mice_research_quest_item",
      "library_power_type_research_quest_item",
      "mystic_advanced_research_quest_item",
      "mystickingresearch_quest_item",
      "pagoda_advanced_research_quest_item",
      "pagoda_research_quest_item",
      "seasonalgardenresearch_quest_item",
      "tech_advanced_research_quest_item",
      "techkingresearch_quest_item",
      "zurreal_trap_research_quest_item"
    ]), updateObjectiveFooterDisplay = () => {
      let footerText = document.querySelector(".campPage-quests-footer-smash");
      if (!footerText)
        return;
      let 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 "), footerText.addEventListener("click", (e) => {
        e.preventDefault();
        let assignment = Object.values(user.quests).find((quest) => quest.is_assignment && quest.type.endsWith("_quest_item"));
        assignment && (e.target.classList.add("inventoryPage-item"), e.target.setAttribute("data-item-type", assignment.type), e.target.setAttribute("data-produced-item", "nothing_stat_item"), app.pages.InventoryPage.showConfirmPopup(e.target, "hammer"), e.target.classList.remove("inventoryPage-item"));
      });
    }, addQuestsTab = () => {
      let tabs = document.querySelector(".campPage-tabs-tabRow");
      if (!tabs || tabs.querySelector('a[data-tab="quests"]'))
        return;
      let newQuestsButton = makeElement("a", ["campPage-tabs-tabHeader", "quests"]);
      newQuestsButton.setAttribute("data-tab", "quests"), newQuestsButton.addEventListener("click", () => {
        hg.views.HeadsUpDisplayZugswangLibraryView.showPopup();
      }), makeElement("span", "", "Quests", newQuestsButton), tabs.insertBefore(newQuestsButton, tabs.lastChild);
    }, addQuestTabEventListener = () => {
      let questTabContent = document.querySelector('.campPage-tabs-tabContent[data-tab="quests"]');
      if (!questTabContent)
        return;
      new MutationObserver(() => {
        updateObjectiveFooterDisplay(), m400IfEnabled();
      }).observe(questTabContent, { childList: !0 });
    }, addResearchSmashWarning = () => {
      let existing = document.querySelector("#mh-research-smash-warning");
      if (existing && existing.remove(), getCurrentSubtab() !== "hammer")
        return;
      let confirm2 = document.querySelector(".inventoryPage-confirmPopup");
      if (!confirm2)
        return;
      let type = confirm2.getAttribute("data-item-type");
      if (!type || !questAssignments.has(type))
        return;
      let 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 = () => {
      let errorTextEl = document.querySelectorAll(".questLink .requirements .error");
      if (!errorTextEl)
        return;
      let errorText = "";
      if (errorTextEl.forEach((el) => {
        el.innerText && (errorText = el.innerText), el.classList.add("hidden");
      }), !errorText)
        return;
      errorText = errorText.replace(/ \d\d seconds/, "").replace(" before taking", " for");
      let titleBar = document.querySelector("#jsDialogAjaxPrefix h2");
      if (!titleBar)
        return;
      let titleError = makeElement("h3", "errorText", errorText);
      titleBar.parentNode.insertBefore(titleError, titleBar.nextSibling);
    }, removeSmashText = () => {
      let smashText = document.querySelector(".smashQuest");
      smashText && smashText.classList.add("hidden");
    }, updateAssignmentList = () => __async(void 0, null, function* () {
      let assignmentList = document.querySelectorAll("#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink");
      if (!assignmentList)
        return;
      assignmentList.forEach((questLink) => {
        let type = questLink.getAttribute("data-quest-type");
        if (!type) {
          let onclickAttr = questLink.getAttribute("onclick") || "";
          if (!onclickAttr.includes("hg.views.HeadsUpDisplayZugswangLibraryView.showConfirm") || (type = onclickAttr.replace("hg.views.HeadsUpDisplayZugswangLibraryView.showConfirm('", "").replace("'); return false;", ""), !type))
            return;
        }
        questLink.removeAttribute("onclick");
        let actionButton = questLink.querySelector(".actions .mousehuntActionButton");
        actionButton && actionButton.setAttribute("onclick", `hg.views.HeadsUpDisplayZugswangLibraryView.showConfirm('${type}'); return false;`);
        let content = questLink.querySelector(".content");
        if (!content || !content.querySelector("b"))
          return;
        questLink.setAttribute("data-quest-type", type);
        let assignment = library_assignments_default[type], requirements = questLink.querySelector(".requirements");
        requirements && requirements.remove();
        let metaWrapper = makeElement("div", "mh-ui-assignment-meta-wrapper"), cost = makeElement("div", ["mh-ui-assignment-price", "mh-ui-assignment-cost"]);
        makeElement("span", "mh-ui-assignment-price-label", "Requires", cost), makeElement("strong", "mh-ui-assignment-price-value", assignment.cost, cost), metaWrapper.append(cost);
        let reward = makeElement("div", ["mh-ui-assignment-price", "mh-ui-assignment-reward"]);
        makeElement("span", "mh-ui-assignment-price-label", "Reward", reward), makeElement("strong", "mh-ui-assignment-price-value", assignment.rewardPoints, reward), metaWrapper.append(reward);
        let wiki = makeElement("a", "mh-ui-assignment-wiki-button", "View on Wiki \u2192");
        if (wiki.href = `https://mhwiki.hitgrab.com/wiki/index.php/Library_Assignment#${assignment.name.replaceAll(" ", "_")}`, wiki.target = "_blank", wiki.rel = "noopener noreferrer", metaWrapper.append(wiki), content.after(metaWrapper), assignment.name === "M400 Hunting Research Assignment") {
          let m400Wrapper = makeElement("div", ["content", "mh-ui-m400-wrapper"]);
          makeElement("b", "mh-ui-m400-title", assignment.name, m400Wrapper), makeElement("span", "mh-ui-m400-content", "This envelope contains a Research Assignment that will have you looking for the elusive M400 prototype.", m400Wrapper), content.replaceWith(m400Wrapper);
        }
        if (assignment.assignments) {
          let assigmentDetails = makeElement("details", "mh-ui-assignment-details");
          makeElement("summary", "mh-ui-assignment-details-summary", "Assignment Details", assigmentDetails);
          for (let singleAssignment of assignment.assignments) {
            let assignmentWrapper = makeElement("div", "mh-ui-assignment-details-wrapper");
            makeElement("h4", "mh-ui-assignment-details-title", singleAssignment.name, assignmentWrapper);
            let singleAssignmentTasks = singleAssignment.tasks || [];
            for (let task of singleAssignmentTasks) {
              let taskEl = makeElement("div", "mh-ui-assignment-details-task");
              makeElement("h5", "mh-ui-assignment-details-task-title", task.title, taskEl);
              let taskList = makeElement("ul", "mh-ui-assignment-details-task-list");
              if (Array.isArray(task.text))
                for (let taskItem of task.text)
                  makeElement("li", "mh-ui-assignment-details-task-item", taskItem, taskList);
              else
                makeElement("li", "mh-ui-assignment-details-task-item", task.text, taskList);
              taskEl.append(taskList), assignmentWrapper.append(taskEl);
            }
            assigmentDetails.append(assignmentWrapper);
          }
          content.append(assigmentDetails);
        }
        if (assignment.rewards) {
          let rewardsWrapper = makeElement("details", "mh-ui-assignment-details-wrapper");
          makeElement("summary", "mh-ui-assignment-details-summary", "Rewards", rewardsWrapper);
          let rewardsList = makeElement("ul", "mh-ui-assignment-details-task-list");
          for (let singleReward of assignment.rewards)
            makeElement("li", "mh-ui-assignment-details-task-item", singleReward, rewardsList);
          rewardsWrapper.append(rewardsList), content.append(rewardsWrapper);
        }
      });
      let resources = document.querySelector("#overlayPopup.zugzwangsLibraryQuestShopPopup .questResources");
      if (!resources)
        return;
      let tomeDetails = yield getUserItems([
        "library_boss_trinket",
        // not a tome but we want it here.
        "tome_of_wisdom_yellow_convertible",
        "tome_of_wisdom_green_convertible",
        "tome_of_wisdom_blue_convertible",
        "tome_of_wisdom_convertible",
        // purple.
        "tome_of_wisdom_red_convertible",
        "tome_of_wisdom_white_convertible"
        // silver.
      ]);
      if (tomeDetails)
        for (let tome of tomeDetails) {
          if (!tome.type)
            continue;
          let tomeEl = makeElement("div", ["item", "mh-ui-quest-resources"]), imageEl = makeElement("div", "itemImage"), image = makeElement("img");
          image.src = tome.thumbnail_transparent || tome.thumbnail || tome.image || "", imageEl.append(image), makeElement("div", "quantity", tome.quantity || 0, imageEl), tomeEl.append(imageEl), makeElement("span", "itemName", tome.name || "", tomeEl), tomeEl.addEventListener("click", () => {
            hg.views.ItemView.show(tome.type);
          }), resources.append(tomeEl);
        }
    }), modifyAvailableQuestsPopup = () => {
      if (!document.querySelector("#overlayPopup.zugzwangsLibraryQuestShopPopup"))
        return;
      updateAssignmentList(), document.querySelector(".questLink .requirements .error") && (moveErrorText(), removeSmashText());
    }, checkForQuestSmash = () => {
      if (!window.location.hash || window.location.hash !== "#smashQuest" || getCurrentTab() !== "crafting" || getCurrentSubtab() !== "hammer")
        return;
      let assignment = document.querySelector('.inventoryPage-item.quest[data-produced-item="nothing_stat_item"]');
      assignment && app.pages.InventoryPage.useItem(assignment);
    }, restoreQuestTabAfterSmash = (request, data) => {
      if (!(data && data.item_type && questAssignments.has(data.item_type)))
        return;
      let questsTab = document.querySelector(".campPage-tabs-tabHeader.quests");
      questsTab && (questsTab.remove(), addQuestsTab());
    }, m400IfEnabled = () => {
      getSetting("better-quests.m400-helper", !0) && m400_default();
    }, main8 = () => {
      if (!isUserTitleAtLeast("lord"))
        return;
      let activate = () => {
        addQuestTabEventListener(), addQuestsTab(), checkForQuestSmash();
      };
      m400IfEnabled(), activate(), onNavigation(activate, {
        page: "camp"
      }), onNavigation(checkForQuestSmash, {
        page: "inventory",
        tab: "crafting",
        subtab: "hammer"
      }), onOverlayChange({
        /**
         * When the overlay is shown.
         */
        show: () => {
          addResearchSmashWarning(), modifyAvailableQuestsPopup();
        }
      }), onRequest("users/usehammer.php", restoreQuestTabAfterSmash);
    }, init10 = () => __async(void 0, null, function* () {
      addStyles(styles_default21, "better-quests"), main8();
    }), better_quests_default = {
      id: "better-quests",
      name: "Better Quests",
      type: "better",
      default: !0,
      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_default8
    };
  }
});

// src/modules/better-send-supplies/settings/index.js
var settings_default9, init_settings10 = __esm({
  "src/modules/better-send-supplies/settings/index.js"() {
    init_utils2();
    settings_default9 = () => __async(void 0, null, function* () {
      let tradableItems = yield getTradableItems("truncated_name");
      return tradableItems.unshift({ name: "None", value: "none" }, { seperator: !0 }), [{
        id: "better-send-supplies.pinned-items",
        title: "Pinned items",
        default: [
          {
            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"
          }
        ],
        description: "Items to pin at the top of the send supplies page",
        settings: {
          type: "multi-select",
          number: 5,
          options: tradableItems
        }
      }];
    });
  }
});

// src/modules/better-send-supplies/styles.css
var styles_default22, init_styles23 = __esm({
  "src/modules/better-send-supplies/styles.css"() {
    styles_default22 = `#supplytransfer .tabContent.recipient .listContainer .actions{display:none}#supplytransfer .listContainer a.element.recipient{width:auto;height:120px;white-space:nowrap;background-color:#fff}#supplytransfer .tabContent.recipient .listContainer span.content{font-size:12px}#supplytransfer .listContainer a.element.item{display:grid;grid-template-rows:1fr 1fr;align-items:center;width:auto;height:100px;padding:0;margin:0;overflow:hidden}#supplytransfer .listContainer a.element.item,#supplytransfer .listContainer a.element.recipient{border-radius:5px;box-shadow:0 1px 2px -2px #1f1f1f}#supplytransfer .listContainer a.element:hover,#supplytransfer .listContainer a.element.recipient:hover,#supplytransfer .listContainer a.element.item.pinned:hover,#supplytransfer .tabs .tab .image:hover,#supplytransfer .tabs .tab .image.empty:hover{color:#3b5998;background-color:#d8f0ff;border-color:#ccc}#supplytransfer .tabContent.item .listContainer{grid-template-columns:repeat(5,1fr);gap:5px;width:550px;height:100%;max-height:80vh;margin-bottom:0;margin-left:90px}#supplytransfer .categoryMenu{width:90px;background:none}#supplytransfer .categoryMenu a{margin-bottom:1px;font-size:12px;text-align:left}#supplytransfer .itemList .element .itemImage img{width:60px;height:60px}#supplytransfer .listContainer a.element .details{width:90px;margin:0 auto;font-size:11px;text-align:center}#supplytransfer .categoryMenu a:hover,#supplytransfer .categoryMenu a:focus,#supplytransfer .categoryMenu a:active{padding-left:5px;margin-left:-5px;text-decoration:none;background-color:#d8f0ff}.mhui-supply-search{display:flex;align-items:center;padding-bottom:5px;margin:5px 5px 15px;border-bottom:1px solid #ccc}#supplytransfer .drawer .tabContent .searchContainer{position:absolute;top:-5px;right:0}#supplytransfer .drawer .tabContent h2{padding:0;margin:0 auto 0 0;font-size:14px;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;margin-right:10px}.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;gap:10px;align-items:center;justify-content:center;margin:10px auto}.mhui-supply-quick-quantity-max{width:53px}#supplytransfer .friendList.listContainer{padding-top:10px;margin-top:10px;border-top:1px solid #ccc}#supplytransfer .tabs .tab.recipient .image.empty:after,#supplytransfer .tabs .tab.item .image.empty:after{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#3b5998;cursor:pointer;content:""}#supplytransfer .tabs .tab.recipient .image.empty:after{content:"Select Friend"}#supplytransfer .tabs .tab.item .image.empty:after{content:"Select Item"}#supplytransfer .drawer .tabContent.confirm #supplytransfer-confirm-text{padding:0}#supplytransfer .tabs .tab.confirm{display:none}#supplytransfer .tabs .tab.recipient .image.empty,#supplytransfer .tabs .tab.item .image.empty{position:relative;margin-bottom:-20px;background-image:none}#supplytransfer .tabs .tab .image{background:#ccc;border:1px solid #eee}.PageSupplyTransfer .flexibleDialogWarmBrown{padding:0;background:none;box-shadow:none}#supplytransfer .drawer{width:unset;height:100%;max-height:unset;padding:5px;border:none}#supplytransfer{position:relative}#supplytransfer .tabs{position:sticky;top:50px;z-index:1;width:auto;padding:10px 10px 0;margin-top:35px;border:1px solid #ccc;border-radius:5px;box-shadow:0 1px 2px -2px #1f1f1f}#supplytransfer .tabs .tab .image,#supplytransfer .tabs .tab .image.empty{background-color:#eee;border:1px solid #ccc;border-radius:5px}#supplytransfer .drawer .listContainer{display:grid;grid-template-columns:repeat(6,1fr);gap:5px 0}#supplytransfer .listContainer.friendList img{width:85px;height:85px;padding-bottom:5px;border:none;border-radius:3px}#supplytransfer .tabs .tab:hover{background:transparent}#supplytransfer .tabContent.item{margin:-5px}span.mhui-supply-sort-label{color:#000}#supplytransfer .itemList a.element .itemImage{width:60px;height:60px;padding:5px;overflow:visible}#supplytransfer .drawer .tabContent{position:relative;height:100%;max-height:unset}#supplytransfer .tabs .tab .image .img,#supplytransfer .tabs .tab .image{width:80px;height:80px}#supplytransfer .tabs .tab{display:flex;flex-direction:column;align-items:center}#supplytransfer .itemImage .quantity{right:0;bottom:0;background-color:#fff9}#supplytransfer .tab .itemImage .quantity{bottom:10px}#supplytransfer .listContainer a.element.item.pinned .itemImage .quantity{background-color:#aef5f799}.mousehuntPage-content #supplytransfer .drawer .listContainer,.mousehuntPage-content #supplytransfer .drawer .tabContent,.mousehuntPage-content #supplytransfer .drawer{height:auto;max-height:unset}
`;
  }
});

// src/modules/better-send-supplies/index.js
var processSearch, addSearch, asNum, resortItems, addSortButtons, highlightFavoritedItems, addQuickQuantityButtons, items, currentSort, upgradeSendSupplies, hasSorted, main9, init11, better_send_supplies_default, init_better_send_supplies = __esm({
  "src/modules/better-send-supplies/index.js"() {
    init_utils2();
    init_settings10();
    init_styles23();
    processSearch = () => {
      let currentValue = document.querySelector("#mhui-supply-search-input");
      currentValue.value || items.forEach((item) => {
        item.classList.remove("hidden");
      }), items.forEach((item) => {
        item.textContent.toLowerCase().includes(currentValue.value.toLowerCase()) ? item.classList.remove("hidden") : item.classList.add("hidden");
      });
    }, addSearch = () => {
      if (document.querySelector(".mhui-supply-search-wrapper"))
        return;
      let container = document.querySelector("#supplytransfer .tabContent.item");
      if (!container)
        return;
      let form = makeElement("form", "mhui-supply-search-form"), label = makeElement("label", ["mhui-supply-search-label"]);
      label.setAttribute("for", "mhui-supply-search-input"), makeElement("span", "", "Search: ", label);
      let input = makeElement("input", "mhui-supply-search-input");
      input.setAttribute("type", "text"), input.setAttribute("id", "mhui-supply-search-input"), input.setAttribute("autocomplete", "off"), input.addEventListener("keyup", processSearch), label.append(input), form.append(label);
      let titleWrapper = makeElement("div", "mhui-supply-search"), 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) => Number.parseInt(number.replace(",", "")), resortItems = (sortType = "alpha") => {
      let container = document.querySelector("#supplytransfer .tabContent.item .listContainer"), items5 = container.querySelectorAll(".item"), sortSelector = ".quantity";
      (sortType === "alpha" || sortType === "alpha-reverse") && (sortSelector = ".details");
      let sorted = [...items5].sort((a, b) => {
        let aText = a.querySelector(sortSelector).textContent, 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 (let item of sorted)
        item.classList.contains("pinned") || container.append(item);
      currentSort = sortType;
    }, addSortButtons = () => {
      if (document.querySelector(".mhui-supply-sort-wrapper"))
        return;
      let container = document.querySelector(".mhui-supply-search");
      if (!container)
        return;
      let sortWrapper = makeElement("div", "mhui-supply-sort-wrapper");
      makeElement("span", "mhui-supply-sort-label", "Sort by:", sortWrapper);
      let 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);
      let 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 = () => {
      let itemsToPin = /* @__PURE__ */ new Set([
        getSetting("better-send-supplies.pinned-items-0", "SUPER|brie+"),
        getSetting("better-send-supplies.pinned-items-1", "Empowered SUPER|b..."),
        getSetting("better-send-supplies.pinned-items-2", "Rift Cherries"),
        getSetting("better-send-supplies.pinned-items-3", "Rift-torn Roots"),
        getSetting("better-send-supplies.pinned-items-4", "Sap-filled Thorns")
      ]);
      for (let item of items) {
        let details = item.querySelector(".details");
        itemsToPin.has(details.textContent) && item.classList.add("pinned");
      }
    }, addQuickQuantityButtons = () => {
      let input = document.querySelector("#supplytransfer-confirm-text input");
      if (!input)
        return;
      let maxquantity = document.querySelector("#supplytransfer-confirm-text .userQuantity");
      if (!maxquantity)
        return;
      let existing = document.querySelector(".mhui-supply-quick-quantity-wrapper");
      existing && existing.remove();
      let maxQty = Number.parseInt(maxquantity.textContent.split("You can send up to: ")[1].split(" ")[0].replace(",", "")), wrapper = makeElement("div", "mhui-supply-quick-quantity-wrapper");
      makeMathButtons([1, 5, 10, 100], {
        appendTo: wrapper,
        input,
        maxQty,
        classNames: ["mhui-supply-quick-quantity", "small"]
      });
      let max = makeElement("button", ["mousehuntActionButton", "lightBlue", "small", "mhui-supply-quick-quantity", "mhui-supply-quick-quantity-max"]), maxText = makeElement("span", "", "Max");
      max.addEventListener("click", () => {
        maxText.textContent === "Reset" ? (input.value = 0, maxText.textContent = "Max") : (input.value = maxQty, maxText.textContent = "Reset");
      }), max.append(maxText), wrapper.append(max), input.parentNode.insertBefore(wrapper, input.nextSibling);
    }, items = [], currentSort = null, upgradeSendSupplies = (initial = !1) => {
      let sendTo = document.querySelector("#supplytransfer .drawer .tabContent.recipient"), isChoosingUser = sendTo && sendTo.style.display !== "none", sending = document.querySelector("#supplytransfer .drawer .tabContent.item"), isChoosingItem = sending && sending.style.display !== "none";
      if (isChoosingUser) {
        let users = document.querySelectorAll("#supplytransfer .friendList .element.recipient");
        for (let user2 of users) {
          user2.addEventListener("click", () => {
            upgradeSendSupplies();
          }, { once: !0 });
          let search = document.querySelector(".searchContainer input");
          search && search.focus();
        }
      } else if (isChoosingItem) {
        items = document.querySelectorAll("#supplytransfer .tabContent.item .listContainer .item"), highlightFavoritedItems(), (initial || !hasSorted) && (hasSorted = !0, resortItems("alpha")), addSortButtons();
        let itemSearch = document.querySelector(".mhui-supply-search-input");
        itemSearch && itemSearch.focus();
      } else {
        addQuickQuantityButtons();
        let inputVal = document.querySelector("#supplytransfer-confirm-text input");
        inputVal && inputVal.focus();
      }
      let categories = document.querySelectorAll("#supplytransfer .categoryMenu a");
      for (let category of categories)
        category.addEventListener("click", () => {
          highlightFavoritedItems();
        }, { once: !0 });
      sendTo.addEventListener("click", () => {
        upgradeSendSupplies();
      }, { once: !0 }), sending.addEventListener("click", () => {
        upgradeSendSupplies();
      }, { once: !0 });
    }, hasSorted = !1, main9 = () => {
      addSearch(), upgradeSendSupplies(!0);
    }, init11 = () => __async(void 0, null, function* () {
      addStyles(styles_default22, "better-send-supplies"), onNavigation(main9, {
        page: "supplytransfer"
      });
    }), better_send_supplies_default = {
      id: "better-send-supplies",
      name: "Better Send Supplies",
      type: "better",
      default: !0,
      description: "Adds pinned items, search, and sorting to the Send Supplies page.",
      load: init11,
      settings: settings_default9
    };
  }
});

// src/modules/better-shops/settings/index.js
var settings_default10, init_settings11 = __esm({
  "src/modules/better-shops/settings/index.js"() {
    settings_default10 = () => __async(void 0, null, function* () {
      return [
        {
          id: "better-shops.hide-max-owned",
          title: "Hide items with maximum quantity owned",
          default: !1
        },
        {
          id: "better-shop.qty-buttons",
          title: "Show quantity buttons",
          default: !0
        }
      ];
    });
  }
});

// src/modules/better-shops/modules/quantity-buttons/index.js
var quantity_buttons_default, init_quantity_buttons = __esm({
  "src/modules/better-shops/modules/quantity-buttons/index.js"() {
    init_utils2();
    quantity_buttons_default = (block, input, maxQty) => __async(void 0, null, function* () {
      if (block.querySelector(".mh-improved-shop-buy-controls"))
        return;
      maxQty = `${maxQty}`.replaceAll(",", "");
      let buyControls = makeElement("div", ["mh-improved-shop-buy-controls"]);
      makeMathButtons([1, 10, 50, 100, 1e3], {
        appendTo: buyControls,
        input,
        maxQty,
        classNames: ["mh-improved-shop-qty", "tiny", "gray"]
      });
      let buyMaxButton = makeElement("a", ["mousehuntActionButton", "lightBlue", "tiny", "mh-improved-shop-buy-max"]), buyMaxButtonText = makeElement("span", "", "Max");
      buyMaxButton.append(buyMaxButtonText);
      let hasMaxed = !1;
      buyMaxButton.addEventListener("click", () => {
        hasMaxed ? (input.value = 0, buyMaxButtonText.innerText = "Max") : (input.value = maxQty, buyMaxButtonText.innerText = "Reset"), hasMaxed = !hasMaxed;
      }), buyControls.append(buyMaxButton);
      let form = block.querySelector(".itemPurchaseView-action-form");
      form ? form.append(buyControls) : block.append(buyControls);
    });
  }
});

// src/modules/better-shops/modules/quantity-buttons/styles.css
var styles_default23, init_styles24 = __esm({
  "src/modules/better-shops/modules/quantity-buttons/styles.css"() {
    styles_default23 = `.mh-improved-shop-buy-controls{position:absolute;top:25px;right:0;left:0;display:flex;flex:1 1 100%;flex-flow:row wrap;gap:5px;align-items:center;justify-content:flex-start;margin-top:7px;margin-left:10px}.itemPurchaseView-action-form.clear-block{position:relative;margin-bottom:40px}.mousehuntActionButton.mh-improved-shop-qty{font-family:monospace;font-size:11px}.mh-improved-shop-buy-max{min-width:25px}.mh-improved-shop-qty,.mh-improved-shop-buy-max{user-select:none}.mousehuntActionButton.mh-improved-shop-buy-max{max-width:25px}
`;
  }
});

// src/modules/better-shops/modules/hide-max-owned/styles.css
var styles_default24, init_styles25 = __esm({
  "src/modules/better-shops/modules/hide-max-owned/styles.css"() {
    styles_default24 = `.mousehuntHud-page-subTabContent.hasShop.active .itemPurchaseView-container.own_max{display:none!important}
`;
  }
});

// src/modules/better-shops/styles/cost.css
var cost_default, init_cost = __esm({
  "src/modules/better-shops/styles/cost.css"() {
    cost_default = `.itemPurchaseView-action-itemCost-table-row{display:grid;grid-template-columns:1fr 15fr 1fr;place-items:center stretch;width:97%;padding:2px 5px 2px 2px;margin:0}.itemPurchaseView-action-goldGost{padding:5px 5px 5px 20px;font-size:1.3em;font-weight:400;text-align:left;background:#f9f9f9;border:1px solid #ccc;border-right:none;border-left:none}.mh-dark-mode .itemPurchaseView-content-container{border-color:#242424}.itemPurchaseView-image-container,.itemPurchaseView-content-container{background-color:#fff}.itemPurchaseView-action-quantity{flex-grow:1;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:#eee;border:1px solid #ccc;border-radius:5px}.itemPurchaseView-action-purchaseHelper-error{height:auto}.itemPurchaseView-action-purchaseHelper-maxPurchasesLimitReached{margin-bottom:5px;font-size:11px}
`;
  }
});

// src/modules/better-shops/styles/general.css
var general_default3, init_general3 = __esm({
  "src/modules/better-shops/styles/general.css"() {
    general_default3 = `.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{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{padding-right:5px;padding-bottom:10px;margin-top:0;margin-bottom:0;overflow-y:auto;color:#626262}.itemPurchaseView-action-itemCost-table{width:250px;padding:0;margin-right:-10px;margin-left:-10px;background:#f9f9f9;border-right:none;border-left:none}.itemPurchaseView-action-itemCost-table-cell.cost{padding-left:11px;background-position:0 0;background-size:10px}.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-container.own_max .itemPurchaseView-action-container{display:none}.itemPurchaseView-container{width:calc(100% - 1px)}.itemPurchaseView-action-container{padding:8px 0 0;border-right:1px solid #ccc}#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);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);background-repeat:no-repeat;background-position:0 -27px;border-bottom:none;border-left:none}a.itemPurchaseView-content-skin-link{display:flex;align-items:center;min-height:25px;padding-left:30px;line-height:unset;background-size:25px}#overlayPopup.marketplaceViewPopup .suffix{display:none}.shopCustomization .PageShops .itemViewStatBlock-padding{display:flex;align-items:center}.shopCustomization .PageShops .itemViewStatBlock,.shopCustomization .PageShops .itemViewStatBlock-stat{margin-top:10px;border:none}.shopCustomization .PageShops .itemViewStatBlock-stat{padding:2px 4px 2px 2px;margin-top:3px;margin-right:5px;border:1px solid #ccc;border-radius:5px}.shopCustomization .PageShops .itemViewStatBlock-stat-helper{right:unset;left:unset;white-space:nowrap}.shopCustomization .PageShops .itemViewStatBlock-stat-label{margin-right:0;background:none}.shopCustomization .PageShops .itemViewStatBlock-stat-value{max-width:unset;background:none;border-radius:0}.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock-stat.cheeseEffect{width:auto;border-bottom:1px solid #ccc}.shopCustomization .PageShops .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}.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.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-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}.shopCustomization .PageShops .itemPurchaseView-container .title .itemViewStatBlock-stat-value span a{max-width:60px;font-size:10px;text-overflow:ellipsis}.itemPurchaseView-image-container .itemViewStatBlock-stat.title.error{background-color:#ffc9c9}.itemPurchaseView-image-container .itemViewStatBlock-stat-icon{width:20px;height:17px}.itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-icon{width:26px;height:24px}.itemViewStatBlock.horizontal .itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-icon{height:30px}.itemViewStatBlock-stat.title .itemPurchaseView-image-container .itemViewStatBlock-stat-icon{background-size:100%}.itemViewStatBlock-stat.error .itemViewStatBlock-stat-value{background-color:unset}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:hidden;opacity:.3;transition:.4s}.hasShop .itemPurchaseView-container.donation .itemPurchaseView-content-container,.itemPurchaseView-container.own_max .itemPurchaseView-content-container{width:calc(100% - 10px)}.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}.mh-dark-mode .itemPurchaseView-container .itemViewStatBlock-stat.title,.mh-dark-mode .itemPurchaseView-container .itemViewStatBlock-stat.powerType{background-color:#3d3d3d;border-color:#606060}.mh-dark-mode .itemPurchaseView-container .itemPurchaseView-image-container .itemViewStatBlock-stat.powerType{background-color:transparent;border:none}.itemPurchaseView-container.new .itemPurchaseView-margin:after{top:5px}.itemPurchaseView-action-marketplace b,.itemPurchaseView-action-marketplace br{display:none}.itemPurchaseView-action-marketplace a:last-of-type:after{content:" in the Marketplace"}.itemPurchaseView-action-marketplace{padding:5px 0}a.itemPurchaseView-action-buySuperBrie{display:inline-block;margin:0 auto}.super_brie_cheese .itemPurchaseView-action-purchaseHelper{display:block}.donation .itemPurchaseView-action-itemCost-table-row{display:flex;justify-content:center;font-size:15px}.itemPurchaseView-container.donation .itemPurchaseView-action-container,.itemPurchaseView-container.donation .itemPurchaseView-action-itemCost-table{border-top-color:#ffc62b;border-bottom-color:#c7991c}.mh-dark-mode .itemPurchaseView-container.donation .itemPurchaseView-action-container{background-color:#e6b963}.mh-dark-mode .itemPurchaseView-container.donation .itemPurchaseView-action-itemCost-table{background-color:#f4eeca}.itemPurchaseView-container:hover .itemPurchaseView-margin,.itemPurchaseView-container:hover .itemPurchaseView-image-container,.itemPurchaseView-container:hover .itemPurchaseView-content-container{background-color:#f9f9f9}.mh-dark-mode .itemPurchaseView-container:hover .itemPurchaseView-margin,.mh-dark-mode .itemPurchaseView-container:hover .itemPurchaseView-image-container,.mh-dark-mode .itemPurchaseView-container:hover .itemPurchaseView-content-container{background-color:#242424}.itemPurchaseView-container.trinket .itemViewStatBlock{margin-top:0;margin-bottom:10px}.itemViewStatBlock-stat-helper{padding:10px;font-size:10px;color:#fff;text-align:center;background:#000;border:none;border-radius:10px}.itemViewStatBlock-stat-helper-arrow:after{border-top:10px solid #000}.itemPurchaseView-container .itemPurchaseView-action-form{min-height:50px}.itemPurchaseView-action-confirm-button:focus,.itemPurchaseView-action-confirm-button:hover{filter:hue-rotate(50deg)}.shopsPageTrapPreview .trapImageView-layerWrapper{top:10px}.shopsPageTrapPreview .trapImageView{height:370px}.itemViewPopup .itemViewStatBlock-stat.title{order:1}.itemViewPopup .itemViewStatBlock-stat.powerType{order:2}.itemViewPopup .itemViewStatBlock-stat.points{order:3}.itemViewPopup .itemViewStatBlock-stat.power,.itemViewPopup .itemViewStatBlock-stat.luck,.itemViewPopup .itemViewStatBlock-stat.powerBonus,.itemViewPopup .itemViewStatBlock-stat.attraction{order:4}.itemViewPopup .itemViewStatBlock-stat.cheeseEffect{order:5}.itemViewContainer .itemViewStatBlock.trinket .itemViewStatBlock-stat.empty{display:flex;opacity:.6}.itemViewPopup .itemView-thumbnailContainer a{display:flex;justify-content:center;padding-top:5px}.itemViewPopup .itemViewStatBlock-stat:last-child .itemViewStatBlock-stat-label{border-radius:0 0 0 5px}.itemViewPopup .itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-icon:after{position:absolute;top:0;bottom:0;left:26px;display:flex;align-items:center;justify-content:center;width:115px;font-weight:900;content:""}.itemViewPopup .itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-label{position:relative;width:26px}.itemViewPopup .itemViewStatBlock-stat-value{display:flex;align-items:center;justify-content:center}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-content-details{height:auto;max-height:180px;overflow-y:auto}.itemPurchaseView-container.kingsCartItem.expanded .itemPurchaseView-content-details{height:100%;max-height:unset;overflow-y:visible}.itemPurchaseView-container[data-max-inventory-quantity="1"]:after{position:absolute;top:17px;right:5px;z-index:1;color:#3b3b3b;content:"(Limit " attr(data-max-inventory-quantity) ")"}.itemPurchaseView-action-buySuperBrie{border-radius:7px}
`;
  }
});

// src/modules/better-shops/styles/order.css
var order_default, init_order = __esm({
  "src/modules/better-shops/styles/order.css"() {
    order_default = `.itemViewStatBlock.trinket{order:3}.itemPurchaseView-content-container{display:flex;flex-direction:column}.itemPurchaseView-content-name{order:1}.itemPurchaseView-content-details{display:flex;order:4}.itemPurchaseView-content-description{order:2}
`;
  }
});

// src/modules/better-shops/styles/retired.css
var retired_default, init_retired = __esm({
  "src/modules/better-shops/styles/retired.css"() {
    retired_default = `.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}
`;
  }
});

// src/modules/better-shops/styles/riftstalker.css
var riftstalker_default, init_riftstalker = __esm({
  "src/modules/better-shops/styles/riftstalker.css"() {
    riftstalker_default = `ul.set_bonus_effects{display:inline-block;flex-wrap:nowrap}.item_set .set_bonus_effects li{display:inline;margin:0}.item_set .set_bonus_level{width:40%}.item_set{display:flex;flex-flow:row wrap;align-items:center}.item_set .set_bonus_effects li:after{content:", "}.item_set .set_bonus_effects li:last-of-type:after{content:""}.item_set>b{display:none}.item_set .set_name>img{right:30px;display:none}.item_set .set_name{margin:0;font-size:11px}.item_set .set_name:after{margin-right:5px;margin-left:10px;font-weight:400;content:" Requires: "}
`;
  }
});

// src/modules/better-shops/styles/stats.css
var stats_default, init_stats = __esm({
  "src/modules/better-shops/styles/stats.css"() {
    stats_default = `.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-padding{display:flex;flex-flow:row wrap;row-gap:5px;align-items:center;justify-content:flex-start}.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock.horizontal .itemViewStatBlock-stat.title,.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock.horizontal .itemViewStatBlock-stat.cheeseEffect{width:70px}.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock-stat.title,.itemPurchaseView-container .itemViewStatBlock-stat.powerType{display:flex;align-items:center;justify-content:space-evenly;width:auto;line-height:14px;border:1px solid #ccc}.mh-dark-mode .shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock-stat.title,.mh-dark-mode .itemPurchaseView-container .itemViewStatBlock-stat.powerType{border-color:#606060}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat-label{display:inline-block;padding:0}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat-value{display:inline-flex;align-items:center;justify-content:center;margin-right:3px}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat{display:flex;align-items:center;justify-content:space-around;min-width:55px;padding:2px;margin:0 5px 0 0;background-color:#f9f9f9;border:1px solid #ccc;border-radius:5px}.mh-dark-mode.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat{background-color:#333;border-color:#606060}.mh-dark-mode.shopCustomization .PageShops .pageFrameView .itemViewStatBlock .itemViewStatBlock-stat-value{background-color:transparent}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat-value span{display:inline-block;padding:0}.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat.cheeseEffect .itemViewStatBlock-stat-value{font-size:9px}
`;
  }
});

// src/modules/better-shops/index.js
var imported3, styles3, updateInputField, main10, init12, better_shops_default, init_better_shops = __esm({
  "src/modules/better-shops/index.js"() {
    init_utils2();
    init_settings11();
    init_quantity_buttons();
    init_styles24();
    init_styles25();
    init_cost();
    init_general3();
    init_order();
    init_retired();
    init_riftstalker();
    init_stats();
    imported3 = [cost_default, general_default3, order_default, retired_default, riftstalker_default, stats_default], styles3 = imported3, updateInputField = () => __async(void 0, null, function* () {
      let purchaseBlocks = document.querySelectorAll(".itemPurchaseView-action-state.view");
      purchaseBlocks && purchaseBlocks.forEach((block) => {
        let qty = block.querySelector(".itemPurchaseView-action-maxPurchases");
        if (!qty)
          return;
        let maxQty = qty.innerText;
        maxQty.includes("Inventory max") && (maxQty = 0);
        let input = block.querySelector("input");
        if (!input)
          return;
        input.setAttribute("placeholder", maxQty);
        let buyButton = block.querySelector(".itemPurchaseView-action-form-button.buy");
        buyButton && input.addEventListener("focus", () => {
          let enterEvt = input.addEventListener("keydown", (e) => {
            e.key === "Enter" && (buyButton.click(), setTimeout(() => {
              let confirmButton = document.querySelector(".itemPurchaseView-container.confirmPurchase .itemPurchaseView-action-confirm-button");
              confirmButton && confirmButton.focus();
            }, 200));
          });
          input.addEventListener("blur", () => {
            input.removeEventListener("keydown", enterEvt);
          });
        }), getSetting("better-shops.show-qty-buttons", !0) && quantity_buttons_default(block, input, maxQty);
      });
    }), main10 = () => {
      let body = document.querySelector("body");
      if (!body)
        return;
      if (getCurrentPage() === "item") {
        body.classList.remove("shopCustomization");
        return;
      }
      body.classList.add("shopCustomization");
      let golds = document.querySelectorAll(".itemPurchaseView-action-goldGost");
      golds && golds.forEach((gold) => {
        gold.innerText = gold.innerText.replace("Cost:", "");
      });
      let buyBtns = document.querySelectorAll(".itemPurchaseView-action-form-button.buy");
      buyBtns && buyBtns.forEach((btn) => {
        btn.classList.add("mousehuntActionButton"), btn.innerHTML = "<span>Buy</span>";
      });
      let sellBtns = document.querySelectorAll(".itemPurchaseView-action-form-button.sell");
      sellBtns && sellBtns.forEach((btn) => {
        btn.classList.add("mousehuntActionButton"), btn.classList.add("lightBlue"), btn.innerHTML = "<span>Sell</span>";
      }), updateInputField();
      let owned = document.querySelectorAll(".itemPurchaseView-action-purchaseHelper-owned");
      owned && owned.forEach((ownedItem) => {
        if (ownedItem.getAttribute("moved-to-title"))
          return;
        let nameEl = ownedItem.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".itemPurchaseView-content-name");
        ownedItem.setAttribute("moved-to-title", "true"), nameEl.append(ownedItem);
      });
      let kingsCart = document.querySelectorAll(".itemPurchaseView-container.kingsCartItem");
      kingsCart && kingsCart.forEach((cart) => {
        cart.querySelector("input").value = "";
      });
      let shopQty = document.querySelectorAll(".itemPurchaseView-action-quantity input");
      if (!shopQty)
        return;
      shopQty.forEach((qty) => {
        qty.setAttribute("maxlength", "100");
      });
      let itemStats = document.querySelectorAll(".itemViewStatBlock");
      itemStats && itemStats.forEach((stat) => {
        if (stat.classList.contains("horizontal"))
          return;
        let contentSection = stat.parentNode.parentNode.querySelector(".itemPurchaseView-content-container");
        contentSection && contentSection.append(stat);
      });
      let itemStatsTitle = document.querySelectorAll(".itemViewStatBlock.horizontal .itemViewStatBlock-stat");
      itemStatsTitle && itemStatsTitle.forEach((title) => {
        if (title.classList.contains("title") || title.classList.contains("powerType")) {
          let imageContainer = title.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".itemPurchaseView-image-container");
          imageContainer && imageContainer.append(title);
        }
      });
    }, init12 = () => __async(void 0, null, function* () {
      let stylesToAdd = [...styles3];
      getSetting("better-shops.hide-max-owned", !1) && stylesToAdd.push(styles_default24), getSetting("better-shops.show-qty-buttons", !0) && stylesToAdd.push(styles_default23), addStyles(stylesToAdd, "better-shops"), onNavigation(main10, {
        page: "shops"
      }), onRequest("purchases/itempurchase.php", updateInputField);
    }), better_shops_default = {
      id: "better-shops",
      name: "Better Shops",
      type: "better",
      default: !0,
      description: "Updates the Shop layout and appearance, minimizes owned items that have an inventory limit of 1, and more.",
      load: init12,
      settings: settings_default10
    };
  }
});

// src/modules/better-tournaments/settings/index.js
var settings_default11, init_settings12 = __esm({
  "src/modules/better-tournaments/settings/index.js"() {
    settings_default11 = () => __async(void 0, null, function* () {
      return [{
        id: "better-tournaments.time-inline",
        title: "Display localized times inline, rather than on hover",
        default: !1
      }];
    });
  }
});

// src/modules/better-tournaments/styles.css
var styles_default25, init_styles26 = __esm({
  "src/modules/better-tournaments/styles.css"() {
    styles_default25 = `.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-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}.scoreRow:last-child{margin-bottom:0}.scoreIcon{position:relative;width:20px;height:20px;margin-right:5px;overflow:hidden;border:1px solid #c2b384;border-radius:3px}.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;padding-top:3px;border:1px solid #cbc6bb;border-top:none;border-left:none}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:2px;left:160px;width:220px;font-size:12px;text-align:center}.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:11px;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}.tournamentStatusHud a.name,.tournamentStatusHud a.teamMembers,.tournamentStatusHud a.friendsOnline,.tournamentStatusHud .help,.tournamentStatusHud .tournamentInviteTeamMembers,.tournamentStatusHud .tournamentInviteFriends{transition:.2s}.tournamentStatusHud a.name{border-radius:23px 20px 20px 29px}.tournamentStatusHud a.name:hover{width:221px;padding-left:10px;margin-left:5px;background-color:#e658137f}.tournamentStatusHud.pending a.name:hover{width:324px;padding-left:11px;margin-left:4px}.tournamentStatusHud a.teamMembers{border-radius:20px}.tournamentStatusHud a.teamMembers:hover{background-color:#c800ff7f}.tournamentStatusHud a.friendsOnline{border-radius:0% 100% 100% 0%/0% 100% 100%}.tournamentStatusHud a.friendsOnline:hover{background-color:#a7de6f7f}.tournamentStatusHud a.friendsOnline,.tournamentStatusHud a.friendsOnline:visited,.tournamentStatusHud a.friendsOnline:hover{left:693px;font-size:14px}.tournamentStatusHud .help:hover{filter:brightness(1.1)}.tournamentStatusHud .tournamentInviteTeamMembers{border-radius:5px 5px 5px 8px}.tournamentStatusHud .tournamentInviteFriends{width:63px;margin-left:1px;border-radius:5px 5px 7px 6px}.tournamentStatusHud .tournamentInviteTeamMembers:hover,.tournamentStatusHud .tournamentInviteFriends:hover{padding:2px 0;margin-top:-2px;background:#e8e3a07f}.tournamentStatusHud .rank:after,.tournamentStatusHud .score:after{position:absolute;inset:8px 9px 7px 4px;content:"";border-radius:15px 3px 3px 15px;transition:.2s}.tournamentStatusHud .score:after{inset:9px -21px 10px 10px;border-radius:2px 18px 18px 3px}.tournamentStatusHud .score:hover:after{background:#e8e3a07f}.tournamentStatusHud .rank:hover:after{background-color:#c800ff7f}
`;
  }
});

// src/modules/better-tournaments/index.js
var updateTournamentHud, updateTournamentList, updateScoreboard, init13, better_tournaments_default, init_better_tournaments = __esm({
  "src/modules/better-tournaments/index.js"() {
    init_utils2();
    init_settings12();
    init_styles26();
    updateTournamentHud = () => __async(void 0, null, function* () {
      var _a, _b;
      let activeTourney = document.querySelector("#tournamentStatusHud > a.name");
      if (!activeTourney)
        return;
      let tourneyId = activeTourney.href.split("=")[1];
      if (!tourneyId)
        return;
      let tourneyData = yield doRequest("managers/ajax/pages/page.php", {
        page_class: "Tournament",
        "page_arguments[tournament_id]": tourneyId
      });
      if (tourneyData != null && tourneyData.page)
        if ((_a = tourneyData.page) != null && _a.is_active) {
          let name = (_b = tourneyData == null ? void 0 : tourneyData.page) == null ? void 0 : _b.name;
          name && (activeTourney.innerText = name);
          let rank = document.querySelector(".tournamentStatusHud .rank");
          if (rank) {
            let scoreHover = document.createElement("div");
            scoreHover.classList.add("scoreHover"), tourneyData.page.scoreboard.rows.forEach((scoreboard) => {
              let scoreRow = makeElement("div", "scoreRow");
              makeElement("div", "scoreRank", scoreboard.rank, scoreRow);
              let teamWrapper = makeElement("a", "teamWrapper");
              teamWrapper.href = `https://www.mousehuntgame.com/team.php?team_id=${scoreboard.team_id}`;
              let icon = makeElement("div", "scoreIcon"), iconLayer1 = makeElement("div", "scoreIconLayer1");
              iconLayer1.style.backgroundImage = `url(${scoreboard.emblem.layers[0].image})`, icon.append(iconLayer1);
              let iconLayer2 = makeElement("div", "scoreIconLayer2");
              iconLayer2.style.backgroundImage = `url(${scoreboard.emblem.layers[1].image})`, icon.append(iconLayer2);
              let 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);
          }
          let points = document.querySelector(".tournamentStatusHud .score");
          if (points) {
            let pointsHover = document.createElement("div");
            pointsHover.classList.add("pointsHover"), tourneyData.page.mouse_groups.reverse().forEach((mouseGroup) => {
              let pointsRow = makeElement("div", "pointsRow");
              makeElement("div", "pointsTotal", mouseGroup.name, pointsRow);
              let groupMice = document.createElement("div");
              groupMice.classList.add("pointsMice"), mouseGroup.mice.forEach((mouse) => {
                let mouseWrapper = makeElement("div", "pointsMouseWrapper"), 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 {
          let members = document.querySelector(".tournamentStatusHud a.teamMembers");
          if (members) {
            let memberHover = makeElement("div", "memberHover");
            tourneyData.page.members.forEach((member) => {
              var _a2, _b2;
              let memberRow = makeElement("div", "memberRow");
              if (member.is_empty)
                makeElement("div", "memberEmpty", "Empty", memberRow), memberRow.classList.add("empty");
              else {
                let 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* () {
      let beginsRows = document.querySelectorAll(".tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(3)");
      if (!beginsRows.length)
        return;
      let durationRows = document.querySelectorAll(".tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(4)");
      if (!durationRows.length)
        return;
      let nowTime = (/* @__PURE__ */ new Date()).getTime(), dateOptions = {
        weekday: "short",
        month: "short",
        day: "numeric",
        hour: "numeric",
        minute: "numeric"
      };
      beginsRows.forEach((beginsRow, i) => {
        let beginsParts = beginsRow.innerText.split(" "), beginsMinutes = beginsParts.reduce((acc, part) => part === "minutes" || part === "minute" ? acc + Number.parseInt(beginsParts[beginsParts.indexOf(part) - 1], 10) : part === "hours" || part === "hour" ? acc + Number.parseInt(beginsParts[beginsParts.indexOf(part) - 1], 10) * 60 : part === "days" || part === "day" ? acc + Number.parseInt(beginsParts[beginsParts.indexOf(part) - 1], 10) * 1440 : acc, 0), inlineOrHover = getSetting("better-tournaments.time-inline") ? "tournament-time-display-inline" : "tournament-time-display-hover", beginsDate = new Date(nowTime + beginsMinutes * 6e4), beginsDateString = beginsDate.toLocaleString("en-US", dateOptions), beginsDateEl = makeElement("div", ["tournament-normal-time", "tournament-begins-date", inlineOrHover], beginsDateString);
        beginsRow.append(beginsDateEl);
        let durationParts = durationRows[i].innerText.split(" "), durationMinutes = durationParts.reduce((acc, part) => part === "minutes" || part === "minute" ? acc + Number.parseInt(durationParts[durationParts.indexOf(part) - 1], 10) : part === "hours" || part === "hour" ? acc + Number.parseInt(durationParts[durationParts.indexOf(part) - 1], 10) * 60 : part === "days" || part === "day" ? acc + Number.parseInt(durationParts[durationParts.indexOf(part) - 1], 10) * 1440 : acc, 0), durationDateString = new Date(beginsDate.getTime() + durationMinutes * 6e4).toLocaleString("en-US", dateOptions), durationDateEl = makeElement("div", ["tournament-normal-time", "tournament-end-date", inlineOrHover], durationDateString);
        durationRows[i].append(durationDateEl);
      });
    }), updateScoreboard = () => {
      document.querySelectorAll(".tournament-team-rank:not(.updated)").forEach((rank) => {
        rank.classList.add("updated");
        let rankParts = rank.innerText.split(/(\d+)/);
        if (rankParts.length !== 3)
          return;
        let rankNum = Number.parseInt(rankParts[1], 10);
        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_default25, "better-tournaments"), updateTournamentHud(), onEvent("tournament_status_change", updateTournamentHud), onNavigation(updateTournamentList, {
        page: "tournament"
      }), onNavigation(updateScoreboard, {
        page: "scoreboards"
      }), onRequest("pages/scoreboards.php", updateScoreboard);
    }), better_tournaments_default = {
      id: "better-tournaments",
      name: "Better Tournaments",
      type: "better",
      default: !0,
      description: "Updates the Tournaments UI to show information on hover and a variety of small interface tweaks.",
      load: init13,
      settings: settings_default11
    };
  }
});

// src/modules/better-travel/utils.js
var getTravelSetting, saveTravelSetting, init_utils4 = __esm({
  "src/modules/better-travel/utils.js"() {
    init_utils2();
    getTravelSetting = (settingName, defaultValue) => getSetting(`better-travel.${settingName}`, defaultValue), saveTravelSetting = (settingName, value) => {
      saveSetting(`better-travel.${settingName}`, value);
    };
  }
});

// src/modules/better-travel/modules/reminders/index.js
var hasDisabledReminder, addReminders, reminders_default, init_reminders = __esm({
  "src/modules/better-travel/modules/reminders/index.js"() {
    init_utils2();
    hasDisabledReminder = (item) => getFlag(`better-travel-no-reminder-${item}`), 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, _F, _G, _H, _I;
      let reminderOpts = {
        title: "Travel Reminder",
        dismiss: 6e3,
        classname: "travel-reminder"
      };
      switch (getCurrentLocation()) {
        case "rift_valour":
          if (hasDisabledReminder("champions-fire"))
            break;
          (_b = (_a = user.quests) == null ? void 0 : _a.QuestRiftValour) != null && _b.is_fuel_enabled && (reminderOpts.text = "Champion's Fire is active.", reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/6622efd1db7028b30f48b15771138720.png", reminderOpts.button = "Deactivate", reminderOpts.action = () => {
            let button = document.querySelector(".valourRiftHUD-fuelContainer-armButton");
            button && button.click();
          });
          break;
        case "queso_river":
        case "queso_plains":
        case "queso_quarry":
        case "queso_geyser":
          if (hasDisabledReminder("wild-tonic"))
            break;
          ((_d = (_c = user.quests) == null ? void 0 : _c.QuestQuesoCanyon) != null && _d.is_wild_tonic_active || (_f = (_e = user.quests) == null ? void 0 : _e.QuestQuesoGeyser) != null && _f.is_wild_tonic_enabled) && (reminderOpts.text = "Wild Tonic is active.", reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/b6b9f97a1ee3692fdff0b5a206adf7e1.png", reminderOpts.button = "Deactivate", reminderOpts.action = () => {
            let button = document.querySelector(".quesoHUD-wildTonic-button");
            button && button.click();
          });
          break;
        case "floating_islands":
          if (hasDisabledReminder("bottled-wind") || ((_i = (_h = (_g = user.quests) == null ? void 0 : _g.QuestFloatingIslands) == null ? void 0 : _h.hunting_site_atts) == null ? void 0 : _i.island_power_type) === "launch_pad_island")
            break;
          !((_l = (_k = (_j = user.quests) == null ? void 0 : _j.QuestFloatingIslands) == null ? void 0 : _k.hunting_site_atts) != null && _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 && _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 && _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", reminderOpts.button = "Activate", reminderOpts.action = () => {
            let button = document.querySelector(".floatingIslandsHUD-fuel-button");
            button && button.click();
          });
          break;
        case "bountiful_beanstalk":
        case "foreword_farm":
        case "prologue_pond":
        case "table_of_contents":
        case "school_of_sorcerey":
          if (hasDisabledReminder("condensed-creativity"))
            break;
          (_u = (_t = user.quests) == null ? void 0 : _t.QuestBountifulBeanstalk) != null && _u.is_fuel_enabled || (_w = (_v = user.quests) == null ? void 0 : _v.QuestProloguePond) != null && _w.is_fuel_enabled || (_y = (_x = user.quests) == null ? void 0 : _x.QuestForewordFarm) != null && _y.is_fuel_enabled || (_A = (_z = user.quests) == null ? void 0 : _z.QuestTableOfContents) != null && _A.is_fuel_enabled || (_C = (_B = user.quests) == null ? void 0 : _B.QuestSchoolOfSorcery) != null && _C.is_fuel_enabled ? (reminderOpts.text = "Condensed Creativity is active.", reminderOpts.button = "Deactivate") : (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", reminderOpts.action = hg.views.HeadsUpDisplayFolkloreForestRegionView.toggleFuel;
          break;
        case "winter_hunt_grove":
        case "winter_hunt_workshop":
        case "winter_hunt_fortress":
          if (hasDisabledReminder("festive-spirit"))
            break;
          (_E = (_D = user.quests) == null ? void 0 : _D.QuestCinnamonTreeGrove) != null && _E.is_fuel_enabled || (_G = (_F = user.quests) == null ? void 0 : _F.QuestGolemWorkshop) != null && _G.is_fuel_enabled || (_I = (_H = user.quests) == null ? void 0 : _H.QuestIceFortress) != null && _I.is_fuel_enabled ? (reminderOpts.text = "Festive Spirit is active.", reminderOpts.button = "Deactivate") : getCurrentLocation() === "winter_hunt_forest" && (reminderOpts.text = "Festive Spirit is <strong>not</strong> active.", reminderOpts.button = "Activate"), reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/large/cda292833fce3b65b7a6a38c000e8620.png", reminderOpts.action = () => {
            let toggle = document.querySelector(".headsUpDisplayWinterHuntRegionView__fuelButton");
            toggle && toggle.click();
          };
      }
      reminderOpts.text && showHornMessage(reminderOpts);
    }, reminders_default = addReminders;
  }
});

// src/modules/better-travel/modules/travel-window/styles.css
var styles_default26, init_styles27 = __esm({
  "src/modules/better-travel/modules/travel-window/styles.css"() {
    styles_default26 = `.mh-improved-travel-window .greatWinterHuntGolemDestinationView__content{flex-direction:column;align-items:center;background-color:transparent}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentsScroller{height:auto;min-height:425px;max-height:650px;padding:0 0 10px 5px;margin-right:-5px}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__regionEnvironments{gap:15px 6px;justify-content:space-evenly}.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}.mh-improved-travel-window-environment-icon{cursor:pointer}.mh-improved-travel-window-search-input-wrapper{margin-bottom:15px}.mh-improved-travel-window-search-input,input.mh-improved-travel-window-search-input[type=text]{width:auto;min-width:350px;padding:10px;font-size:14px;border:1px solid #333}.greatWinterHuntGolemDestinationView__environment.greatWinterHuntGolemDestinationView__environment--active{opacity:.4}
`;
  }
});

// src/modules/better-travel/modules/travel-window/index.js
var getHiddenLocations, toggleLocation, hideLocation, unhideLocation, isLocationHidden, openTravelWindow, isEditing, environments2, makeMenuItem2, addEnvironmentIconListener, travel_window_default, init_travel_window = __esm({
  "src/modules/better-travel/modules/travel-window/index.js"() {
    init_utils2();
    init_utils4();
    init_styles27();
    getHiddenLocations = () => getTravelSetting("travel-window-hidden-locations", []), toggleLocation = (location2) => {
      isLocationHidden(location2) ? unhideLocation(location2) : hideLocation(location2);
    }, hideLocation = (location2) => {
      let hiddenLocations = getHiddenLocations();
      hiddenLocations.includes(location2) || (hiddenLocations.push(location2), saveTravelSetting("travel-window-hidden-locations", hiddenLocations));
    }, unhideLocation = (location2) => {
      let hiddenLocations = getHiddenLocations();
      hiddenLocations.includes(location2) && (hiddenLocations.splice(hiddenLocations.indexOf(location2), 1), saveTravelSetting("travel-window-hidden-locations", hiddenLocations));
    }, isLocationHidden = (location2) => getHiddenLocations().includes(location2), openTravelWindow = () => __async(void 0, null, function* () {
      debug("Opening travel window");
      let 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");
      let eventEnvironments2 = yield getData("environments-events");
      environments2 = [...environments2, ...eventEnvironments2];
      let currentEnvironment = environments2.find((e) => e.id === getCurrentLocation()), locationsToRemove = ["acolyte_realm"];
      environments2 = environments2.map((env) => (isUserTitleAtLeast(env.title) || locationsToRemove.push(env.id), 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="mh-improved-travel-window-search-input-wrapper"><input type="text" class="mh-improved-travel-window-search-input" placeholder="Search locations"></div>', content += '<div class="greatWinterHuntGolemDestinationView__regionsContainer">';
      for (let region of regions2) {
        let buttonClass = "greatWinterHuntGolemDestinationView__regionButton";
        (currentEnvironment == null ? void 0 : currentEnvironment.region) === (region == null ? void 0 : region.type) && (buttonClass += " greatWinterHuntGolemDestinationView__regionButton--active"), content += `<button class="${buttonClass}" data-region-type="${region.type}">${region.name}</button>`;
      }
      content += "</div>";
      let hasTitles = !1;
      content += '<div class="greatWinterHuntGolemDestinationView__environmentsContainer"><div class="greatWinterHuntGolemDestinationView__environmentsScroller"><div class="greatWinterHuntGolemDestinationView__regionList">', hasTitles || (content += `<div class="greatWinterHuntGolemDestinationView__regionGroup" data-region-type="all">
    <div class="greatWinterHuntGolemDestinationView__regionEnvironments">`);
      for (let region of regions2)
        hasTitles && (content += `<div class="greatWinterHuntGolemDestinationView__regionGroup" data-region-type="${region.type}">
      <div class="greatWinterHuntGolemDestinationView__regionName">${region.name}</div>
      <div class="greatWinterHuntGolemDestinationView__regionEnvironments">`), environments2.filter((e) => e.region === region.type).forEach((environment) => {
          let envButtonClass = "greatWinterHuntGolemDestinationView__environment";
          currentEnvironment && currentEnvironment.id && currentEnvironment.id === environment.id && (envButtonClass += " greatWinterHuntGolemDestinationView__environment--active"), isLocationHidden(environment.id) && (envButtonClass += " mh-improved-travel-window-hidden"), environment.type === getCurrentLocation() && (envButtonClass += " greatWinterHuntGolemDestinationView__environment--current"), 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>`;
        }), hasTitles && (content += "</div></div>");
      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>";
      let popup = createPopup({
        id: "mh-improved-travel-window",
        title: "",
        content,
        className: "mh-improved-travel-window-popup jsDialogFixed",
        show: !1
      });
      popup.setOffsetHeight(0), popup.setPersistentOffsetHeight(0), popup.setIsModal(!1), popup.show();
      let travelWindow = document.querySelector(".mh-improved-travel-window");
      if (!travelWindow)
        return;
      let editButton = document.querySelector(".mh-improved-travel-window-edit");
      if (!editButton)
        return;
      let editButtonSpan = editButton.querySelector("span");
      if (!editButtonSpan)
        return;
      let environmentButtons = document.querySelectorAll(".greatWinterHuntGolemDestinationView__environment");
      if (!environmentButtons)
        return;
      editButton.addEventListener("click", () => {
        isEditing = !isEditing, isEditing ? (travelWindow.classList.add("mh-improved-travel-window--editing"), editButtonSpan.textContent = "Save", editButton.classList.add("active")) : (travelWindow.classList.remove("mh-improved-travel-window--editing"), editButtonSpan.textContent = "Edit", editButton.classList.remove("active"));
      }), environmentButtons.forEach((button) => {
        let environmentType = button.getAttribute("data-environment-type");
        button.addEventListener("click", () => {
          isEditing ? (toggleLocation(environmentType), button.classList.toggle("mh-improved-travel-window-hidden")) : (debug(`Traveling to ${environmentType}`), travelTo(environmentType), setPage("Camp"), popup.hide());
        });
      }), onDialogHide(() => {
        isEditing = !1;
      });
      let search = document.querySelector(".mh-improved-travel-window-search-input");
      search && (search.focus(), search.addEventListener("input", () => {
        let value = search.value.trim().toLowerCase();
        environmentButtons.forEach((button) => {
          let environmentType = button.getAttribute("data-environment-type"), environment = environments2.find((e) => e.id === environmentType);
          button.style.display = environment.name.toLowerCase().includes(value) ? "block" : "none";
        });
      }), search.addEventListener("keydown", (e) => {
        if (e.key === "Enter") {
          let visibleButton = document.querySelector('.greatWinterHuntGolemDestinationView__environment[style="display: block;"]');
          visibleButton && !visibleButton.classList.contains("greatWinterHuntGolemDestinationView__environment--active") && visibleButton.click();
        }
      }));
    }), isEditing = !1, environments2 = [], makeMenuItem2 = () => {
      addSubmenuItem({
        id: "mh-improved-travel-window",
        menu: "travel",
        label: "Travel Window",
        icon: "https://i.mouse.rip/icons/tiles.png",
        callback: () => openTravelWindow()
      });
    }, addEnvironmentIconListener = () => {
      let environmentIcon = document.querySelector(".mousehuntHud-environmentIcon");
      environmentIcon && (environmentIcon.classList.add("mh-improved-travel-window-environment-icon"), environmentIcon.title = "Open Travel Window", environmentIcon.addEventListener("click", () => {
        openTravelWindow();
      }));
    }, travel_window_default = () => __async(void 0, null, function* () {
      addStyles(styles_default26, "better-travel-travel-window"), makeMenuItem2(), getSetting("better-travel.travel-window-environment-icon", !0) && addEnvironmentIconListener(), onEvent("mh-improved-open-travel-window", openTravelWindow), environments2 = yield getData("environments");
    });
  }
});

// src/modules/better-travel/settings/index.js
var settings_default12, init_settings13 = __esm({
  "src/modules/better-travel/settings/index.js"() {
    settings_default12 = () => __async(void 0, null, function* () {
      return [
        {
          id: "better-travel.default-to-simple-travel",
          title: "Show Simple Travel tab by default",
          default: !1
        },
        {
          id: "better-travel.show-alphabetized-list",
          title: "Show alphabetized list on Simple Travel",
          default: !1
        },
        {
          id: "better-travel.show-reminders",
          title: "Show Travel Reminders",
          default: !0
        },
        {
          id: "better-travel.travel-window",
          title: "Travel Window",
          default: !0
        },
        {
          id: "better-travel.travel-window-environment-icon",
          title: "Environment icon opens Travel Window",
          default: !0
        }
      ];
    });
  }
});

// src/modules/better-travel/styles/styles.css
var styles_default27, init_styles28 = __esm({
  "src/modules/better-travel/styles/styles.css"() {
    styles_default27 = `.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,.travelPage-regionMenu-environmentLink.current{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:200px;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,#mh-simple-travel-page .travelPage-regionMenu-environmentLink.current{color:#4e6081}#mh-simple-travel-page .travelPage-regionMenu-environmentLink:hover,#mh-simple-travel-page .travelPage-regionMenu-environmentLink:focus{color:#fff;background-color:#6383bf;border-radius:3px}.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,#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.current.highlight{margin-right:-3px;border-right:1px solid #4c71b4}#mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environmentLink.active.highlight,#mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environmentLink.current.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);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:3px;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);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.current.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.current.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);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);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}.mh-improved-better-travel-favorite-location .icon,.mh-improved-better-travel-region-location .icon{border:1px solid #9f9171;border-radius:3px}.mh-improved-travel-message.travelPage-map-message.active{top:46px;box-shadow:0 3px 6px -3px #333}.mh-improved-travel-message.travelPage-map-message .mousehuntActionButton{padding:3px 10px;font-size:11px}.mh-improved-travel-message>div{display:none}.travelPage-map-image-environment-pointer{top:5px;left:29px;width:140px;height:116px;background-size:cover}.travelPage-map-image-environment-pointer-image{top:10px;left:6px;width:70px;height:70px}.huntersHornView__message.huntersHornView__message--active.travel-reminder .huntersHornMessageView--unknown_error .huntersHornMessageView__content:before{display:none}.huntersHornView__message.huntersHornView__message--active.travel-reminder .huntersHornMessageView--unknown_error{border-image-source:url(https://i.mouse.rip/horn-message-blank-pink.png)}
`;
  }
});

// src/modules/better-travel/styles/travel-menu-hiding.css
var travel_menu_hiding_default, init_travel_menu_hiding = __esm({
  "src/modules/better-travel/styles/travel-menu-hiding.css"() {
    travel_menu_hiding_default = `ul.fast-travel-list>li:not(.custom-submenu-item){display:none}
`;
  }
});

// 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, main11, environments3, eventEnvironments, init14, better_travel_default, init_better_travel = __esm({
  "src/modules/better-travel/index.js"() {
    init_utils2();
    init_utils4();
    init_reminders();
    init_travel_window();
    init_settings13();
    init_styles28();
    init_travel_menu_hiding();
    expandTravelRegions = () => {
      var _a, _b;
      if (getCurrentPage() !== "travel")
        return;
      let hud5 = document.querySelector("#mousehuntHud");
      if (hud5) {
        let hudHeight = hud5.offsetHeight + 30, map = document.querySelector(".travelPage-mapContainer.full");
        map && (map.style.height = `calc(100vh - ${hudHeight}px)`);
      }
      let regionHeaders = document.querySelectorAll(".travelPage-regionMenu-regionLink");
      regionHeaders && regionHeaders.forEach((regionHeader) => {
        regionHeader.setAttribute("onclick", "return false;");
      });
      let travelAreas = document.querySelectorAll(".travelPage-regionMenu-item");
      travelAreas && travelAreas.length > 0 && travelAreas.forEach((area) => {
        area.classList.add("active"), area.classList.remove("contracted");
      });
      let locations = document.querySelectorAll(".travelPage-map-image-environment.active");
      locations && locations.length > 0 && locations.forEach((location2) => {
        location2.addEventListener("mouseover", () => {
          location2.classList.add("highlight");
        }), location2.addEventListener("mouseout", () => {
          setTimeout(() => {
            location2.classList.remove("highlight");
          }, 1e3);
        });
      }), (_b = (_a = app == null ? void 0 : app.pages) == null ? void 0 : _a.TravelPage) != null && _b.zoomOut && setTimeout(() => {
        app.pages.TravelPage.zoomOut();
      }, 500);
    }, travelClickHandler = (event) => {
      var _a, _b;
      (_b = (_a = app == null ? void 0 : app.pages) == null ? void 0 : _a.TravelPage) != null && _b.travel && (travelTo(event.target.getAttribute("data-environment")), setPage("Camp"));
    }, cloneRegionMenu = () => {
      let regionMenu = document.querySelector(".travelPage-regionMenu");
      if (!regionMenu)
        return !1;
      let regionMenuClone = regionMenu.cloneNode(!0), travelLinks = regionMenuClone.querySelectorAll(".travelPage-regionMenu-environmentLink");
      return travelLinks && travelLinks.length > 0 && travelLinks.forEach((link) => {
        link.setAttribute("onclick", "return false;"), link.addEventListener("click", travelClickHandler);
      }), regionMenuClone;
    }, addTab = (id, label) => {
      if (getCurrentPage() !== "travel" || document.querySelector(`#mh-${id}-tab`))
        return;
      let tabContainer = document.querySelector(".mousehuntHud-page-tabHeader-container");
      if (!tabContainer)
        return;
      let 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 (getCurrentPage() !== "travel" || document.querySelector(`#mh-${id}-page`))
        return;
      let pageContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
      if (!pageContainer)
        return;
      let page = makeElement("div", ["mousehuntHud-page-tabContent", id]);
      if (page.id = `mh-${id}-page`, page.setAttribute("data-tab", id), content)
        page.append(content);
      else {
        let blank = makeElement("div");
        page.append(blank);
      }
      pageContainer.append(page);
    }, addAlphabetizedList = (regionMenu) => {
      let alphaWrapper = makeElement("div", "travelPage-alpha-wrapper"), alphaContent = makeElement("div", "travelPage-regionMenu"), alphaHeader = makeElement("div", ["travelPage-regionMenu-item", "active"]), alphaList = makeElement("div", "travelPage-regionMenu-item-contents"), alphaListContent = makeElement("div", "travelPage-regionMenu-environments"), sortedLinks = [...regionMenu.querySelectorAll(".travelPage-regionMenu-environmentLink")].sort((a, b) => {
        let aName = a.innerText, bName = b.innerText;
        return aName < bName ? -1 : aName > bName ? 1 : 0;
      }), lastLetter = "";
      return sortedLinks.forEach((link) => {
        let linkClone = link.cloneNode(!0);
        alphaListContent.append(linkClone), linkClone.addEventListener("click", travelClickHandler);
        let firstLetter = linkClone.innerText.charAt(0).toLowerCase();
        firstLetter !== lastLetter && linkClone.classList.add("first-letter"), lastLetter = firstLetter, environments3.find((env) => env.id === link.getAttribute("data-environment")) || linkClone.classList.add("event-location");
      }), alphaList.append(alphaListContent), alphaHeader.append(alphaList), alphaContent.append(alphaHeader), alphaWrapper.append(alphaContent), alphaWrapper;
    }, addSimpleTravelPage = () => {
      expandTravelRegions();
      let wrapper = makeElement("div", "travelPage-wrapper");
      if (getSetting("better-travel.default-to-simple-travel", "not-set") === "not-set") {
        let 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);
      }
      let regionMenu = cloneRegionMenu();
      getSetting("better-travel.show-alphabetized-list", !1) && wrapper.append(addAlphabetizedList(regionMenu)), wrapper.append(regionMenu), addPage("simple-travel", wrapper);
    }, addSimpleTravel = () => {
      getCurrentPage() === "travel" && (addTab("simple-travel", "Simple Travel"), addSimpleTravelPage());
    }, getPreviousLocation = () => {
      let previousLocation = getSetting("better-travel.previous-location", !1);
      return previousLocation && previousLocation !== getCurrentLocation() ? environments3.find((environment) => environment.id === previousLocation) : !1;
    }, goToPreviousLocation = () => {
      let previousLocation = getPreviousLocation();
      previousLocation && travelTo(previousLocation.id);
    }, addToTravelDropdown = () => __async(void 0, null, function* () {
      let currentLocation = getCurrentLocation(), eventEnvironments2 = yield getData("environments-events");
      environments3.push(...eventEnvironments2);
      let currentRegion = environments3.find((environment) => environment.id === currentLocation);
      if (!currentRegion && (currentRegion = eventEnvironments2.find((environment) => environment.id === currentLocation), !currentRegion))
        return;
      let otherRegions = environments3.filter((environment) => !(environment != null && environment.region) || !(currentRegion != null && currentRegion.region) ? !1 : environment.region === currentRegion.region);
      otherRegions.splice(otherRegions.findIndex((environment) => environment.id === currentLocation), 1);
      let existingCustomSubmenuItems = document.querySelectorAll(".mh-improved-better-travel-menu-item");
      existingCustomSubmenuItems && existingCustomSubmenuItems.forEach((item) => {
        item.remove();
      });
      let previousLocation = getPreviousLocation();
      previousLocation && addSubmenuItem({
        menu: "travel",
        label: `Back to ${previousLocation.name}`,
        icon: "https://i.mouse.rip/icons/back.png",
        callback: goToPreviousLocation,
        class: "mh-improved-better-travel-menu-item mh-improved-better-travel-previous-location"
      }), otherRegions.forEach((region) => {
        region.id !== currentLocation && addSubmenuItem({
          menu: "travel",
          label: region.name,
          icon: region.image,
          callback: () => travelTo(region.id),
          class: "mh-improved-better-travel-menu-item mh-improved-better-travel-region-location"
        });
      });
      let favorites = getLocationFavorites();
      favorites && favorites.length > 0 && (addSubmenuDivider("travel", "mh-improved-better-travel-favorites-divider"), favorites.forEach((favorite) => {
        let favoriteRegion = environments3.find((environment) => environment.id === favorite);
        favoriteRegion && addSubmenuItem({
          menu: "travel",
          label: favoriteRegion.name,
          icon: favoriteRegion.image,
          callback: () => travelTo(favoriteRegion.id),
          class: "mh-improved-better-travel-menu-item mh-improved-better-travel-favorite-location"
        });
      }));
    }), onTravelComplete = () => {
      onEvent("travel_complete", () => {
        saveTravelLocation(), setTimeout(() => {
          getSetting("better-travel.show-reminders", !0) && reminders_default(), addToTravelDropdown();
        }, 250);
      });
    }, initSimpleTab = () => {
      if (getCurrentTab() === "simple-travel") {
        let isActive = document.querySelector(".mousehuntHud-page-tabContent.simple-travel");
        if (!isActive || isActive && isActive.classList.contains("active"))
          return;
        setTab("simple-travel");
      }
    }, maybeSetTab = () => {
      getCurrentPage() === "travel" && (initSimpleTab(), getCurrentTab() === "map" && getSetting("better-travel.default-to-simple-travel", !1) && setTab("simple-travel"));
    }, addRhToSimpleTravel = () => __async(void 0, null, function* () {
      let location2 = yield getRelicHunterLocation();
      if (!location2)
        return;
      let travelLink = document.querySelectorAll(`.travelPage-regionMenu-environmentLink[data-environment="${location2.id}"]`);
      travelLink.length && travelLink.forEach((link) => {
        link.classList.add("relic-hunter-is-here");
      });
    }), addRhToMap = () => __async(void 0, null, function* () {
      let location2 = yield getRelicHunterLocation();
      if (!location2)
        return;
      let mapLocation = document.querySelector(`.travelPage-map-image-environment[data-environment-type="${location2.id}"]`);
      if (!mapLocation)
        return;
      let 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 = () => {
      getCurrentPage() === "travel" && getCurrentTab() === "map" && (expandTravelRegions(), addRhToMap());
    }, _tabHandler = null, listenTabChange = () => {
      var _a, _b;
      _tabHandler || (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.onclickPageTabHandler && (_tabHandler = hg.utils.PageUtil.onclickPageTabHandler, hg.utils.PageUtil.onclickPageTabHandler = (tab) => {
        _tabHandler(tab), maybeDoMapView();
      });
    }, saveTravelLocation = () => {
      if (sessionGet("doing-location-refresh", !1))
        return;
      let previousLocation = getTravelSetting("current-location", "not-set"), currentLocation = getCurrentLocation();
      currentLocation !== previousLocation && (saveTravelSetting("previous-location", previousLocation), saveTravelSetting("current-location", currentLocation));
    }, getLocationFavorites = () => getSetting("better-travel.favorites", []), isLocationFavorite = (type) => getLocationFavorites().includes(type), saveLocationFavorites = (favorites) => {
      saveTravelSetting("favorites", favorites);
    }, addToLocationFavorites = (type) => {
      if (!isLocationFavorite(type)) {
        let faves = getLocationFavorites();
        faves.push(type), saveLocationFavorites(faves);
      }
    }, removeFromLocationFavorites = (type) => {
      if (getLocationFavorites()) {
        let faves = getLocationFavorites();
        faves.splice(faves.indexOf(type), 1), saveLocationFavorites(faves);
      }
    }, addFavoriteButtonsToTravelPage = () => __async(void 0, null, function* () {
      let locations = document.querySelectorAll(".travelPage-map-environment-detailContainer .travelPage-map-environment-detail");
      if (!locations)
        return;
      let locationFavorites = getLocationFavorites();
      locations.forEach((location2) => {
        let type = location2.getAttribute("data-environment-type");
        if (!type || eventEnvironments.find((environment) => environment.id === type))
          return;
        let isFavorite2 = locationFavorites.includes(type);
        makeFavoriteButton({
          id: `better-travel-favorite-${type}`,
          target: location2.querySelector(".travelPage-map-environment-detail-title"),
          size: "small",
          state: isFavorite2,
          isSetting: !1,
          defaultState: !1,
          /**
           * Callback for when the favorite button is clicked.
           */
          onActivate: () => {
            addToLocationFavorites(type), addToTravelDropdown();
          },
          /**
           * Callback for when the favorite button is deactivated.
           */
          onDeactivate: () => {
            removeFromLocationFavorites(type), removeSubmenuItem(type);
          }
        });
      });
    }), main11 = () => {
      getSetting("better-travel.travel-window", !0) && 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 = [], eventEnvironments = [], init14 = () => __async(void 0, null, function* () {
      let stylesJoined = [styles_default27];
      getFlag("no-travel-menu-hiding") || stylesJoined.push(travel_menu_hiding_default), addStyles(stylesJoined, "better-travel"), environments3 = yield getData("environments"), eventEnvironments = yield getData("environments-events"), main11();
    }), better_travel_default = {
      id: "better-travel",
      name: "Better Travel",
      type: "better",
      default: !0,
      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_default12
    };
  }
});

// src/modules/big-timer/legacy-styles.css
var legacy_styles_default, init_legacy_styles = __esm({
  "src/modules/big-timer/legacy-styles.css"() {
    legacy_styles_default = `.big-timer.huntersHornView__timer.huntersHornView__timer.countdown:after{content:""}.big-timer.huntersHornView__timer.huntersHornView__timer--legacy.countdown .huntersHornView__timerState--type-countdown:before{content:""}.big-timer.huntersHornView__timer.huntersHornView__timer.countdown{position:absolute;top:60px;left:270px;z-index:100;padding:2px;background-color:#d9c9a0;border-radius:5px;box-shadow:0 -1px #ded9c3;transform:scale(2.6)}
`;
  }
});

// src/modules/big-timer/styles.css
var styles_default28, init_styles29 = __esm({
  "src/modules/big-timer/styles.css"() {
    styles_default28 = `.big-timer.huntersHornView__timer.huntersHornView__timer.countdown{position:absolute;top:40px;left:185px;z-index:100;transform:scale(2.2)}.big-timer.huntersHornView__timer.huntersHornView__timer.countdown:after{position:absolute;top:6px;right:5px;left:5px;font-size:14px;text-align:center;content:"Next Hunt";background:linear-gradient(180deg,#fef2b8,#ecdfae)}
`;
  }
});

// src/modules/big-timer/index.js
var toggleBigTimer, init15, big_timer_default, init_big_timer = __esm({
  "src/modules/big-timer/index.js"() {
    init_utils2();
    init_legacy_styles();
    init_styles29();
    toggleBigTimer = () => {
      let timer = document.querySelector(".huntersHornView__timer");
      if (!timer)
        return;
      let isBigTimer = timer.classList.contains("big-timer");
      timer.addEventListener("click", () => {
        isBigTimer = !isBigTimer, timer.classList.toggle("big-timer", isBigTimer);
      });
    }, init15 = () => __async(void 0, null, function* () {
      addStyles([
        styles_default28,
        isLegacyHUD() ? legacy_styles_default : ""
      ], "experiment-big-timer"), toggleBigTimer(), setTimeout(toggleBigTimer, 1e3);
    }), big_timer_default = {
      id: "big-timer",
      name: "Big Timer",
      type: "feature",
      default: !1,
      description: "Click the timer to toggle between normal and big sizes.",
      load: init15
    };
  }
});

// src/modules/better-ui/modules/friends/index.js
var reorderBlocks, addSelect2Toggles, toggleSelect2, autofocusIdSearch, friends_default, init_friends = __esm({
  "src/modules/better-ui/modules/friends/index.js"() {
    init_utils2();
    reorderBlocks = () => {
      if (getCurrentPage() !== "friends")
        return;
      let reordered = document.querySelector(".mousehuntHud-page-subTabContent.community");
      if (!reordered || reordered.getAttribute("data-reordered"))
        return;
      let blocks = document.querySelectorAll(".friendsPage-community-channel");
      if (!blocks || blocks.length < 3)
        return;
      let block = blocks[2], parent = block.parentNode;
      block.remove(), parent.insertBefore(block, parent.firstChild), block.classList.add("friends-page-id-search");
      let input = block.querySelector("input");
      input && input.setAttribute("data-1p-ignore", "true"), reordered.setAttribute("data-reordered", "true");
    }, addSelect2Toggles = () => {
      let environmentToggle = document.querySelector('.friendsPage-list-filter[data-filter="environment_id"] .friendsPage-list-filter-label');
      environmentToggle && environmentToggle.addEventListener("click", () => toggleSelect2(".friendsPage-environment-filter"));
      let friendToggle = document.querySelector('.friendsPage-list-filter[data-filter="snuid"] .friendsPage-list-filter-label');
      friendToggle && friendToggle.addEventListener("click", () => toggleSelect2(".active .friendsPage-list-search"));
    }, toggleSelect2 = (className) => {
      let select2 = document.querySelector(`${className}.select2-container`);
      if (!select2)
        return;
      let original = document.querySelector(`${className}.select2-offscreen`);
      if (!original && (original = document.querySelector(`${className}.select2-onscreen-now`), !original))
        return;
      let select2Hidden = select2.style.display === "none";
      select2.style.display = select2Hidden ? "" : "none", select2Hidden ? (original.classList.add("select2-offscreen"), original.classList.remove("select2-onscreen-now")) : (original.classList.remove("select2-offscreen"), original.classList.add("select2-onscreen-now"));
    }, autofocusIdSearch = () => {
      let input = document.querySelector(".friendsPage-community-hunterIdForm-input");
      input && input.focus();
    }, friends_default = () => __async(void 0, null, function* () {
      onNavigation(reorderBlocks, {
        page: "friends"
      }), onNavigation(addSelect2Toggles, {
        page: "friends",
        anyTab: !0,
        anySubtab: !0
      }), onNavigation(autofocusIdSearch, {
        page: "friends",
        tab: "requests",
        subtab: "community"
      });
    });
  }
});

// src/modules/better-ui/modules/hud/index.js
var showFullTitlePercent, replaceInboxClose, replaceKingdomLink, hud_default, init_hud = __esm({
  "src/modules/better-ui/modules/hud/index.js"() {
    init_utils2();
    showFullTitlePercent = () => __async(void 0, null, function* () {
      let title = document.querySelector(".mousehuntHud-userStat.title");
      if (!title)
        return;
      let percent = title.getAttribute("title");
      if (!percent)
        return;
      let target = title.querySelector(".hud_titlePercentage");
      if (!target)
        return;
      let 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* () {
      let 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* () {
      let kingdomLink = document.querySelector('.mousehuntHud-menu .kingdom a[href="https://www.mousehuntgame.com/forum.php"]');
      kingdomLink && (kingdomLink.href = "https://www.mousehuntgame.com/news.php", kingdomLink.setAttribute("data-page", "News"));
    }), hud_default = () => __async(void 0, null, function* () {
      showFullTitlePercent(), replaceInboxClose(), getFlag("no-kingdom-link-replacement") || replaceKingdomLink(), onTurn(showFullTitlePercent, 1e3);
    });
  }
});

// src/modules/better-ui/modules/userscript-styles/any-trap-any-skin.css
var any_trap_any_skin_default, init_any_trap_any_skin = __esm({
  "src/modules/better-ui/modules/userscript-styles/any-trap-any-skin.css"() {
    any_trap_any_skin_default = `#custom-skins-flex{display:flex;gap:10px;align-items:center;justify-content:center}.buttonstyle{position:relative;display:block;width:100px;height:25px;margin:5px;line-height:25px;color:#926944;background-color:#f6f3eb!important;border:1px solid #d3cecb;border-radius:4px;box-shadow:-1px 1px 3px #d3cecb inset}.buttonstyle:hover{color:#926944;background-color:#fdfaf2!important}.buttonstyle[style*="rgb(34, 139, 34);"]{color:#fff;background-color:#5ccd5d!important}.buttonstyle[style*="rgb(34, 139, 34);"]:hover{background-color:#2e942f!important}#trap-skin-button:after,#base-skin-button:after{position:absolute;inset:0;display:flex;justify-content:center;content:"Toggle Trap"}#base-skin-button:after{content:"Toggle Base"}#wb-steal{margin-left:10px}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/favorite-setups.css
var favorite_setups_default, init_favorite_setups = __esm({
  "src/modules/better-ui/modules/userscript-styles/favorite-setups.css"() {
    favorite_setups_default = `#tsitu-fave-setups{z-index:100}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/journal-historian.css
var journal_historian_default, init_journal_historian = __esm({
  "src/modules/better-ui/modules/userscript-styles/journal-historian.css"() {
    journal_historian_default = `.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}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/lgs-reminder.css
var lgs_reminder_default, init_lgs_reminder = __esm({
  "src/modules/better-ui/modules/userscript-styles/lgs-reminder.css"() {
    lgs_reminder_default = `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}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/mhct.css
var mhct_default2, init_mhct2 = __esm({
  "src/modules/better-ui/modules/userscript-styles/mhct.css"() {
    mhct_default2 = `#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}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/profile-plus.css
var profile_plus_default, init_profile_plus = __esm({
  "src/modules/better-ui/modules/userscript-styles/profile-plus.css"() {
    profile_plus_default = `.mouseCrownsView-group.favourite .mouseCrownsView-group-header .mouseCrownsView-crown,.mouseCrownsView-group.favourite .mouseCrownsView-group-header-name{display:inline-block}.mouseCrownsView-group-mouse-favouriteButton{top:2px;left:2px}.mouseCrownsView .pt.event{border-radius:50%}.mouseCrownsView #copyCrownsButton{width:16px!important;height:16px!important;background-color:transparent!important;border:none!important}.mouseCrownsView .pt{position:absolute;top:3px;right:3px;padding:2px;border-radius:50%}.mouseCrownsView button.ptbtn{font-size:14px!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 .toolBar{position:absolute;top:-1px;right:9px;display:flex;gap:2px;align-items:center;justify-content:flex-end;float:none!important;padding:1px;background-color:#ececec;border:1px solid #a7a7a7;border-radius:0 5px;opacity:.5}.mouseCrownsView .toolBar:hover{opacity:1}.powerCrown .mouseCrownsView-group-header-name,.mouseCrownsView-crown.powerCrown{display:none!important}.mouseCrownsView-group-header.powerCrown{padding:0;margin:0;background-color:transparent!important}button.ptbtn img{left:unset!important;width:auto!important;height:50px!important}.mouseCrownsView button.ptbtn>div{top:unset!important;right:unset!important;bottom:unset!important;left:unset!important;width:unset!important}button.ptbtn{display:grid;grid-template-columns:1fr 2fr 2fr;place-content:center flex-start;place-items:center center;width:100%!important;max-width:180px;height:unset!important;background-color:#00b0eb!important;border-width:1px}#powerTypeBtns{display:flex;flex-wrap:wrap;gap:5px;justify-content:center;padding:6px;margin:0;background-color:transparent}.mouseCrownsView-crown.community{padding-right:5px}.mouseCrownsView-group-header.community{margin:10px}.rank.summary{line-height:1.5}img.pt.undefined{display:none}a.mouseListView-categoryContent-subgroup-mouse-thumb{position:relative;border:none!important;border-radius:0!important}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image{border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.mouseCrownsView-group-mice.favourites img.pt{display:none}.hideLeContainer{position:absolute;top:-9px;right:0;display:flex;flex-direction:row-reverse;opacity:.5}.hideLeContainer:hover{opacity:1}.hideLeContainer #hideLeCb{width:auto!important}.hideLeContainer label{font-size:10px!important;line-height:18px;text-align:right;vertical-align:middle}.mouseCrownsView-group-mouse-image{border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/spring-egg-hunt-helper.css
var spring_egg_hunt_helper_default, init_spring_egg_hunt_helper = __esm({
  "src/modules/better-ui/modules/userscript-styles/spring-egg-hunt-helper.css"() {
    spring_egg_hunt_helper_default = `.eggs-wrapper .egg-wrapper-unfound img{filter:sepia(1);mix-blend-mode:multiply;opacity:.5}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/tsitu-autoloader.css
var tsitu_autoloader_default, init_tsitu_autoloader = __esm({
  "src/modules/better-ui/modules/userscript-styles/tsitu-autoloader.css"() {
    tsitu_autoloader_default = `#mht-bookmarklet-loader{width:225px!important;padding:0 0 20px!important;color:transparent;background:#f6f3eb!important;border:1px solid #534022!important;border-radius:0!important;box-shadow:1px 1px 1px #9d917f,1px 3px 5px #6a6969}#mht-bookmarklet-loader button:first-of-type{position:absolute;top:7px;right:5px;width:20px;height:20px;padding:0;margin:0;font-size:16px;color:#fff;background-color:transparent;border:none;box-shadow:none}#mht-bookmarklet-loader button:first-of-type:hover{color:#926944;background-color:#eee;border-radius:50%;outline:1px solid #ccc}#mht-bookmarklet-loader br+br,#mht-bookmarklet-loader br:first-of-type,#mht-bookmarklet-loader span[style*=font-size]{display:none}#mht-bookmarklet-loader span:first-of-type{display:flex;align-items:center;justify-content:space-between;padding:10px!important;margin-bottom:-30px;font-weight:400!important;color:#f6f3eb;cursor:grab;background-color:#926944;border-bottom:1px solid #ceb7a6}#mht-bookmarklet-loader button{width:174px;padding:5px 15px;margin:0;color:#000;text-shadow:0 0 1px #fff;background-color:#fff600;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}#mht-bookmarklet-loader button:hover{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}#mht-bookmarklet-loader span{color:#000}#mht-bookmarklet-loader span:nth-of-type(2){position:absolute;right:0;bottom:4px;left:0}#mht-bookmarklet-loader span:nth-of-type(3){position:absolute;right:0;bottom:20px;left:0;display:inline;margin:0}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/tsitu-location-catch-stats.css
var tsitu_location_catch_stats_default, init_tsitu_location_catch_stats = __esm({
  "src/modules/better-ui/modules/userscript-styles/tsitu-location-catch-stats.css"() {
    tsitu_location_catch_stats_default = `#tsitu-location-stats{width:300px!important;padding:0!important;background:#f6f3eb!important;border:1px solid #534022!important;border-radius:0!important;box-shadow:1px 1px 1px #9d917f,1px 3px 5px #6a6969!important}#tsitu-location-stats span[style="font-weight: bold; font-size: 18px; text-decoration: underline; padding-left: 20px;"]{display:flex;align-items:center;justify-content:space-between;padding:10px!important;font-size:1.5em!important;font-weight:400!important;color:#f6f3eb;text-decoration:none!important;cursor:grab;background-color:#926944;border-bottom:1px solid #ceb7a6}#tsitu-location-stats button[style="float: right; font-size: 8px;"]{position:absolute;top:7px;right:5px;width:20px;height:20px;font-size:16px!important;color:#fff;background-color:transparent;border:none}#tsitu-location-stats button[style="float: right; font-size: 8px;"]:hover{color:#926944;background-color:#eee;border-radius:50%;outline:1px solid #926944}#tsitu-location-stats>div br{display:none}#tsitu-location-stats>div span br{display:block}#tsitu-location-stats>div span br:first-child,#tsitu-location-stats>div span br:last-child{display:none}#tsitu-location-stats>div span{line-height:20px}#tsitu-location-stats>div span>button,.tsitu-current-detail>span>button,#tsitu-location-stats>button{padding:2px 15px;margin:10px 0;line-height:1.5;color:#000;text-shadow:0 0 1px #fff;background-color:#fff600;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}#tsitu-location-stats>div span>button:hover,.tsitu-current-detail>span>button:hover,#tsitu-location-stats>button:hover{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}#tsitu-location-stats>div span>button{display:inline;padding:3px 5px;margin:.25em .75em;line-height:1}.tsitu-current-detail>span>button{display:block;margin:.25em auto}#tsitu-hideCaught-box{margin:0 3px;vertical-align:bottom}#tsitu-location-stats>span{padding:.125em;font-size:.9em}#tsitu-location-stats details{position:relative;padding:.5em}#tsitu-location-stats details details:nth-child(2n){background-color:#e8e3d7}#tsitu-location-stats details[style="font-size: 16px;"]{margin:.25em 0;border-top:1px solid #926944}#tsitu-complete-box,#tsitu-incomplete-box{position:absolute;top:0;right:0}.tsitu-complete-box-label,.tsitu-incomplete-box-label{position:absolute;top:3px;right:20px;font-size:10px!important;color:#7b6b47;text-align:right}#tsitu-location-stats details[style="font-size: 16px;"]>summary{margin:.5em 0}.tsitu-current-detail>span{line-height:1.5}#tsitu-location-stats span[style="font-style: italic; font-size: 12px;"]{display:block;margin-left:1.5em;font-size:10px!important;line-height:2;color:#7b6b47}.tsitu-current-detail>br:first-of-type,.tsitu-current-detail>span br:nth-of-type(1),.tsitu-current-detail>span br:nth-of-type(2),.tsitu-current-detail>span br:nth-last-of-type(1),.tsitu-current-detail>span br:nth-last-of-type(2){display:none}#tsitu-location-stats>div>span:last-of-type{display:inline-block;margin-top:5px}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/tsitu-qol.css
var tsitu_qol_default, init_tsitu_qol = __esm({
  "src/modules/better-ui/modules/userscript-styles/tsitu-qol.css"() {
    tsitu_qol_default = `#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}
`;
  }
});

// src/modules/better-ui/modules/userscript-styles/tsitu-supply-search.css
var tsitu_supply_search_default, init_tsitu_supply_search = __esm({
  "src/modules/better-ui/modules/userscript-styles/tsitu-supply-search.css"() {
    tsitu_supply_search_default = `#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}
`;
  }
});

// src/modules/better-ui/legacy-styles.css
var legacy_styles_default2, init_legacy_styles2 = __esm({
  "src/modules/better-ui/legacy-styles.css"() {
    legacy_styles_default2 = `.huntersHornView__timer.huntersHornView__timer.countdown:after{content:""}.mousehuntHud-userStat .icon{width:26px;height:26px;border:1px solid #c2b384;box-shadow:1px 1px 1px #7d6027}.mousehuntHud-userStat.bait:hover .value,.mousehuntHud-userStat.trinket:hover .value,.mousehuntHud-userStat.treasureMap:hover .value{margin:0}#mh-custom-icon-egg img{filter:none}
`;
  }
});

// src/modules/better-ui/styles/adventure.css
var adventure_default, 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;overflow:hidden;font-size:13px;font-style:italic;font-weight:400;line-height:15px;color:#333;text-overflow:ellipsis;white-space:nowrap;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{margin-right:5px;margin-bottom:10px;box-shadow:none}.adventureBookBanner-adventureImage{height:45px;background-image:none!important}.adventureBookBanner-goalPadding{margin-left:75px}.adventureBookBanner-goalImage{position:absolute;top:-25px;left:10px;width:60px;height:60px;border-radius:5px;box-shadow:none}.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-completed b{font-size:10px}.adventureBookBanner-completed{top:0;bottom:20px;left:75px;background:none;box-shadow:none}.adventureBookBanner-completedCheckmark{top:-10px;background-color:#fff;box-shadow:0 0 10px #94ff65,0 0 10px #94ff65}.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}.adventureBookPopup-adventure-details-environment-image{width:40px;height:40px;margin-bottom:10px}.adventureBookBanner-complete .adventureBookBanner-adventureName{display:none}.adventureBookBanner-complete .adventureBookBanner-completedCheckmark{top:10px;width:30px;height:30px;background-color:transparent;box-shadow:none}.adventureBookBanner-complete .adventureBookBanner-completed{font-size:11px}.adventureBookBanner-complete .adventureBookBanner-completed b{margin-bottom:5px;font-size:13px}.adventureBookBanner-complete .adventureBookBanner-moreInfo{top:unset}a.adventureBookPopup-title{display:block;height:auto;margin-bottom:4px;margin-left:10px;text-align:right;background:#eee;border:1px solid #ccc;border-right:none;border-radius:10px 0 0 10px}.adventureBookPopup-title-margin{padding:3px 15px}img.adventureBookPopup-title-icon{left:5px;height:20px}.adventureBookPopup-title.complete .adventureBookPopup-title-status{top:3px;left:3px;width:20px;height:20px;padding:2px;background:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png) 0 0 no-repeat;background-color:#eeeeee7f;background-size:cover;border-radius:50px}.adventureBookPopup-title-name{padding-left:16px;margin:0}a.adventureBookPopup-title:hover{background:#dfdcdc}a.adventureBookPopup-title.active{margin-left:2px;color:#fff;background:#354661}.adventureBookPopup-title.active .adventureBookPopup-title-icon{top:6px;left:5px}.adventureBookPopup-titleDirectory{padding-top:5px;padding-bottom:5px;margin-top:-5px;margin-bottom:5px;border-right:1px solid #ccc}.adventureBookPopup-header-title{margin-bottom:5px}.adventureBookPopup-adventureContainer.canClaim .adventureBookPopup-adventure-footer{box-shadow:-120px 0 50px #6bff75 inset}.adventureBookPopup-adventureContainer.claimed .adventureBookPopup-adventure-footer-claim.adventureBookPopup-adventure-button{background-color:#35751a;border:1px solid #158f00;box-shadow:none}.adventureBookPopup-adventureContainer.claimed .adventureBookPopup-adventure-image-status{background-color:transparent;filter:drop-shadow(2px 2px 4px #94ff65);box-shadow:none}.adventureBookPopup-adventureContainer{margin-right:5px;border-color:#ccc;border-radius:5px}.adventureBookPopup-adventure-header{padding:10px;background-color:#eee;border-radius:5px 5px 0 0}.adventureBookPopup-adventure-header-accordion{top:14px;filter:brightness(.4);opacity:.6}.adventureBookPopup-adventureContainer.available .adventureBookPopup-adventure-favorite{top:6px}.adventureBookPopup-adventure-details-block-step.multi_choice{background-color:#ffc20a}.adventureBookPopup-adventure-details-block-step-checkmark{border:1px solid #ababab;box-shadow:none}.adventureBookPopup-adventure-details-block-goalGroup-container{border-color:#171717}.adventureBookPopup-adventure-footer-claim-reward abbr{text-decoration:none}.adventureBookPopup-adventure-details-powerTypeContainer{margin:10px 0}.claimed .adventureBookPopup-adventure-header{color:#fff;text-shadow:0 1px 1px #000;background:#62aa42}.adventureBookPopup-adventure-footer{border-radius:0 0 5px 5px}.highlight .adventureBookPopup-adventure-header,.highlight .adventureBookPopup-adventure-footer{background-color:#fff0c2}.adventureBookPopup-adventure-button.disabled{opacity:.6}.adventureBookPopup-adventure-header-duration{font-size:13px}
`;
  }
});

// src/modules/better-ui/styles/buttons.css
var buttons_default, init_buttons = __esm({
  "src/modules/better-ui/styles/buttons.css"() {
    buttons_default = `.mousehuntArmNowButton{box-sizing:border-box;background:#8bb139;border:1px solid #000;border-radius:5px;box-shadow:inset 0 0 5px 2px #778e3a}.mousehuntArmNowButton:hover{background:#a4d044;box-shadow:inset 0 0 5px 2px #8da746}.mousehuntArmNowButton:after{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;color:#f0f4e7;text-align:center;text-shadow:0 1px 2px #000;text-transform:uppercase;content:"Arm"}.mousehuntArmNowButton:hover:after{color:#fff}.mousehuntArmNowButton.active{background:#50b0be;box-shadow:inset 0 0 5px 2px #368591}.mousehuntArmNowButton.active:hover{background:#5ffcff;box-shadow:inset 0 0 5px 2px #5accdb}.mousehuntArmNowButton.active:after{color:#fff;content:"Armed"}.mousehuntArmNowButton.disabled{filter:grayscale(1)}a.campPage-trap-itemBrowser-item-disarmButton,a.campPage-trap-itemBrowser-item-armButton{height:unset;font-size:11px;font-weight:900;line-height:19px;color:#fff;text-shadow:0 1px 2px #000;text-transform:uppercase;background:#a4d044;border-radius:5px;box-shadow:inset 0 0 5px 2px #8da746}a.campPage-trap-itemBrowser-item-disarmButton{background:#ff9800;box-shadow:inset 0 0 5px 2px #cc7a00}.armed .campPage-trap-itemBrowser-item-armButton{background:#50b0be;box-shadow:inset 0 0 5px 2px #368591}.campPage-trap-itemBrowser-item-armButton:hover{background:#8bb139;box-shadow:inset 0 0 5px 2px #778e3a}.armed.canDisarm .campPage-trap-itemBrowser-item-armButton:hover{background:#5ffcff;border-color:#000;box-shadow:inset 0 0 5px 2px #5accdb}a.campPage-trap-itemBrowser-item-disarmButton:hover{background:#ffc266;box-shadow:inset 0 0 5px 2px #f90}
`;
  }
});

// src/modules/better-ui/styles/corkboard.css
var corkboard_default, 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{color:#fff}.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}
`;
  }
});

// src/modules/better-ui/styles/daily-draw.css
var daily_draw_default, 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:5px;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:""}
`;
  }
});

// src/modules/better-ui/styles/events.css
var events_default2, init_events3 = __esm({
  "src/modules/better-ui/styles/events.css"() {
    events_default2 = `.MiniEventGiveawayCampHUD-popup-content-prize-name span{font-size:11px}.MiniEventGiveawayCampHud-popup-recruit-info{padding:10px;color:#939393}.QuestKingsGiveawayCampHUD__dialogItem .quantity{color:#000}.QuestKingsGiveawayCampHUD__dialogItem .itemImage{border:none}.QuestKingsGiveawayCampHUD__dialog{color:#fff;background:#7e35c2}.QuestKingsGiveawayCampHUD__tabContent{height:auto;min-height:515px;max-height:765px}.QuestKingsGiveawayCampHUD__scoreboard table{overflow:hidden;border-radius:10px}.QuestKingsGiveawayCampHUD__scoreboard tbody td:last-child{font-size:13px}.QuestKingsGiveawayCampHUD__scoreboard tbody td{font-size:12px}.QuestKingsGiveawayCampHUD__scoreboardTitle.Recruit:after{display:none}.QuestKingsGiveawayCampHUD__scoreboard thead th img{width:50px;margin-bottom:5px}.QuestKingsGiveawayCampHUD__prizeKeyQuantity{font-size:15px}.QuestKingsGiveawayCampHUD__vaultInfoThumbnail{width:75px;height:75px}.QuestKingsGiveawayCampHUD__tabButton span{opacity:.8}.QuestKingsGiveawayCampHUD__vaultPrizeButton:nth-child(1):hover{filter:drop-shadow(-5px 0 5px #7b67aa)}.QuestKingsGiveawayCampHUD__vaultPrizeButton:nth-child(3):hover{filter:drop-shadow(5px 0 5px #7b67aa)}.QuestKingsGiveawayCampHUD__vaultPrizeButton:nth-child(1),.QuestKingsGiveawayCampHUD__vaultPrizeButton:nth-child(3){transform-origin:center}.QuestKingsGiveawayCampHUD__vaultPrizeButton--selected{z-index:1;background-color:#0ffd59;filter:drop-shadow(0 2px 5px #7b67aa);transform:scale(1.2)}.QuestKingsGiveawayCampHUD__claimVaultPrizeButton{margin-top:10px}
`;
  }
});

// src/modules/better-ui/styles/footer.css
var footer_default, 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 ease-in}.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);filter:grayscale(1);background-repeat:no-repeat;background-position:center;background-size:50%}
`;
  }
});

// src/modules/better-ui/styles/friends.css
var friends_default2, 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%}.friendsPage-friendList-content .friendsPage-friendRow-content{width:calc(100% - 125px)}'.friendsPage-list-filter[data-filter="environment_id"] .friendsPage-list-filter-label,
'.friendsPage-list-filter[data-filter="snuid"] .friendsPage-list-filter-label {
user-select: none; }{}
`;
  }
});

// src/modules/better-ui/styles/general.css
var general_default4, init_general4 = __esm({
  "src/modules/better-ui/styles/general.css"() {
    general_default4 = `#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:4px;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}.span.campPage-trap-baitQuantity,.campPage-trap-armedItem .quantity span{border-bottom-right-radius:0}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent{padding:0;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}.mousehuntHeaderView a.superBrie .quantity{font-weight:600}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready{transition:all .2s;transform-origin:left;will-change:transform}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready:hover{transform:scale(1.1) rotate(-1deg)}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,.min-luck-button{visibility:hidden;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,.trapImageView:hover .min-luck-button{visibility:visible;opacity:1}.trapImageView .trapImageView-trapAura{z-index:1;transition:.4s}.trapImageView .trapImageView-trapAura:hover{z-index:2;transform:scale(1.25)}.trapImageView-trapAura.active.expiring-soon{visibility:visible;border-radius:50%;box-shadow:inset 0 0 10px 1px #ff4d4d;opacity:1}a.trapImageView-zoomButton{border:1px solid rgb(189 180 166 / 80%);border-radius:50%}.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{text-align:center}.journalThemeSelectorView-preview{min-height:600px}a.inventoryPage-tagDirectory-tag{border:1px solid #ccc;border-right:none}.inventoryPage-tagDirectory-tag:hover{color:#3b5998;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 .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) 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}.campPage-trap-itemBrowser-item{overflow:hidden}.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}.mousehuntHud-userStat-row{line-height:14px}.newsPostBody .flexCenter{justify-content:space-evenly}.newsPostBody #news-post-responsive .flexCenter img{max-width:100px;transition:.2s ease-in}.newsPostBody #news-post-responsive .flexCenter img.huge{max-width:100%}.newsPostBody #news-post-responsive img.huge:hover,.newsPostBody #news-post-responsive img[style*="width:100%"]:hover{transform:none}.newsPostBody #news-post-responsive img{transition:.2s ease-in}.newsPostBody #news-post-responsive img:hover{transform:rotate(4deg) scale(1.1)}#overlayPopup{animation:MHCheckoutDialogView-frameReveal .2s ease-out}@media (prefers-reduced-motion: reduce){#overlayPopup{animation:none}}.mousehuntHeaderView .dropdownContent a{background-position-x:8px}.tsitu-maptem .notification{left:0!important}.tsitu-maptem .notification[title="No uncaught map mice with this setup (according to TEM)"]{display:none}.campPage-trap-itemBrowser-armed-itemContainer.empty .campPage-trap-itemBrowser-item-subtitle{color:#671d1d}.mh-dark-mode .campPage-trap-itemBrowser-item.largeQuantity .campPage-trap-itemBrowser-item-quantity .quantity{background-color:#333}.mh-dark-mode .campPage-trap-itemBrowser-item-image:after{border-color:#000;box-shadow:2px 2px 3px -1px #000 inset}.travelPage-map-pieces-detail-title{padding:5px 10px}.mouseListView-categoryContent-category{padding-right:5px}.mousehuntHud-menu-item.root{height:24px;margin-top:1px}.mousehuntHeaderView .menuItem.first{border-left:none}.mousehuntHeaderView .menuItem{border-color:#ccc}.mousehuntHud-menu{box-shadow:0 10px 0 -8px #bfac91}.menuItem.superBrie{border-right:1px solid #ccc}.inventoryPage-confirmPopup-itemRow.small{min-height:35px}.mousehuntHeaderView .menuItem.new:hover{background-image:url(https://i.mouse.rip/inbox_new.png)!important}.journalThemeSelectorView-filter label{display:flex;align-items:center}
`;
  }
});

// src/modules/better-ui/styles/gifts.css
var gifts_default, 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 ease-in}#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)}#giftSelectorView-inbox{margin-top:-7px}
`;
  }
});

// src/modules/better-ui/styles/hud.css
var hud_default2, 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;z-index:11;width:auto}.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:2px 2px 2px #d6c8a2,-2px -2px 2px #d6c8a2,2px -2px 2px #d6c8a2,-2px 2px 2px #d6c8a2,2px 0 2px #d6c8a2,0 2px 2px #d6c8a2,-2px 0 2px #d6c8a2,0 -2px 2px #d6c8a2;filter:drop-shadow(0 1px 1px #d6c8a2) drop-shadow(0 2px 1px #d6c8a2) drop-shadow(-1px 4px 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;overflow:visible}.mousehuntHud-userStat .title-container span.label.hud_title{overflow:hidden}.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-userStat .miceWarning{top:-1px;left:11px;z-index:0;width:21px;height:21px;background:url(https://i.mouse.rip/map-marker.png) 0 -26px no-repeat;background-size:21px;box-shadow:none}.mousehuntHud-userStat .corkboardUpdate{top:-4px;left:-13px;width:35px;height:27px;background-size:26px}.mousehuntHud-menu .free_gifts .icon{background-image:url(https://i.mouse.rip/icons/gift.png)}.mousehuntHeaderView .menuItem.dropdown.last .arrow{pointer-events:none}.mousehuntHud-titleProgressBar{height:13px}
`;
  }
});

// src/modules/better-ui/styles/inbox.css
var inbox_default, init_inbox = __esm({
  "src/modules/better-ui/styles/inbox.css"() {
    inbox_default = `.notificationMessageList .message{padding:5px 10px;border-left:1px solid #c8c8c8}.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,.notificationMessageList .message.friend_invite_accepted .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:15px}#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{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:-14px;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;box-shadow:1px 2px 6px -4px #3e3e3e}#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}#messengerUINotification .notificationMessageList .tab[data-tab=marketplace] .message .clear-block{order:1}#messengerUINotification .notificationMessageList .tab[data-tab=marketplace] .message .date{order:3;margin-left:0}.notificationMessageList .message.marketplace .actions{transform:translateY(10px)}.notificationMessageList .message .date{margin:5px 0}#messengerUINotification .tabs a{display:flex;align-items:center;height:15px;border-right:1px solid #dcdedd}#messengerUINotification .notificationMessageList{box-sizing:border-box;width:calc(100% - 150px);border-left-width:0}.notificationMessageList .message .actions.newsPost input[type=button]{padding:5px 10px;border:none;outline:1px solid #000;box-shadow:0 -5px 8px -2px #ffae00 inset}.notificationMessageList .news.message a{display:inline-block;margin-bottom:10px;font-size:14px}.notificationMessageList .news.message .messageText{display:block;padding:0;font-size:12px}.notificationMessageList .tab[data-tab=news] .message{background-color:#fdf5bf}#messengerUINotification .bumper{display:none}#messengerUINotification{margin-top:-3px;box-shadow:0 3px 6px -3px #3e3e3e}
`;
  }
});

// src/modules/better-ui/styles/le.css
var le_default, init_le = __esm({
  "src/modules/better-ui/styles/le.css"() {
    le_default = `.itemImage .limitedEdition,.itemPurchaseView-image-limitedEdition,.marketplaceView-itemImage .limitedEdition,.inventoryPage-item .itemImage .limitedEdition,.campPage-trap-itemBrowser-item-image.limitedEdition:before{top:-10px;right:-10px;z-index:1;width:25px;height:25px;background:url(https://i.mouse.rip/le-badge.png) no-repeat 0 0;filter:drop-shadow(0 1px 1px rgb(0 0 0 / 50%));background-size:contain}.campPage-trap-itemBrowser-item-image.limitedEdition:before{top:-5px;right:-8px}.trapImageView-layer.limitedEdition{bottom:10px;left:7px;width:100%;height:50px;background:url(https://i.mouse.rip/le-trap-badge.png?) no-repeat 0 0;background-size:contain}
`;
  }
});

// src/modules/better-ui/styles/legacy.css
var legacy_default, init_legacy = __esm({
  "src/modules/better-ui/styles/legacy.css"() {
    legacy_default = `.headsup .mousehuntHud-userStat.bait:hover .label,.headsup .mousehuntHud-userStat.trinket:hover .label,.headsup .mousehuntHud-userStat.treasureMap:hover .label{position:relative;top:unset;right:unset;left:unset;width:unset;padding:0;background:none;mix-blend-mode:normal}.headsup .mousehuntHud-userStat.treasureMap:hover .label{padding-top:3px}.headsup .mousehuntHud-userStat.bait:hover .label{width:83px}.headsup .mousehuntHud-userStat:hover .icon{border-color:#ccc;box-shadow:0 0 3px #ffde00}
`;
  }
});

// src/modules/better-ui/styles/login.css
var login_default, 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}
`;
  }
});

// src/modules/better-ui/styles/maintence.css
var maintence_default, init_maintence = __esm({
  "src/modules/better-ui/styles/maintence.css"() {
    maintence_default = `.maintenance-banner{margin-bottom:20px;line-height:20px;background-color:#f5f3eb!important;border-color:#ceb7a6!important;box-shadow:-1px -1px 1px #d3cecb inset}.maintenance-banner .close{position:absolute;top:-5px;right:5px;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:"";background:#fff;border:1px solid #d1d0cf;border-color:#d1d0cf;border-radius:20px;box-shadow:inset 0 0 3px -1px #d1d0cf}.maintenance-banner .close:hover{color:#fff;background-color:#e03a3a}
`;
  }
});

// src/modules/better-ui/styles/mobile-camp.css
var mobile_camp_default, init_mobile_camp = __esm({
  "src/modules/better-ui/styles/mobile-camp.css"() {
    mobile_camp_default = `body.mobile.MobilePageCamp div[data-role=header]:after{position:absolute;top:15px;left:15px;width:85px;height:85px;content:"";background:url(https://www.mousehuntgame.com/images/ui/elements/golden_shield_page_shield_disabled_320.png) no-repeat;background-position:right;background-size:cover;opacity:.3;transform:scaleX(-1)}body.mobile.MobilePageCamp .headerText>div:first-child{font-size:17px}body.mobile.MobilePageCamp .pageFrameView,body.mobile.MobilePageCamp.noSidebar .pageFrameView{grid-template-columns:[first] auto [content-start] 485px [content-end] auto [last]}body.mobile.MobilePageCamp .pageFrameView-column.right,body.mobile.MobilePageCamp .pageFrameView-column.left{border-width:5px}div#mobileCountdown{margin:10px;font-size:15px}div#mobileJournal{margin-top:10px}
`;
  }
});

// src/modules/better-ui/styles/overlays.css
var overlays_default2, init_overlays2 = __esm({
  "src/modules/better-ui/styles/overlays.css"() {
    overlays_default2 = `#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 .tab[data-tab=news] .message{line-height:18px}.notificationMessageList .tab[data-tab=news] .message .actions.newsPost{padding:2px 15px;transform:translateY(65%)}.notificationMessageList .tab[data-tab=news] .message .date{margin-left:0}.notificationMessageList .message .actions input[type=button].delete{margin:0 2px}.notificationMessageList .message .actions.friendRequestAccepted input[type=button].delete{padding:4px;margin-left:4px}.message.notification .actions.ballot{display:flex;gap:3px;float:none}.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:#ccc}#messengerUINotification .notificationMessageList .tab{max-height:50vh;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;margin:0 1px;font-size:10px}.upgrade_gifts .kingsGiveawayCalibratorPopup-upgrade-description{font-size:14px}#messengerUINotification .tabs a.active .arrow{right:-19px}#messengerUINotification .tabs a.active .arrowShadow{right:-20px}
`;
  }
});

// src/modules/better-ui/styles/profile.css
var profile_default, 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-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{min-height:68px;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{padding:5px;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:-5px;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:55px;height:55px;border-bottom-right-radius:0;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .itemImage-container{display:block;padding:2px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContent[data-tab=team] .hunterInfoView-teamTab-content{margin:0 -5px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .hunterInfoView-teamTab-content-wrapper{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-around;width:360px}.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;transition:.2s ease-in}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage-overlay-container,.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage-overlay{width:54px;height:54px}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage:hover{background-size:120%}.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:5px;right:5px;left:unset}.mouseCrownsView-group-mouse:hover .mouseCrownsView-group-mouse-image{background-size:120%}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image{background-size:auto 230px}.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;margin-right:-2px;margin-left:-5px}.mouseCrownsView-group-mice.favourites{gap:5px}.mouseCrownsView-group-header b{font-size:13px}.mouseCrownsView-group.favourite .mouseCrownsView-group-header-subtitle{display:none}.mouseCrownsView-group-mouse{width:auto}.mouseCrownsView-group-mouse-image{width:100%;height:200px;border:none!important;border-bottom-right-radius:0;border-bottom-left-radius:0;transition:.2s ease-in}.mouseCrownsView-crown.none{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_none.png)!important}.mouseCrownsView-group-header-name{margin-left:10px}.mouseCrownsView-group{padding:10px;margin:10px;background-color:#f5f5f5;border-radius:5px;box-shadow:0 0 1px 1px #cbcbcb}.mouseCrownsView-group.diamond{background-color:#d6eafb;box-shadow:0 0 1px 1px #6aa6f9}.mouseCrownsView-group.diamond .mouseCrownsView-group-header{box-shadow:inset 0 0 1px 1px #b6d9fc}.mouseCrownsView-group.platinum{background-color:#d6d6fb;box-shadow:0 0 1px 1px #7e6af9}.mouseCrownsView-group.platinum .mouseCrownsView-group-header{box-shadow:inset 0 0 1px 1px #bfb6fc}.mouseCrownsView-group.favourite .mouseCrownsView-group-header{box-shadow:inset 0 0 1px 1px #e0e0e0}.mouseCrownsView-group.gold{background-color:#fbf5ce;box-shadow:0 0 1px 1px #cfc791}.mouseCrownsView-group.gold .mouseCrownsView-group-header{box-shadow:0 0 1px 1px #ded9b5}.mouseCrownsView-group.silver{background-color:#d2e7fe;box-shadow:0 0 1px 1px #8fb9e6}.mouseCrownsView-group.silver .mouseCrownsView-group-header{box-shadow:0 0 1px 1px #b4d0ee}.mouseCrownsView-group.bronze{background-color:#ffe6d4;box-shadow:0 0 1px 1px #d8af91}.mouseCrownsView-group.bronze .mouseCrownsView-group-header{box-shadow:0 0 1px 1px #ead3c3}.mouseCrownsView-group.none .mouseCrownsView-group-header{box-shadow:0 0 1px 1px #c5c5c5}.mouseCrownsView-group-header{display:flex;align-items:center;padding:5px;border:none!important;border-radius:5px}.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group-header-subtitle{color:#787}.mouseCrownsView-group .mouseCrownsView-group-header{background-color:#fafafa99!important}.mouseCrownsView-group-mouse-favouriteButton.active{opacity:0;transition:.2s ease-in}.mouseCrownsView-group-mouse.favourite:hover .mouseCrownsView-group-mouse-favouriteButton,.mouseCrownsView-group-mouse.favourite:hover .mouseCrownsView-group-mouse-favouriteButton.active{opacity:1}.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}.mouseCrownsView-crown.favourite{width:45px;height:45px;margin:5px}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:15px;right:-12px;float:none!important;width:30px!important;height:30px!important;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{width:95%;padding:0 1px 3px}.hunterProfileItemsView-categoryContent-item-padding .itemImage .quantity{right:0;bottom:5px;padding:5px}.hunterProfileItemsView-categoryContent-item .itemImage{width:90px;height:100px;background-repeat:no-repeat;background-position:center;background-size:100%;transition:.2s ease-in}.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{filter:grayscale(1);mix-blend-mode:darken;opacity:.5}.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}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image,.mouseCrownsView-group-mouse-image{background-position:center;background-size:100%;transition:.4s ease-in}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image{background-position:center;background-size:auto 200px}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.costumed_horse,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.geyser_eruption_dragon_flaming,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.rift_gaunt_prestige_low,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.crystal_behemoth,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.desert_beast,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.ful_mina_mountain_queen{background-position:80% center}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.costumed_horse,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.geyser_eruption_dragon_flaming,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.rift_gaunt_prestige_low,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.crystal_behemoth,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.desert_beast,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.ful_mina_mountain_queen{background-position:78% center}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.magmatic_golem,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.empyrean_treasure_guardian,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.richard_rich{background-position:60% center}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.magmatic_golem .mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.empyrean_treasure_guardian,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.richard_rich{background-position:62% center}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.rift_claw_master,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.hween_2013_boss,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.spice_sorcerer{background-position:25% center}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.rift_claw_master,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.hween_2013_boss,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.spice_sorcerer{background-position:26% center}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.ancient_of_the_deep,.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image.rift_assassin_beast{background-position:15% center}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.ancient_of_the_deep,.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image.rift_assassin_beast{background-position:16% center}.mouseView-group.mouseview-title-group{display:flex;flex-direction:column}.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group-mouse:hover .mouseCrownsView-group-mouse-padding,.mouseCrownsView-group-mouse:hover .mouseCrownsView-group-mouse-padding{background-color:#fff}.mouseCrownsView-group-mouse-favouriteButton{top:0;right:0}.mouseCrownsView-group-mouse-favouriteButton:hover{background-color:transparent;border:none}.mouseCrownsView-group-mouse .mouseCrownsView-group-mouse-favouriteButton{pointer-events:all!important}.mouseCrownsView-group-mouse .mouseCrownsView-group-mouse-favouriteButton:hover{top:2px;right:2px;background:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png) 0 0 / cover no-repeat}.hunterProfileItemsView-categoryContent-item .itemImage .limitedEdition,.hunterProfileItemsView-categoryContent-item .itemImage .quantity{opacity:1;transition:.2s ease-in}.hunterProfileItemsView-categoryContent-item:hover .itemImage .limitedEdition,.hunterProfileItemsView-categoryContent-item:hover .itemImage .quantity{opacity:0}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage:after{width:30px;height:30px}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage:before{top:-10px;left:-10px;width:25px;height:25px}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container .hunterInfoView-idCardBlock-stats-horn-image{filter:contrast(.4);transition:.2s ease-in}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container:hover .hunterInfoView-idCardBlock-stats-horn-image{transform:rotate(-6deg) scale(1.5)}.hunterInfoView-wrapper hr{background-color:#000}.hunterInfoView-wrapper .hunterInfoView-idCardTooltipBox-content>div{margin:5px 0}.hunterInfoView-wrapper .hunterInfoView-idCardTooltipBox-content>div:first-child{margin-top:0}.hunterInfoView-wrapper .hunterInfoView-idCardTooltipBox-content>div:last-child{margin-bottom:0}.hunterInfoView-wrapper .messageBoardView .pagerView-container{background-color:#f0ead6;border:1px solid #bea87a;border-radius:5px}.userInteractionButtonsView-button{border-radius:15px;box-shadow:inset 0 0 0 2px #eae1c6}.hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail{top:22px;font-size:13px}.friendsPage-friendRow-titleBar-icon{top:-12px}.mousehuntPage-content .mh-improved-scoreboard-dropdown select{border:1px solid #bea87a}.hunterInfoView-wrapper .hunterInfoView-playerActionsBlock{margin:0 10px;text-align:left;opacity:.5}.hunterInfoView-wrapper .hunterInfoView-playerActionsBlock:hover{opacity:1}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container:before,.hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container,.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-huntingSince,.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container,.hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats{border-color:#bea87a}.hunterProfileItemsView-categoryContent-item.limited_edition .itemImage .limitedEdition{top:3px;right:-3px;width:50px;height:50px;background:url(https://www.mousehuntgame.com/images/ui/backgrounds/trap_image_limited_edition_badge.png) no-repeat top right / 90px;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff)}.hunterProfileItemsView-directory{border:none}.hunterProfileItemsView-content:before,.mouseListView-categoryContent:before{left:0;width:1px;background-color:#ccc;border-radius:0}.mouseListView-categoryDirectory{border-right:none}.mouseListView-categoryContent-subgroup-miceContainer{border:1px solid #dfe5f1;border-radius:11px}
`;
  }
});

// src/modules/better-ui/styles/scoreboards.css
var scoreboards_default, 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}.scoreboardTableView-profilePic{box-sizing:border-box;border:1px solid #e9e9e9;box-shadow:none}.viewer .tournament-team-rank.updated:hover:after{border-radius:2px}.pageFrameView .scoreboardRelativeRankingTableView-table{margin-bottom:15px;border:1px solid #ddedff}
`;
  }
});

// src/modules/better-ui/styles/scrambles.css
var scrambles_default, init_scrambles = __esm({
  "src/modules/better-ui/styles/scrambles.css"() {
    scrambles_default = `#overlayPopup.spring_chick_message_item{background:#f8f8f4;border:2px solid #bdb1d8;border-radius:50px/90%;box-shadow:0 3px 3px -2px #ababab;animation:.2s MHCheckoutDialogView-frameReveal 1 ease-out,.9s bannerSoundNew 1 .2s}#overlayPopup.spring_chick_message_item .jsDialog.top,#overlayPopup.spring_chick_message_item .jsDialog.bottom,#overlayPopup.spring_chick_message_item .jsDialogContainer .prefix,#overlayPopup.spring_chick_message_item #jsDialogClose,#overlayPopup.spring_chick_message_item .jsDialog .quantity,#overlayPopup.spring_chick_message_item .description{display:none}#overlayPopup.spring_chick_message_item .jsDialogContainer .content{flex-grow:1;margin:0;font-size:1.75em;text-align:center;animation:1s claimWiggle 1 1s}@media (prefers-reduced-motion: reduce){#overlayPopup.spring_chick_message_item .jsDialogContainer .content{animation:none}}#overlayPopup.spring_chick_message_item .jsDialogContainer{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;height:120px}#overlayPopup.spring_chick_message_item .imgArray .img img{width:100px;max-width:unset;height:100px;filter:drop-shadow(0 2px 1px #505050);transform:scaleX(-1)}#overlayPopup.spring_chick_message_item .jsDialogContainer .suffix{background:transparent;border:none}#overlayPopup.spring_chick_message_item.singleItemLeft .jsDialogContainer .items{float:none;width:150px;padding:0}#overlayPopup.spring_chick_message_item.singleItemLeft .img{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}#overlayPopup.spring_chick_message_item .jsDialog.background{background:transparent}#overlayPopup.spring_chick_message_item .button{padding:2px 6px}#overlayPopup.spring_chick_message_item .img .itemImage{width:100px;height:100px}#overlayPopup.spring_chick_message_item .img .name{font-size:1.25em}
`;
  }
});

// src/modules/better-ui/styles/select2.css
var select2_default, init_select2 = __esm({
  "src/modules/better-ui/styles/select2.css"() {
    select2_default = `.MHCheckoutSearchView-dropdown .select2-search{padding-top:5px}.PageFriends .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) 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}
`;
  }
});

// src/modules/better-ui/styles/settings.css
var settings_default13, init_settings14 = __esm({
  "src/modules/better-ui/styles/settings.css"() {
    settings_default13 = `.PagePreferences__section{padding:10px;margin:10px 0;border:1px solid #e0cfb4}.PreferencesPage__formInputDescription{position:relative}.PagePreferences__profilePicContainer{padding-top:10px}.PagePreferences__settingDefault{display:none}.PagePreferences__title{padding-bottom:10px;margin:0}
`;
  }
});

// src/modules/better-ui/styles/sidebar.css
var sidebar_default4, init_sidebar4 = __esm({
  "src/modules/better-ui/styles/sidebar.css"() {
    sidebar_default4 = `.pageSidebarView-user{border-bottom:none}.pageSidebarView-block-description{display:none}
`;
  }
});

// src/modules/better-ui/styles/skins.css
var skins_default, init_skins = __esm({
  "src/modules/better-ui/styles/skins.css"() {
    skins_default = `.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}
`;
  }
});

// src/modules/better-ui/styles/tabs.css
var tabs_default, 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{top:0}.campPage-tabs-tabRow:hover .campPage-tabs-tabHeader span,.campPage-tabs-tabRow a.campPage-tabs-tabHeader span{border-bottom:none}.campPage-tabs-tabRow a.campPage-tabs-tabHeader.active span{padding-bottom:5px;margin-bottom:-1px;border:1px solid #cbc6bb;border-bottom:none;box-shadow:0 1px #f5f3eb}.campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span,.campPage-tabs-tabRow a.campPage-tabs-tabHeader:focus span{margin-bottom:-1px}.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);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{max-width:80px;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-tabs-tabContent-larryTip-container{padding-top:10px}.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}.mousehuntHud-menu ul li a{text-shadow:0 0 1px #cbbba9}
`;
  }
});

// src/modules/better-ui/styles/team.css
var team_default, 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;align-items:stretch}.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:3px;right:-182px;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 ease-in}.teamPage-profile-awardContainer-awardList:hover .teamPage-profile-awardContainerInfo{opacity:1}.teamPage-memberJournal-padding{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:calc(100% - 8px)}.teamPage-memberJournal-trapSetup{flex-grow:1}.teamPage-memberJournal-identity:hover a.teamPage-member-image.online:before{display:flex;justify-content:end;line-height:7px;text-shadow:0 0 #fff,1px 1px #fff,2px 2px #fff,-1px -1px #fff,-2px -2px #fff,0 1px #fff,0 2px #fff,0 -1px #fff,0 -2px #fff,-1px 0 #fff,-2px 0 #fff,1px -1px #fff,2px -2px #fff,-1px 1px #fff,-2px 2px #fff;white-space:nowrap;content:attr(title) "    "}
`;
  }
});

// src/modules/better-ui/styles/timer.css
var timer_default, init_timer = __esm({
  "src/modules/better-ui/styles/timer.css"() {
    timer_default = `.huntersHornView__timer.huntersHornView__timer.countdown:after{position:absolute;top:6px;right:5px;left:5px;font-size:14px;text-align:center;content:"Next Hunt";background:linear-gradient(180deg,#fef2b8,#ecdfae)}.huntersHornMessageView--bait_disarmed .huntersHornMessageView__content:before{background-image:url(https://www.mousehuntgame.com/images/ui/hunters_horn/sandwich_board/icons/bait_empty.png)}
`;
  }
});

// src/modules/better-ui/styles/trap-selector.css
var trap_selector_default, init_trap_selector = __esm({
  "src/modules/better-ui/styles/trap-selector.css"() {
    trap_selector_default = `.campPage-trap-itemBrowser-item.largeQuantity .campPage-trap-itemBrowser-item-quantity .quantity{display:inline-block;font-size:12px;background-color:#fff}.campPage-trap-itemBrowser-item-description.shortDescription{width:auto;margin-left:62px;font-size:10px}.campPage-trap-itemBrowser-item-content{width:81%}.campPage-trap-itemBrowser-item-favorite{position:absolute;top:0;right:5px;width:15px;height:15px;padding:5px;margin-top:0;background-color:#fff;background-size:15px;border-radius:50%;opacity:0;transition:.2s ease-in}.campPage-trap-itemBrowser-item:hover .campPage-trap-itemBrowser-item-favorite{opacity:1}.campPage-trap-itemBrowser-item{min-height:80px}.campPage-trap-itemBrowser-item-name{margin-bottom:5px}.trapSelectorView__activeCodex{width:50px;height:50px}.campPage-trap-itemBrowser-armed-item-content{position:relative;height:auto}.campPage-trap-itemBrowser-armed-item .campPage-trap-itemBrowser-item-quantity{display:flex;flex-direction:column;align-items:flex-start}.campPage-trap-itemBrowser-item-stat.power,.campPage-trap-itemBrowser-item-stat.powerBonus,.campPage-trap-itemBrowser-item-stat.luck,.campPage-trap-itemBrowser-item-stat.attraction_bonus,.campPage-trap-itemBrowser-item-stat.cheese_effect{background-size:28px}.campPage-trap-itemBrowser-item-stat .value{height:30px}.campPage-trap-itemBrowser-item-statContainer{border-radius:2px}.campPage-trap-itemBrowser-items{right:5px;padding-right:2px}.campPage-trap-itemBrowser-item-stat.cheese_effect span{font-size:8px}.campPage-trap-itemBrowser-item-powerType{width:18%;margin-right:2px}.campPage-trap-itemBrowser-item-image{width:49px;height:49px}.mousehuntActionButton.loading:after{position:absolute;inset:0;content:"";background:center / 15px no-repeat url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif),center / contain repeat url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png)}
`;
  }
});

// src/modules/better-ui/styles/traps.css
var traps_default, 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{right:0;bottom:0;color:#ffe6d0;text-shadow:0 0 1px #ae9b6d,1px 1px #000}.trapSelectorView__armedItemQuantity span,.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}.mh-dark-mode .trapSelectorView__armedItemQuantity span{color:#ffe6d0;text-shadow:none;background-color:#333}.campPage-trap-armedItem.bait .campPage-trap-armedItem-image{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:#333}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-trapEffectiveness{background:#424242;border:1px solid #888;box-shadow:1px 1px 1px #535151}.mh-dark-mode .campPage-trap-trapStat .value{color:#fff;background-color:#333;border-color:#5c5c5c}.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 4px;box-shadow:-1px -1px 1px #d3cecb inset}.campPage-trap-statsContainer{border:1px solid #d3cecb;border-radius:4px;box-shadow:-1px 1px 3px #d3cecb inset}.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 #ceb7a6;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}.mh-dark-mode .hunterInfoView-wrapper .campPage-trap-trapStat{background:#424242;border-color:#5c5c5c}.hunterInfoView-wrapper .campPage-trap-itemStats{display:flex;padding-bottom:0;margin:0 5px}.hunterInfoView-wrapper .campPage-trap-trapStat .value{background:transparent;border:none}.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}.mh-dark-mode .campPage-trap-trapEffectivenessBar{background-color:#424242;border-color:#5c5c5c}.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}.trapSelectorView__browserContainer .campPage-trap-trapEffectivenessBar{display:none}.campPage-trap-armedItem.inactive{background:#f6f3eb}.campPage-trap-trapStat.power .value b{margin-bottom:-2px;line-height:18px}.itembrowser-skin-image-wrapper{background-image:url(https://www.mousehuntgame.com/images/items/bases/trap_small/a44d6a59ca9c0d11224bb36fd4e16378.png);background-position:center}img.itembrowser-skin-image{width:332px}.campPage-trap-trapStat-mathRow{font-size:12px;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:15px}.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-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 70px;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}.trapSelectorView__browserContainer{animation:mh-improved-in-from-left .2s ease-in-out}@media (prefers-reduced-motion: reduce){.trapSelectorView__browserContainer{animation:none}}.trapSelectorView__armedItemBorder,.trapSelectorView__weaponSkinGroup button{border:1px solid #d3cecb;border-radius:5px 5px 4px 4px;box-shadow:-1px 1px 3px #d3cecb inset}.trapSelectorView__weaponSkinGroup{padding:0;margin:0;border:none;box-shadow:none}.trapSelectorView__armedItem[data-item-classification=skin] .trapSelectorView__armedItemImage,.trapSelectorView__armedItem[data-item-classification=weapon] .trapSelectorView__armedItemImage{margin:3px;background-position:-1px -1px;background-size:72px}.trapSelectorView__trapStatSummaryContainer{background:#f6f3eb;border-color:#e3dbd5;border-radius:3px;box-shadow:none}.mh-dark-mode .trapSelectorView__trapStatSummaryContainer{background:#333;border-color:#fff;border-radius:3px;box-shadow:none}.trapSelectorView__trapStatSummary,.trapSelectorView__outerBlock{border:1px solid #d3cecb;border-radius:4px;box-shadow:-1px 1px 3px #d3cecb inset}.mh-dark-mode .trapSelectorView__trapStatSummary,.mh-dark-mode .trapSelectorView__outerBlock,.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-trapEffectiveness,.mh-dark-mode .mh-improved-favorite-setups-button{background:#424242;border:1px solid #888;box-shadow:1px 1px 1px #535151}.mh-dark-mode .mh-improved-favorite-setups-button{background-color:#424242;border-color:#5c5c5c}.trapSelectorView__activeCodexList.trapSelectorView__innerBlock{background:transparent;border:none}.trapSelectorView__activeCodexHeader{display:none}.trapSelectorView__armedItemQuantity span{position:absolute;right:-6px;bottom:3px;box-sizing:border-box;text-shadow:0 0 1px #ae9b6d,1px 1px #fff;background-color:#fcfbf9;border-color:#d3cecb;border-right:none;border-bottom:none;border-radius:0 0 3px}.trapSelectorView__armedItem[data-item-classification=skin]{margin-right:0}.trapSelectorView__armedItem[data-item-classification=skin] .trapSelectorView__armedItemImage,.trapSelectorView__armedItemImage{width:65px}.trapSelectorView__trap{padding-top:0}.trapSelectorView__activeCodexContainer:hover{background-color:#fdfaf2;filter:none}.mh-dark-mode .trapSelectorView__activeCodexContainer:hover{background-color:#494949}.trapSelectorView__armedItem--empty .trapSelectorView__armedItemImage{background:transparent;box-shadow:none}.campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-description{line-height:1.5}input.trapSelectorView__codexListSearch{width:auto;max-width:100px}.PageCamp .trapImageView-layer{border-top-left-radius:4px;border-top-right-radius:4px}#overlayPopup.LargerTrapView #jsDialogClose{display:none}#overlayPopup.LargerTrapView .trapImageView-layerWrapper{border-top-left-radius:7px;border-top-right-radius:7px}#overlayPopup.LargerTrapView .trapImageView{top:1px}.mh-dark-mode .trapSelectorView__trapStatSummary,.mh-dark-mode .trapSelectorView__outerBlock,.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-trapEffectiveness,.mh-dark-mode .trapSelectorView__armedItemBorder,.mh-dark-mode .trapSelectorView__weaponSkinGroup button,.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-armedItem.bait{border:1px solid #5c5c5c;border-radius:5px 5px 4px 4px;box-shadow:-1px 1px 3px #515151 inset}.mh-dark-mode .trapSelectorView__weaponSkinGroup.trapSelectorView__armedItemBorder{border:none;box-shadow:none}.mh-dark-mode .trapSelectorView__armedItemQuantity span,.mh-dark-mode .campPage-trap-baitName,.mh-dark-mode .campPage-trap-baitQuantity{border-color:#5a5a5a;box-shadow:-1px -1px 1px #5c5c5c inset}.mh-dark-mode .mh-improved-favorite-setups-button-label{color:#e0d3b3}.campPage-trap-itemBrowser-favorite-item-image-frame{top:-1px;left:-1px;width:50px;height:50px;overflow:hidden}.trapSelectorView__armedItem--empty[data-item-classification=bait] .trapSelectorView__armedItemImage:after{position:absolute;top:0;bottom:0;left:0;width:70px;content:"";background:url(https://www.mousehuntgame.com/images/ui/hunters_horn/sandwich_board/icons/bait_empty.png) no-repeat 50% 50% / contain}#mousehuntContainer.PageCamp.showBlueprint{background:url(https://i.mouse.rip/bg-wood.png)}.trapSelectorView__blueprint.trapSelectorView__blueprint--active{background:url(https://www.mousehuntgame.com/images/ui/hud/blueprint_tile.png) repeat}
`;
  }
});

// src/modules/better-ui/styles/tutorial.css
var tutorial_default, 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}.campPage-trap-baitQuantity.highlight{transform-origin:bottom right;animation:mh-improved-scale-large .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}
`;
  }
});

// src/modules/better-ui/styles/ui-page.css
var ui_page_default, init_ui_page = __esm({
  "src/modules/better-ui/styles/ui-page.css"() {
    ui_page_default = `.pageFrameView-contentContainer{padding-top:10px;padding-bottom:0;margin-bottom:10px;background-color:transparent}.mh-dark-mode .pageFrameView-contentContainer{margin-bottom:0}.pageFrameView-content{margin:0 -10px;border:10px solid #fff;border-radius:10px;box-shadow:0 2px 4px #000}.mh-dark-mode .pageFrameView-content{margin:0;border:none}@media only screen and (max-width: 810px){body.noSidebar .pageFrameView{background:transparent!important}}.mh-dark .pageFrameView-content{border-color:var(--d)}.mh-dark .pageFrameView-column.left,.mh-dark .pageFrameView-column.right,.pageFrameView-column.left,.pageFrameView-column.right{border-color:transparent;box-shadow:none}.mousehuntHeaderView{padding-top:0;margin-top:0}#overlayContainer{padding-top:0}#overlayBg{top:-5px}.mousehuntHeaderView .menuItem.first{border-radius:9px 0 0}.pageFrameView-column.left,.pageFrameView-column.right{box-shadow:none}
`;
  }
});

// src/modules/better-ui/index.js
var imported4, styles4, kingsPromoTextChange, addAdventureBookClass, addUserscriptStyles, addMaintenanceClasses, init16, better_ui_default, init_better_ui = __esm({
  "src/modules/better-ui/index.js"() {
    init_utils2();
    init_friends();
    init_hud();
    init_any_trap_any_skin();
    init_favorite_setups();
    init_journal_historian();
    init_lgs_reminder();
    init_mhct2();
    init_profile_plus();
    init_spring_egg_hunt_helper();
    init_tsitu_autoloader();
    init_tsitu_location_catch_stats();
    init_tsitu_qol();
    init_tsitu_supply_search();
    init_legacy_styles2();
    init_adventure();
    init_buttons();
    init_corkboard();
    init_daily_draw();
    init_events3();
    init_footer();
    init_friends2();
    init_general4();
    init_gifts();
    init_hud2();
    init_inbox();
    init_le();
    init_legacy();
    init_login();
    init_maintence();
    init_mobile_camp();
    init_overlays2();
    init_profile();
    init_scoreboards();
    init_scrambles();
    init_select2();
    init_settings14();
    init_sidebar4();
    init_skins();
    init_tabs();
    init_team();
    init_timer();
    init_trap_selector();
    init_traps();
    init_tutorial();
    init_ui_page();
    imported4 = [adventure_default, buttons_default, corkboard_default, daily_draw_default, events_default2, footer_default, friends_default2, general_default4, gifts_default, hud_default2, inbox_default, le_default, legacy_default, login_default, maintence_default, mobile_camp_default, overlays_default2, profile_default, scoreboards_default, scrambles_default, select2_default, settings_default13, sidebar_default4, skins_default, tabs_default, team_default, timer_default, trap_selector_default, traps_default, tutorial_default, ui_page_default], styles4 = imported4, kingsPromoTextChange = () => {
      let kingsPromo = document.querySelector(".shopsPage-kingsCalibratorPromo");
      kingsPromo && (kingsPromo.innerHTML = kingsPromo.innerHTML.replace("and even", "and"));
    }, addAdventureBookClass = () => {
      var _a, _b, _c;
      if (!((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestAdventureBook) == null ? void 0 : _b.adventure) != null && _c.can_claim) || !getCurrentPage("camp"))
        return;
      let adventureBook = document.querySelector(".adventureBookBanner");
      adventureBook && adventureBook.classList.add("adventureBookBanner-complete");
    }, addUserscriptStyles = () => __async(void 0, null, function* () {
      let userscriptStyles = [
        { id: "userscript-styles-no-any-trap-any-skin-styles", styles: any_trap_any_skin_default },
        { id: "userscript-styles-no-mhct-styles", styles: mhct_default2 },
        { id: "userscript-styles-no-tsitu-qol-styles", styles: tsitu_qol_default },
        { id: "userscript-styles-no-profile-plus-styles", styles: profile_plus_default },
        { id: "userscript-styles-no-spring-egg-hunt-helper-styles", styles: spring_egg_hunt_helper_default },
        { id: "userscript-styles-no-lgs-reminder-styles", styles: lgs_reminder_default },
        { id: "userscript-styles-no-favorite-setups-styles", styles: favorite_setups_default },
        { id: "userscript-styles-no-tsitu-autoloader-styles", styles: tsitu_autoloader_default },
        { id: "userscript-styles-no-journal-historian-styles", styles: journal_historian_default },
        { id: "userscript-styles-no-tsitu-supply-search-styles", styles: tsitu_supply_search_default },
        { id: "userscript-styles-no-tsitu-location-catch-stats-styles", styles: tsitu_location_catch_stats_default }
      ];
      getFlag("no-userscript-styles") || userscriptStyles.forEach((userscript) => {
        getFlag(userscript.id) || addStyles(userscript.styles, userscript.id);
      });
    }), addMaintenanceClasses = () => {
      let banner = document.querySelector('div[style="background: #f2f27c; border:1px solid #555; border-radius: 3px; text-align: center; font-size: 12px; padding: 6px 3px"]');
      if (!banner)
        return;
      if (sessionGet("maintenance-banner-hidden")) {
        banner.classList.add("hidden");
        return;
      }
      if (banner.classList.add("maintenance-banner", "mh-ui-fade", "mh-ui-fade-in"), banner.querySelector(".close"))
        return;
      banner.childNodes.forEach((node) => {
        node.nodeType === Node.ELEMENT_NODE ? node.innerHTML = `${node.innerHTML}.` : node.nodeType === Node.TEXT_NODE && (node.textContent = `${node.textContent}.`);
      });
      let close2 = makeElement("div", "close", "\u2715");
      close2.addEventListener("click", () => {
        banner.classList.add("mh-ui-fade-out"), setTimeout(() => {
          banner.classList.add("hidden"), sessionSet("maintenance-banner-hidden", !0);
        }, 350);
      }), banner.append(close2);
    }, init16 = () => __async(void 0, null, function* () {
      addStyles(styles4, "better-ui"), isLegacyHUD() && addStyles(legacy_styles_default2, "better-ui-legacy"), addMaintenanceClasses(), addUserscriptStyles(), friends_default(), hud_default(), onRequest("*", addAdventureBookClass), onRequest("users/dailyreward.php", kingsPromoTextChange), onNavigation(() => {
        addMaintenanceClasses(), addAdventureBookClass();
      }, {
        page: "camp"
      });
    }), better_ui_default = {
      id: "better-ui",
      name: "Better UI",
      type: "better",
      default: !0,
      description: "Updates the MH interface with a variety of UI and style changes.",
      order: -1,
      load: init16
    };
  }
});

// src/modules/catch-rate-estimate/mice-groups.json
var mice_groups_default, init_mice_groups = __esm({
  "src/modules/catch-rate-estimate/mice-groups.json"() {
    mice_groups_default = {
      dragon: [
        "dragon",
        "drag_goon",
        "ful_mina_mountain_queen",
        "thunderstriker",
        "thundering_watcher",
        "thunderlord",
        "violet_thunderling",
        "geyser_cork_dropper_bland",
        "geyser_cork_dropper_mild",
        "geyser_cork_dropper_medium",
        "geyser_cork_dropper_rare",
        "geyser_cork_dropper_hot",
        "geyser_cork_dropper_flaming",
        "geyser_cork_dropper_wildfire",
        "geyser_pressure_builder_mild",
        "geyser_pressure_builder_medium",
        "geyser_pressure_builder_hot",
        "geyser_pressure_builder_flaming",
        "geyser_pressure_builder_wildfire",
        "geyser_eruption_dragon_mild",
        "geyser_eruption_dragon_small",
        "geyser_eruption_dragon_medium_spice",
        "geyser_eruption_dragon_medium",
        "geyser_eruption_dragon_hot",
        "geyser_eruption_dragon_large",
        "geyser_eruption_dragon_flaming",
        "geyser_eruption_dragon_epic",
        "geyser_eruption_dragon_wildfire",
        "tiny_dragonfly",
        "dragon_lancer",
        "dragon_breather",
        "regal_spearman",
        "draconic_paragon",
        "empyrean_draconic_mouse"
      ],
      fort_rox: {
        cosmic: [
          "moonstone_slinger",
          "arcane_summoner",
          "night_watcher",
          "cursed_taskmaster",
          "moonstone_golem",
          "moonstone_mystic"
        ],
        weremice: [
          "good_supply_night",
          "werehauler",
          "wealthy_werewarrior",
          "mischievous_wereminer",
          "were_alpha",
          "reveling_lycanthrope",
          "wereminer"
        ]
      },
      fiery_warpath: {
        archers: ["desert_archer_weak", "desert_archer", "desert_archer_epic"],
        cavalry: ["desert_cavalry", "desert_cavalry_strong"],
        mages: ["desert_mage", "desert_mage_strong"],
        scouts: ["desert_scout_weak", "desert_scout", "desert_scout_epic"],
        warriors: ["desert_warrior_weak", "desert_warrior", "desert_warrior_epic"],
        commanders: ["desert_general"]
      },
      sand_dunes: ["king_grub", "king_scarab"],
      rift_whisker_woods: ["rift_cyclops", "rift_centaur", "rift_hydra", "rift_black_widow"],
      zugzwang_tower: {
        mystic: ["mystic_bishop", "mystic_king", "mystic_knight", "mystic_pawn", "mystic_queen", "mystic_rook"],
        technic: ["tech_bishop", "tech_king", "tech_knight", "tech_pawn", "tech_queen", "tech_rook"],
        rooks: ["mystic_rook", "technic_rook"]
      }
    };
  }
});

// src/modules/catch-rate-estimate/data.js
var miceEffs, hasGottenEffs, items2, getMiceEffectiveness, getMouse, getMousePower, getMouseEffectiveness, getMinluck, getPercent, isWaveAndHasRemaining, kingScarabThresholds, kingScarabCoefficients, defaultThresholds, defaultCoefficients, calculatePowerWhenSalted, getAmplifier, applySpecialEffectsAndGetCatchRate, calculateCatchRate, getCatchRate, init_data2 = __esm({
  "src/modules/catch-rate-estimate/data.js"() {
    init_utils2();
    init_utils2();
    init_mice_groups();
    hasGottenEffs = !1, items2 = null, getMiceEffectiveness = () => __async(void 0, null, function* () {
      hasGottenEffs || (miceEffs = yield getData("effs"), hasGottenEffs = !0);
      let response = yield doRequest("managers/ajax/users/getmiceeffectiveness.php");
      return response == null ? void 0 : response.effectiveness;
    }), getMouse = (mouseId) => __async(void 0, null, function* () {
      return (!miceEffs || !hasGottenEffs) && (miceEffs = yield getData("effs"), hasGottenEffs = !0), miceEffs.find((m) => m.type === mouseId);
    }), getMousePower = (mouseId) => __async(void 0, null, function* () {
      var _a;
      let mouse = yield getMouse(mouseId);
      return !mouse || !mouse.effectivenesses ? 0 : (_a = mouse == null ? void 0 : mouse.effectivenesses) == null ? void 0 : _a.power;
    }), getMouseEffectiveness = (mouseId) => __async(void 0, null, function* () {
      let mouse = yield getMouse(mouseId);
      return !mouse || !mouse.effectivenesses ? 0 : mouse.effectivenesses[user.trap_power_type_name.toLowerCase()];
    }), getMinluck = (options2) => __async(void 0, null, function* () {
      let { mousePower, effectiveness: effectiveness2 } = options2;
      return effectiveness2 = effectiveness2 * 100, effectiveness2 === 0 ? "\u221E" : Math.ceil(
        Math.ceil(Math.sqrt(mousePower / 2)) / Math.min(effectiveness2 / 100, 1.4)
      );
    }), getPercent = (rate) => rate === 1 ? "100%" : `${(rate * 100).toFixed(2)}%`, isWaveAndHasRemaining = (waveToCheck) => {
      let wave = [...waveToCheck.classList].find((className) => className.startsWith("wave")).replace("wave", "").replace("_", "");
      if (waveToCheck !== wave)
        return !1;
      let remainingEl = document.querySelectorAll(`.warpathHUD-wave.wave_${wave} .warpathHUD-wave-mouse-population`);
      return remainingEl.length && (remaining = [...remainingEl].reduce((sum, el) => (el.innerText && (sum += Number.parseInt(el.innerText)), sum), 0)), remaining > 0;
    }, kingScarabThresholds = [0, 30, 40, 50], kingScarabCoefficients = [25e3, 12500, 6500, 0], defaultThresholds = [0, 6, 7, 10, 14, 18, 23, 24, 27, 34, 44, 48, 50], defaultCoefficients = [5e4, 4e4, 2e4, 1e4, 5e3, 2500, 1e3, 1500, 1e3, 500, 1e3, 2e3, 0], calculatePowerWhenSalted = (power, salt, mousetype) => {
      if (salt === 0)
        return power;
      let saltThresholds = mousetype === "king_scarab" ? kingScarabThresholds : defaultThresholds, saltCoefficients = mousetype === "king_scarab" ? kingScarabCoefficients : defaultCoefficients;
      for (let i = 0; i < saltThresholds.length - 1; i++)
        power -= Math.min(saltThresholds[i + 1] - saltThresholds[i], Math.max(0, salt - saltThresholds[i])) * saltCoefficients[i];
      return power;
    }, getAmplifier = () => {
      let selector = location === "seasonal_garden" ? ".seasonalGardenHUD-currentAmplifier-value" : ".zuzwangsTowerHUD-currentAmplifier span", ampEl = document.querySelector(selector);
      return ampEl ? Number.parseInt(ampEl.textContent, 10) : 0;
    }, applySpecialEffectsAndGetCatchRate = (options2) => __async(void 0, null, function* () {
      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, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T;
      items2 || (items2 = yield getData("items"));
      let {
        mouseType,
        mousePower,
        effectiveness: effectiveness2,
        trapPower: trapPower2,
        trapLuck: trapLuck2,
        trapPowerBonus: trapPowerBonus2,
        hasRiftstalkerCodex: hasRiftstalkerCodex2,
        riftSetCount: riftSetCount2
      } = options2, weapon = (_a = items2.find((item) => item.id === Number.parseInt(user == null ? void 0 : user.weapon_item_id))) == null ? void 0 : _a.type, charm = (_b = items2.find((item) => item.id === Number.parseInt(user == null ? void 0 : user.trinket_item_id))) == null ? void 0 : _b.type, location2 = getCurrentLocation();
      switch (location2) {
        case "ancient_city":
          mouseType === "retired_minotaur" ? mousePower = mousePower * (((_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestAncientCity) == null ? void 0 : _d.width) || 100) / 100 : user.quests.QuestAncientCity.boss === "defeated" && user.trap_power_type_name.toLowerCase() === "forgotten" && (effectiveness2 = 1);
          break;
        case "claw_shot_city":
          mouseType === "bounty_hunter" && charm === "sheriff_badge_trinket" && (mousePower = 0, effectiveness2 = 1);
          break;
        case "crystal_library":
          mouseType === "library_boss" && weapon !== "zurreals_folly_weapon" && (effectiveness2 = 0);
          break;
        case "desert_warpath":
          (mice_groups_default.fiery_warpath.archers.includes(mouseType) && charm === "super_flame_march_archer_trinket" || mice_groups_default.fiery_warpath.cavalry.includes(mouseType) && charm === "super_flame_march_cavalry_trinket" || mice_groups_default.fiery_warpath.mages.includes(mouseType) && charm === "super_flame_march_mage_trinket" || mice_groups_default.fiery_warpath.scouts.includes(mouseType) && charm === "super_flame_march_scout_trinket" || mice_groups_default.fiery_warpath.warriors.includes(mouseType) && charm === "super_flame_march_warrior_trinket" || mice_groups_default.fiery_warpath.commanders.includes(mouseType) && charm === "super_flame_march_commander_trinket") && (trapPowerBonus2 += 50), (mouseType === "desert_boss" && isWaveAndHasRemaining("4") || mouseType === "desert_artillery_commander" && isWaveAndHasRemaining("portal") === "portal") && (effectiveness2 = 0);
          break;
        case "fort_rox":
          mice_groups_default.fort_rox.weremice.includes(mouseType) && Number.parseInt((_h = (_g = (_f = (_e = user == null ? void 0 : user.quests) == null ? void 0 : _e.QuestFortRox) == null ? void 0 : _f.fort) == null ? void 0 : _g.b) == null ? void 0 : _h.level) > 0 || mice_groups_default.fort_rox.cosmic.includes(mouseType) && Number.parseInt((_l = (_k = (_j = (_i = user == null ? void 0 : user.quests) == null ? void 0 : _i.QuestFortRox) == null ? void 0 : _j.fort) == null ? void 0 : _k.c) == null ? void 0 : _l.level) > 0 ? mousePower *= 2 : mouseType === "nightmancer" && Number.parseInt((_p = (_o = (_n = (_m = user == null ? void 0 : user.quests) == null ? void 0 : _m.QuestFortRox) == null ? void 0 : _n.fort) == null ? void 0 : _o.c) == null ? void 0 : _p.level) === 3 || mouseType === "nightfire" && Number.parseInt((_t = (_s = (_r = (_q = user == null ? void 0 : user.quests) == null ? void 0 : _q.QuestFortRox) == null ? void 0 : _r.fort) == null ? void 0 : _s.c) == null ? void 0 : _t.level) === 3 ? (mousePower = 0, effectiveness2 = 1, mousePower = 0, effectiveness2 = 1) : mouseType === "battering_ram_night" && weapon === "battering_ram_buster_weapon" ? (mousePower = 0, effectiveness2 = 1) : mouseType === "heart_of_the_meteor" && (mousePower *= (((_v = (_u = user == null ? void 0 : user.quests) == null ? void 0 : _u.QuestFortRox) == null ? void 0 : _v.lair_width) || 100) / 100);
          break;
        case "rift_bristle_woods":
          mouseType === "rift_acolyte" && (((_y = (_x = (_w = user == null ? void 0 : user.quests) == null ? void 0 : _w.QuestRiftBristleWoods) == null ? void 0 : _x.QuestRiftBristleWoods) == null ? void 0 : _y.acolyte_sand) || 0) > 0 && (effectiveness2 = 0);
          break;
        case "rift_whisker_woods":
          mice_groups_default.rift_whisker_woods.includes(mouseType) && charm === "calming_trinket" && (riftSetCount2 === 1 ? trapPowerBonus2 += hasRiftstalkerCodex2 ? 40 : 20 : riftSetCount2 === 2 && (trapLuck2 += hasRiftstalkerCodex2 ? 10 : 5));
          break;
        case "sand_dunes":
          mice_groups_default.sand_dunes.includes(mouseType) && !((_A = (_z = user == null ? void 0 : user.quests) == null ? void 0 : _z.QuestSandDunes) != null && _A.is_normal) && (mousePower = calculatePowerWhenSalted(mousePower, ((_D = (_C = (_B = user == null ? void 0 : user.quests) == null ? void 0 : _B.QuestSandDunes) == null ? void 0 : _C.minigame) == null ? void 0 : _D.salt_charms_used) || 0, mouseType));
          break;
        case "sunken_city":
          charm === "ultimate_anchoring_trinket" && (mousePower = 0, effectiveness2 = 1);
          break;
        case "zugzwang_tower":
          weapon === "obvious_ambush_weapon" && mice_groups_default.zugzwang_tower.technic.includes(mouseType) || weapon === "blackstone_pass_weapon" && mice_groups_default.zugzwang_tower.mystic.includes(mouseType) ? (trapPower2 += 1800, trapLuck2 += 6) : weapon === "obvious_ambush_weapon" && mice_groups_default.zugzwang_tower.mystic.includes(mouseType) || weapon === "blackstone_pass_weapon" && mice_groups_default.zugzwang_tower.technic.includes(mouseType) ? (trapPower2 -= 2400, trapLuck2 -= 9) : /* Pawn Pinchers - each give +10920 Power and +51 luck on corresponding Pawn, -60 Power and -0.05 Luck on opposite Pawn. */ weapon === "technic_low_weapon" && mouseType === "tech_pawn" || weapon === "mystic_low_weapon" && mouseType === "mystic_pawn" ? (trapPower2 += 10920, trapLuck2 += 51) : (weapon === "technic_low_weapon" && mouseType === "mystic_pawn" || weapon === "mystic_low_weapon" && mouseType === "tech_pawn") && (trapPower2 -= 60, trapLuck2 -= 0.05), charm === "rook_crumble_trinket" && mice_groups_default.zugzwang_tower.rook.includes(mouseType) && (trapPowerBonus2 += 300);
          break;
      }
      mice_groups_default.dragon.includes(mouseType) && (charm === "dragonbane_trinket" ? trapPowerBonus2 += 300 : charm === "super_dragonbane_trinket" ? trapPowerBonus2 += 600 : charm === "extrme_dragonbane_trinket" ? trapPowerBonus2 += 900 : charm === "ultimate_dragonbane_trinket" && (trapPowerBonus2 += 1200));
      let power = Math.ceil(trapPower2 + trapPower2 * (trapPowerBonus2 / 100));
      location2 === "zugzwang_tower" && (power = Math.ceil(power * getAmplifier() / 100));
      let catchRate = calculateCatchRate(mousePower, effectiveness2, power, trapLuck2);
      return weapon === "zugzwang_ultimate_move_weapon" && (location2 === "zugzwang_tower" || location2 === "seasonal_garden") && getAmplifier() > 0 || weapon === "anniversary_acronym_weapon" || weapon === "anniversary_ambush_weapon" || weapon === "anniversary_ancient_box_trap_weapon" || weapon === "anniversary_mouse_deathbot_weapon" || weapon === "anniversary_reaper_perch_weapon" ? catchRate += (1 - catchRate) * 0.1 : location2 === "fort_rox" && // Weremice get a 50% auto catch with Ballista 2 or 3.
      (mice_groups_default.fort_rox.weremice.includes(mouseType) && (Number.parseInt(((_H = (_G = (_F = (_E = user == null ? void 0 : user.quests) == null ? void 0 : _E.QuestFortRox) == null ? void 0 : _F.fort) == null ? void 0 : _G.b) == null ? void 0 : _H.level) === 2) || Number.parseInt(((_L = (_K = (_J = (_I = user == null ? void 0 : user.quests) == null ? void 0 : _I.QuestFortRox) == null ? void 0 : _J.fort) == null ? void 0 : _K.b) == null ? void 0 : _L.level) === 3)) || // Cosmic Critters get a 50% auto catch with Cannon 2 or 3.
      mice_groups_default.fort_rox.cosmic.includes(mouseType) && (Number.parseInt(((_P = (_O = (_N = (_M = user == null ? void 0 : user.quests) == null ? void 0 : _M.QuestFortRox) == null ? void 0 : _N.fort) == null ? void 0 : _O.c) == null ? void 0 : _P.level) === 2) || Number.parseInt(((_T = (_S = (_R = (_Q = user == null ? void 0 : user.quests) == null ? void 0 : _Q.QuestFortRox) == null ? void 0 : _R.fort) == null ? void 0 : _S.c) == null ? void 0 : _T.level) === 3))) && (catchRate += (1 - catchRate) * 0.5), catchRate;
    }), calculateCatchRate = (mousePower, effectiveness2, power, luck) => Math.min(
      1,
      (effectiveness2 * power + 2 * Math.pow(Math.floor(Math.min(effectiveness2, 1.4) * luck), 2)) / (effectiveness2 * power + mousePower)
    ), getCatchRate = (options2) => __async(void 0, null, function* () {
      let rate = yield applySpecialEffectsAndGetCatchRate(options2);
      return {
        rate,
        percent: getPercent(rate)
      };
    });
  }
});

// src/modules/catch-rate-estimate/styles.css
var styles_default29, init_styles30 = __esm({
  "src/modules/catch-rate-estimate/styles.css"() {
    styles_default29 = `#mh-improved-cre{padding:3px;margin:5px 0;cursor:default}#mh-improved-cre table{width:100%}#mh-improved-cre thead{box-shadow:0 -1px #d3cecb inset}.mh-dark-mode #mh-improved-cre thead{box-shadow:0 -1px #5c5c5c inset}#mh-improved-cre table th{font-weight:700;text-align:center}#mh-improved-cre table th.name{padding-left:5px;text-align:left}#mh-improved-cre table th:last-of-type{padding-right:5px}#mh-improved-cre table:first-child{text-align:left}.mh-improved-cre-data{min-width:70px;font-size:12px;text-align:center}.mh-improved-cre-data-good{color:#138f13}.mh-dark-mode .mh-improved-cre-data-good{color:#4fe54f}.mh-improved-cre-data-bad{color:#bb4646}.mh-dark-mode .mh-improved-cre-data-bad{color:#fb9b9b}.mh-improved-cre-data-ultimate{color:#0fa4bd}.mh-improved-cre-name{padding-left:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mh-improved-cre-name a{color:inherit}#mh-improved-cre.cre-loading{display:flex;align-items:flex-end;justify-content:center;height:100%;min-height:50px;padding:20px 0;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif);background-repeat:no-repeat;background-position:center 10px;background-size:55px}#mh-improved-cre.cre-loading:after{position:absolute;right:0;bottom:-5px;left:0;font-weight:400;color:#926944;text-align:center;content:"Loading Catch Rate Estimator\\2026"}span.mh-improved-cre-no-mice{font-size:12px}
`;
  }
});

// src/modules/catch-rate-estimate/index.js
var lastStats, effectiveness, isUpdating, hasRiftstalkerCodex, riftSetCount, trapPower, trapPowerBonus, updateStats, updateMinLucks, renderList, main12, init17, catch_rate_estimate_default, init_catch_rate_estimate = __esm({
  "src/modules/catch-rate-estimate/index.js"() {
    init_utils2();
    init_data2();
    init_styles30();
    lastStats = [], effectiveness = null, isUpdating = !1, hasRiftstalkerCodex = !1, riftSetCount = 0, updateStats = () => {
      trapPower = 0, trapPowerBonus = 0, trapLuck = user.trap_luck;
      let riftStalkerCodex = document.querySelector(".campPage-trap-trapStat-mathRow.special .campPage-trap-trapStat-mathRow-name");
      if (riftStalkerCodex && riftStalkerCodex.innerText.includes("Riftstalker") && (hasRiftstalkerCodex = !0, riftSetCount = Number.parseInt(riftStalkerCodex.innerText.replace("Riftstalker Set Bonus (", "").replace(" pieces)", "") || 0, 10)), getCurrentLocation() !== "zugzwang_tower") {
        trapPower = user.trap_power, trapPowerBonus = user.trap_power_bonus;
        return;
      }
      document.querySelectorAll(".campPage-trap-trapStat.power .campPage-trap-trapStat-mathRow").forEach((mathRow) => {
        let row = mathRow.querySelector(".campPage-trap-trapStat-mathRow-value");
        if (!row.textContent)
          return;
        let label = mathRow.querySelector(".campPage-trap-trapStat-mathRow-name");
        if (label && label.textContent.includes("Your trap is receiving a boost!"))
          return;
        let value = Number.parseInt(row.textContent.replaceAll(",", "").replace("%", "") || 0, 10);
        value && (row.innerText.includes("%") ? trapPowerBonus += value : trapPower += value);
      });
    }, updateMinLucks = () => __async(void 0, null, function* () {
      if (getCurrentPage() !== "camp" || isUpdating)
        return;
      isUpdating = !0;
      let minluckList = document.querySelector("#mh-improved-cre");
      if (!minluckList) {
        let statsContainer = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
        if (!statsContainer) {
          isUpdating = !1;
          return;
        }
        minluckList = makeElement("div", ["mh-cre-table", "campPage-trap-trapEffectiveness", "cre-loading"]), minluckList.id = "mh-improved-cre", statsContainer.append(minluckList);
      }
      let currentStats = [
        user.trap_power,
        user.trap_luck,
        user.trap_attraction_bonus,
        user.trap_cheese_effect,
        user.trap_luck,
        user.trap_power,
        user.trap_power_bonus,
        user.trap_power_type_name,
        user.trinket_item_id,
        user.base_item_id,
        user.weapon_item_id,
        user.bait_item_id,
        user.environment_id
      ];
      if (currentStats !== lastStats && (effectiveness = yield getMiceEffectiveness(), lastStats = currentStats, updateStats()), !effectiveness) {
        isUpdating = !1;
        return;
      }
      let miceIds = Object.values(effectiveness).flatMap(({ mice }) => mice).map((mouse) => ({
        name: mouse.name,
        type: mouse.type
      }));
      yield renderList(miceIds), isUpdating = !1;
    }), 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";
        let statsContainer = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
        if (!statsContainer)
          return;
        statsContainer.append(minluckList), doEvent2("mh-improved-cre-list-rendered");
      }
      let existing = document.querySelector("#mh-improved-cre-table");
      existing && existing.remove(), minluckList.classList.remove("cre-loading");
      let table = makeElement("table");
      table.id = "mh-improved-cre-table";
      let tableheader = makeElement("thead");
      makeElement("th", "name", "Mouse", tableheader), makeElement("th", "", "Minluck", tableheader), makeElement("th", "", "Catch Rate", tableheader), tableheader.addEventListener("click", updateMinLucks), table.append(tableheader);
      let rows = [];
      for (let mouse of list) {
        let mousePower = yield getMousePower(mouse.type), mouseEffectiveness = yield getMouseEffectiveness(mouse.type), options2 = {
          mouseType: mouse.type,
          mousePower,
          effectiveness: mouseEffectiveness / 100,
          trapPower,
          trapLuck,
          trapPowerBonus,
          hasRiftstalkerCodex,
          riftSetCount
        }, minluck = yield getMinluck(options2), catchRate = yield getCatchRate(options2), crClass = ["mh-improved-cre-data"], minluckClass = ["mh-improved-cre-data"];
        catchRate.rate * 100 >= 100 ? (crClass.push("mh-improved-cre-data-good"), minluckClass.push("mh-improved-cre-data-good")) : catchRate.rate * 100 <= 60 && (crClass.push("mh-improved-cre-data-bad"), minluckClass.push("mh-improved-cre-data-bad")), user.trap_luck >= minluck && (crClass.push("mh-improved-cre-data-minlucked"), minluckClass.push("mh-improved-cre-data-minlucked")), user.trinket_item_id == 1075 && (crClass.push("mh-improved-cre-data-ultimate"), catchRate.rate = 1, catchRate.percent = "100%"), rows.push({
          mouse: mouse.name,
          type: mouse.type,
          minluck,
          catchRateValue: catchRate.rate,
          catchRate: catchRate.percent,
          crClass,
          minluckClass
        });
      }
      if (rows.sort((a, b) => a.catchRateValue !== b.catchRateValue ? a.catchRateValue - b.catchRateValue : b.minluck - a.minluck), rows.length === 0) {
        makeElement("span", "mh-improved-cre-no-mice", "No mice found.", table), minluckList.append(table);
        return;
      }
      rows.forEach(({ mouse, type, minluck, catchRate, crClass, minluckClass }) => {
        let row = makeElement("tr", "mh-improved-cre-row"), name = makeElement("td", "mh-improved-cre-name"), nameLink = makeElement("a", "", mouse);
        nameLink.addEventListener("click", (e) => {
          e.preventDefault(), hg.views.MouseView.show(type);
        }), name.append(nameLink), row.append(name), makeElement("td", minluckClass, minluck, row), makeElement("td", crClass, catchRate, row), table.append(row);
      }), minluckList.append(table);
    }), main12 = () => __async(void 0, null, function* () {
      onNavigation(updateMinLucks, {
        page: "camp"
      }), getFlag("catch-rate-estimate-more-refresh") ? onRequest("*", updateMinLucks) : onRequest("users/changetrap.php", updateMinLucks), onTravel(null, { callback: updateMinLucks });
    }), init17 = () => __async(void 0, null, function* () {
      addStyles(styles_default29, "catch-rate-estimate"), setTimeout(main12, 240);
    }), catch_rate_estimate_default = {
      id: "catch-rate-estimate",
      name: "Catch Rate Estimator & Minlucks",
      type: "feature",
      default: !0,
      description: "Minluck and catch rate estimates.",
      load: init17
    };
  }
});

// src/modules/codex-at-bottom/styles.css
var styles_default30, init_styles31 = __esm({
  "src/modules/codex-at-bottom/styles.css"() {
    styles_default30 = `.trapSelectorView__activeCodexContainer--visible{order:100}
`;
  }
});

// src/modules/codex-at-bottom/index.js
var moveCodex, init18, codex_at_bottom_default, init_codex_at_bottom = __esm({
  "src/modules/codex-at-bottom/index.js"() {
    init_utils2();
    init_styles31();
    moveCodex = () => __async(void 0, null, function* () {
      let codex = document.querySelector(".trapSelectorView__activeCodexContainer"), statsContainer = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
      codex && statsContainer && statsContainer.append(codex);
    }), init18 = () => __async(void 0, null, function* () {
      addStyles(styles_default30, "codex-at-bottom"), moveCodex(), onNavigation(moveCodex, {
        page: "camp"
      }), onEvent("mh-improved-cre-list-rendered", moveCodex);
    }), codex_at_bottom_default = {
      id: "codex-at-bottom",
      name: "Codex at Bottom",
      type: "feature",
      default: !1,
      description: "Move the codex to the bottom of the trap selector.",
      load: init18
    };
  }
});

// src/modules/copy-id/settings/index.js
var settings_default14, init_settings15 = __esm({
  "src/modules/copy-id/settings/index.js"() {
    settings_default14 = () => __async(void 0, null, function* () {
      return [
        {
          id: "copy-id-button.hide-button",
          title: "Hide button",
          description: "Click profile pic to copy ID",
          default: !1
        }
      ];
    });
  }
});

// src/modules/copy-id/styles.css
var styles_default31, init_styles32 = __esm({
  "src/modules/copy-id/styles.css"() {
    styles_default31 = `.mousehuntHud-userStatBar .profileImage{position:relative}.mh-copy-id-button{position:absolute;top:30px;left:3px;z-index:10;display:none;padding:2px 4px;font-size:9px;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}
`;
  }
});

// src/modules/copy-id/index.js
var main13, init19, copy_id_default, init_copy_id = __esm({
  "src/modules/copy-id/index.js"() {
    init_utils2();
    init_settings15();
    init_styles32();
    main13 = () => {
      let profilePic = document.querySelector(".mousehuntHud-userStatBar .mousehuntHud-profilePic");
      if (!profilePic)
        return;
      let copyIdButton = makeElement("div", ["mh-copy-id-button", "mousehuntActionButton", "tiny"]), hidebutton = getSetting("copy-id-button.hide-button");
      hidebutton && copyIdButton.classList.add("hidden"), makeElement("span", "mh-copy-id-button-text", "Copy ID", copyIdButton), profilePic.parentNode.insertBefore(copyIdButton, profilePic.nextSibling);
      let successMessage = makeElement("div", "mh-copy-id-success-message", "Copied!");
      successMessage.style.opacity = 0, copyIdButton.parentNode.insertBefore(successMessage, copyIdButton.nextSibling);
      let clickAction = (e) => {
        e.preventDefault();
        let Id = user.user_id;
        navigator.clipboard.writeText(Id), successMessage.style.opacity = 1, setTimeout(() => {
          successMessage.style.opacity = 0;
        }, 1e3);
      };
      copyIdButton.addEventListener("click", clickAction), hidebutton ? (profilePic.setAttribute("onclick", ""), profilePic.addEventListener("click", clickAction)) : (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";
      }));
    }, init19 = () => __async(void 0, null, function* () {
      addStyles(styles_default31, "copy-id"), main13();
    }), copy_id_default = {
      id: "copy-id",
      name: "Copy ID Button",
      type: "feature",
      default: !0,
      description: "Hover over your profile picture in the HUD for a quick 'Copy ID to clipboard' button.",
      load: init19,
      settings: settings_default14
    };
  }
});

// src/data/backgrounds.json
var backgrounds_default2, init_backgrounds2 = __esm({
  "src/data/backgrounds.json"() {
    backgrounds_default2 = [
      { id: "midnight", name: "Midnight", css: "linear-gradient(220.55deg, #565656 0%, #181818 100%)" },
      { id: "amber-sunrise", name: "Amber Sunrise", css: "radial-gradient(circle at center top, #b45309, #fdba74, #9f1239)" },
      { id: "aqua-depths", name: "Aqua Depths", css: "linear-gradient(220.55deg, #24cfc5 0%, #001c63 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: "camo", name: "Camo", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-camo.png) top center / 200px" },
      { id: "canary-shine", name: "Canary Shine", css: "linear-gradient(220.55deg, #fff500 0%, #ffb800 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: "candy-clouds", name: "Candy Clouds", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-candy-clouds.png) repeat top center / contain" },
      { 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: "cobalt-mist", name: "Cobalt Mist", css: "linear-gradient(#3951c6, #8896dd)" },
      { id: "cold-breeze", name: "Cold Breeze", css: "conic-gradient(at center bottom, #ffffff, #0ea5e9, #0ea5e9)" },
      { id: "cosmic-twilight", name: "Cosmic Twilight", css: "linear-gradient(to right, #0f172a, #581c87, #0f172a)" },
      { id: "cotton-candy-shores", name: "Cotton Candy Shores", css: "linear-gradient(#32c7e5, #f078d5)" },
      { id: "crimson-blush", name: "Crimson Blush", css: "linear-gradient(#b9466c, #e3b5c4)" },
      { 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: "dark-digital", name: "Dark Digital", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-dark-digital.png) top left / 230px" },
      { id: "dark", name: "Dark", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-dark.png) top left / 200px" },
      { 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: "electric-hexes", name: "Electric Hexes", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-electric-hexes.png) top left / 550px" },
      { id: "emerald-forest", name: "Emerald Forest", css: "linear-gradient(#43ac20, #76df53)" },
      { 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: "flamingo-fling", name: "Flamingo Fling", css: "linear-gradient(#e84a8c, #f3a5c5)" },
      { id: "flowers", name: "Flowers", css: "url(https://i.mouse.rip/mh-improved/custom-hud/hud-flowers.png) left center / 300px" },
      { 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: "galactic-dusk", name: "Galactic Dusk", css: "linear-gradient(220.55deg, #4063bc 0%, #6b0013 100%)" },
      { id: "glacial-gleam", name: "Glacial Gleam", css: "linear-gradient(220.55deg, #c5edf5 0%, #4a879a 100%)" },
      { id: "groovy-green", name: "Groovy Green", css: "url(https://www.mousehuntgame.com/images/ui/hud/folklore_forest_region/pattern.png) repeat bottom center / 200px" },
      { 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: "neon-nights", name: "Neon Nights", css: "linear-gradient(#f3b167, #ec38bc, #7303c0, #03001e)" },
      { id: "night-in-salem", name: "Night in Salem", css: "linear-gradient(#111827, #581c87, #7c3aed)" },
      { id: "oahu-sunset", name: "Oahu Sunset", css: "linear-gradient(to top, #fb923c, #38bdf8)" },
      { id: "orange-coral", name: "Orange Coral", css: "linear-gradient(to top, #fb923c, #fb7185)" },
      { 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: "polaroid-memories", name: "Polaroid Memories", css: "linear-gradient(to top, #040308, #ad4a28, #dd723c, #fc7001, #dcb697, #9ba5ae, #3e5879, #020b1a)" },
      { id: "radiant-rouge", name: "Radiant Rouge", css: "linear-gradient(161.15deg, #ffa492 12.73%, #ff2c55 72.95%)" },
      { id: "rainbow", name: "Rainbow", css: "linear-gradient(#e02020 0%, #fa6400 17%, #f7b500 33%, #6dd400 50%, #0091ff 67%, #6236ff 83%, #b620e0 100%)" },
      { 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))" },
      { 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: "soft-metal", name: "Soft Metal", css: "conic-gradient(at right top, rgb(199, 210, 254), rgb(71, 85, 105), rgb(199, 210, 254))" },
      { 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: "warm-glow", name: "Warm Glow", css: "radial-gradient(at center top, #d1d5db, #c026d3, #ea580c)" }
    ];
  }
});

// src/modules/custom-background/settings/index.js
var settings_default15, init_settings16 = __esm({
  "src/modules/custom-background/settings/index.js"() {
    init_backgrounds2();
    settings_default15 = () => __async(void 0, null, function* () {
      let gradientOptions = backgrounds_default2.map((gradient) => ({
        name: gradient.name,
        value: gradient.id
      })), options2 = [
        { 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: "Other",
          value: "group",
          options: gradientOptions
        }
      ];
      return [{
        id: "custom-background",
        title: 'Custom Background <a class="mh-improved-custom-bg-preview hidden">Preview choices</a>',
        default: [options2[0]],
        description: "Change the background to an event background, a color, or a gradient",
        settings: {
          type: "multi-select",
          number: 1,
          options: options2
        }
      }];
    });
  }
});

// src/modules/custom-background/styles.css
var styles_default32, init_styles33 = __esm({
  "src/modules/custom-background/styles.css"() {
    styles_default32 = `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-hud .PagePreferences__settingLabel,#mousehunt-improved-settings-feature-custom-background .PagePreferences__settingLabel{position:relative}.mh-improved-custom-hud-preview,.mh-improved-custom-bg-preview{position:absolute;top:0;right:225px;bottom:0;display:flex;align-items:center;font-size:12px}.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}.mh-improved-custom-preview-popup-custom-hud .mh-improved-custom-background-gradient-preview .gradient{height:55px}.mh-improved-custom-preview-popup-custom-hud .mh-improved-custom-background-gradient-preview .name{font-size:18px}.mh-improved-custom-background-gradient-preview .mh-improved-custom-bg-action-button{margin:0 3px}
`;
  }
});

// src/modules/custom-background/index.js
var addedClass, addBodyClass2, listenForPreferenceChanges, addPreview, addPreviewCallback, persistBackground, init20, custom_background_default, init_custom_background = __esm({
  "src/modules/custom-background/index.js"() {
    init_utils2();
    init_backgrounds2();
    init_settings16();
    init_styles33();
    addedClass = "", addBodyClass2 = (preview = !1) => {
      let body = document.querySelector("body");
      if (!body)
        return;
      let setting = getSetting("custom-background-0", "default");
      preview && (setting = preview), addedClass && (Array.isArray(addedClass) ? addedClass.forEach((cls) => {
        body.classList.remove(cls);
      }) : body.classList.remove(addedClass), addedClass = "");
      let style = document.querySelector("#mh-improved-custom-background-style");
      if (style && style.remove(), setting === "default")
        return;
      let background = `mh-improved-bg-${setting}`;
      if (body.classList.add(background, setting), addedClass = [background, setting], setting.startsWith("background-color-") && (body.classList.remove(setting), body.classList.add(background), addedClass = background), !backgrounds_default2)
        return;
      let gradient = backgrounds_default2.find((g) => g.id === setting);
      if (!gradient)
        return;
      let 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 = () => {
      let input = document.querySelector("#mousehunt-improved-settings-design-custom-background select");
      input && input.addEventListener("change", () => {
        addBodyClass2();
      });
    }, addPreview = () => {
      addPreviewCallback({
        id: "custom-background",
        selector: ".mh-improved-custom-bg-preview",
        inputSelector: "#mousehunt-improved-settings-design-custom-background select",
        previewCallback: (selected) => addBodyClass2(selected)
      }), addPreviewCallback({
        id: "custom-hud",
        selector: ".mh-improved-custom-hud-preview",
        inputSelector: "#mousehunt-improved-settings-design-custom-hud select",
        preview: !1
      });
    }, addPreviewCallback = ({ id, selector, inputSelector, preview = !0, previewCallback = () => {
    } }) => {
      let previewLink = document.querySelector(selector);
      previewLink && previewLink.addEventListener("click", (e) => {
        e.preventDefault(), e.stopPropagation();
        let content = "";
        backgrounds_default2.forEach((gradient) => {
          content += `<div class="gradient" style="background: ${gradient.css}">
      <div class="name">${gradient.name}</div>
      <div class="controls">`, preview && (content += `<div class="mousehuntActionButton lightBlue mh-improved-custom-bg-action-button" data-gradient="${gradient.id}" data-action="preview"><span>Preview</span></div>`), content += `<div class="mousehuntActionButton mh-improved-custom-bg-action-button ${preview ? "normal" : "small"}" data-gradient="${gradient.id}" data-action="use"><span>Use</span></div>
        </div>
    </div>`;
        });
        let popup = createPopup({
          title: "",
          className: `mh-improved-custom-background-gradient-preview-popup mh-improved-custom-preview-popup-${id}`,
          content: `<div class="mh-improved-custom-background-gradient-preview">${content}</div>`,
          show: !1
        });
        popup.show(), document.querySelectorAll(".mh-improved-custom-bg-action-button").forEach((action) => {
          let gradient = action.getAttribute("data-gradient"), actionType = action.getAttribute("data-action");
          action.addEventListener("click", (evt) => {
            if (evt.preventDefault(), actionType === "preview")
              previewCallback(gradient);
            else if (actionType === "use") {
              let input = document.querySelector(inputSelector);
              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: !0
      });
    }, init20 = () => __async(void 0, null, function* () {
      addStyles(styles_default32, "custom-background"), persistBackground();
    }), custom_background_default = {
      id: "custom-background",
      type: "design",
      alwaysLoad: !0,
      load: init20,
      settings: settings_default15
    };
  }
});

// src/modules/custom-css/settings/index.js
var settings_default16, init_settings17 = __esm({
  "src/modules/custom-css/settings/index.js"() {
    settings_default16 = () => __async(void 0, null, function* () {
      return [{
        id: "override-styles",
        title: "Custom Styles",
        default: "",
        description: '<a href="https://github.com/MHCommunity/mousehunt-improved/wiki/Custom-CSS" target="_blank" rel="noopener noreferrer">Custom CSS</a> to apply',
        settings: {
          type: "textarea"
        }
      }];
    });
  }
});

// src/modules/custom-css/index.js
var init21, custom_css_default, init_custom_css = __esm({
  "src/modules/custom-css/index.js"() {
    init_utils2();
    init_settings17();
    init21 = () => __async(void 0, null, function* () {
      onEvent("mh-improved-loaded", () => {
        let customStyles = getSetting("override-styles");
        customStyles && addStyles(customStyles, "mousehunt-improved-override-styles");
      });
    }), custom_css_default = {
      id: "custom-css",
      type: "advanced",
      alwaysLoad: !0,
      load: init21,
      settings: settings_default16
    };
  }
});

// src/modules/custom-horn/settings/index.js
var settings_default17, init_settings18 = __esm({
  "src/modules/custom-horn/settings/index.js"() {
    settings_default17 = () => __async(void 0, null, function* () {
      let options2 = [
        { 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: "Spring Egg Hunt",
              value: "huntersHornView--seasonalEvent-springEggHunt"
            }
          ]
        },
        {
          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" }
          ]
        }
      ];
      return [{
        id: "custom-horn",
        title: 'Custom Horn <a class="mh-improved-custom-horn-show-horn">Show Horn</a>',
        default: [options2[0]],
        description: "Change the horn to an event horn or a different color",
        settings: {
          type: "multi-select",
          number: 1,
          options: options2
        }
      }];
    });
  }
});

// src/modules/custom-horn/styles.css
var styles_default33, init_styles34 = __esm({
  "src/modules/custom-horn/styles.css"() {
    styles_default33 = `.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)}.huntersHornView.horn-color-rainbow .huntersHornView__horn{animation:mh-improved-hue-rotate 30s infinite}@media (prefers-reduced-motion: reduce){.huntersHornView.horn-color-rainbow .huntersHornView__horn{animation:none}}.mh-improved-custom-horn-show-horn{position:absolute;top:0;right:225px;bottom:0;display:flex;align-items:center;font-size:12px}
`;
  }
});

// src/modules/custom-horn/index.js
var addedClass2, addHornClass, listenForPreferenceChanges2, addPreview2, persistHornClass, init22, custom_horn_default, init_custom_horn = __esm({
  "src/modules/custom-horn/index.js"() {
    init_utils2();
    init_settings18();
    init_styles34();
    addedClass2 = "", addHornClass = (preview = !1) => {
      let hornView = document.querySelector(".huntersHornView");
      if (!hornView)
        return;
      let horn = document.querySelector(".huntersHornView__horn");
      if (!horn)
        return;
      horn.classList.add("huntersHornView__horn--default");
      let setting = getSetting("custom-horn-0", "default");
      preview && (setting = preview), hornView.classList.add(), addedClass2 && hornView.classList.remove(addedClass2), setting !== "default" && (hornView.classList.add(setting), addedClass2 = setting);
    }, listenForPreferenceChanges2 = () => {
      let input = document.querySelector("#mousehunt-improved-settings-design-custom-horn select");
      input && input.addEventListener("change", () => {
        addHornClass();
      });
    }, addPreview2 = () => {
      let previewLink = document.querySelector(".mh-improved-custom-horn-show-horn");
      if (!previewLink)
        return;
      let isShowing = !1, timeout = null;
      previewLink.addEventListener("click", (e) => {
        e.preventDefault(), e.stopPropagation();
        let horn = document.querySelector(".huntersHornView__horn");
        if (!horn)
          return;
        let backdrop = document.querySelector(".huntersHornView__backdrop");
        if (backdrop) {
          if (isShowing) {
            isShowing = !1, 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 = !0, 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: !0
      });
    }, init22 = () => __async(void 0, null, function* () {
      addStyles(styles_default33, "custom-horn"), persistHornClass();
    }), custom_horn_default = {
      id: "custom-horn",
      type: "design",
      alwaysLoad: !0,
      load: init22,
      settings: settings_default17
    };
  }
});

// src/modules/custom-hud/settings/index.js
var settings_default18, init_settings19 = __esm({
  "src/modules/custom-hud/settings/index.js"() {
    init_backgrounds2();
    settings_default18 = () => __async(void 0, null, function* () {
      let gradientOptions = backgrounds_default2.map((gradient) => ({
        name: gradient.name,
        value: gradient.id
      })), options2 = [
        { 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" },
        {
          name: "Other",
          value: "group",
          options: gradientOptions
        }
      ];
      return [{
        id: "custom-hud",
        title: 'Custom HUD background <a class="mh-improved-custom-hud-preview hidden">Preview choices</a>',
        default: [options2[0]],
        description: "Change the marbled HUD background",
        settings: {
          type: "multi-select",
          number: 1,
          options: options2
        }
      }];
    });
  }
});

// src/modules/custom-hud/styles/blueprint.css
var blueprint_default, init_blueprint2 = __esm({
  "src/modules/custom-hud/styles/blueprint.css"() {
    blueprint_default = `body .mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 731px 0 no-repeat,url(https://i.mouse.rip/mh-improved/custom-hud/hud-blueprint.png) repeat-y top center}
`;
  }
});

// src/modules/custom-hud/styles/groovy-green.css
var groovy_green_default, init_groovy_green = __esm({
  "src/modules/custom-hud/styles/groovy-green.css"() {
    groovy_green_default = `body .mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 731px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/folklore_forest_region/pattern.png) repeat-y bottom center/cover}
`;
  }
});

// src/modules/custom-hud/styles/midnight.css
var midnight_default, init_midnight = __esm({
  "src/modules/custom-hud/styles/midnight.css"() {
    midnight_default = `.pageFrameView #mousehuntContainer.PageCamp .gameHeader:before,.pageFrameView #mousehuntContainer.PageJournal .gameHeader:before{background:transparent}.pageFrameView #mousehuntContainer.PageCamp,.pageFrameView #mousehuntContainer.PageJournal{background-color:#383e49}body .mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 731px 0 no-repeat;background-color:#383e49}.pageFrameView .pageFrameView-contentContainer,.pageFrameView .pageFrameView-column.right,.pageFrameView .pageFrameView-column.left{background-color:#111;border-color:#111}
`;
  }
});

// src/modules/custom-hud/styles/suede.css
var suede_default, init_suede = __esm({
  "src/modules/custom-hud/styles/suede.css"() {
    suede_default = `.mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -51px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 736px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/suede.jpg) repeat bottom left/760px}#mousehuntContainer.PageCamp{background:url(https://www.mousehuntgame.com/images/ui/hud/suede.jpg) repeat-y}
`;
  }
});

// src/modules/custom-hud/index.js
var addStyleEl, listenForPreferenceChanges3, persistBackground2, init23, custom_hud_default, init_custom_hud = __esm({
  "src/modules/custom-hud/index.js"() {
    init_utils2();
    init_settings19();
    init_backgrounds2();
    init_blueprint2();
    init_groovy_green();
    init_midnight();
    init_suede();
    addStyleEl = () => {
      let setting = getSetting("custom-hud-0", "default"), stylesEl = document.querySelector("#mh-improved-custom-hud-style");
      if (stylesEl && stylesEl.remove(), setting === "default")
        return;
      let mapping = {
        "hud-blueprint": blueprint_default,
        "hud-suede": suede_default,
        "hud-groovy-green": groovy_green_default,
        "hud-midnight": midnight_default
      }, styleEl = document.createElement("style");
      if (styleEl.id = "mh-improved-custom-hud-style", mapping[setting])
        styleEl.innerHTML = mapping[setting];
      else {
        let gradient = backgrounds_default2.find((g) => g.id === setting);
        gradient ? styleEl.innerHTML = `body .mousehuntHud-marbleDrawer {
      background: url(https://i.mouse.rip/mousehuntHudPedestal.png) -46px 0 no-repeat, url(https://i.mouse.rip/mousehuntHudPedestal.png) 731px 0 no-repeat, ${gradient.css};
    }` : styleEl.innerHTML = `body .mousehuntHud-marbleDrawer {
      background: url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat, url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 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(styleEl);
    }, listenForPreferenceChanges3 = () => {
      let input = document.querySelector("#mousehunt-improved-settings-design-custom-hud select");
      input && input.addEventListener("change", () => {
        addStyleEl();
      });
    }, persistBackground2 = () => {
      addStyleEl(), onNavigation(listenForPreferenceChanges3, {
        page: "preferences",
        onLoad: !0
      });
    }, init23 = () => __async(void 0, null, function* () {
      persistBackground2();
    }), custom_hud_default = {
      id: "custom-hud",
      type: "design",
      alwaysLoad: !0,
      load: init23,
      settings: settings_default18
    };
  }
});

// src/modules/custom-shield/settings/index.js
var settings_default19, init_settings20 = __esm({
  "src/modules/custom-shield/settings/index.js"() {
    settings_default19 = () => __async(void 0, null, function* () {
      let options2 = [
        { name: "Default", value: "default" },
        { name: "Default (normal resolution)", value: "default-normal" },
        {
          name: "Events",
          value: "group",
          options: [
            { name: "Birthday (Generic)", value: "birthday" },
            { 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 (Year 16)", value: "birthday.year16" },
            { 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: "Cyan", value: "color-cyan" },
            { name: "Green", value: "color-green" },
            { name: "Pink", value: "color-pink" },
            { name: "Purple", value: "color-purple" },
            { name: "Red", value: "color-red" },
            { name: "Faded", value: "color-faded" },
            { name: "Rainbow", value: "color-rainbow" },
            { name: "Cotton Candy", value: "color-cotton-candy" },
            { seperator: !0 },
            { name: "Blue with matching timer", value: "color-blue-timer" },
            { name: "Cyan with matching timer", value: "color-cyan-timer" },
            { name: "Green with matching timer", value: "color-green-timer" },
            { name: "Pink with matching timer", value: "color-pink-timer" },
            { name: "Purple with matching timer", value: "color-purple-timer" },
            { name: "Red with matching timer", value: "color-red-timer" },
            { name: "Rainbow with matching timer", value: "color-rainbow-timer" }
          ]
        },
        {
          name: "Title Shields",
          value: "group",
          options: [
            { name: "Current Title ", value: "title" },
            { seperator: !0 },
            { 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) {
        let toDisable = /* @__PURE__ */ new Set([
          "pride",
          "spring-egg-hunt",
          "spring-egg-hunt-alt",
          "Color (LGS required)"
        ]);
        options2 = options2.map((option) => {
          if (option.value === "group") {
            let disabledParent = toDisable.has(option.name) || toDisable.has(option.value);
            disabledParent && (option.disabled = !0), option.options = option.options.map((groupOption) => ((toDisable.has(groupOption.value) || disabledParent) && (groupOption.disabled = !0), groupOption));
          }
          return option;
        });
      }
      return [{
        id: "custom-shield",
        title: "Custom Shield",
        default: [options2[0]],
        description: "Change the shield to an event shield, a color, a title shield, or a silly shield",
        settings: {
          type: "multi-select",
          number: 1,
          options: options2
        }
      }];
    });
  }
});

// src/modules/custom-shield/styles.css
var styles_default34, init_styles35 = __esm({
  "src/modules/custom-shield/styles.css"() {
    styles_default34 = `.mousehuntHud-shield.golden.default{top:2px;left:10px;background-image:url(https://www.mousehuntgame.com/images/mousehunt_gold_logo.png);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);filter:none}.mousehuntHud-shield.golden.default-fancy:hover,.mousehuntHud-shield.golden.default-fancy: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)}.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)}.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{top:2px;left:2px;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:center;background-size:105px;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)}.mousehuntHud-shield.title.recruit:after,.mousehuntHud-shield.golden.title.recruit:after{background-image:url(https://www.mousehuntgame.com/images/titles/3f1e44bbaa7138da4c326819e9f3f0a8.png)}.mousehuntHud-shield.title.apprentice:after,.mousehuntHud-shield.golden.title.apprentice:after{background-image:url(https://www.mousehuntgame.com/images/titles/6f4673dd2d9d1e98b4569667d702a775.png)}.mousehuntHud-shield.title.initiate:after,.mousehuntHud-shield.golden.title.initiate:after{background-image:url(https://www.mousehuntgame.com/images/titles/e96387f7261b95c0eeab9291e4e594e1.png)}.mousehuntHud-shield.title.journeyman:after,.mousehuntHud-shield.golden.title.journeyman:after{background-image:url(https://www.mousehuntgame.com/images/titles/ad6875955f541159133c6d3798519f81.png)}.mousehuntHud-shield.title.master:after,.mousehuntHud-shield.golden.title.master:after{background-image:url(https://www.mousehuntgame.com/images/titles/35ee6056a09037fb13a9195881875045.png)}.mousehuntHud-shield.title.grandmaster:after,.mousehuntHud-shield.golden.title.grandmaster:after{background-image:url(https://www.mousehuntgame.com/images/titles/0da3761747914f497c16dc2051ba132d.png)}.mousehuntHud-shield.title.legendary:after,.mousehuntHud-shield.golden.title.legendary:after{background-image:url(https://www.mousehuntgame.com/images/titles/fca35751046f4bcc972716ca484b6d61.png)}.mousehuntHud-shield.title.hero:after,.mousehuntHud-shield.golden.title.hero:after{background-image:url(https://www.mousehuntgame.com/images/titles/0567284d6e12aaaed35ca5912007e070.png)}.mousehuntHud-shield.title.knight:after,.mousehuntHud-shield.golden.title.knight:after{background-image:url(https://www.mousehuntgame.com/images/titles/398dca9a8c7703de969769491622ca32.png)}.mousehuntHud-shield.title.lord:after,.mousehuntHud-shield.golden.title.lord:after{background-image:url(https://www.mousehuntgame.com/images/titles/9a6acd429a9a3a4849ed13901288b0b8.png)}.mousehuntHud-shield.title.baron:after,.mousehuntHud-shield.golden.title.baron:after{background-image:url(https://www.mousehuntgame.com/images/titles/ea9c0ec2e6d3d81c14e61f5ce924d0e1.png)}.mousehuntHud-shield.title.count:after,.mousehuntHud-shield.golden.title.count:after{background-image:url(https://www.mousehuntgame.com/images/titles/dd11711a25b80db90e0306193f2e8d78.png)}.mousehuntHud-shield.title.duke:after,.mousehuntHud-shield.golden.title.duke:after{background-image:url(https://www.mousehuntgame.com/images/titles/eb46ac1e8197b13299ab860f07d963db.png)}.mousehuntHud-shield.title.grandduke:after,.mousehuntHud-shield.golden.title.grandduke:after{background-image:url(https://www.mousehuntgame.com/images/titles/87937fa96bbb3b2dd3225df883002642.png)}.mousehuntHud-shield.title.archduke:after,.mousehuntHud-shield.golden.title.archduke:after{background-image:url(https://www.mousehuntgame.com/images/titles/043efe31de4f0f2e0ddca590fe829032.png)}.mousehuntHud-shield.title.viceroy:after,.mousehuntHud-shield.golden.title.viceroy:after{background-image:url(https://www.mousehuntgame.com/images/titles/e2e79f6f9201a4d4e7a89684fbb5356f.png)}.mousehuntHud-shield.title.elder:after,.mousehuntHud-shield.golden.title.elder:after{background-image:url(https://www.mousehuntgame.com/images/titles/0f3cf224bf98457f6b5bad91ab1c7bd2.png)}.mousehuntHud-shield.title.sage:after,.mousehuntHud-shield.golden.title.sage:after{background-image:url(https://www.mousehuntgame.com/images/titles/cb49e43c5e4460da7c09fe28ca4f44ce.png)}.mousehuntHud-shield.title.fabled:after,.mousehuntHud-shield.golden.title.fabled:after{background-image:url(https://www.mousehuntgame.com/images/titles/5daba92a8d609834aa8b789f37544e08.png)}.mousehunt-improved-lgs-reminder-new.color-blue,.huntersHornView__timer--default.color-blue,.mousehuntHud-shield.golden.color-blue{filter:hue-rotate(158deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-cyan,.huntersHornView__timer--default.color-cyan,.mousehuntHud-shield.golden.color-cyan{filter:hue-rotate(112deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-green,.huntersHornView__timer--default.color-green,.mousehuntHud-shield.golden.color-green{filter:hue-rotate(66deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-pink,.huntersHornView__timer--default.color-pink,.mousehuntHud-shield.golden.color-pink{filter:hue-rotate(280deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-purple,.huntersHornView__timer--default.color-purple,.mousehuntHud-shield.golden.color-purple{filter:hue-rotate(195deg) drop-shadow(0 0 5px #e8dbb8)}.mousehunt-improved-lgs-reminder-new.color-red,.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)}.huntersHornView__timer--default.color-blue .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-cyan .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-green .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-pink .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-purple .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown,.huntersHornView__timer--default.color-red .huntersHornView__timerState.huntersHornView__timerState--type-countdown.huntersHornView__countdown{mix-blend-mode:color-burn}@keyframes mh-improved-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)}}.mousehunt-improved-lgs-reminder-new.color-rainbow,.huntersHornView__timer--default.color-rainbow,.mousehuntHud-shield.golden.color-rainbow,.mousehuntHud-shield.golden.color-rainbow2{animation:mh-improved-shield-hue-rotate 30s infinite}@media (prefers-reduced-motion: reduce){.mousehunt-improved-lgs-reminder-new.color-rainbow,.huntersHornView__timer--default.color-rainbow,.mousehuntHud-shield.golden.color-rainbow,.mousehuntHud-shield.golden.color-rainbow2{animation:none}}
`;
  }
});

// src/modules/custom-shield/cotton-candy.css
var cotton_candy_default, 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) 100% 0 no-repeat;filter:hue-rotate(328deg);backdrop-filter:hue-rotate(292deg)}
`;
  }
});

// src/modules/custom-shield/index.js
var doClass, addClass, removeClass, lastShield, changeShield, watchForPreferenceChanges, init24, custom_shield_default, init_custom_shield = __esm({
  "src/modules/custom-shield/index.js"() {
    init_utils2();
    init_settings20();
    init_styles35();
    init_cotton_candy();
    doClass = (el, shieldClass, verb) => {
      if (Array.isArray(shieldClass) && (shieldClass = shieldClass.join(" ")), !shieldClass)
        return;
      let classToAdd = shieldClass.replace(".", " ");
      classToAdd = classToAdd.split(" "), Array.isArray(classToAdd) || (classToAdd = [classToAdd]), classToAdd.forEach((className) => {
        if (el && el.classList && el.classList[verb]) {
          if (verb === "remove" && !el.classList.contains(className))
            return;
          el.classList[verb](className);
        }
      });
    }, addClass = (el, shieldClass) => {
      doClass(el, shieldClass, "add");
    }, removeClass = (el, shieldClass) => {
      doClass(el, shieldClass, "remove");
    }, lastShield = "", changeShield = () => {
      let shieldEl = document.querySelector(".mousehuntHud-shield");
      if (!shieldEl)
        return;
      let timer = document.querySelector(".huntersHornView__timer--default");
      if (!timer)
        return;
      lastShield && [
        ...lastShield,
        "mhui-custom-shield"
      ].forEach((className) => {
        removeClass(shieldEl, className), timer.classList.remove(className);
      });
      let shield = getSetting("custom-shield-0", "default");
      if (shield === "default") {
        shieldEl.classList.add("default", "default-fancy"), lastShield = ["default", "default-fancy"];
        return;
      }
      if (shield === "color-cotton-candy")
        makeElement("style", "mh-improved-cotton-candy-style", cotton_candy_default, document.head), shield = "color-pink-timer";
      else {
        let cottonCandyStyle = document.querySelector(".mh-improved-cotton-candy-style");
        cottonCandyStyle && cottonCandyStyle.remove();
      }
      if (lastShield = [shield], shield.startsWith("color-") && (shieldEl.classList.add("default"), shieldEl.classList.add("color"), lastShield.push("color")), shield.endsWith("-timer") && (shield = shield.replace("-timer", ""), timer.classList.add(shield), lastShield.push(shield)), shield.endsWith("-alt")) {
        let altClass = shield.replace("-alt", "");
        shieldEl.classList.add(altClass, "alt"), lastShield.push(altClass, "alt");
      }
      shield.includes("title") && (shieldEl.classList.add("title"), shield = shield === "title" ? getUserTitle() : shield, lastShield.push("title", shield)), shieldEl.classList.add("mhui-custom-shield"), addClass(shieldEl, shield);
    }, watchForPreferenceChanges = () => {
      let input = document.querySelector("#mousehunt-improved-settings-design-custom-shield select");
      input && input.addEventListener("change", () => {
        changeShield();
      });
    }, init24 = () => __async(void 0, null, function* () {
      addStyles(styles_default34, "custom-shield"), lastShield = getSetting("custom-shield-0", "default"), changeShield(), onNavigation(watchForPreferenceChanges, {
        page: "preferences",
        onLoad: !0
      });
    }), custom_shield_default = {
      id: "custom-shield",
      type: "design",
      alwaysLoad: !0,
      load: init24,
      settings: settings_default19
    };
  }
});

// src/modules/dark-mode/styles.css
var styles_default35, init_styles36 = __esm({
  "src/modules/dark-mode/styles.css"() {
    styles_default35 = `:root{--mhdm-dimming-filter: transparent}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-goalPadding{background-color:transparent}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-adventureName{color:#000}.mh-dark-mode .journal a{color:#0174a7}.mh-dark-mode .entry.short.supplytransferitem{background:url(https://i.mouse.rip/upscaled/item-add.png) no-repeat 10px center;background-color:#a0a0a0}.mh-dark-mode .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-margin,.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}.mh-dark-mode .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}.mh-dark-mode .trapSelectorView__trapStatSummaryContainer{background:#333}.mh-dark-mode .pageFrameView .campPage-trap-itemBrowser-armed-item-content .campPage-trap-itemBrowser-item-disarmButton{color:#000}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .trapImageView{background:#000!important;border:none}.mh-dark-mode .mh-ui-goals-sidebar-toggle{filter:invert(1)}.mh-dark-mode .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{color:#000}.mh-dark-mode .mousehuntHeaderView .dropdownContent a span,.mh-dark-mode .pageFrameView .giftSelectorView-friend>.giftSelectorView-friend-padding{color:#fff}.mh-dark-mode .regionName{background-color:#1c1c1c;border-color:#000}.mh-dark-mode .regionWrapper{border-color:#0c0c0c}.mh-dark-mode .locationWrapper{background-color:#2e2e2e}.mh-dark-mode .locationWrapper:nth-child(2n){background-color:#242424}.mh-dark-mode .dashboardWrapper{border-color:#0c0c0c}.mh-dark-mode .scoreboardRelativeRankingTableView-table,.mh-dark-mode .mousehuntHeaderView .dropdownContent{color:#fff;background-color:#252525;border-color:#666;border-radius:0}.mh-dark-mode .mousehuntHeaderView .menuItem.sidebar .dropdownContent a.pageSidebarView-user-logout,.mh-dark-mode .mousehuntHeaderView .menuItem.sidebar .dropdownContent .pageSidebarView-user a:nth-child(2),.mh-dark-mode .mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a,.mh-dark-mode .mousehuntHeaderView .dropdownContent a{color:#009adf}.mh-dark-mode .mousehuntHeaderView .dropdownContent a{border-color:#666}.mh-dark-mode .pageFrameView #mousehuntContainer.PageHunterProfile .trapImageView{background:none;border:none}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp{box-shadow:none}.mh-dark-mode .trapSelectorView__codexBrowser .loading,.mh-dark-mode .campPage-trap-itemBrowser-empty-container{color:#fff;background-color:#424242;border-color:#5c5c5c}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .journal:before,.mh-dark-mode .pageFrameView #mousehuntContainer.PageJournal .journal:before{background:none}.mh-dark-mode .giftSelectorView-confirmPopup-content{color:#dcddde;background-color:#242424}.mh-dark-mode .giftSelectorView-confirmPopup-padding{background-color:#0f0f0f;border-color:#0f0f0f;box-shadow:0 0 10px #c8c8c8}.mh-dark-mode .campPage-trap-itemBrowser-item.largeQuantity .campPage-trap-itemBrowser-item-quantity .quantity{background-color:#333}.mh-dark-mode .campPage-trap-itemBrowser-item-image:after,.mh-dark-mode .pageFrameView .campPage-trap-itemBrowser-favorite-item-image-frame{border-color:#000;box-shadow:2px 2px 3px -1px #000 inset}.mh-dark-mode .campPage-trap-itemBrowser-filter input{background-color:#333;border-color:#000}.mh-dark-mode .campPage-trap-itemBrowser-filterContainer .label,.mh-dark-mode .campPage-trap-itemBrowser-quickLinks-header{color:#fff}.mh-dark-mode .campPage-trap-itemBrowser .campPage-trap-itemBrowser-filter select{color:#fff;background-color:#333;border-color:#000}.mh-dark-mode .campPage-trap-itemBrowser-item-favorite,.mh-dark-mode .pageFrameView .campPage-trap-itemBrowser-tagGroup-name{background-color:#333}.mh-dark-mode .trapSelectorView__blueprint{border-color:#0e7fbf;box-shadow:-1px -1px 2px #0e7fbf inset,0 0 10px #333 inset,3px 3px 3px #000}.mh-dark-mode a.campPage-trap-blueprint-closeButton{border-color:#0e7fbf}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner:before{background:transparent}.mh-dark-mode .adventureBookBanner-container{background-color:#bbb;border-color:#333}.mh-dark-mode .mousehuntHeaderView a.superBrie .getMore{background-color:#0e7fbf}.journal .entry.socialGift,.journal .content .marketplacepurchase,.journal .content .supplytransferitem,.journal .content .toolbarinstalled{background-image:url(https://i.mouse.rip/item_add.png)}.journal .content .marketplacesale,.journal .content .supplytransfergold{background-image:url(https://i.mouse.rip/gold_add.png)}.journal .content .travel{background-image:url(https://i.mouse.rip/travel.png)}.mh-dark-mode .mouseview-has-mhct .mouse-ar-wrapper:nth-child(odd){background-color:#3d3d3d}.mh-dark-mode .minluck-title,.mh-dark-mode .mouseview-has-mhct .ar-header{border-color:#606060}.mh-dark-mode li.minluck-item{background-color:#3d3d3d;border-color:#606060}.mh-dark-mode .pageFrameView .mouseViewPopup .content{color:#dcddde;background-color:#242424}.mh-dark-mode .mouseView-title{color:#dcddde}.mh-dark-mode .mouseView-statsContainer-block{background-color:#1a1a1a}.mh-dark-mode .mh-improved-map-sidebar-goal-image,.mh-dark-mode .mh-improved-mice-sidebar-mouse-image{box-shadow:inset 0 0 0 1px #222}.mh-dark-mode .mh-improved-map-sidebar-goal:hover,.mh-dark-mode .mh-improved-mice-sidebar-mouse:hover{background-color:#383e49}.mh-dark-mode .scoreboardRelativeRankingTableView th{color:#a7adb9;background-color:#383838;border-color:#383838}.mh-dark-mode .pageFrameView .scoreboardRelativeRankingTableView-table{border-color:#383838}.mh-dark-mode .pageFrameView .pageSidebarView-block{background-color:transparent}.mh-dark-mode .mh-improved-map-sidebar-title,.mh-dark-mode .mh-improved-mice-sidebar-title{color:#a7adb9;background-color:#383838}.mh-dark-mode .mh-improved-map-sidebar,.mh-dark-mode .mh-improved-mice-sidebar{border-color:#383838}.mh-dark-mode .mh-improved-map-sidebar-title:after{filter:invert(1)}.mh-dark-mode .mh-improved-favorite-setups-button{background:#424242;border:1px solid #5c5c5c;box-shadow:1px 1px 1px #535151}
`;
  }
});

// src/modules/dark-mode/index.js
var isDarkMode, checkForDarkModeAndAddBodyClass, addDarkModeBodyClass, init25, dark_mode_default, init_dark_mode = __esm({
  "src/modules/dark-mode/index.js"() {
    init_utils2();
    init_styles36();
    isDarkMode = () => !!getComputedStyle(document.documentElement).getPropertyValue("--mhdm-white"), checkForDarkModeAndAddBodyClass = () => isDarkMode() ? (document.body.classList.add("mh-dark-mode"), !0) : !1, addDarkModeBodyClass = () => {
      let added = checkForDarkModeAndAddBodyClass();
      added || setTimeout(() => {
        added = checkForDarkModeAndAddBodyClass(), added || setTimeout(() => {
          checkForDarkModeAndAddBodyClass();
        }, 1e3);
      }, 500);
    }, init25 = () => __async(void 0, null, function* () {
      addStyles(styles_default35, "dark-mode"), addDarkModeBodyClass(), onNavigation(addDarkModeBodyClass), onRequest("*", addDarkModeBodyClass);
    }), dark_mode_default = {
      id: "dark-mode",
      name: "Dark Mode Updates & Tweaks",
      type: "feature",
      default: !0,
      description: "Improves and tweaks dark mode. Requires either the standalone extension or enabling the setting in MHCT.",
      load: init25
    };
  }
});

// src/modules/data-exporters/utils.js
var recursiveFetch, addDownloadToButton, addJsonDownloadToButton, addCsvDownloadToButton, getFormattedDate, addDownloadButtons, resultReducer, updateSingleTotalEl, exportPopup, init_utils5 = __esm({
  "src/modules/data-exporters/utils.js"() {
    init_utils2();
    recursiveFetch = (data, callbackToRun) => data.reduce((promiseChain, item) => promiseChain.then((chainResults) => new Promise((resolve) => {
      callbackToRun(item).then((currentResult) => {
        chainResults.push(currentResult), resolve(chainResults);
      });
    })), Promise.resolve([])), addDownloadToButton = (opts, callback) => {
      let { buttonSelector, results, filename, beforeDownload } = opts, exportButton = document.querySelector(buttonSelector);
      exportButton.classList.remove("disabled"), exportButton.addEventListener("click", () => {
        beforeDownload && (results = opts.beforeDownload()), callback(results, filename);
      });
    }, addJsonDownloadToButton = (opts) => {
      addDownloadToButton(opts, (results, filename) => {
        let data = JSON.stringify({
          type: opts.type,
          generated: (/* @__PURE__ */ new Date()).toISOString(),
          data: results
        }), blob = new Blob([data], { type: "application/json" }), url = URL.createObjectURL(blob), link = document.createElement("a");
        link.download = `${filename}.json`, link.href = url, link.click(), URL.revokeObjectURL(url);
      });
    }, addCsvDownloadToButton = (opts) => {
      addDownloadToButton(opts, (results, filename) => {
        opts.reduceResults && (results = resultReducer(results));
        let csv = results.map((row) => Object.values(row).map((value) => `"${value}"`).join(",")).join(`
`);
        opts.headers && (csv = `${opts.headers.join(",")}
${csv}`);
        let blob = new Blob([csv], { type: "text/csv" }), url = URL.createObjectURL(blob), link = document.createElement("a");
        link.download = `${filename}.csv`, link.href = url, link.click(), URL.revokeObjectURL(url);
      });
    }, getFormattedDate = () => {
      let date = /* @__PURE__ */ new Date();
      return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
    }, addDownloadButtons = (opts) => {
      let { type, results, headers, reduceResults } = opts, filename = `${type}-${getFormattedDate()}`, buttonSelector = `#export-${type}`;
      addJsonDownloadToButton({
        buttonSelector,
        type,
        results,
        filename
      }), addCsvDownloadToButton({
        buttonSelector: `${buttonSelector}-csv`,
        results,
        filename,
        headers,
        reduceResults
      });
    }, resultReducer = (results) => results.reduce((acc, { category, items: items5 }) => (items5.forEach((data) => {
      acc.push(__spreadValues({
        region: category
      }, data));
    }), acc), []), updateSingleTotalEl = (results) => {
      let totalItemsEl = document.querySelector(".export-items-footer .total-items");
      if (!totalItemsEl)
        return;
      let totalItems = results.reduce((acc, { items: items5 }) => acc + items5.length, 0);
      totalItemsEl.textContent = totalItems.toLocaleString();
    }, exportPopup = (opts) => {
      let {
        type,
        text,
        headerMarkup,
        itemsMarkup,
        footerMarkup,
        fetch: fetch6,
        afterFetch: afterFetch5,
        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>`
      });
      let exportBackButton = document.querySelector("#export-back");
      if (!exportBackButton)
        return;
      exportBackButton.addEventListener("click", () => {
        doEvent2("show-export-data");
      });
      let fetchButton = document.querySelector(`#fetch-${type}`);
      fetchButton && (fetchButton.addEventListener("click", () => {
        fetchButton.classList.add("disabled"), fetch6().then((results) => {
          afterFetch5 && afterFetch5(results), updateSingleTotal && updateSingleTotalEl(results), addDownloadButtons(__spreadValues({
            results,
            type
          }, download)), fetchButton.classList.remove("disabled");
        });
      }), dataIsAvailable && fetchButton.click());
    };
  }
});

// src/modules/data-exporters/exporters/export-favorite-setups-userscript.js
var hasFavoriteSetupsUserscript, fetch2, afterFetch, exportFavoriteSetupsUserscript, init_export_favorite_setups_userscript = __esm({
  "src/modules/data-exporters/exporters/export-favorite-setups-userscript.js"() {
    init_utils5();
    hasFavoriteSetupsUserscript = () => localStorage.getItem("favorite-setups-saved"), fetch2 = () => __async(void 0, null, function* () {
      let setups = JSON.parse(localStorage.getItem("favorite-setups-saved")), flattenedSetups = [];
      for (let setupName in setups) {
        let 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) => {
      let totalItemsEl = document.querySelector(".export-items-footer .total-items");
      totalItemsEl.textContent = data.length.toLocaleString();
    }, exportFavoriteSetupsUserscript = () => {
      exportPopup({
        type: "favorite-setups-saved",
        text: "Favorite Setups (userscript)",
        footerMarkup: '<div class="region-name">Total Values</div><div class="total-items">-</div>',
        fetch: fetch2,
        afterFetch,
        dataIsAvailable: !0,
        download: {
          headers: [
            "Name",
            "Bait",
            "Base",
            "Weapon",
            "Trinket",
            "Skin",
            "Location",
            "Sort"
          ]
        }
      });
    };
  }
});

// src/modules/data-exporters/exporters/export-rankup-forecaster.js
var hasRankupForecaster, fetch3, afterFetch2, exportRankupForecaster, init_export_rankup_forecaster = __esm({
  "src/modules/data-exporters/exporters/export-rankup-forecaster.js"() {
    init_utils5();
    hasRankupForecaster = () => localStorage.getItem("Chro-forecaster-time"), fetch3 = () => __async(void 0, null, function* () {
      return JSON.parse(localStorage.getItem("Chro-forecaster-time"));
    }), afterFetch2 = (data) => {
      let 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: !0,
        download: {
          headers: ["Date", "Wisdom"]
        }
      });
    };
  }
});

// src/modules/data-exporters/exporters/export-favorite-setups.js
var fetch4, afterFetch3, exportFavoriteSetups, export_favorite_setups_default, init_export_favorite_setups = __esm({
  "src/modules/data-exporters/exporters/export-favorite-setups.js"() {
    init_utils5();
    init_utils2();
    fetch4 = () => __async(void 0, null, function* () {
      return getSetting("favorite-setups.setups").map((setup) => ({
        id: setup.id || 0,
        name: setup.name || "",
        location: setup.location || "",
        bait_id: setup.bait_id || 0,
        base_id: setup.base_id || 0,
        trinket_id: setup.trinket_id || 0,
        weapon_id: setup.weapon_id || 0,
        power_type: setup.power_type || ""
      }));
    }), afterFetch3 = (data) => {
      let totalItemsEl = document.querySelector(".export-items-footer .total-items");
      totalItemsEl.textContent = data.length.toLocaleString();
    }, exportFavoriteSetups = () => {
      exportPopup({
        type: "favorite-setups",
        text: "Favorite Setups",
        footerMarkup: '<div class="region-name">Total Values</div><div class="total-items">-</div>',
        fetch: fetch4,
        afterFetch: afterFetch3,
        dataIsAvailable: !0,
        download: {
          headers: [
            "ID",
            "Name",
            "Location",
            "Bait ID",
            "Base ID",
            "Trinket ID",
            "Weapon ID",
            "Power Type"
          ]
        }
      });
    }, export_favorite_setups_default = exportFavoriteSetups;
  }
});

// src/modules/data-exporters/exporters/export-inventory.js
var itemCategories, getData2, exportInventory, export_inventory_default, init_export_inventory = __esm({
  "src/modules/data-exporters/exporters/export-inventory.js"() {
    init_utils2();
    init_utils5();
    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* () {
      let totalItemsEl = document.querySelector(`.item-wrapper[data-region="${classification.id}"]`).querySelector(".total-items");
      totalItemsEl.textContent = "\u2026", totalItemsEl.scrollIntoView({
        behavior: "smooth",
        block: "nearest"
      });
      let response = yield doRequest("managers/ajax/users/userInventory.php", {
        action: "get_items_by_classification",
        "classifications[]": classification.id
      }), items5 = [];
      return response.items.forEach((item) => {
        let 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 || !1,
          is_tradable: item.is_tradable || !1,
          is_givable: item.is_givable || !1
        };
        items5.push(itemData), totalItemsEl.textContent = items5.length.toLocaleString();
      }), {
        category: classification.name,
        items: items5
      };
    }), 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 the data for the inventory.
         *
         * @return {Promise} The promise that resolves when the data is fetched.
         */
        fetch: () => recursiveFetch(itemCategories, getData2),
        updateSingleTotal: !0,
        download: {
          headers: [
            "Category",
            "Item ID",
            "Item Type",
            "Item Name",
            "Classification",
            "Quantity",
            "Thumbnail",
            "Limited Edition",
            "Tradable",
            "Givable"
          ],
          reduceResults: !0
        }
      });
    }, export_inventory_default = exportInventory;
  }
});

// src/modules/data-exporters/exporters/export-journal-entries.js
var fetch5, afterFetch4, exportJournalEntries, export_journal_entries_default, init_export_journal_entries = __esm({
  "src/modules/data-exporters/exporters/export-journal-entries.js"() {
    init_utils2();
    init_utils5();
    fetch5 = () => __async(void 0, null, function* () {
      let journalEntries2 = yield dbGetAll("journal");
      return journalEntries2.sort((a, b) => b.id - a.id), journalEntries2.map((entry) => {
        var _a, _b, _c, _d, _e, _f;
        return {
          id: ((_a = entry == null ? void 0 : entry.data) == null ? void 0 : _a.id) || 0,
          date: ((_b = entry == null ? void 0 : entry.data) == null ? void 0 : _b.date) || "",
          location: ((_c = entry == null ? void 0 : entry.data) == null ? void 0 : _c.location) || "",
          text: ((_d = entry == null ? void 0 : entry.data) == null ? void 0 : _d.text) || "",
          type: ((_e = entry == null ? void 0 : entry.data) == null ? void 0 : _e.type) || "",
          mouse: ((_f = entry == null ? void 0 : entry.data) == null ? void 0 : _f.mouse) || ""
        };
      });
    }), afterFetch4 = (data) => {
      let totalItemsEl = document.querySelector(".export-items-footer .total-items");
      totalItemsEl.textContent = data.length.toLocaleString();
    }, exportJournalEntries = () => {
      exportPopup({
        type: "journal-entries",
        text: "Journal Entries",
        footerMarkup: '<div class="region-name">Total Values</div><div class="total-items">-</div>',
        fetch: fetch5,
        afterFetch: afterFetch4,
        dataIsAvailable: !0,
        download: {
          headers: [
            "ID",
            "Date",
            "Location",
            "Text",
            "Type",
            "Mouse"
          ]
        }
      });
    }, export_journal_entries_default = exportJournalEntries;
  }
});

// src/modules/data-exporters/exporters/export-marketplace.js
var fetchPage, fetchTransactions, exportMarketplace, export_marketplace_default, init_export_marketplace = __esm({
  "src/modules/data-exporters/exporters/export-marketplace.js"() {
    init_utils2();
    init_utils2();
    init_utils5();
    fetchPage = (page) => __async(void 0, null, function* () {
      let 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;
      let totalItemsEl = document.querySelector(".export-items-footer .total-items");
      totalItemsEl.textContent = "\u2026", totalItemsEl.scrollIntoView({
        behavior: "smooth",
        block: "nearest"
      });
      let page = 1, response, transactions = [];
      page = Number.parseInt(sessionGet("export-marketplace-page"), 10) || 1, transactions = sessionGet("export-marketplace-transactions", []);
      let tradableItems = yield getData("items-tradable");
      do {
        response = yield fetchPage(page);
        for (let 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/exporters/export-mice.js
var seenMice, getWeight, getWeightFormatted, getDataForRegion, processWeights, groups, regions, exportMicePopup, exportType, exportMice, export_mice_default, init_export_mice = __esm({
  "src/modules/data-exporters/exporters/export-mice.js"() {
    init_utils2();
    init_utils2();
    init_utils5();
    seenMice = [], getWeight = (weight) => {
      weight = weight.toString().replaceAll(",", "").trim();
      let ozSplit = weight.split(" oz."), lbSplit = weight.split(" lb."), weightOz = 0;
      if (ozSplit.length === 1 && lbSplit.length === 1 && (weightOz = Number.parseFloat(weight)), ozSplit.length > 1)
        weightOz = Number.parseFloat(ozSplit[0].trim());
      else if (lbSplit.length > 1) {
        let lb = Number.parseInt(lbSplit[0].trim(), 10), oz = Number.parseFloat(lbSplit[1].trim());
        weightOz = lb * 16 + oz;
      }
      return weightOz;
    }, getWeightFormatted = (weight) => {
      let weightOz = getWeight(weight), weightLbs = Math.floor(weightOz / 16), weightOzRemainder = weightOz % 16;
      return weightLbs > 0 ? `${weightLbs.toLocaleString()} lb. ${weightOzRemainder} oz.` : `${weightOzRemainder} oz.`;
    }, getDataForRegion = (region) => __async(void 0, null, function* () {
      var _a, _b;
      let regionEl = document.querySelector(`.item-wrapper[data-region="${region.id}"]`);
      regionEl && regionEl.scrollIntoView({
        behavior: "smooth",
        block: "nearest"
      });
      let miceCaughtEl = regionEl.querySelector(".mice-caught"), totalCatchesEl = regionEl.querySelector(".total-catches"), totalWeightEl = regionEl.querySelector(".total-weight");
      miceCaughtEl.textContent = "\u2026", totalCatchesEl.textContent = "\u2026", totalWeightEl.textContent = "\u2026";
      let action, view;
      exportType === "group" ? (action = "get_group", view = "ViewMouseListGroups") : (action = "get_environment", view = "ViewMouseListEnvironments");
      let miceData = yield doRequest("managers/ajax/mice/mouse_list.php", {
        action,
        category: region.id,
        user_id: user.user_id,
        display_mode: "stats",
        view
      }), mice = (_b = (_a = miceData == null ? void 0 : miceData.mouse_list_category) == null ? void 0 : _a.subgroups) == null ? void 0 : _b.reduce((acc, cur) => [...acc, ...cur.mice], []), weights = [], totalCatches = 0, totalWeight = 0, regionSubtract = 0;
      return mice.forEach((mouse) => {
        if (exportType === "region" && seenMice.includes(mouse.type)) {
          regionSubtract++;
          return;
        }
        seenMice.push(mouse.type), mouse.num_catches = Number.parseInt(mouse.num_catches.toString().replace(",", ""), 10);
        let avgWeight = getWeight(mouse.avg_weight);
        totalCatches += mouse.num_catches, totalWeight += avgWeight * mouse.num_catches;
        let 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 = `${miceData.mouse_list_category.caught}/${miceData.mouse_list_category.total}`;
        let totalCatchesFormatted = totalCatches.toLocaleString();
        totalCatchesEl.textContent = totalCatchesFormatted;
        let totalWeightLbs = Math.floor(totalWeight / 16), totalWeightOz = totalWeight % 16, totalWeightLbsFormatted = totalWeightLbs.toLocaleString();
        totalWeightEl.textContent = totalWeightLbs > 0 ? `${totalWeightLbsFormatted} lb. ${totalWeightOz} oz` : `${totalWeightOz} oz`;
      }), {
        category: region.id,
        regionName: region.name,
        caughtMice: miceData.mouse_list_category.caught - regionSubtract,
        uniqueMice: miceData.mouse_list_category.total - regionSubtract,
        totalCatches,
        totalWeight,
        items: weights
      };
    }), processWeights = (results) => {
      seenMice = [];
      let totalUniqueMiceEl = document.querySelector(".export-items-footer .mice-caught"), totalCatchesEl = document.querySelector(".export-items-footer .total-catches"), totalWeightEl = document.querySelector(".export-items-footer .total-weight");
      if (!totalUniqueMiceEl || !totalCatchesEl || !totalWeightEl)
        return;
      let totals = results.reduce((acc, { caughtMice, uniqueMice, totalCatches, totalWeight }) => (acc.caughtMice += caughtMice, acc.uniqueMice += uniqueMice, acc.totalCatches += totalCatches, acc.totalWeight += totalWeight, 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, title;
      exportType === "group" ? (title = "Group", itemTypes = groups) : exportType === "region" ? (title = "Region", itemTypes = regions) : (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: !0
        }
      });
    }, 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/exporters/export-scoreboards.js
var getScoreboardData, exportScoreboards, export_scoreboards_default, init_export_scoreboards = __esm({
  "src/modules/data-exporters/exporters/export-scoreboards.js"() {
    init_utils2();
    init_utils2();
    init_utils5();
    getScoreboardData = (scoreboard, useWeekly = !1, useFriendsOnly = !1) => __async(void 0, null, function* () {
      var _a;
      let totalItemsEl = document.querySelector(`.item-wrapper[data-region="${scoreboard.id}"] .total-items`);
      totalItemsEl && (totalItemsEl.textContent = "\u2026", totalItemsEl.scrollIntoView({
        behavior: "smooth",
        block: "nearest"
      }));
      let 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 (((_a = response.scoreboard_page) == null ? void 0 : _a.viewer_row) === null)
        return totalItemsEl && (totalItemsEl.textContent = "-"), {
          scoreboard: scoreboard.name,
          rank: "",
          value: ""
        };
      let entry = {
        rank: response.scoreboard_page.viewer_row.rank,
        points: response.scoreboard_page.viewer_row.points
      }, rankSuffix = response.scoreboard_page.viewer_row.rank_formatted.replaceAll(/[\d\s]+/g, "");
      return totalItemsEl && (totalItemsEl.textContent = `${entry.rank.toLocaleString()}${rankSuffix}`), {
        scoreboard: scoreboard.name,
        rank: entry.rank,
        value: entry.points
      };
    }), exportScoreboards = (..._0) => __async(void 0, [..._0], function* ({ useWeekly = !1, useFriendsOnly = !1 } = {}) {
      let inventoryMarkup = "", scoreboardsToUse = yield getData("scoreboards");
      useWeekly && (scoreboardsToUse = scoreboards.filter((scoreboard) => scoreboard.weekly));
      for (let 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_default36, init_styles37 = __esm({
  "src/modules/data-exporters/styles.css"() {
    styles_default36 = `#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}
`;
  }
});

// src/modules/data-exporters/index.js
var exportDataPopup, init26, data_exporters_default, init_data_exporters = __esm({
  "src/modules/data-exporters/index.js"() {
    init_utils2();
    init_export_favorite_setups_userscript();
    init_export_rankup_forecaster();
    init_export_favorite_setups();
    init_export_inventory();
    init_export_journal_entries();
    init_export_marketplace();
    init_export_mice();
    init_export_scoreboards();
    init_styles37();
    exportDataPopup = () => {
      let 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: !0 })
        },
        {
          id: "scoreboard-rankings-friends",
          name: "Scoreboard Rankings (Friends)",
          callback: () => export_scoreboards_default({ useFriendsOnly: !0 })
        },
        {
          id: "scoreboard-rankings-weekly-friends",
          name: "Scoreboard Rankings (Weekly, Friends)",
          callback: () => export_scoreboards_default({ useWeekly: !0, useFriendsOnly: !0 })
        },
        {
          id: "journal-entries",
          name: "Journal Entries",
          callback: export_journal_entries_default
        },
        {
          id: "favorite-setups",
          name: "Favorite Setups",
          callback: export_favorite_setups_default
        }
      ];
      hasFavoriteSetupsUserscript() && exporters.push({
        id: "favorite-setups-userscript",
        name: "Favorite Setups (userscript)",
        callback: exportFavoriteSetupsUserscript
      }), 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 }) => {
        let button = document.querySelector(`#export-${id}`);
        button && button.addEventListener("click", (e) => {
          e.preventDefault(), callback();
        });
      });
    }, init26 = () => __async(void 0, null, function* () {
      addStyles(styles_default36, "data-exporters"), onEvent("show-export-data", exportDataPopup), addSubmenuItem({
        menu: "kingdom",
        label: "Export Data",
        icon: "https://www.mousehuntgame.com/images/items/crafting_items/transparent_thumb/c6f39c2b522f114c788f5fb65e3ab8d7.png",
        class: "export-data",
        callback: exportDataPopup
      });
    }), data_exporters_default = {
      id: "data-exporters",
      name: "Data Exporters",
      type: "feature",
      default: !0,
      description: "Export data from the game.",
      load: init26
    };
  }
});

// src/modules/debug/settings/index.js
var settings_default20, init_settings21 = __esm({
  "src/modules/debug/settings/index.js"() {
    settings_default20 = () => __async(void 0, null, function* () {
      return [
        {
          id: "debug.utils-data",
          title: "Log data caching and retrieval"
        },
        {
          id: "debug.events",
          title: "Log events"
        },
        {
          id: "debug.all-events",
          title: "Log all events"
        },
        {
          id: "debug.dialog",
          title: "Log IDs of opening and closing dialogs/popups"
        },
        {
          id: "debug.all",
          title: "Log module debug messages"
        },
        {
          id: "debug.module-loading",
          title: "Log module loading"
        },
        {
          id: "debug.navigation",
          title: "Log page, tab, and subtab navigation"
        },
        {
          id: "debug.request",
          title: "Log remote requests and responses"
        },
        {
          id: "debug.sentry",
          title: "Set Sentry to debug mode"
        },
        {
          id: "debug.hover-popups",
          title: "Don't close hover popups on mouseout"
        },
        {
          id: "debug.disable-cache",
          title: "Disable caching",
          description: "Disable caching of data and settings"
        }
      ];
    });
  }
});

// src/modules/debug/index.js
var debug3, main14, init27, debug_default, init_debug2 = __esm({
  "src/modules/debug/index.js"() {
    init_utils2();
    init_settings21();
    debug3 = (message, ...args) => {
      let textMessages = [], objectMessages = [];
      for (let arg of args)
        typeof arg == "string" ? textMessages.push(arg) : 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
      );
    }, main14 = () => {
      if (window.app = window.app || {}, window.app.mhutils = utils_exports, getSetting("debug.dialog", !1)) {
        let currentDialog = null;
        onDialogHide(() => {
          debug3(`Dialog hidden: ${currentDialog}`);
        }), onDialogShow("all", () => {
          currentDialog = getCurrentDialog(), debug3(`Dialog shown: ${currentDialog}`);
        });
      }
      getSetting("debug.navigation", !1) && (onNavigation(() => {
        debug3("onNavigation", {
          page: getCurrentPage(),
          tab: getCurrentTab(),
          subtab: getCurrentSubtab()
        });
      }), onTravel(null, () => {
        debug3("onTravel", getCurrentLocation());
      })), getSetting("debug.request", !1) && onRequest("*", (response) => {
        debug3("onRequest", response);
      });
      let debugAllEvents = getSetting("debug.all-events", !1);
      if (getSetting("debug.events", !1) && !debugAllEvents) {
        let events = [
          "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",
          "spring_hunt_claim_hidden_egg",
          "tournament_status_change",
          "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"
        ], hasSingleEvent = !1, ignoredEvents = [];
        for (let flag in getFlags())
          if (flag.startsWith("debug-events-only-"))
            hasSingleEvent = flag.replace("debug-events-only-", "");
          else if (flag.startsWith("debug-events-")) {
            let event = flag.replace("debug-events-", "");
            events.push(event);
          } else if (flag.startsWith("debug-events-no-")) {
            let event = flag.replace("debug-events-no-", "");
            ignoredEvents.push(event);
          }
        ignoredEvents.length > 0 && (events = events.filter((event) => !ignoredEvents.includes(event))), hasSingleEvent && (events = [hasSingleEvent]), events.forEach((event) => {
          onEvent(event, (...data) => {
            debug3(`onEvent: ${event}`, data);
          });
        });
      }
      if (debugAllEvents) {
        let _doEvent = eventRegistry.doEvent;
        eventRegistry.doEvent = function(eventName, eventParams) {
          [
            "journal-entry",
            "journal-entries"
          ].includes(eventName) || debug3(`doEvent: ${eventName}`, eventParams), Reflect.apply(_doEvent, this, arguments);
        };
      }
    }, init27 = () => {
      main14(), onActivation("dev", main14), onDeactivation("dev", () => {
        window.location.reload();
      });
    }, debug_default = {
      id: "debug",
      name: "Debug",
      type: "advanced",
      default: !1,
      order: 900,
      load: init27,
      settings: settings_default20
    };
  }
});

// src/modules/delayed-menus/styles.css
var styles_default37, init_styles38 = __esm({
  "src/modules/delayed-menus/styles.css"() {
    styles_default37 = `.mousehuntHud-menu ul li ul{transform-origin:top;animation:mh-improved-in-scale-y .15s .25s 1 backwards cubic-bezier(.4,0,1,1)}
`;
  }
});

// src/modules/delayed-menus/index.js
var init28, delayed_menus_default, init_delayed_menus = __esm({
  "src/modules/delayed-menus/index.js"() {
    init_utils2();
    init_styles38();
    init28 = () => __async(void 0, null, function* () {
      addStyles(styles_default37, "delayed-menus");
    }), delayed_menus_default = {
      id: "delayed-menus",
      name: "Delayed Menus",
      type: "feature",
      default: !1,
      description: "Adds a short delay to the menu dropdowns to prevent accidental clicks",
      load: init28
    };
  }
});

// src/modules/delayed-tooltips/styles.css
var styles_default38, init_styles39 = __esm({
  "src/modules/delayed-tooltips/styles.css"() {
    styles_default38 = `.mousehuntTooltipParent>.mousehuntTooltip{will-change:transform}.mousehuntTooltipParent:hover>.mousehuntTooltip{animation:mh-improved-in-scale .35s 1 forwards cubic-bezier(.4,0,1,1) 0s}.PageHunterProfile .userInteractionButtonsView-button .mousehuntTooltip,.no-delayed-tooltips .mousehuntTooltip{animation:none!important}
`;
  }
});

// src/modules/delayed-tooltips/index.js
var init29, delayed_tooltips_default, init_delayed_tooltips = __esm({
  "src/modules/delayed-tooltips/index.js"() {
    init_utils2();
    init_styles39();
    init29 = () => __async(void 0, null, function* () {
      addStyles(styles_default38, "delayed-tooltips"), document.addEventListener("keydown", (e) => {
        e.shiftKey && document.body.classList.add("no-delayed-tooltips");
      }), document.addEventListener("keyup", (e) => {
        e.shiftKey || document.body.classList.remove("no-delayed-tooltips");
      });
    }), delayed_tooltips_default = {
      id: "delayed-tooltips",
      name: "Delayed Tooltips",
      type: "feature",
      default: !1,
      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: init29
    };
  }
});

// src/modules/error-reporting/index.js
var error_reporting_default, init_error_reporting = __esm({
  "src/modules/error-reporting/index.js"() {
    error_reporting_default = {
      id: "error-reporting",
      name: "Error Reporting",
      type: "advanced",
      description: "Send anonymous error reports to the developers.",
      default: !0,
      order: 1e3,
      load: () => {
      }
    };
  }
});

// src/modules/experiments/modules/emotes/index.js
var emotes_default, init_emotes = __esm({
  "src/modules/experiments/modules/emotes/index.js"() {
    init_utils2();
    emotes_default = () => {
      addStyles(".emote { vertical-align: bottom; }", "emote-styles"), onRender({
        group: "MessageBoardView",
        layout: "layout",
        after: !0,
        callback: (data, results) => (results = results.replaceAll(":jerry:", '<img src="https://i.mouse.rip/emotes/jerry.png" alt=":jerry:" width="20" height="20" class="emote" />'), results)
      });
    };
  }
});

// src/modules/experiments/modules/new-settings-styles-columns/styles.css
var styles_default39, init_styles40 = __esm({
  "src/modules/experiments/modules/new-settings-styles-columns/styles.css"() {
    styles_default39 = `.mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings.active.two-column{display:grid;grid-template-columns:49% 49%;justify-content:space-between}.two-column.mousehunt-improved-settings .PagePreferences__title{max-width:350px}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-location-hud.PagePreferences__title{grid-column:1 / 3;max-width:unset}.two-column.mousehunt-improved-settings .PagePreferences__setting{flex-wrap:wrap}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-design-wrapper .PagePreferences__setting{display:flex;flex-direction:column;align-items:stretch;margin:0}.two-column.mousehunt-improved-settings .mh-improved-custom-bg-preview,.two-column.mousehunt-improved-settings .mh-improved-custom-horn-show-horn{top:10px;right:0}#mousehunt-improved-settings-design .PagePreferences__settingAction{max-width:200px}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-feature-ultimate-checkmark-show.PagePreferences__subSetting .multi-toggle-row .PagePreferences__settingName{max-width:65px;padding:0;overflow:hidden;line-height:14px;text-overflow:ellipsis;white-space:nowrap}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-feature-ultimate-checkmark-show.PagePreferences__subSetting .multi-toggle-row{gap:0;justify-items:stretch}.two-column.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__subSetting{margin-left:5px}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList.PagePreferences__subSetting{padding:0 5px;border-right:1px solid #e0cfb4;border-radius:0}.two-column.mousehunt-improved-settings .PagePreferences__settingsList-textarea .PagePreferences__setting,.two-column.mousehunt-improved-settings .PagePreferences__settingsList-input .PagePreferences__setting{display:flex;flex-direction:column;gap:0;align-items:stretch;padding:0;margin:0}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-advanced-mh-improved-advanced-settings{position:relative;top:unset;right:unset;display:flex;align-items:flex-start;padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #e0cfb4}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-feature-quick-send-supplies-items .inputBoxContainer.multiSelect{display:grid;grid-template-columns:1fr 1fr}.two-column.mousehunt-improved-settings #mousehunt-improved-settings-feature-quick-send-supplies-items .multiSelect{width:auto;max-width:140px}.two-column #mousehunt-improved-settings-better-better-gifts-ignore-bad-gifts select.inputBox.multiSelect{max-width:200px}.two-column select.inputBox.multiSelect{max-width:140px;margin:0}.two-column .inputBoxContainer.multiSelect{gap:5px 10px;justify-content:flex-start;margin-top:5px}.two-column #mousehunt-improved-settings-location-hud{padding-bottom:0}.two-column #mousehunt-improved-settings-location-hud-wrapper{gap:0;height:725px;padding:10px 0 0;margin:0 -11px;border-left:1px solid #e0cfb4}.two-column #mousehunt-improved-settings-location-hud .PagePreferences__title{border-bottom:1px solid #f2ebde}.two-column.mousehunt-improved-settings .PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .mhui-setting-toggle,.PagePreferences .mousehuntHud-page-tabContent.game_settings.two-column.mousehunt-improved-settings .mhui-setting-toggle,.two-column #mousehunt-improved-settings-feature-quick-send-supplies-items .PagePreferences__settingLabel{display:none}.two-column #mousehunt-improved-settings-better-better-send-supplies-pinned-items .settingRow-action-inputContainer{width:300px}.two-column #mousehunt-improved-settings-advanced-override-styles,.two-column #mousehunt-improved-settings-advanced-override-flags{margin-left:0}.two-column #mousehunt-improved-settings-advanced-override-styles .PagePreferences__settingName,.two-column #mousehunt-improved-settings-advanced-override-flags .PagePreferences__settingName{margin-bottom:10px}.two-column .PagePreferences__settingsList .PagePreferences__subSetting{opacity:.4}.two-column .PagePreferences__settingsList:hover .PagePreferences__subSetting{opacity:1}.two-column .mousehunt-improved-settings .PagePreferences__titleText{padding-bottom:0}.two-column .mousehunt-improved-settings .PagePreferences__settingsList-textarea .PagePreferences__setting,.two-column .mousehunt-improved-settings .PagePreferences__settingsList-input .PagePreferences__setting{gap:5px}.two-column .mousehunt-improved-settings .PagePreferences__settingDescription{display:none}.two-column .mousehunt-improved-settings .PagePreferences__subSetting .PagePreferences__settingName{font-size:11px;line-height:1.5}
`;
  }
});

// src/modules/experiments/modules/new-settings-styles-columns/index.js
var new_settings_styles_columns_default, init_new_settings_styles_columns = __esm({
  "src/modules/experiments/modules/new-settings-styles-columns/index.js"() {
    init_utils2();
    init_styles40();
    new_settings_styles_columns_default = () => __async(void 0, null, function* () {
      addStyles(styles_default39, "new-settings-styles-columns"), onNavigation(() => __async(void 0, null, function* () {
        document.querySelectorAll(".PagePreferences__settingsWrapper > .PagePreferences__settingsList").forEach((setting) => {
          setting.addEventListener("click", () => {
            setting.classList.toggle("hover");
          });
        });
      }), {
        page: "preferences"
      });
    });
  }
});

// src/modules/experiments/modules/raffle/raffle.css
var raffle_default, init_raffle = __esm({
  "src/modules/experiments/modules/raffle/raffle.css"() {
    raffle_default = `.mh-return-raffles.message{position:sticky;top:0;right:0;left:0;z-index:10;background-color:#f9f9f9}.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}
`;
  }
});

// src/modules/experiments/modules/raffle/index.js
var getBallotsToSend, getSavedSentBallots, getSavedSentBallot, saveSentBallot, sendBallot, returnRaffles, _inboxOpen, replaceInboxMethods, raffle_default2, init_raffle2 = __esm({
  "src/modules/experiments/modules/raffle/index.js"() {
    init_utils2();
    init_raffle();
    getBallotsToSend = () => {
      let ballotsToSend = [], ballots = document.querySelectorAll(".message.notification.ballot");
      return ballots.length && ballots.forEach((ballot) => {
        if (ballot.classList.contains("done") || ballot.classList.contains("skipped"))
          return;
        let name = ballot.querySelector(".messageText a"), action = ballot.querySelector(".sendBallot");
        !action || !name || ballotsToSend.push({
          id: action.getAttribute("data-sender"),
          name: name.innerText ? name.innerText.trim() : "",
          element: ballot
        });
      }), ballotsToSend;
    }, getSavedSentBallots = () => sessionGet("sent-ballots", []), getSavedSentBallot = (id) => getSavedSentBallots().includes(id), saveSentBallot = (id) => {
      let savedSentBallots = getSavedSentBallots();
      savedSentBallots.push(id), sessionSet("sent-ballots", savedSentBallots);
    }, sendBallot = (ballot) => __async(void 0, null, function* () {
      var _a;
      debuglog("feature-flags-raffle", `Returning ballot for ${ballot.name} (${ballot.id})\u2026`);
      let button = document.querySelector(`.sendBallot[data-sender="${ballot.id}"]`);
      if (!button)
        return debuglog("feature-flags-raffle", `Could not find button for ${ballot.name} (${ballot.id})`), { status: "error", proceed: !1 };
      let buttonParent = button.parentElement.parentElement;
      if (buttonParent) {
        let id = buttonParent.getAttribute("data-id");
        if (id) {
          if (getSavedSentBallot(id))
            return debuglog("feature-flags-raffle", `Already returned ballot for ${ballot.name} (${ballot.id})`), { status: "skipped", proceed: !0 };
          saveSentBallot(id);
        }
      }
      let response;
      try {
        response = yield doRequest("managers/ajax/users/givefriendballot.php", {
          snuid: ballot.id
        });
      } catch (error) {
        return debuglog("feature-flags-raffle", `Error returning ballot for ${ballot.name}: ${error}`), yield sleep(1e3), { status: "error", proceed: !0 };
      }
      return response != null && response.error && !((_a = response == null ? void 0 : response.error) != null && _a.includes("You have already entered ")) ? (debuglog("feature-flags-raffle", `Error returning ballot for ${ballot.name}: ${response.error}`), { status: "error", proceed: !1 }) : (debuglog("feature-flags-raffle", `Returned ballot for ${ballot.name} (${ballot.id})`), button.classList.add("disabled"), button.setAttribute("disabled", !0), yield sleep(250), { status: "done", proceed: !0 });
    }), returnRaffles = () => __async(void 0, null, function* () {
      let drawTab = document.querySelector('.notificationMessageList .tab.active[data-tab="daily_draw"]');
      if (!drawTab)
        return;
      let existing = document.querySelector(".mh-return-raffles.message");
      existing && existing.remove();
      let messageWrapper = makeElement("div", ["mh-return-raffles", "message"]), actionsWrapper = makeElement("div", ["actions"]), returnButton = makeElement("input", ["mh-return-raffles-button", "sendBallot"]);
      returnButton.setAttribute("type", "button"), returnButton.setAttribute("value", "Return Raffles");
      let statusEl = makeElement("div", ["status"]), isReturning = !1;
      returnButton.addEventListener("click", () => __async(void 0, null, function* () {
        if (isReturning) {
          returnButton.value = "Return Raffles", statusEl.innerText = "Stopped returning ballots.", setTimeout(() => {
            statusEl.innerText = "";
          }, 1e3), isReturning = !1;
          return;
        }
        isReturning = !0, returnButton.value = "Stop Returning", statusEl.innerText = "Returning ballots\u2026";
        let ballotsToSend = getBallotsToSend();
        if (!ballotsToSend.length)
          return;
        debuglog("feature-flags-raffle", `Returning ${ballotsToSend.length} ballots\u2026`, ballotsToSend);
        let tab = document.querySelector('.notificationMessageList .tab.active[data-tab="daily_draw"]');
        if (tab) {
          for (let 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");
            let { status, proceed } = yield sendBallot(ballot, tab);
            if (status === "skipped" && (statusEl.innerText = `Already returned ballot for ${ballot.name}!`), ballot.element.classList.remove("hover"), !proceed) {
              statusEl.innerText = "Ballots returned!";
              break;
            }
            ballot.element.classList.add(status);
          }
          isReturning && (isReturning = !1, 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 = () => {
      var _a, _b, _c, _d;
      if (typeof messenger == "undefined" || !((_b = (_a = messenger == null ? void 0 : messenger.UI) == null ? void 0 : _a.notification) != null && _b.showTab) || _inboxOpen || (_inboxOpen = messenger.UI.notification.showTab, messenger.UI.notification.showTab = (tab) => {
        let toReturn = _inboxOpen(tab);
        return tab === "daily_draw" && returnRaffles(), toReturn;
      }, !((_d = (_c = messenger == null ? void 0 : messenger.UI) == null ? void 0 : _c.notification) != null && _d.togglePopup)))
        return;
      let _inboxPopup = messenger.UI.notification.togglePopup;
      messenger.UI.notification.togglePopup = (e) => {
        let toReturn = _inboxPopup(e);
        return onEvent("ajax_response", () => {
          setTimeout(() => {
            let activeTab = document.querySelector(".notificationHeader .tab.active");
            activeTab && activeTab.getAttribute("data-tab") === "daily_draw" && returnRaffles();
          }, 100);
        }, !0), toReturn;
      };
    }, raffle_default2 = () => __async(void 0, null, function* () {
      getSetting("hide-daily-draw", !1) || (addStyles(raffle_default, "feature-flags-raffle"), replaceInboxMethods());
    });
  }
});

// src/modules/experiments/modules/troll-mode/styles.css
var styles_default40, init_styles41 = __esm({
  "src/modules/experiments/modules/troll-mode/styles.css"() {
    styles_default40 = `*+*{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)}.lolspin{animation:mh-improved-spin 1s linear infinite}@media (prefers-reduced-motion: reduce){.lolspin{animation:none}}
`;
  }
});

// src/modules/experiments/modules/troll-mode/index.js
var trollEm, trollem2, troll_mode_default, init_troll_mode = __esm({
  "src/modules/experiments/modules/troll-mode/index.js"() {
    init_utils2();
    init_styles41();
    trollEm = () => {
      let domQuery = "#journallatestentry", lastCatch = document.querySelector(domQuery);
      lastCatch && ["attractionfailure", "catchfailure", "catchfailuredamage"].some((s) => lastCatch.classList.contains(s)) && (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: !0
      }), hg.views.MessengerView.go());
    }, trollem2 = () => {
      let banner = document.querySelector(".campPage-banner");
      if (!banner)
        return;
      let bannerLink = document.createElement("a"), newbieImg = document.createElement("img");
      newbieImg.src = "https://www.mousehuntgame.com/images/promo/campbanners/groups/newbie.png", bannerLink.append(newbieImg), bannerLink.addEventListener("click", () => {
        addStyles(styles_default40, "troll-mode"), banner.classList.add("lolspin"), setTimeout(() => {
          banner.classList.remove("lolspin");
        }, 1e3);
        let elements = document.querySelectorAll("body * *");
        elements[Math.floor(Math.random() * elements.length)].classList.add("lolspin"), setInterval(() => {
          elements[Math.floor(Math.random() * elements.length)].classList.add("lolspin");
        }, 500);
      }), banner.append(bannerLink), banner.classList.remove("hidden");
    }, troll_mode_default = () => __async(void 0, null, function* () {
      trollEm(), onTurn(trollEm, 1e3), trollem2();
    });
  }
});

// src/modules/experiments/index.js
var experiments, init30, experiments_default, init_experiments = __esm({
  "src/modules/experiments/index.js"() {
    init_utils2();
    init_emotes();
    init_new_settings_styles_columns();
    init_raffle2();
    init_troll_mode();
    experiments = [
      {
        id: "experiments.emotes",
        title: "Emotes in corkboard",
        description: "Replaces discord-style emotes on corkboards like :jerry: with the actual image",
        load: emotes_default
      },
      {
        id: "experiments.raffle",
        title: "Return Raffles button",
        description: "Adds a button to return all raffle tickets to the Inbox. Use at your own risk",
        load: raffle_default2
      },
      {
        id: "experiments.lol-gottem",
        title: "Troll mode",
        description: "lol",
        load: troll_mode_default
      },
      {
        id: "better-maps.community",
        title: "Better Maps: Community maps information",
        description: "Shows last active time on community maps and hides old maps"
      },
      {
        id: "better-marketplace.show-chart-images",
        title: "Better Marketplace: Show sales price history charts on category pages"
      },
      {
        id: "experiments.favorite-setups-toggle",
        title: "Favorite Setups: Add toggle button to top menu"
      },
      {
        id: "favorite-setups.show-mobile-favorites",
        title: "Favorite Setups: Include mobile favorites"
      },
      {
        id: "experiments.location-hud-toggle",
        title: "Location HUDs: Add toggle button to top menu"
      },
      {
        id: "location-huds.bountiful-beanstalk-invetory-in-one-row",
        title: "Location HUDs - Bountiful Beanstalk: Inventory box in one row"
      },
      {
        id: "experiments.fi-draggable-airship",
        title: "Location HUDs - Floating Islands: Make airship draggable"
      },
      {
        id: "experiments.prologue-pond-wood-boat",
        title: "Location HUDs - Prologue Pond: Normal boat color"
      },
      {
        id: "experiments.new-settings-styles-columns",
        title: "Settings: Columns",
        load: new_settings_styles_columns_default
      }
    ], init30 = () => __async(void 0, null, function* () {
      for (let experiment of experiments)
        experiment.load && getSetting(experiment.id, !1) && experiment.load();
    }), experiments_default = {
      id: "experiments",
      name: "Experiments",
      description: "",
      type: "beta",
      default: !0,
      order: -1,
      load: init30,
      settings: () => experiments
    };
  }
});

// src/modules/favorite-setups/styles.css
var styles_default41, init_styles42 = __esm({
  "src/modules/favorite-setups/styles.css"() {
    styles_default41 = `.mh-improved-favorite-setups-button{position:relative;display:block;padding:5px 10px;margin:5px 0;font-size:12px;font-weight:700;line-height:31px;color:#4e300b;cursor:pointer;background:#f6f3eb;border:1px solid #d3cecb;border-radius:4px;box-shadow:-1px 1px 3px #d3cecb inset}.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-button:hover{text-decoration:none}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .mh-improved-favorite-setups-button:hover{background-color:#494949}.mh-improved-favorite-setups-blueprint-container{position:absolute;inset:0;color:#4e300b}.mh-improved-favorite-setups-blueprint-container .header{margin-top:10px;font-size:13px;color:#926944;text-align:center}.mh-improved-favorite-setups-blueprint-container .content{position:absolute;inset:35px 5px 10px;overflow-y:auto}.mh-improved-favorite-setups-blueprint-container .row{display:grid;grid-template-columns:1fr 30px repeat(4,45px);align-items:center;height:auto;min-height:50px;padding:3px;margin-bottom:7px;background:#fff;border:1px solid #ceb7a6;border-radius:5px}.mh-improved-favorite-setups-blueprint-container .location-favorites{padding:10px 0;margin:10px 0}.mh-improved-favorite-setups-blueprint-container .row.location-favorite{background-color:#fdfacf}.mh-improved-favorite-setups-blueprint-container .row.location-favorite:last-child{margin-bottom:0}.mh-improved-favorite-setups-blueprint-container .row .campPage-trap-itemBrowser-favorite-item-image{width:100%;height:45px;border-radius:0}.mh-improved-favorite-setups-blueprint-container .row.editing{grid-template-columns:1fr repeat(4,40px);align-items:start}.mh-improved-favorite-setups-blueprint-container .controls{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-around;height:50px}.mh-improved-favorite-setups-blueprint-container .row.editing .controls{align-items:flex-end}.mh-improved-favorite-setups-blueprint-container .button-wrapper{display:flex;gap:5px;align-items:center;justify-content:center}.mh-improved-favorite-setups-blueprint-container .row.editing .button-wrapper{align-self:flex-end;margin-right:5px}.mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-favorite-item{width:100%}.mh-improved-favorite-setups-blueprint-container .controls .label{padding:0;font-size:12px;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 .controls .action.arm{padding:4px 10px}.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:150px}.row.editing .campPage-trap-itemBrowser-favorite-item:after{position:absolute;right:5px;bottom:-8px;left:5px;display:flex;align-items:center;justify-content:center;padding:2px 0;content:"edit";background-color:#eeeeeeed;border:1px solid #585858;border-radius:5px}.row.editing .campPage-trap-itemBrowser-favorite-item:hover:after{background-color:#ccc}.mh-improved-favorite-setups-blueprint-container .editing .campPage-trap-itemBrowser-favorite-item:hover .campPage-trap-itemBrowser-favorite-item-image{opacity:.8}.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:space-around;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:2px;right:-18px;box-sizing:border-box;display:block;width:17px;height:17px;padding:9px;margin:1px;content:"";background:url(https://www.mousehuntgame.com/images/ui/puzzle/refresh.png) no-repeat center center / contain;border-radius:50%}a.random-title:hover:after{background-color:#ddd}a.random-title.loading:after{animation:mh-improved-spin 1s linear infinite}@media (prefers-reduced-motion: reduce){a.random-title.loading:after{animation:none}}.mh-improved-favorite-setups-blueprint-container .editing .controls .label{position:relative;align-self:flex-start}.mh-improved-favorite-setups-blueprint-container .row .mh-improved-favorite-setups-power-type-wrapper .campPage-trap-itemBrowser-favorite-item-image{width:25px;height:25px;opacity:.8}.mh-improved-favorite-setups-component-picker-popup .campPage-trap-itemBrowser-item-statContainer{width:75%;margin-top:5px}.mh-improved-favorite-setups-component-picker-popup .campPage-trap-itemBrowser-item-content{width:80%}.mh-improved-favorite-setups-blueprint-container .editing .campPage-trap-itemBrowser-item-powerType{display:none}.mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-item-powerType{display:flex;flex-direction:column;align-items:center;justify-content:center;width:25px}.mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-item-powerType.hidden{visibility:hidden}.mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-item-powerType:before{box-sizing:border-box;background-color:transparent;border:none}.mh-improved-favorite-setups-blueprint-container .row:hover .controls .action.arm{outline:2px solid #eab35d}.mh-improved-favorite-setups-blueprint-container .row.editing .campPage-trap-itemBrowser-favorite-item-image{height:40px}.mh-improved-favorite-setups-blueprint-container .row.editing .move-buttons{display:flex}.mh-improved-favorite-setups-blueprint-container .row .move-buttons{position:absolute;bottom:20px;left:28px;display:none;flex-direction:row;align-items:center}.mh-improved-favorite-setups-blueprint-container .row.editing a.move-down:after,.mh-improved-favorite-setups-blueprint-container .row.editing a.move-up:after{position:absolute;top:0;right:0;width:18px;height:18px;content:"";background-repeat:no-repeat;background-size:contain;opacity:.4}.mh-improved-favorite-setups-blueprint-container .row.editing a.move-up:after{position:absolute;right:13px;background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 17a.75.75 0 0 1-.75-.75V5.612L5.29 9.77a.75.75 0 0 1-1.08-1.04l5.25-5.5a.75.75 0 0 1 1.08 0l5.25 5.5a.75.75 0 1 1-1.08 1.04l-3.96-4.158V16.25A.75.75 0 0 1 10 17Z" clip-rule="evenodd" /></svg>')}.mh-improved-favorite-setups-blueprint-container .row.editing a.move-down:after{background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z" clip-rule="evenodd" /></svg>')}.mh-improved-favorite-setups-blueprint-container .row.editing a.move-down:hover:after,.mh-improved-favorite-setups-blueprint-container .row.editing a.move-up:hover:after{opacity:1}.mh-improved-favorite-setups-blueprint-container .row:last-child .move-down{display:none}.mh-improved-favorite-setups-blueprint-container .row:nth-child(2) .move-up{display:none}.pageFrameView #mousehuntContainer.PageCamp .mh-improved-favorite-setups-button:hover{background-color:#fdfaf2}.mh-dark-mode .pageFrameView .mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-item-powerType:after{color:#000}.mh-dark-mode .mh-improved-favorite-setups-button-label{color:#e0d3b3}.mh-dark-mode .mh-improved-favorite-setups-button-text{color:#ebebeb}.mousehuntHeaderView .menuItem.mousehunt-improved-favorite-setups-icon{display:flex;align-items:center;justify-content:center;width:20px;height:25px;padding:0}.mousehunt-improved-favorite-setups-icon:before{display:block;width:15px;height:15px;content:"";background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10.868 2.884c-.321-.772-1.415-.772-1.736 0l-1.83 4.401-4.753.381c-.833.067-1.171 1.107-.536 1.651l3.62 3.102-1.106 4.637c-.194.813.691 1.456 1.405 1.02L10 15.591l4.069 2.485c.713.436 1.598-.207 1.404-1.02l-1.106-4.637 3.62-3.102c.635-.544.297-1.584-.536-1.65l-4.752-.382-1.831-4.401Z" clip-rule="evenodd" /></svg>');background-repeat:no-repeat;background-size:contain;opacity:.5}.mousehunt-improved-favorite-setups-icon:hover:before{opacity:1}.mh-improved-favorite-setups-blueprint-container .editing .controls .action{padding:2px 6px}.mh-improved-favorite-setups-blueprint-container .location-favorite .controls .edit-setup{display:none}.campPage-trap-itemBrowser-favorite-item.loading .campPage-trap-itemBrowser-favorite-item-image:after{position:absolute;inset:0;content:"";background:center / 15px no-repeat url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif),center / contain repeat url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png)}.row .campPage-trap-itemBrowser-favorite-item{pointer-events:none}.row.editing .campPage-trap-itemBrowser-favorite-item.clickable{pointer-events:auto}
`;
  }
});

// src/modules/favorite-setups/index.js
var getFavoriteSetups, getGeneratedName, saveFavoriteSetup, normalizeSetup, getCurrentSetup, itemThumbs2, addImage, makeButton2, getCheeseEffect, getPowerTypeId, makeImagePicker, armItem, makeBlueprintRow, makeBlueprintContainer, getNameOfCurrentSetup, updateFavoriteSetupName, addFavoriteSetupsButton, toggleFavoriteSetups, addIcon, init31, favorite_setups_default2, init_favorite_setups2 = __esm({
  "src/modules/favorite-setups/index.js"() {
    init_utils2();
    init_styles42();
    getFavoriteSetups = () => __async(void 0, null, function* () {
      var _a, _b;
      let faves = getSetting("favorite-setups.setups", []);
      if (getSetting("favorite-setups.show-mobile-favorites", !1)) {
        let userData = yield getUserData(), mobileFavorites = ((_b = (_a = userData == null ? void 0 : userData.user) == null ? void 0 : _a.trap_favourite) == null ? void 0 : _b.favourite_traps) || [];
        if (mobileFavorites != null && mobileFavorites.length) {
          let newFaves = [];
          for (let favorite of mobileFavorites) {
            let newFavorite = {
              id: `mobile-${favorite == null ? void 0 : favorite.bait_id}-${favorite == null ? void 0 : favorite.base_id}-${favorite == null ? void 0 : favorite.weapon_id}-${favorite == null ? void 0 : favorite.trinket_id}`,
              name: favorite == null ? void 0 : favorite.name,
              bait_id: favorite == null ? void 0 : favorite.bait_id,
              base_id: favorite == null ? void 0 : favorite.base_id,
              weapon_id: favorite == null ? void 0 : favorite.weapon_id,
              trinket_id: favorite == null ? void 0 : favorite.trinket_id,
              power_type: null,
              // todo: add this.
              is_mobile: !0
              // todo: add a check for this when editing.
            };
            newFaves.push(newFavorite);
          }
          faves = [...faves, ...newFaves];
        }
      }
      return !faves || !Array.isArray(faves) || !faves.length ? [] : faves.filter(Boolean);
    }), getGeneratedName = (setup) => __async(void 0, null, function* () {
      return yield (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
        ])
      })).json();
    }), saveFavoriteSetup = (setup, useGeneratedName = !0) => __async(void 0, null, function* () {
      let setups = yield getFavoriteSetups();
      setups.length || (setups = []);
      let normalizedSetup = normalizeSetup(setup);
      if (useGeneratedName) {
        let setupNameData = yield getGeneratedName(normalizeSetup);
        setupNameData.name && (normalizedSetup.name = setupNameData.name);
      } else
        normalizedSetup.name = user.environment_name;
      if (setup.id) {
        normalizedSetup.id = setup.id;
        let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setup.id);
        index === -1 ? setups.push(normalizedSetup) : setups[index] = normalizedSetup;
      } else
        try {
          setups.push(normalizedSetup);
        } catch (e) {
          setups = [normalizedSetup];
        }
      return saveSetting("favorite-setups.setups", setups), normalizedSetup;
    }), normalizeSetup = (setup) => Object.keys(setup).reduce((acc, key) => (acc[key] = setup[key] ? setup[key].toString() : "", acc), {}), getCurrentSetup = () => 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,
      power_type: user == null ? void 0 : user.trap_power_type_name.toLowerCase(),
      location: getCurrentLocation()
    }), addImage = (type, id, appendTo) => __async(void 0, null, function* () {
      var _a;
      let wrapper = makeElement("div", "campPage-trap-itemBrowser-favorite-item");
      wrapper.setAttribute("data-item-id", id), wrapper.setAttribute("data-item-type", type), wrapper.setAttribute("title", `Click to change ${type}`);
      let item = makeElement("div", ["campPage-trap-itemBrowser-favorite-item-image"]);
      itemThumbs2 || (itemThumbs2 = yield getData("item-thumbnails")), item.style.backgroundImage = `url(${((_a = itemThumbs2.find((thumb) => thumb.id == id)) == null ? void 0 : _a.thumb) || ""})`, makeElement("div", "campPage-trap-itemBrowser-favorite-item-frame", "", item), wrapper.append(item), appendTo.append(wrapper);
    }), makeButton2 = (button) => {
      let buttonElement = makeElement("a", ["mousehuntActionButton", "action", ...button.className]);
      return makeElement("span", "", button.text, buttonElement), buttonElement.addEventListener("click", button.callback), buttonElement;
    }, getCheeseEffect = (textValue) => ({
      "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
    })[textValue], getPowerTypeId = (powerType) => ({
      arcane: "arcn",
      draconic: "drcnc",
      forgotten: "frgttn",
      hydro: "hdr",
      law: "law",
      parental: "prntl",
      physical: "phscl",
      rift: "rift",
      shadow: "shdw",
      tactical: "tctcl"
    })[powerType] || powerType, makeImagePicker = (setupId, type, currentId, callback) => __async(void 0, null, function* () {
      let components, cached = sessionGet("mh-improved-favorite-setups-components");
      if (cached)
        components = cached;
      else {
        let response = yield doRequest("managers/ajax/users/gettrapcomponents.php");
        components = (response == null ? void 0 : response.components) || [], components.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0), sessionSet("mh-improved-favorite-setups-components", components);
      }
      let items5 = components.filter((item) => item.classification === type), 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 class="mh-improved-favorites-setups-component-picker-popup-use-current mousehuntActionButton" title="Use current item"><span>Use currently armed item</span></div>', content += "</div>", content += '<div class="mh-improved-favorite-setups-component-picker-popup-body-items">';
      for (let item of items5) {
        let getStatRow = (stat, title, formatted, compare) => {
          let compareStat = item[stat];
          stat === "cheese_effect" && (compareStat = getCheeseEffect(item), compare = getCheeseEffect(compare));
          let 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}" data-the-power-type="${item.power_type_image_name}">Use</a>`, content += " </div>", content += ' <div class="campPage-trap-itemBrowser-item-content">', content += ` <div class="campPage-trap-itemBrowser-item-name">${item.name}</div>`, (type === "bait" || type === "trinket") && (content += `<div class="campPage-trap-itemBrowser-item-quantity"><span class="quantity">${Number.parseInt(item.quantity).toLocaleString()}</span><span class="label">Quantity</span></div>`), item.power_type && (content += `<div class="campPage-trap-itemBrowser-item-powerType ${item.power_type}"></div>`), 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>` : "", content += "</div>", content += "</div>", content += "</div>";
      }
      content += "</div>", content += "</div>", content += "</div>";
      let popup = createPopup({
        id: "mh-improved-favorite-setups-component-picker",
        title: "",
        content,
        className: "mh-improved-favorite-setups-component-picker"
      });
      popup.show(), document.querySelectorAll(".campPage-trap-itemBrowser-item-armButton.save-button").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"),
            saveButton.getAttribute("data-the-power-type")
          ), popup.hide();
        }));
      });
      let searchInput = document.querySelector("#mh-improved-favorite-setups-component-picker-popup-search-input");
      if (!searchInput)
        return;
      searchInput.focus(), searchInput.addEventListener("keyup", () => {
        let filter = searchInput.value.toLowerCase();
        document.querySelectorAll(".campPage-trap-itemBrowser-item").forEach((item) => {
          item.querySelector(".campPage-trap-itemBrowser-item-name").textContent.toLowerCase().includes(filter) ? item.classList.remove("hidden") : item.classList.add("hidden");
        });
      }), document.querySelector(".mh-improved-favorites-setups-component-picker-popup-use-current").addEventListener("click", () => {
        let item = document.querySelector(`.campPage-trap-itemBrowser-item[data-item-id="${user[`${type}_item_id`]}"]`);
        if (!item)
          return;
        let saveButton = item.querySelector(".campPage-trap-itemBrowser-item-armButton.save-button");
        saveButton && (callback(
          saveButton.getAttribute("data-item-id"),
          saveButton.getAttribute("data-item-classification"),
          saveButton.getAttribute("data-item-image"),
          saveButton.getAttribute("data-the-power-type")
        ), popup.hide());
      });
    }), armItem = (items5) => __async(void 0, null, function* () {
      return new Promise((resolve, reject2) => {
        items5.forEach(({ id, type }) => {
          hg.utils.TrapControl.armItem(id, type);
        }), hg.utils.TrapControl.go(resolve, reject2);
      });
    }), makeBlueprintRow = (setup, isCurrent = !1) => __async(void 0, null, function* () {
      if (!setup)
        return !1;
      let setupContainer = makeElement("div", ["row"]), controls = makeElement("div", ["controls"]);
      makeElement("div", ["label"], (setup == null ? void 0 : setup.name) || "", controls);
      let hasHighlighted = !1, buttonWrapper = makeElement("div", ["button-wrapper"]);
      if (isCurrent)
        buttonWrapper.append(makeButton2({
          text: "Save",
          className: ["save", "lightBlue"],
          /**
           * Save the current setup as a favorite setup.
           */
          callback: () => __async(void 0, null, function* () {
            let currentSetup = getCurrentSetup(), setups = yield getFavoriteSetups();
            if (setups.length) {
              let existingSetup = setups.find((s) => (s == null ? void 0 : s.bait_id) === currentSetup.bait_id && (s == null ? void 0 : s.base_id) === currentSetup.base_id && (s == null ? void 0 : s.weapon_id) === currentSetup.weapon_id && (s == null ? void 0 : s.trinket_id) === currentSetup.trinket_id);
              if (existingSetup && !hasHighlighted) {
                document.querySelectorAll(`.mh-improved-favorite-setups-blueprint-container .row[data-setup-id="${existingSetup.id}"]`).forEach((row) => {
                  row.classList.add("flash"), setTimeout(() => {
                    row.classList.remove("flash");
                  }, 1e3);
                }), hasHighlighted = !0, setTimeout(() => {
                  hasHighlighted = !1;
                }, 2e3);
                return;
              }
            }
            currentSetup.id = Math.random().toString(36).slice(2, 15) + Math.random().toString(36).slice(2, 15), currentSetup = yield saveFavoriteSetup(currentSetup, !1);
            let setupRow = yield makeBlueprintRow(currentSetup);
            setupRow.setAttribute("data-setup-id", currentSetup.id), document.querySelector(".mh-improved-favorite-setups-blueprint-container .content").append(setupRow), updateFavoriteSetupName();
          })
        }));
      else {
        let armButton = makeButton2({
          text: "Arm",
          className: ["arm"],
          /**
           * Arm the setup.
           */
          callback: () => __async(void 0, null, function* () {
            armButton.classList.add("loading");
            let setupId = setupContainer.getAttribute("data-setup-id");
            debuglog("favorite-setups", `Arming setup ${setupId}`);
            let setups = yield getFavoriteSetups();
            if (!setups.length || !setupId)
              return;
            let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId), thisSetup = setups[index];
            if (!thisSetup)
              return;
            let toArm = [];
            thisSetup.base_id && thisSetup.base_id != user.base_item_id && toArm.push({ id: thisSetup.base_id, type: "base" }), thisSetup.weapon_id && thisSetup.weapon_id != user.weapon_item_id && toArm.push({ id: thisSetup.weapon_id, type: "weapon" }), thisSetup.trinket_id && thisSetup.trinket_id != user.trinket_item_id && toArm.push({ id: thisSetup.trinket_id, type: "trinket" }), thisSetup.bait_id && thisSetup.bait_id != user.bait_item_id && toArm.push({ id: thisSetup.bait_id, type: "bait" }), toArm.length && (yield armItem(toArm)), armButton.classList.remove("loading"), updateFavoriteSetupName();
          })
        });
        buttonWrapper.append(armButton);
        let editClickables = [];
        setup.id.startsWith("mobile-") || buttonWrapper.append(makeButton2({
          text: "Edit",
          className: ["edit-setup"],
          /**
           * Edit the setup.
           */
          callback: () => {
            let setupId = setupContainer.getAttribute("data-setup-id");
            debuglog("favorite-setups", `Editing setup ${setupId}`), setupContainer.classList.add("editing");
            let title = setupContainer.querySelector(".label"), 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");
              let setupNameData = yield getGeneratedName(setup);
              setupNameData.name && (title.querySelector("input").value = setupNameData.name), e.target.classList.remove("loading");
            }));
            let titleInput = document.createElement("input");
            titleInput.value = title.textContent, title.textContent = "", title.append(titleInput), title.prepend(randomTitleButton);
            let powerTypeInput = makeElement("input", ["hidden", "power-type-input"]);
            powerTypeInput.setAttribute("data-the-power-type", setup.power_type), title.append(powerTypeInput), setupContainer.querySelectorAll(".campPage-trap-itemBrowser-favorite-item").forEach((image) => {
              image.classList.add("clickable");
              let eventListenerClickable = image.addEventListener("click", () => __async(void 0, null, function* () {
                image.classList.add("loading");
                let itemType = image.getAttribute("data-item-type"), itemId = image.getAttribute("data-item-id"), imageDisplay = image.querySelector(".campPage-trap-itemBrowser-favorite-item-image");
                yield makeImagePicker(setupId, itemType, itemId, (newItemId, newItemType, newItemImageUrl, newItemPowerType) => {
                  itemType === newItemType && itemId != newItemId && (image.setAttribute("data-new-item-id", newItemId), image.setAttribute("data-new-item-image", newItemImageUrl), image.setAttribute("data-old-image-url", imageDisplay.style.backgroundImage), newItemPowerType && newItemPowerType !== "undefined" && setupContainer.querySelector(".power-type-input").setAttribute("data-power-type", newItemPowerType), imageDisplay.style.backgroundImage = `url(${newItemImageUrl})`);
                }), image.classList.remove("loading");
              }));
              editClickables.push({ image, event: eventListenerClickable });
            });
            let existing = setupContainer.querySelector(".move-buttons");
            existing && existing.remove();
            let moveUpButton = makeElement("a", ["move-up"]);
            moveUpButton.addEventListener("click", (event) => __async(void 0, null, function* () {
              let previous = event.target.closest(".row").previousElementSibling;
              if (previous) {
                let setups = yield getFavoriteSetups();
                if (!setups.length)
                  return;
                let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId), previousIndex = setups.findIndex((s) => (s == null ? void 0 : s.id) === previous.getAttribute("data-setup-id")), temp = setups[index];
                setups[index] = setups[previousIndex], setups[previousIndex] = temp, saveSetting("favorite-setups.setups", setups), previous.before(setupContainer);
              }
            }));
            let moveDownButton = makeElement("a", ["move-down"]);
            moveDownButton.addEventListener("click", (event) => __async(void 0, null, function* () {
              let next = event.target.closest(".row").nextElementSibling;
              if (next) {
                let setups = yield getFavoriteSetups();
                if (!setups.length)
                  return;
                let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId), nextIndex = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === next.getAttribute("data-setup-id")), temp = setups[index];
                setups[index] = setups[nextIndex], setups[nextIndex] = temp, saveSetting("favorite-setups.setups", setups), next.after(setupContainer);
              }
            }));
            let moveButtons = makeElement("div", ["move-buttons"]);
            moveButtons.append(moveUpButton), moveButtons.append(moveDownButton), controls.append(moveButtons);
          }
        }));
        let stopEditing = () => {
          editClickables.forEach(({ image, event }) => {
            image.removeEventListener("click", event), image.classList.remove("clickable");
          }), editClickables = [];
        };
        buttonWrapper.append(makeButton2({
          text: "Save",
          className: ["save-setup"],
          /**
           * Save the edited setup.
           */
          callback: () => __async(void 0, null, function* () {
            let setupId = setupContainer.getAttribute("data-setup-id");
            debuglog("favorite-setups", `Saving setup ${setupId}`), setupContainer.classList.remove("editing");
            let newSetup = setup, title = setupContainer.querySelector(".label"), titleInput = title.querySelector("input");
            setup.name = titleInput.value;
            let powerTypeInput = setupContainer.querySelector(".power-type-input");
            if (powerTypeInput) {
              let lastPowerType = setup.power_type, newPowerType = powerTypeInput.getAttribute("data-the-power-type");
              if (newPowerType && lastPowerType !== newPowerType) {
                setup.power_type = newPowerType;
                let powerTypeImage = setupContainer.querySelector(".campPage-trap-itemBrowser-item-powerType");
                if (powerTypeImage) {
                  let lastPowerTypeClass = lastPowerType ? getPowerTypeId(lastPowerType) : "hidden", newPowerTypeClass = newPowerType ? getPowerTypeId(newPowerType) : "hidden";
                  powerTypeImage.classList.remove(lastPowerTypeClass), powerTypeImage.classList.add(newPowerTypeClass), powerTypeImage.classList.remove("hidden");
                }
              }
            }
            setupContainer.querySelectorAll(".campPage-trap-itemBrowser-favorite-item").forEach((image) => {
              let newItemId = image.getAttribute("data-new-item-id");
              if (!newItemId)
                return;
              let 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 = yield getFavoriteSetups();
            setups.length || (setups = []);
            let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId);
            setups[index] = newSetup, saveSetting("favorite-setups.setups", setups), title.textContent = newSetup.name, titleInput.remove(), updateFavoriteSetupName(), stopEditing();
          })
        })), buttonWrapper.append(makeButton2({
          text: "Cancel",
          className: ["cancel-setup"],
          /**
           * Cancel editing the setup.
           */
          callback: () => {
            setupContainer.classList.remove("editing");
            let titleInput = setupContainer.querySelector(".label input"), title = setupContainer.querySelector(".label");
            title.textContent = setup.name, titleInput.remove(), setupContainer.querySelectorAll(".campPage-trap-itemBrowser-favorite-item").forEach((image) => {
              if (!image.getAttribute("data-new-item-id"))
                return;
              let 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");
            }), stopEditing();
          }
        })), buttonWrapper.append(makeButton2({
          text: "Delete",
          className: ["delete", "danger"],
          /**
           * Delete the setup.
           */
          callback: () => __async(void 0, null, function* () {
            let setupId = setupContainer.getAttribute("data-setup-id");
            if (debuglog("favorite-setups", `Deleting setup ${setupId}`), !confirm("Are you sure you want to delete this setup?"))
              return;
            let setups = yield getFavoriteSetups();
            setups.length || (setups = []);
            let index = setups.findIndex((s) => (s == null ? void 0 : s.id) && s.id === setupId);
            setups.splice(index, 1), saveSetting("favorite-setups.setups", setups), setupContainer.remove();
          })
        }));
      }
      controls.append(buttonWrapper), setupContainer.append(controls);
      let powerTypeId = getPowerTypeId(setup == null ? void 0 : setup.power_type), powertype = makeElement("div", ["campPage-trap-itemBrowser-item-powerType", powerTypeId]);
      return powerTypeId || powertype.classList.add("hidden"), setupContainer.append(powertype), yield addImage("bait", setup.bait_id, setupContainer), yield addImage("base", setup.base_id, setupContainer), yield addImage("weapon", setup.weapon_id, setupContainer), yield addImage("trinket", setup.trinket_id, setupContainer), setupContainer;
    }), makeBlueprintContainer = () => __async(void 0, null, function* () {
      let existing = document.querySelector(".mh-improved-favorite-setups-blueprint-container");
      existing && existing.remove();
      let container = makeElement("div", "mh-improved-favorite-setups-blueprint-container"), header = makeElement("div", ["header"]);
      makeElement("b", ["title"], "Favorite Setups", header), container.append(header);
      let body = makeElement("div", ["content"]), currentSetupRow = yield makeBlueprintRow(getCurrentSetup(), !0);
      currentSetupRow.classList.add("current-setup"), body.append(currentSetupRow);
      let setups = yield getFavoriteSetups();
      if (setups.length) {
        let locationFavorites = [];
        for (let setup of setups)
          !setup || !setup.id || setup.location && setup.location === getCurrentLocation() && locationFavorites.push(setup);
        if (locationFavorites.length) {
          let locationWrapper = makeElement("div", ["location-favorites"]);
          for (let setup of locationFavorites) {
            if (!setup || !setup.id)
              continue;
            let setupContainer = yield makeBlueprintRow(setup);
            setupContainer.setAttribute("data-setup-id", setup.id), setupContainer.classList.add("location-favorite"), locationWrapper.append(setupContainer);
          }
          body.append(locationWrapper);
        }
        for (let setup of setups) {
          if (!setup || !setup.id)
            continue;
          let setupContainer = yield makeBlueprintRow(setup);
          setupContainer.setAttribute("data-setup-id", setup.id), body.append(setupContainer);
        }
      }
      return container.append(body), container;
    }), getNameOfCurrentSetup = () => __async(void 0, null, function* () {
      let setups = yield getFavoriteSetups();
      if (!setups.length)
        return "";
      let currentSetup = getCurrentSetup(), setup = setups.find((s) => (s == null ? void 0 : s.bait_id) === (currentSetup == null ? void 0 : currentSetup.bait_id) && (s == null ? void 0 : s.base_id) === (currentSetup == null ? void 0 : currentSetup.base_id) && (s == null ? void 0 : s.weapon_id) === (currentSetup == null ? void 0 : currentSetup.weapon_id) && (s == null ? void 0 : s.trinket_id) === (currentSetup == null ? void 0 : currentSetup.trinket_id));
      return setup && setup.name ? setup.name : "";
    }), updateFavoriteSetupName = () => __async(void 0, null, function* () {
      let label = document.querySelector(".mh-improved-favorite-setups-button-label");
      label && (label.innerHTML = (yield getNameOfCurrentSetup()) || "");
    }), addFavoriteSetupsButton = () => __async(void 0, null, function* () {
      if (getCurrentPage() !== "camp" || document.querySelector(".mh-improved-favorite-setups-button"))
        return;
      let appendTo = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
      if (!appendTo)
        return;
      let button = makeElement("a", ["mh-improved-favorite-setups-button"]);
      makeElement("div", ["mh-improved-favorite-setups-button-text"], "Favorite Setups", button);
      let label = makeElement("div", ["mh-improved-favorite-setups-button-label"]);
      label.innerHTML = yield getNameOfCurrentSetup(), button.append(label), button.addEventListener("click", toggleFavoriteSetups), appendTo.append(button);
    }), toggleFavoriteSetups = () => __async(void 0, null, function* () {
      let content = yield makeBlueprintContainer();
      toggleBlueprint("favorite-setups", content);
    }), addIcon = () => {
      addIconToMenu({
        id: "favorite-setups",
        classname: "mousehunt-improved-favorite-setups-icon",
        title: "Favorite Setups",
        action: toggleFavoriteSetups,
        position: "prepend"
      });
    }, init31 = () => __async(void 0, null, function* () {
      addStyles(styles_default41, "favorite-setups"), onNavigation(addFavoriteSetupsButton, {
        page: "camp"
      });
      let timeoutId;
      onEvent("camp_page_arm_item", () => {
        timeoutId && clearTimeout(timeoutId), timeoutId = setTimeout(updateFavoriteSetupName, 500);
      }), getSetting("experiments.favorite-setups-toggle", !1) && addIcon(), onEvent("mh-improved-toggle-favorite-setups", toggleFavoriteSetups);
    }), favorite_setups_default2 = {
      id: "favorite-setups",
      name: "Favorite Setups",
      type: "feature",
      default: !1,
      description: "Save your favorite setups and arm them with a single click.",
      load: init31
    };
  }
});

// src/modules/feature-flags/modules/rank-up-forecaster.js
var exportRankupForecasterData, exportRankupForecasterDataAsCsv, importRankupForecassterData, addRankupForecasterButtons, rank_up_forecaster_default, init_rank_up_forecaster = __esm({
  "src/modules/feature-flags/modules/rank-up-forecaster.js"() {
    init_utils2();
    exportRankupForecasterData = () => {
      let allArea = localStorage.getItem("Chro-forecaster-all-area"), currentArea = localStorage.getItem("Chro-forecaster-current-area"), time = localStorage.getItem("Chro-forecaster-time"), dataStr = JSON.stringify({
        allArea,
        currentArea,
        time
      }), base64 = btoa(dataStr), link = document.createElement("a"), date = /* @__PURE__ */ new Date(), 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 = () => {
      let time = localStorage.getItem("Chro-forecaster-time"), data = JSON.parse(time), csv = ["Time,Wisdom"];
      data.forEach((row) => {
        let date2 = new Date(row[0]);
        csv.push(`"${date2.toLocaleString()}",${row[1]}`);
      });
      let csvStr = csv.join(`
`), link = document.createElement("a"), date = /* @__PURE__ */ new Date(), 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 = () => {
      let input = document.createElement("input");
      input.type = "file", input.accept = ".json", input.addEventListener("change", (e) => {
        let file = e.target.files[0];
        if (!file)
          return;
        let reader = new FileReader();
        reader.onload = (re) => {
          let contents = re.target.result, 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();
      let points = document.querySelector(".mousehuntHud-userStat-row.points");
      points && points.click();
    }, addRankupForecasterButtons = () => {
      let forecastOpen = document.querySelector(".mousehuntHud-userStat-row.points");
      forecastOpen && forecastOpen.addEventListener("click", () => {
        setTimeout(() => {
          let rankup = document.querySelector("#forecaster-content-div");
          if (!rankup || document.querySelector(".mh-ui-forecaster-buttons"))
            return;
          let wrapper = makeElement("div", "mh-ui-forecaster-buttons"), exportButton = makeElement("button", "mh-ui-export-forecaster-data", "Export Data");
          exportButton.addEventListener("click", exportRankupForecasterData), wrapper.append(exportButton);
          let importButton = makeElement("button", "mh-ui-import-forecaster-data", "Import Data");
          importButton.addEventListener("click", importRankupForecassterData), wrapper.append(importButton);
          let 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;
}`, "rank-up-forecaster"), addRankupForecasterButtons();
    });
  }
});

// src/modules/feature-flags/modules/social.js
var social_default, init_social = __esm({
  "src/modules/feature-flags/modules/social.js"() {
    init_utils2();
    social_default = () => {
      window.twttr = {
        widgets: {
          load: () => {
          },
          createShareButton: () => {
          }
        }
      };
      class SocialLink {
        /**
         * Noop constructor.
         *
         * @param {string} url The URL.
         */
        constructor(url) {
          this.url = url;
        }
        appendTo() {
        }
        setFacebookLikeUrl() {
        }
        setFacebookShareUrl() {
        }
        setImage() {
        }
        setTitle() {
        }
        setTwitterUrl() {
        }
      }
      hg.classes.SocialLink = SocialLink, addStyles('a[onclick="SocialFramework.shareToFeedButton(this); return false;"] { filter: grayscale(1) opacity(0.5); cursor: not-allowed;}', "social-noop");
    };
  }
});

// src/modules/feature-flags/settings/index.js
var settings_default21, init_settings22 = __esm({
  "src/modules/feature-flags/settings/index.js"() {
    settings_default21 = () => __async(void 0, null, function* () {
      return [{
        id: "override-flags",
        title: "Feature Flags",
        default: "",
        description: 'Comma separated list of <a href="https://github.com/MHCommunity/mousehunt-improved/blob/c0bec5ea0f0b5f34b179507891e294559e39f34d/docs/feature-flags.md" target="_blank" rel="noopener noreferrer">feature flags</a> to enable.',
        settings: {
          type: "input"
        }
      }];
    });
  }
});

// src/modules/feature-flags/index.js
var init32, feature_flags_default, init_feature_flags = __esm({
  "src/modules/feature-flags/index.js"() {
    init_utils2();
    init_rank_up_forecaster();
    init_social();
    init_settings22();
    init32 = () => __async(void 0, null, function* () {
      (getFlag("social-noop") || getFlag("twitter")) && social_default(), getFlag("rankup-forecaster") || rank_up_forecaster_default();
    }), feature_flags_default = {
      id: "feature-flags",
      type: "advanced",
      alwaysLoad: !0,
      load: init32,
      settings: settings_default21,
      order: 200
    };
  }
});

// src/modules/fixes/modules/item-page.js
var fixItemPage, fixItemPageReceiver, item_page_default, init_item_page = __esm({
  "src/modules/fixes/modules/item-page.js"() {
    init_utils2();
    fixItemPage = () => {
      if (getCurrentPage() !== "item")
        return;
      let currentType = document.querySelector(".itemViewContainer");
      if (!currentType)
        return;
      let type = currentType.classList.toString().replace("itemViewContainer ", "").split(" ");
      if (!type || !type[0] || type.includes("message_item"))
        return;
      let link = document.querySelector(`.itemView-header-classification-link.${type[0]} a`);
      if (!link)
        return;
      let onclick = link.getAttribute("onclick");
      if (!onclick)
        return;
      let page = onclick.match(/setPage\('(.+?)'.+tab:'(.+)'/);
      if (!page)
        return;
      let pageTitle = page[1], tab = page[2], subtab = null;
      (tab === "skin" || tab === "trinket") && (subtab = tab, tab = "traps");
      let url = `https://www.mousehuntgame.com/${pageTitle.toLowerCase()}.php?tab=${tab}`;
      subtab && (url += `&sub_tab=${subtab}`);
      let itemType = currentType.getAttribute("data-item-type");
      url += `&viewing-item-id=${itemType}`, window.location = url;
    }, fixItemPageReceiver = () => {
      let itemId = new URLSearchParams(window.location.search).get("viewing-item-id");
      if (!itemId)
        return;
      hg.views.ItemView.show(itemId);
      let item = document.querySelector(`.inventoryPage-item[data-item-type="${itemId}"]`);
      item && item.scrollIntoView();
    }, item_page_default = () => __async(void 0, null, function* () {
      getCurrentPage() === "item" && fixItemPage(), onNavigation(fixItemPage, {
        page: "item",
        onLoad: !0
      }), onNavigation(fixItemPageReceiver, {
        page: "inventory",
        anyTab: !0,
        anySubtab: !0,
        onLoad: !0
      }), onDialogShow("item", () => {
        let currentHref = window.location.href;
        setMultipleTimeout(() => {
          currentHref !== window.location.href && window.history.replaceState(null, "", currentHref);
        }, [10, 100, 500, 1e3]);
      });
    });
  }
});

// src/modules/fixes/modules/marketplace-buy-button.js
var marketplace_buy_button_default, init_marketplace_buy_button = __esm({
  "src/modules/fixes/modules/marketplace-buy-button.js"() {
    marketplace_buy_button_default = () => __async(void 0, null, function* () {
      hg.views.MarketplaceView.setOrderPrice = (price) => {
        let input = document.querySelector(".marketplaceView-item-unitPriceWithTariff");
        input && (input.value = price, hg.views.MarketplaceView.blurInput(input));
      };
    });
  }
});

// src/modules/fixes/modules/passing-parcel.js
var fixPassingParcel, passing_parcel_default, init_passing_parcel = __esm({
  "src/modules/fixes/modules/passing-parcel.js"() {
    init_utils2();
    fixPassingParcel = () => {
      let passingParcel = document.querySelector('.inventoryPage-item[data-item-type="passing_parcel_message_item"]');
      if (!passingParcel)
        return;
      let quantity = passingParcel.querySelector(".quantity");
      if (!quantity)
        return;
      let 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"></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, document.querySelector("#passing-parcel-action").addEventListener("click", () => {
        window.location.href = "https://www.mousehuntgame.com/supplytransfer.php?item_type=passing_parcel_message_item";
      });
    }, passing_parcel_default = () => __async(void 0, null, function* () {
      onNavigation(fixPassingParcel, {
        page: "inventory",
        tab: "special",
        onLoad: !0
      });
    });
  }
});

// src/modules/fixes/modules/rift-tooltip-quantities.js
var fixRiftTooltipQuantities, rift_tooltip_quantities_default, init_rift_tooltip_quantities = __esm({
  "src/modules/fixes/modules/rift-tooltip-quantities.js"() {
    init_utils2();
    fixRiftTooltipQuantities = () => __async(void 0, null, function* () {
      var _a, _b;
      if (getCurrentLocation() !== "rift_gnawnia")
        return;
      let cheeseQtys = yield getUserItems(["gnawnia_boss_cheese", "riftiago_cheese"]);
      if (!cheeseQtys || !cheeseQtys.length)
        return;
      let craft = document.querySelector(".riftGnawniaHud-craftingBait .riftGnawniaHud-tooltip-quantity");
      craft && (craft.textContent = ((_a = cheeseQtys[0]) == null ? void 0 : _a.quantity) || 0), document.querySelector(".riftGnawniaHud-potion .riftGnawniaHud-tooltip-quantity") && (craft.textContent = ((_b = cheeseQtys[1]) == null ? void 0 : _b.quantity) || 0);
    }), rift_tooltip_quantities_default = () => __async(void 0, null, function* () {
      fixRiftTooltipQuantities(), onTravel("rift_gnawnia", {
        callback: fixRiftTooltipQuantities
      });
    });
  }
});

// src/modules/fixes/styles/backgrounds.css
var backgrounds_default3, init_backgrounds3 = __esm({
  "src/modules/fixes/styles/backgrounds.css"() {
    backgrounds_default3 = `@media only screen and (max-width: 1000px){body.halloween .pageFrameView-column.left,body.halloween .pageFrameView-column.right{background-color:#e87e33!important;background-repeat:no-repeat!important;background-position:0 0!important}body.halloween .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/halloween/left.png)!important;background-position-x:100%!important}body.halloween .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/halloween/right.png)!important}body.lunar_new_year .pageFrameView-column.left,body.lunar_new_year .pageFrameView-column.right{background-color:#7f051b!important;background-repeat:no-repeat!important;background-position:0 0!important}body.lunar_new_year .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/lunar_new_year/left.png)!important;background-position-x:100%!important}body.lunar_new_year .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/lunar_new_year/right.png)!important}body.great_winter_hunt .pageFrameView-column.left,body.great_winter_hunt .pageFrameView-column.right{background-color:#bad4ed!important}body.great_winter_hunt .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/great_winter_hunt/left.jpg)!important}body.great_winter_hunt .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/great_winter_hunt/right.jpg)!important}body.birthday .pageFrameView-column.left,body.birthday .pageFrameView-column.right{background-color:#bad4ed!important;background-repeat:no-repeat!important;background-position:0 0!important}body.birthday .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/birthday/left.png)!important;background-position-x:100%!important}body.birthday .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/birthday/right.png)!important}body.valentines .pageFrameView-column.left,body.valentines .pageFrameView-column.right{background-color:#f69798!important}body.valentines .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/valentines/left.png)!important}body.valentines .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/valentines/right.png)!important}body.spring_hunt .pageFrameView-column.left,body.spring_hunt .pageFrameView-column.right{background-color:#86ce5c!important;background-repeat:no-repeat!important}body.spring_hunt .pageFrameView-column.left{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/spring_hunt/left.png)!important}body.spring_hunt .pageFrameView-column.right{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/events/spring_hunt/right.png)!important}}
`;
  }
});

// src/modules/fixes/styles/bountiful-beanstalk.css
var bountiful_beanstalk_default, init_bountiful_beanstalk = __esm({
  "src/modules/fixes/styles/bountiful-beanstalk.css"() {
    bountiful_beanstalk_default = `.bountifulBeanstalkPlayHarpDialogView__volumeIcon{background-repeat:no-repeat}
`;
  }
});

// src/modules/fixes/styles/buttons.css
var buttons_default2, init_buttons2 = __esm({
  "src/modules/fixes/styles/buttons.css"() {
    buttons_default2 = `.schoolOfSorceryCourseView__dropOutButton{height:19px}
`;
  }
});

// src/modules/fixes/styles/claim-gift.css
var claim_gift_default, init_claim_gift = __esm({
  "src/modules/fixes/styles/claim-gift.css"() {
    claim_gift_default = `.claimGiftPage__giftQuantity{background:#fff777;border:1px solid #b5814e}
`;
  }
});

// src/modules/fixes/styles/colors.css
var colors_default, init_colors = __esm({
  "src/modules/fixes/styles/colors.css"() {
    colors_default = `.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) 50% 50% no-repeat}.halloweenBoilingCauldronHUD-dialog-reward.complete:after{box-shadow:5px 5px 5px #000888}.folkloreForestRegionView-dialogContainer{box-shadow:10px 10px 4px 1px #0003 inset}.folkloreForestRegionView-boost{box-shadow:2px 2px 2px #33333312}.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}.eggSweeper-viewAllRewardsButton:hover{background-color:#228b22}.schoolOfSorceryHallwayView__startCourse.schoolOfSorceryHallwayView__startCourse{text-shadow:1px 2px 2px #000aad}
`;
  }
});

// src/modules/fixes/styles/convertibles.css
var convertibles_default, init_convertibles = __esm({
  "src/modules/fixes/styles/convertibles.css"() {
    convertibles_default = `.itemView-action-convertForm{display:flex;align-items:center}.itemView-action-convert-quantity{top:0}
`;
  }
});

// src/modules/fixes/styles/dropdown.css
var dropdown_default, init_dropdown = __esm({
  "src/modules/fixes/styles/dropdown.css"() {
    dropdown_default = `.mousehuntHeaderView .menuItem.dropdown .arrow{top:10px;transform:rotate(180deg)}.mousehuntHeaderView .menuItem.dropdown.expanded .arrow{top:5px}.dropdownContent{color:#000}.mousehuntHeaderView .support .dropdownContent{right:-.5px;border-top:1px solid #ccc}
`;
  }
});

// src/modules/fixes/styles/fb-img-size.css
var fb_img_size_default, init_fb_img_size = __esm({
  "src/modules/fixes/styles/fb-img-size.css"() {
    fb_img_size_default = `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}
`;
  }
});

// src/modules/fixes/styles/font-sizes.css
var font_sizes_default, init_font_sizes = __esm({
  "src/modules/fixes/styles/font-sizes.css"() {
    font_sizes_default = `.riftWhiskerWoodsHUD-zone-rageLevel{font-size:14px}.riftWhiskerWoodsHUD-zone-charm-craftingItem-quantity{font-size:9px}
`;
  }
});

// src/modules/fixes/styles/footer.css
var footer_default2, init_footer2 = __esm({
  "src/modules/fixes/styles/footer.css"() {
    footer_default2 = `.pageFrameView-column.left,.pageFrameView-column.right{margin-bottom:-140px}
`;
  }
});

// src/modules/fixes/styles/hud-shadow.css
var hud_shadow_default, init_hud_shadow = __esm({
  "src/modules/fixes/styles/hud-shadow.css"() {
    hud_shadow_default = `.mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) -46px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif) 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) repeat-y top center}
`;
  }
});

// src/modules/fixes/styles/hunter-title.css
var hunter_title_default, init_hunter_title = __esm({
  "src/modules/fixes/styles/hunter-title.css"() {
    hunter_title_default = `.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}
`;
  }
});

// src/modules/fixes/styles/labyrinth.css
var labyrinth_default2, init_labyrinth2 = __esm({
  "src/modules/fixes/styles/labyrinth.css"() {
    labyrinth_default2 = `.labyrinthHUD.exit.secret{background-position-y:-184px}
`;
  }
});

// src/modules/fixes/styles/location-names-overflow.css
var location_names_overflow_default, init_location_names_overflow = __esm({
  "src/modules/fixes/styles/location-names-overflow.css"() {
    location_names_overflow_default = `.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}
`;
  }
});

// src/modules/fixes/styles/maps.css
var maps_default2, init_maps3 = __esm({
  "src/modules/fixes/styles/maps.css"() {
    maps_default2 = `.treasureMapView-hunter.empty .treasureMapView-hunter-miceCaught{display:none}input.treasureMapView-shareLinkInput{width:95%;margin:0 auto}.treasureMapInviteSettingsView-listing-visibility.active:before{content:"\\2713"}
`;
  }
});

// src/modules/fixes/styles/menu.css
var menu_default, init_menu = __esm({
  "src/modules/fixes/styles/menu.css"() {
    menu_default = `body .mousehuntHud-menu .friends .team .icon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/team.png)}body .mousehuntHud-menu .scoreboards>a>.icon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/scoreboard.png)}body .mousehuntHud-menu .forum .icon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/forum.png)}
`;
  }
});

// src/modules/fixes/styles/news-back.css
var news_back_default, init_news_back = __esm({
  "src/modules/fixes/styles/news-back.css"() {
    news_back_default = `.PageNewsPost .MHCheckout-button-arrow{position:relative}.PageNewsPost .MHCheckout-button-arrow:before{position:absolute;top:2px;bottom:10px;left:0;width:0;height:0;content:"";border-top:6px solid transparent;border-right:10px solid #000;border-bottom:6px solid transparent}
`;
  }
});

// src/modules/fixes/styles/other.css
var other_default2, init_other2 = __esm({
  "src/modules/fixes/styles/other.css"() {
    other_default2 = `.mousehuntHud-shield.larrys_football_challenge.golden{background-image:url(https://www.mousehuntgame.com/images/ui/elements/header_world_cup_golden_shield.png)}.itemView-loading{z-index:0;border-top-right-radius:20px}.PageNews{background-size:cover}
`;
  }
});

// src/modules/fixes/styles/preferences.css
var preferences_default, init_preferences = __esm({
  "src/modules/fixes/styles/preferences.css"() {
    preferences_default = `.PreferencesPage__dialogForm .PreferencesPage__formLabel{flex:1}.PreferencesPage__dialogForm .PreferencesPage__formInput{flex:1.8}.PreferencesPage__dialogForm form{padding-left:18px}.accountVerificationRewardsView__step.can_claim{background-image:none}
`;
  }
});

// src/modules/fixes/styles/ronza.css
var ronza_default, init_ronza = __esm({
  "src/modules/fixes/styles/ronza.css"() {
    ronza_default = `span.chromeBitImage,span.voucherImage{vertical-align:middle}
`;
  }
});

// src/modules/fixes/styles/scoreboard.css
var scoreboard_default, init_scoreboard = __esm({
  "src/modules/fixes/styles/scoreboard.css"() {
    scoreboard_default = `.scoreboardTableView-filters label{display:flex;align-items:center}
`;
  }
});

// src/modules/fixes/styles/tabs.css
var tabs_default2, init_tabs2 = __esm({
  "src/modules/fixes/styles/tabs.css"() {
    tabs_default2 = `a.mousehuntHud-page-tabHeader.collectibles span{overflow:visible!important;font-size:13px;text-overflow:unset!important;white-space:normal!important}#messengerUINotification .tabs a:hover .arrow{border-color:transparent transparent transparent #eee}.mousehuntHud-page-tabHeader-container{margin-bottom:-1px}.mousehuntHud-page-tabHeader.active span{background-color:#fff;border-bottom:1px solid #fff}.mousehuntHud-page-tabHeader{height:30px}.mousehuntHud-page-tabHeader span{height:16px;margin-top:5px}.mousehuntHud-page-tabHeader.active span,.mousehuntHud-page-tabHeader:hover span{padding-bottom:8px;margin-top:0;border-bottom:none}
`;
  }
});

// src/modules/fixes/styles/tem.css
var tem_default, init_tem = __esm({
  "src/modules/fixes/styles/tem.css"() {
    tem_default = `.pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer:hover{background-color:#fdfaf2}body .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer{padding-left:10px;margin:5px 0}
`;
  }
});

// src/modules/fixes/styles/tooltips.css
var tooltips_default, init_tooltips = __esm({
  "src/modules/fixes/styles/tooltips.css"() {
    tooltips_default = `.mousehuntTooltip.top .mousehuntTooltip-arrow:after{top:-16px;left:-13px;border-width:13px}.mousehuntTooltip.left .mousehuntTooltip-arrow:after{right:-10px;bottom:-13px;border-width:13px}.mousehuntTooltip.right .mousehuntTooltip-arrow:after{bottom:-13px;left:-10px;border-width:13px}.mousehuntTooltip.bottom .mousehuntTooltip-arrow:after{bottom:-16px;left:-13px;border-width:13px}
`;
  }
});

// src/modules/fixes/styles/tutorial-overlay.css
var tutorial_overlay_default, init_tutorial_overlay = __esm({
  "src/modules/fixes/styles/tutorial-overlay.css"() {
    tutorial_overlay_default = `#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}
`;
  }
});

// src/modules/fixes/index.js
var imported5, styles5, init33, fixes_default, init_fixes = __esm({
  "src/modules/fixes/index.js"() {
    init_utils2();
    init_item_page();
    init_marketplace_buy_button();
    init_passing_parcel();
    init_rift_tooltip_quantities();
    init_backgrounds3();
    init_bountiful_beanstalk();
    init_buttons2();
    init_claim_gift();
    init_colors();
    init_convertibles();
    init_dropdown();
    init_fb_img_size();
    init_font_sizes();
    init_footer2();
    init_hud_shadow();
    init_hunter_title();
    init_labyrinth2();
    init_location_names_overflow();
    init_maps3();
    init_menu();
    init_news_back();
    init_other2();
    init_preferences();
    init_ronza();
    init_scoreboard();
    init_tabs2();
    init_tem();
    init_tooltips();
    init_tutorial_overlay();
    imported5 = [backgrounds_default3, bountiful_beanstalk_default, buttons_default2, claim_gift_default, colors_default, convertibles_default, dropdown_default, fb_img_size_default, font_sizes_default, footer_default2, hud_shadow_default, hunter_title_default, labyrinth_default2, location_names_overflow_default, maps_default2, menu_default, news_back_default, other_default2, preferences_default, ronza_default, scoreboard_default, tabs_default2, tem_default, tooltips_default, tutorial_overlay_default], styles5 = imported5, init33 = () => __async(void 0, null, function* () {
      addStyles(styles5, "fixes"), item_page_default(), marketplace_buy_button_default(), passing_parcel_default(), rift_tooltip_quantities_default();
    }), fixes_default = {
      id: "fixes",
      name: "Fixes",
      type: "feature",
      description: "Fixes various bugs and issues in the game.",
      default: !0,
      load: init33
    };
  }
});

// src/modules/flrt-helper/styles.css
var styles_default42, init_styles43 = __esm({
  "src/modules/flrt-helper/styles.css"() {
    styles_default42 = `.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);background-repeat:no-repeat;background-size:100%}
`;
  }
});

// src/modules/flrt-helper/index.js
var addFlrtButtonToConvertible, sendItemsToMaptain, flrtPopup, init34, flrt_helper_default, init_flrt_helper = __esm({
  "src/modules/flrt-helper/index.js"() {
    init_utils2();
    init_utils2();
    init_styles43();
    addFlrtButtonToConvertible = (response) => __async(void 0, null, function* () {
      if (!(response.convertible_open && response.convertible_open.name && response.convertible_open.items))
        return;
      let items5 = [], tradableItems = yield getData("items-tradable");
      for (let element of response.convertible_open.items) {
        let itemData = {
          type: element.type,
          name: element.name,
          image: element.thumb,
          quantity: element.quantity
        };
        tradableItems ? tradableItems.find((tradableItem) => tradableItem.type === element.type) && items5.push(itemData) : items5.push(itemData);
      }
      let buttons = document.querySelector(".jsDialogContainer .suffix");
      if (!buttons)
        return;
      let flrtBtn = makeElement("button", ["mousehuntActionButton", "small", "button"]);
      makeElement("span", [], "Return to Maptain", flrtBtn), flrtBtn.addEventListener("click", () => {
        flrtPopup(items5);
      }), buttons.prepend(flrtBtn);
    }), sendItemsToMaptain = (snuid, items5) => __async(void 0, null, function* () {
      for (let item of items5)
        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");
      let sendButton = document.querySelector(".flrt-send-items");
      sendButton && (sendButton.outerHTML = '<input type="submit" value="Continue" class="jsDialogClose button">');
    }), flrtPopup = (items5) => {
      let lastMaptain = getLastMaptain(), itemContent = "";
      items5.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>`;
      });
      let 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&amp;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>`
      });
      if (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(), document.querySelectorAll(".flrt-item").forEach((item) => {
        let checkbox = item.querySelector('input[type="checkbox"]'), toggle = () => {
          checkbox.checked = !checkbox.checked, item.classList.toggle("flrt-item-disabled", !checkbox.checked);
        };
        item.addEventListener("click", toggle);
      }), lastMaptain) {
        let search = document.querySelector(".search-for-hunter");
        search && app.pages.FriendsPage.triggerHunterForm(search);
      }
      let sendBtn = document.querySelector(".flrt-send-items");
      sendBtn && sendBtn.addEventListener("click", () => {
        sendBtn.disabled = !0, sendBtn.classList.add("disabled");
        let id = document.querySelector(".friendsPage-community-hunterIdForm-input");
        if (!id)
          return;
        let sendingItems = document.querySelectorAll(".flrt-item"), itemsToSend = [];
        sendingItems.forEach((item) => {
          let checkbox = item.querySelector('input[type="checkbox"]');
          if (checkbox) {
            if (checkbox.checked) {
              let itemData = {
                type: item.getAttribute("data-item-type"),
                quantity: Number.parseInt(item.getAttribute("data-item-quantity"), 10),
                element: item
              };
              itemsToSend.push(itemData);
            }
            checkbox.disabled = !0;
          }
        });
        let row = document.querySelector(".friendsPage-friendRow.friendsPage-requestRow");
        if (!row)
          return;
        let snuid = row.getAttribute("data-snuid") || id.value;
        sendItemsToMaptain(snuid, itemsToSend);
      });
    }, init34 = () => __async(void 0, null, function* () {
      addStyles(styles_default42, "flrt-helper"), onDialogShow("treasureMapPopup", cacheFinishedMap), onRequest("users/useconvertible.php", addFlrtButtonToConvertible);
    }), flrt_helper_default = {
      id: "flrt-helper",
      name: "FLRT Helper",
      type: "feature",
      default: !1,
      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: init34
    };
  }
});

// src/modules/global-styles/styles/animations.css
var animations_default, init_animations = __esm({
  "src/modules/global-styles/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-fade-slightly{0%{opacity:1}50%{opacity:.75}to{opacity:1}}@keyframes mh-improved-fade-in{0%{opacity:0}to{opacity:1}}@keyframes mh-improved-fade-out{0%{opacity:1}to{opacity:0}}@keyframes mh-improved-in-from-left{0%{opacity:0;transform:translate3d(-100%,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes mh-improved-in-from-top{0%{visibility:visible;transform:translate3d(0,-100%,0)}to{transform:translateZ(0)}}@keyframes mh-improved-in-scale{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes mh-improved-in-scale-y{0%{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}}@keyframes mh-improved-shake{0%{transform:rotate(0)}25%{transform:rotate(5deg)}50%{transform:rotate(-5deg)}75%{transform:rotate(5deg)}to{transform:rotate(0)}}@keyframes mh-improved-shake-scaled{0%{transform:scale(1.2) rotate(0)}25%{transform:scale(1.2) rotate(5deg)}50%{transform:scale(1.2) rotate(-5deg)}75%{transform:scale(1.2) rotate(5deg)}to{transform:scale(1.2) rotate(0)}}@keyframes mh-improved-shake-light{0%{transform:rotate(0)}25%{transform:rotate(-5deg)}75%{transform:rotate(5deg)}to{transform:rotate(0)}}@keyframes mh-improved-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes mh-improved-spin-flipped{0%{transform:scaleX(-1) rotate(0)}to{transform:scaleX(-1) rotate(360deg)}}@keyframes mh-improved-spin-large{0%{transform:scale(2) rotate(0)}to{transform:scale(2) rotate(360deg)}}@keyframes mh-improved-spin-large-flipped{0%{transform:scale(-2,2) rotate(0)}to{transform:scale(-2,2) rotate(360deg)}}@keyframes mh-improved-right-to-left{0%{right:100%}to{right:0}}@keyframes mh-improved-background-slide{0%{background-position:left}50%{background-position:right}to{background-position:left}}@keyframes mh-improved-bounce-and-stretch{0%{transform:scaleX(1) translate(-10px)}60%{transform:scaleX(1)}75%{transform:scaleX(.98)}90%{transform:scaleX(.999)}}@keyframes mh-improved-hue-rotate{0%{filter:hue-rotate(0deg)}50%{filter:hue-rotate(360deg)}to{filter:hue-rotate(0deg)}}@keyframes mh-improved-hue-rotate-and-scale{0%{filter:hue-rotate(0deg);transform:scale(1)}50%{filter:hue-rotate(360deg);transform:scale(1.5)}to{filter:hue-rotate(0deg);transform:scale(1)}}@keyframes mh-improved-glow{0%{filter:brightness(1)}50%{filter:brightness(1.1)}to{filter:brightness(1)}}@keyframes mh-improved-dim{0%{filter:brightness(1)}50%{filter:brightness(.8)}to{filter:brightness(1)}}@keyframes mh-improved-scale{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}@keyframes mh-improved-scale-large{0%{transform:scale(1)}50%{transform:scale(2.7)}to{transform:scale(1)}}@keyframes mh-improved-fade-busy{0%{pointer-events:none;opacity:.5}to{pointer-events:all;opacity:1}}@keyframes mh-improved-background-to-right{0%{background-position:0 0}to{background-position:50px 50px}}@keyframes mh-improved-background-to-left{0%{background-position:50px 50px}to{background-position:0 0}}
`;
  }
});

// src/modules/global-styles/styles/blueprint.css
var blueprint_default2, init_blueprint3 = __esm({
  "src/modules/global-styles/styles/blueprint.css"() {
    blueprint_default2 = `.mh-improved-blueprint .trapSelectorView__outerBlock{position:relative;display:flex;flex:1;flex-direction:column;gap:10px}.mh-improved-blueprint--active .mh-improved-blueprint{display:flex}
`;
  }
});

// src/modules/global-styles/styles/buttons.css
var buttons_default3, init_buttons3 = __esm({
  "src/modules/global-styles/styles/buttons.css"() {
    buttons_default3 = `.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}.mousehuntActionButton.success:before{background-color:#00ff59;box-shadow:0 0 10px #beff99 inset}.mousehuntActionButton.success{background-color:#97f990}.mousehuntActionButton.success:hover:before,.mousehuntActionButton.success:focus:before{background-color:#00ff59}.mousehuntActionButton.danger:before{background-color:#f27b6a;box-shadow:0 0 10px #ffa5a5 inset}.mousehuntActionButton.danger{background-color:#ffa5a5}.mousehuntActionButton.danger:hover:before,.mousehuntActionButton.danger:focus:before{background-color:#ffa5a5}.mousehuntActionButton:hover:before{pointer-events:none}.mousehuntActionButton.gray{background-color:#e5e5e5;border:1px solid #8e8e8e;box-shadow:1px 1px 1px #eee}.mousehuntActionButton.gray:before{background:#dedede;box-shadow:0 0 10px #e8e8e8 inset}.mousehuntActionButton.gray:hover,.mousehuntActionButton.gray:focus{background-color:#f3f3f3}.mh-improved-math-button{font-family:monospace;user-select:none}#overlayPopup .button.button-grey{box-shadow:none}#overlayPopup .button.button-grey:hover{color:#000;background-color:#ddd}.mousehuntActionButton span{user-select:none}
`;
  }
});

// src/modules/global-styles/styles/favorite-button.css
var favorite_button_default, init_favorite_button = __esm({
  "src/modules/global-styles/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) 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);outline:2px solid #ccc}.custom-favorite-button.active{background-image:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png)}.custom-favorite-button.busy{background-image:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif)}
`;
  }
});

// src/modules/global-styles/styles/game-info-bar.css
var game_info_bar_default, init_game_info_bar = __esm({
  "src/modules/global-styles/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}
`;
  }
});

// src/modules/global-styles/styles/general.css
var general_default5, init_general5 = __esm({
  "src/modules/global-styles/styles/general.css"() {
    general_default5 = `.pageFrameView-column{min-height:100vh}code{padding:0 3px;font-family:ui-monospace,Menlo,Monaco,Cascadia Mono,Segoe UI Mono,Roboto Mono,Oxygen Mono,"Ubuntu Monospace",Source Code Pro,Fira Mono,Droid Sans Mono,Courier New,monospace;background-color:#eee;border-radius:3px}.mousehuntHud-page-tabHeader.userscript-settings span{height:16px;font-size:12px;white-space:nowrap}.pageSidebarView-block{display:flex;flex-direction:column;align-items:stretch}.pageSidebarView .fb-page{order:1000}.support-link{padding:10px;background:#8dff7d;border-radius:10px;box-shadow:-1px -1px 1px #ccc inset}.support-link p{margin-top:0;font-size:14px;font-weight:900}.support-link a{font-size:16px;font-weight:900}input[type=text]{padding:2px 1px;border:1px solid #767676}
`;
  }
});

// src/modules/global-styles/styles/messages.css
var messages_default, init_messages2 = __esm({
  "src/modules/global-styles/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 5px -1px #5e5e5e}.mh-ui-success-message{background-color:#a3ea85;border:1px solid #3e803e}
`;
  }
});

// src/modules/global-styles/styles/settings.css
var settings_default22, init_settings23 = __esm({
  "src/modules/global-styles/styles/settings.css"() {
    settings_default22 = `.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}.mh-ui-success-message.setting-link-copied{position:absolute;top:10px;display:inline;padding:3px;margin-left:9px}
`;
  }
});

// src/modules/global-styles/styles/tooltips.css
var tooltips_default2, init_tooltips2 = __esm({
  "src/modules/global-styles/styles/tooltips.css"() {
    tooltips_default2 = `.PreferencesPage__blackTooltip.mh-improved-tooltip{width:20px;height:20px;margin-right:auto;margin-left:5px}.PreferencesPage__blackTooltip.mh-improved-tooltip:hover .PreferencesPage__blackTooltipText{right:-65px;bottom:165%;left:-65px;font-weight:400;line-height:16px}.mh-improved-tooltip-stay-open,.mousehuntTooltip.mh-improved-tooltip-stay-open,.mousehuntTooltipParent:hover>.mousehuntTooltip.mh-improved-tooltip-stay-open{display:block;transition:none;animation:none}
`;
  }
});

// src/modules/global-styles/styles/trap-qty.css
var trap_qty_default, init_trap_qty = __esm({
  "src/modules/global-styles/styles/trap-qty.css"() {
    trap_qty_default = `.campPage-trap-itemBrowser-favorite-item-image-frame{top:-1px;left:-1px;width:50px;height:50px;overflow:hidden}.campPage-trap-itemBrowser-favorites .campPage-trap-itemBrowser-favorite-item-quantity span.campPage-trap-baitQuantity,.campPage-trap-itemBrowser-item-leftBar span.campPage-trap-baitQuantity{right:0;bottom:1px;left:1px;padding:3px;font-size:13px;text-align:center;background-color:#fffc;border-radius:0 0 3px 3px}.campPage-trap-itemBrowser-favorites .campPage-trap-itemBrowser-favorite-item-quantity span.campPage-trap-baitQuantity{bottom:-1px;left:-1px;border:1px solid #4e2e0b}.campPage-trap-itemBrowser-item-leftBar span.campPage-trap-baitQuantity{bottom:0;left:0}
`;
  }
});

// src/modules/global-styles/styles/utility.css
var utility_default, init_utility = __esm({
  "src/modules/global-styles/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}
`;
  }
});

// src/modules/global-styles/index.js
var imported6, styles6, init35, global_styles_default, init_global_styles = __esm({
  "src/modules/global-styles/index.js"() {
    init_utils2();
    init_animations();
    init_blueprint3();
    init_buttons3();
    init_favorite_button();
    init_game_info_bar();
    init_general5();
    init_messages2();
    init_settings23();
    init_tooltips2();
    init_trap_qty();
    init_utility();
    imported6 = [animations_default, blueprint_default2, buttons_default3, favorite_button_default, game_info_bar_default, general_default5, messages_default, settings_default22, tooltips_default2, trap_qty_default, utility_default], styles6 = imported6, init35 = () => __async(void 0, null, function* () {
      addStyles(styles6, "global-styles");
    }), global_styles_default = {
      id: "global-styles",
      type: "required",
      alwaysLoad: !0,
      load: init35
    };
  }
});

// src/modules/hide-codices/styles.css
var styles_default43, init_styles44 = __esm({
  "src/modules/hide-codices/styles.css"() {
    styles_default43 = `.trapSelectorView__activeCodexContainer,.trapSelectorView__activeCodexContainer--visible{display:none}
`;
  }
});

// src/modules/hide-codices/index.js
var init36, hide_codices_default, init_hide_codices = __esm({
  "src/modules/hide-codices/index.js"() {
    init_utils2();
    init_styles44();
    init36 = () => __async(void 0, null, function* () {
      addStyles(styles_default43, "hide-codices");
    }), hide_codices_default = {
      id: "hide-codices",
      name: "Hide Codices",
      type: "element-hiding",
      default: !1,
      description: "Hide the codices on the trap selector.",
      load: init36
    };
  }
});

// src/modules/hide-daily-draw/styles.css
var styles_default44, init_styles45 = __esm({
  "src/modules/hide-daily-draw/styles.css"() {
    styles_default44 = `#messengerUINotification .tabs a[data-tab=daily_draw]{display:none}
`;
  }
});

// src/modules/hide-daily-draw/index.js
var _togglePopup, replaceInboxOpen, isSelfRequest, removeDailyDrawNotifications, init37, hide_daily_draw_default, init_hide_daily_draw = __esm({
  "src/modules/hide-daily-draw/index.js"() {
    init_utils2();
    init_styles45();
    replaceInboxOpen = () => {
      var _a, _b;
      !messenger || !((_b = (_a = messenger == null ? void 0 : messenger.UI) == null ? void 0 : _a.notification) != null && _b.togglePopup) || (_togglePopup || (_togglePopup = messenger.UI.notification.togglePopup), messenger.UI.notification.togglePopup = () => {
        messenger.UI.notification.showPopup(), messenger.UI.notification.setActiveTab("general"), messenger.UI.notification.showTab("general"), onEvent("ajax_response", () => {
          setMultipleTimeout(() => {
            messenger.UI.notification.showTab("general");
          }, [10, 100]);
        }, !0);
      });
    }, isSelfRequest = !1, removeDailyDrawNotifications = (data) => __async(void 0, null, function* () {
      var _a, _b, _c;
      if (isSelfRequest || !(data != null && data.messageData) || !((_a = data == null ? void 0 : data.messageData) != null && _a.notification))
        return;
      let messageBar = document.querySelector("#hgbar_messages");
      if (!messageBar || !messageBar.classList.contains("new"))
        return;
      let displayedNotificationsEl = messageBar.querySelector(".mousehuntHeaderView-menu-notification");
      if (!displayedNotificationsEl)
        return;
      let displayedNotifications = Number.parseInt(displayedNotificationsEl.innerText, 10);
      if (displayedNotifications <= 0)
        return;
      let notification = data.messageData.notification || {};
      if (((notification == null ? void 0 : notification.messageCount) || 0) <= 0)
        return;
      isSelfRequest = !0;
      let notificationData = yield doRequest("managers/ajax/users/messages.php", {
        action: "fetch_messages",
        "message_types[]": "notification"
      });
      isSelfRequest = !1;
      let notificationsToSubtract = 0;
      if ((_c = (_b = notificationData == null ? void 0 : notificationData.messageData) == null ? void 0 : _b.notification) == null || _c.messages.forEach((message) => {
        var _a2;
        message != null && message.isNew && ((_a2 = message == null ? void 0 : message.messageData) == null ? void 0 : _a2.tab) === "Daily Draw" && notificationsToSubtract++;
      }), notificationsToSubtract <= 0)
        return;
      let newDisplayedNotifications = displayedNotifications - notificationsToSubtract;
      newDisplayedNotifications <= 0 && messageBar.classList.remove("new"), displayedNotificationsEl.innerText = newDisplayedNotifications;
    }), init37 = () => __async(void 0, null, function* () {
      addStyles(styles_default44, "hide-daily-draw"), typeof messenger != "undefined" && replaceInboxOpen(), setTimeout(removeDailyDrawNotifications, 1e3), onRequest("*", removeDailyDrawNotifications);
    }), hide_daily_draw_default = {
      id: "hide-daily-draw",
      name: "Hide Daily Draw",
      type: "element-hiding",
      default: !1,
      description: "Hides the Daily Draw inbox tab and notifications.",
      load: init37
    };
  }
});

// src/modules/hide-daily-reward-popup/index.js
var hidePopup, init38, hide_daily_reward_popup_default, init_hide_daily_reward_popup = __esm({
  "src/modules/hide-daily-reward-popup/index.js"() {
    init_utils2();
    hidePopup = () => {
      if (activejsDialog) {
        let attrs = activejsDialog.getAttributes();
        attrs && attrs.className && attrs.className === "dailyRewardPopup" && activejsDialog.hide();
      }
    }, init38 = () => __async(void 0, null, function* () {
      onDialogShow("dailyRewardPopup", () => {
        setTimeout(() => {
          activejsDialog && activejsDialog.hide();
        }, 500);
      }), hidePopup(), setTimeout(hidePopup, 1e3), setTimeout(hidePopup, 2e3), onRequest("*", hidePopup);
    }), hide_daily_reward_popup_default = {
      id: "hide-daily-reward-popup",
      name: "Hide Daily Reward Popup",
      type: "element-hiding",
      default: !1,
      description: "Automatically hide the daily reward popup.",
      load: init38
    };
  }
});

// src/modules/hide-footer/styles.css
var styles_default45, init_styles46 = __esm({
  "src/modules/hide-footer/styles.css"() {
    styles_default45 = `.pageFrameView-footer,.mousehuntFooter{display:none}.no-footer .pageFrameView-column.left,.no-footer .pageFrameView-column.right{margin-bottom:0}
`;
  }
});

// src/modules/hide-footer/index.js
var init39, hide_footer_default, init_hide_footer = __esm({
  "src/modules/hide-footer/index.js"() {
    init_utils2();
    init_styles46();
    init39 = () => __async(void 0, null, function* () {
      addStyles(styles_default45, "no-footer"), addBodyClass("no-footer"), onActivation("no-footer", () => {
        addBodyClass("no-footer");
      }), onActivation("no-footer", () => {
        removeBodyClass("no-footer");
      });
    }), hide_footer_default = {
      id: "no-footer",
      name: "Hide Footer",
      type: "element-hiding",
      default: !1,
      description: "Hides the footer.",
      load: init39
    };
  }
});

// src/modules/hide-news-ticker/styles.css
var styles_default46, init_styles47 = __esm({
  "src/modules/hide-news-ticker/styles.css"() {
    styles_default46 = `.mousehuntHeaderView-newsTicker{display:none}
`;
  }
});

// src/modules/hide-news-ticker/index.js
var init40, hide_news_ticker_default, init_hide_news_ticker = __esm({
  "src/modules/hide-news-ticker/index.js"() {
    init_utils2();
    init_styles47();
    init40 = () => __async(void 0, null, function* () {
      addStyles(styles_default46, "hide-news-ticker");
    }), hide_news_ticker_default = {
      id: "hide-news-ticker",
      name: "Hide News Ticker",
      type: "element-hiding",
      default: !0,
      description: "Hides the news ticker in the header.",
      load: init40
    };
  }
});

// src/modules/hide-share/styles.css
var styles_default47, init_styles48 = __esm({
  "src/modules/hide-share/styles.css"() {
    styles_default47 = `.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.top .canShare .larryTip img{display:none}#OnboardArrow.onboardPopup.canShare .shareButton{display:none!important}#OnboardArrow.onboardPopup.canShare .closeButton{right:43px;left:unset;z-index:2}#OnboardArrow.onboardPopup.top .canShare .larryTip{color:#fff;background-color:#fff;border-color:#fff}
`;
  }
});

// src/modules/hide-share/index.js
var init41, hide_share_default, init_hide_share = __esm({
  "src/modules/hide-share/index.js"() {
    init_utils2();
    init_styles48();
    init41 = () => __async(void 0, null, function* () {
      addStyles(styles_default47, "no-share");
    }), hide_share_default = {
      id: "no-share",
      name: "Hide Share Buttons",
      type: "element-hiding",
      default: !0,
      description: "Hides the share buttons.",
      load: init41
    };
  }
});

// src/modules/hide-sidebar/styles.css
var styles_default48, init_styles49 = __esm({
  "src/modules/hide-sidebar/styles.css"() {
    styles_default48 = `.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 .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}
`;
  }
});

// src/modules/hide-sidebar/index.js
var moveSidebar, init42, hide_sidebar_default, init_hide_sidebar = __esm({
  "src/modules/hide-sidebar/index.js"() {
    init_utils2();
    init_styles49();
    moveSidebar = () => {
      let menuTab = document.createElement("div");
      menuTab.classList.add("menuItem"), menuTab.classList.add("dropdown"), menuTab.classList.add("sidebar"), menuTab.addEventListener("click", () => {
        menuTab.classList.toggle("expanded");
      });
      let menuTabTitle = document.createElement("span");
      menuTabTitle.innerText = "Sidebar";
      let menuTabArrow = document.createElement("div");
      menuTabArrow.classList.add("arrow");
      let dropdownContent = document.createElement("div");
      dropdownContent.classList.add("dropdownContent");
      let sidebarUser = document.querySelector(".pageSidebarView-user");
      if (sidebarUser) {
        let sidebarUserClone = sidebarUser.cloneNode(!0);
        dropdownContent.append(sidebarUserClone);
      }
      let scoreBoardRankings = document.querySelectorAll(".scoreboardRelativeRankingTableView-table");
      if (scoreBoardRankings) {
        let scoreBoardRankingWrapper = document.createElement("div");
        scoreBoardRankingWrapper.classList.add("scoreboardRankingsWrapper"), scoreBoardRankings.forEach((scoreBoardRanking) => {
          let scoreBoardRankingClone = scoreBoardRanking.cloneNode(!0);
          scoreBoardRankingWrapper.append(scoreBoardRankingClone);
        }), dropdownContent.append(scoreBoardRankingWrapper);
      }
      menuTab.append(menuTabTitle), menuTab.append(menuTabArrow), menuTab.append(dropdownContent);
      let tabsContainer = document.querySelector(".mousehuntHeaderView-dropdownContainer");
      tabsContainer && tabsContainer.insertBefore(menuTab, tabsContainer.lastChild);
    }, init42 = () => __async(void 0, null, function* () {
      addStyles(styles_default48, "no-sidebar"), addBodyClass("no-sidebar"), moveSidebar(), hg.views.PageFrameView.setShowSidebar(!1), onDeactivation("no-sidebar", () => {
        hg.views.PageFrameView.setShowSidebar(!0);
        let menuTab = document.querySelector(".menuItem.sidebar");
        menuTab && menuTab.remove();
      });
    }), hide_sidebar_default = {
      id: "no-sidebar",
      name: "Hide Sidebar",
      type: "element-hiding",
      default: !0,
      description: "Hides the sidebar and adds a 'Sidebar' dropdown in the top menu.",
      load: init42
    };
  }
});

// src/modules/hover-profiles/styles.css
var styles_default49, init_styles50 = __esm({
  "src/modules/hover-profiles/styles.css"() {
    styles_default49 = `.message .messageText,.journal .entry .journalbody{position:relative}#friend-data-wrapper{position:absolute;top:-125px;z-index:999999;box-sizing:border-box;display:block;width:325px;height:125px;background:linear-gradient(#decebb 5%,#f0eddf 50%);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:27px;height:27px;margin-right:3px}#friend-data-wrapper .friendsPage-friendRow-environment-name{width:140px;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{opacity:0;animation:none}#friend-data-wrapper .friendsPage-friendRow-environment{box-sizing:border-box;display:flex;align-items:center;height:40px;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}.friend-data-wrapper-loading{display:flex;align-items:flex-end;justify-content:center;height:90%;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif);background-repeat:no-repeat;background-position:center;background-size:55px}.friendsPage-friendRow.loading .friendsPage-friendRow-titleBar-icon:after{top:2px;left:2px;width:30px;height:30px;background:#eee;border:2px solid #7b7b7b}.friendsPage-friendRow.loading .friendsPage-friendRow-image,.friendsPage-friendRow.loading .friendsPage-friendRow-environment-icon{background:#eee;box-shadow:none}.friendsPage-friendRow.loading .friendsPage-friendRow-image{inset:7px}
`;
  }
});

// src/modules/hover-profiles/index.js
var cleanId, getFriendId, friendDataWrapper, makeFriendMarkup, onFriendLinkHover, addFriendLinkEventListener, onTabChangeCallback, onTabChange, onInboxOpen, main15, debugPopup, init43, hover_profiles_default, init_hover_profiles = __esm({
  "src/modules/hover-profiles/index.js"() {
    init_utils2();
    init_styles50();
    cleanId = (id) => id.replaceAll("#", ""), getFriendId = (target) => __async(void 0, null, function* () {
      var _a;
      if (target.getAttribute("data-snuid"))
        return cleanId(target.getAttribute("data-snuid"));
      if (target.href) {
        let href = target.href, hrefMatch = target.href.match(/(.+?)&/);
        hrefMatch && hrefMatch.length && (href = hrefMatch[1]);
        let urlMatch = href.replace("https://www.mousehuntgame.com/hunterprofile.php?snuid=", "").replace("https://www.mousehuntgame.com/profile.php?snuid=", "");
        if (urlMatch && urlMatch !== href)
          return cleanId(urlMatch);
        let pMatch = href.replace("https://www.mousehuntgame.com/p.php?id=", "");
        if (pMatch && pMatch !== href) {
          let snuid = yield doRequest("managers/ajax/pages/friends.php", {
            action: "community_search_by_id",
            user_id: pMatch
          });
          if ((_a = snuid == null ? void 0 : snuid.friend) != null && _a.sn_user_id)
            return cleanId(snuid.friend.sn_user_id);
        }
      }
      if (target.onclick) {
        let giftMatch = target.onclick.toString().match(/show\('(.+)'\)/);
        if (giftMatch && giftMatch.length)
          return cleanId(giftMatch[1]);
      }
      return !1;
    }), makeFriendMarkup = (friendId, data = null, skipCache = !1, e) => {
      var _a, _b;
      skipCache || (sessionSet(`mh-improved-cache-friend-${friendId}`, data), sessionSet(`mh-improved-cache-friend-${friendId}-timestamp`, Date.now())), friendDataWrapper == null || friendDataWrapper.remove();
      let content;
      if (data && data.length) {
        let templateType = (_b = (_a = data[0].user_interactions) == null ? void 0 : _a.relationship) != null && _b.is_stranger ? "PageFriends_request_row" : "PageFriends_view_friend_row";
        content = hg.utils.TemplateUtil.render(templateType, data[0]);
      } else
        content = hg.utils.TemplateUtil.render("PageFriends_view_friend_row", hg.pages.FriendsPage().getPlaceholderData());
      let existing = document.querySelectorAll("#friend-data-wrapper");
      existing && existing.length && existing.forEach((el) => {
        el.remove();
      }), friendDataWrapper = makeElement("div", "friend-data-wrapper"), friendDataWrapper.id = "friend-data-wrapper", friendDataWrapper.innerHTML = content || '<span class="friend-data-wrapper-loading">Loading\u2026</span>', document.body.append(friendDataWrapper);
      let rect = e.target.getBoundingClientRect(), top = rect.top + window.scrollY, left = rect.left + window.scrollX, tooltipTop = top - friendDataWrapper.offsetHeight - 10;
      tooltipTop < 0 && (tooltipTop = top + rect.height + 10), friendDataWrapper.style.top = `${tooltipTop}px`, friendDataWrapper.style.left = `${left - friendDataWrapper.offsetWidth / 2 + rect.width / 2}px`;
      let timeoutId;
      friendDataWrapper.addEventListener("mouseleave", () => {
        timeoutId = setTimeout(() => {
          debugPopup || friendDataWrapper.remove();
        }, 250);
      }), friendDataWrapper.addEventListener("mouseenter", () => {
        clearTimeout(timeoutId);
      }), doEvent2("profile_hover");
    }, onFriendLinkHover = (e) => __async(void 0, null, function* () {
      let friendId = yield getFriendId(e.target);
      if (!friendId || friendId == user.sn_user_id)
        return;
      e.target.setAttribute("data-snuid", friendId);
      let parent = e.target.parentElement;
      if (!parent)
        return;
      parent.setAttribute("data-friend-hover", !0);
      let existing = document.querySelectorAll("#friend-data-wrapper");
      existing && existing.length && existing.forEach((el) => {
        el.remove();
      });
      let cached = sessionGet(`mh-improved-cache-friend-${friendId}`), cachedTimestamp = sessionGet(`mh-improved-cache-friend-${friendId}-timestamp`);
      cached && cachedTimestamp && Date.now() - cachedTimestamp < 15e4 ? makeFriendMarkup(friendId, cached, !0, e) : (makeFriendMarkup(null, null, !0, e), app.pages.FriendsPage.getFriendDataBySnuids([friendId], (data) => {
        !data || !data.length || makeFriendMarkup(friendId, data, !1, e);
      }));
    }), addFriendLinkEventListener = (selector) => {
      let friendLinks = document.querySelectorAll(selector);
      !friendLinks || !friendLinks.length || friendLinks.forEach((friendLink) => {
        if (friendLink.classList.contains("friendsPage-friendRow-image"))
          return;
        let timer;
        friendLink.addEventListener("mouseover", (e) => {
          clearTimeout(timer), timer = setTimeout(() => onFriendLinkHover(e), 200);
        }), friendLink.addEventListener("mouseout", () => {
          clearTimeout(timer);
        });
      });
    }, onTabChangeCallback = (callback, attempts = 0) => {
      let 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) => {
      let inboxBtn = document.querySelector("#hgbar_messages");
      inboxBtn && inboxBtn.addEventListener("click", () => {
        onTabChange(callback);
      });
    }, main15 = () => {
      [
        '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"]',
        '.treasureMapView-scoreboard-table a[href*="https://www.mousehuntgame.com/profile.php"]'
      ].forEach((selector) => {
        addFriendLinkEventListener(selector);
      });
    }, debugPopup = !1, init43 = () => __async(void 0, null, function* () {
      addStyles(styles_default49, "hover-profiles"), debugPopup = getSetting("debug.hover-popups", !1), setTimeout(main15, 500), onRequest("*", () => {
        setTimeout(main15, 1e3);
      }), onInboxOpen(main15);
    }), hover_profiles_default = {
      id: "hover-profiles",
      name: "Hover Profiles",
      type: "feature",
      default: !0,
      description: "Hover over a friend's name in your journal, inbox, or elsewhere and get a mini-profile popup.",
      load: init43
    };
  }
});

// src/modules/image-upscaling/paths-to-skip.json
var paths_to_skip_default, init_paths_to_skip = __esm({
  "src/modules/image-upscaling/paths-to-skip.json"() {
    paths_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/journals.css
var journals_default, init_journals = __esm({
  "src/modules/image-upscaling/journals.css"() {
    journals_default = `.journal.theme_admirals_ship .top{height:43px}.journal.theme_admirals_ship .bottom,.journal.theme_birthday_eight .bottom,.journal.theme_birthday_fifteen .bottom{height:52px}.journal.theme_birthday_fourteen .top{height:43px}.journal.theme_birthday_six .bottom,.journal.theme_ghostship .bottom{height:52px}.journal.theme_halloween_2013 .bottom{height:51px}.journal.theme_halloween_2014 .bottom{height:53px;background-position:0 -1px;background-size:contain}.journal.theme_labyrinth .bottom{height:53px}.journal.theme_lightning_slayer .bottom{height:52px}.journal.theme_living_garden .top{height:25px;background-size:contain}.journal.theme_living_garden .bottom{height:27px}.journal.theme_moussu_picchu .bottom{height:52px}.journal.theme_party_charm .top{margin-bottom:-1px}.journal.theme_regal .bottom{height:44px}.journal.theme_table_of_contents .bottom{height:53px}.journal.theme_western .top{height:25px}.journal.theme_western .bottom,.journal.theme_winter_hunt_2012 .bottom{height:27px}.journal.theme_winter_hunt_2022 .bottom{height:54px}.journal.theme_school_of_sorcery .bottom{height:53px}
`;
  }
});

// src/modules/image-upscaling/styles.css
var styles_default50, init_styles51 = __esm({
  "src/modules/image-upscaling/styles.css"() {
    styles_default50 = `.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,.lunarNewYear2018-claimRow-image .itemImage,.forewordFarmHarvestBin-itemImage.itemImage,.lunarNewYearCampPopup-content-block-image,.superBrieFactoryVendingMachineView-item-imageContainer,.fortRoxHUD-dialog-requiredItem .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.large,.itemView-thumbnail{background-color:transparent}.QuestKingsGiveawayCampHUD__dialogItem .itemImage,.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,.mousoleumHUD-crafting-recipe-result-image,.floatingIslandsHUD .upsellItemActionView-cost-image,.enterPortal .warpathHUD-dialog-image .itemImage,.campPage-trap-armedItem-image{border:none}.notificationMessageList .message img.item{border:none!important}.campPage-trap-armedItem-empty{background:none}.treasureMapDialogView.acknowledge .treasureMapDialogView-highlightItem .itemImage,.greatWinterHuntNewYearsDialogView__itemImage,.convertibleOpenView-item-image{background-size:cover}.marketplaceView-item-image,.itemImage{background-size:100%}.treasureMapOpenChestView-chestImage,.campPage-trap-armedItem.bait .campPage-trap-armedItem-image,.campPage-trap-armedItem-image{background-size:contain}.MHCheckout-featuredItem-image.large{background-size:100px}.campPage-trap-armedItem.skin .campPage-trap-armedItem-empty{color:transparent}.mousehuntHud-userStat .icon{width:28px;height:28px;background-size:100%;border:none;box-shadow:none}.inventoryPage-confirmPopup-itemRow-image .itemImage img{width:80px;height:80px}.treasureMapView-allyCell{padding:5px 2px}.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)}.adventureBookPopup-title-icon{top:5px;width:auto;height:25px}.adventureBookPopup-title.active .adventureBookPopup-title-icon{left:5px}.journal .entry.socialGift,.journal .content .marketplacepurchase,.journal .content .supplytransferitem,.journal .content .toolbarinstalled{background-image:url(https://i.mouse.rip/item_add.png)}.journal .content .marketplacesale,.journal .content .supplytransfergold{background-image:url(https://i.mouse.rip/gold_add.png)}.journal .content .travel{background-image:url(https://i.mouse.rip/travel.png)}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .requirements img{max-width:14px}
`;
  }
});

// src/modules/image-upscaling/views.css
var views_default, 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-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)}.campPage-daily-draw-prize-image{background-image:url(https://i.mouse.rip/upscaled/raffle_ticket.png)}.journal .entry.ronza_chrome_voucher_claim{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/a3be8c11176c289f6c79068cbe813968.png)}
`;
  }
});

// src/modules/image-upscaling/index.js
var ImageUpscaler, init44, image_upscaling_default, init_image_upscaling = __esm({
  "src/modules/image-upscaling/index.js"() {
    init_utils2();
    init_paths_to_skip();
    init_journals();
    init_styles51();
    init_views();
    ImageUpscaler = class {
      /**
       * Create a new ImageUpscaler.
       */
      constructor() {
        this.mapping = [], this.unupscaledImages = /* @__PURE__ */ new Set(), this.upscaledImages = /* @__PURE__ */ new Set(), this.lastCheck = "", this.isUpscaling = !1, this.observerOptions = {
          childList: !0,
          subtree: !0
        }, this.observer = null, this.handleUpscalingImages = this.handleUpscalingImages.bind(this);
      }
      /**
       * Strip the URL of any unnecessary parts.
       *
       * @param {string} url The URL to strip.
       *
       * @return {string} The stripped URL.
       */
      stripUrl(url) {
        let replacements2 = [
          ["//images", "/images"],
          ["https://www.mousehuntgame.com/images/", ""],
          ["cv=1", ""],
          ["cv=2", ""],
          ["cv=3", ""],
          ["cv=4", ""],
          ["cv=5", ""],
          ["asset_cache_version=1", ""],
          ["asset_cache_version=2", ""],
          ["asset_cache_version=3", ""],
          ["asset_cache_version=4", ""],
          ["asset_cache_version=5", ""],
          ["?", ""],
          ["&", ""]
        ];
        return url ? replacements2.reduce((replacedUrl, [from, to]) => replacedUrl.replaceAll(from, to), url) : "";
      }
      /**
       * Get the mapped URL for an image.
       *
       * @param {string} strippedUrl The stripped URL.
       *
       * @return {string} The mapped URL.
       */
      getMappedUrl(strippedUrl) {
        if (!strippedUrl)
          return "";
        let mappedUrl = this.mapping[strippedUrl];
        return mappedUrl ? mappedUrl.includes("https://") ? mappedUrl : (mappedUrl && this.upscaledImages.add(mappedUrl), `https://www.mousehuntgame.com/images/${mappedUrl}`) : "";
      }
      /**
       * Check if the image elements should be skipped.
       *
       * @param {NodeList} items The image elements.
       *
       * @return {boolean} If the update should be skipped.
       */
      shouldSkipUpdate(items5) {
        let itemHash = [...items5].map((item) => item.getAttribute("src") || "").join(","), shouldSkip2 = this.lastCheck === itemHash;
        return this.lastCheck = itemHash, shouldSkip2;
      }
      /**
       * Check if the URL should be skipped.
       *
       * @param {string} url The URL to check.
       *
       * @return {boolean} If the URL should be skipped.
       */
      shouldSkipUrl(url) {
        return this.unupscaledImages.has(url) || // Don't re-upscale images that have already been upscaled.
        this.upscaledImages.has(url) || url.startsWith("https://www.gravatar.com") || // Skip some external images.
        url.startsWith("https://graph.facebook.com") || url.startsWith("https://i.mouse.rip") ? !0 : paths_to_skip_default.some((path) => path.includes("*") ? url.startsWith(path.replace("*", "")) : url === path);
      }
      /**
       * Upscale the image elements.
       */
      upscaleImageElements() {
        let images = document.querySelectorAll("img");
        images && (this.shouldSkipUpdate(images) || images.forEach((image) => {
          let originalUrl = image.getAttribute("src"), strippedUrl = this.stripUrl(originalUrl);
          if (this.shouldSkipUrl(strippedUrl))
            return;
          let mappedUrl = this.getMappedUrl(strippedUrl);
          mappedUrl && originalUrl !== mappedUrl && image.setAttribute("src", mappedUrl);
        }));
      }
      /**
       * Start the observer.
       */
      startObserver() {
        this.observer && this.observer.disconnect(), this.observer = new MutationObserver(() => {
          this.upscaleImageElements();
        }), this.observer.observe(document.body, this.observerOptions);
      }
      /**
       * Upscale the images.
       */
      upscaleImages() {
        return __async(this, null, function* () {
          this.isUpscaling || (this.isUpscaling = !0, yield this.fetchMapping(), this.upscaleImageElements(), this.startObserver(), this.isUpscaling = !1);
        });
      }
      /**
       * Fetch the mapping for the upscaled images.
       */
      fetchMapping() {
        return __async(this, null, function* () {
          this.mapping = yield getData("upscaled-images");
        });
      }
      /**
       * Start the image upscaler observer.
       */
      start() {
        return __async(this, null, function* () {
          this.observer || (this.observer = new MutationObserver((mutations) => __async(this, null, function* () {
            let skipClasses = /* @__PURE__ */ new Set([
              "huntersHornView__timerState",
              "mousehuntHud-gameInfo",
              "campPage-daily-tomorrow-countDown",
              "ticker",
              "mousehuntHeaderView-menu-notification",
              "mousehunt-improved-lgs-reminder-new",
              "mousehunt-improved-lgs-reminder",
              // Select2, search boxes on marketplace and friends list..
              "select2-chosen",
              "select2-offscreen",
              "select2-container",
              "select2-search",
              "select2-drop",
              "marketplaceView-header-searchContainer",
              // Markethunt.
              "highcharts-tracker",
              "highcharts-grid",
              "highcharts-axis",
              "highcharts-axis-labels"
            ]), skipIds = /* @__PURE__ */ new Set([
              "mh-improved-cre",
              "mhhh_flast_message_div"
            ]), skipElements = /* @__PURE__ */ new Set([
              "head",
              "title",
              "optgroup",
              "option"
            ]);
            for (let mutation of mutations)
              if (!((mutation.type === "childList" || mutation.type === "attributes") && (mutation.target.classList && [...mutation.target.classList].some((c) => skipClasses.has(c)) || mutation.target.id && skipIds.has(mutation.target.id) || mutation.target.nodeName && skipElements.has(mutation.target.nodeName.toLowerCase()))))
                try {
                  yield this.upscaleImages(mutation.target);
                } catch (error) {
                  console.error("Failed to upscale images:", error);
                }
          })), this.observer.observe(document, this.observerOptions));
        });
      }
      /**
       * Handle upscaling images.
       */
      handleUpscalingImages() {
        return __async(this, null, function* () {
          try {
            this.observer || (yield this.start()), this.isUpscaling || (yield this.upscaleImages(document.querySelector("body")));
          } catch (error) {
            console.error("Failed to handle upscaling images:", error);
          }
        });
      }
    }, init44 = () => __async(void 0, null, function* () {
      addStyles([styles_default50, views_default], "image-upscaling"), addExternalStyles("https://static.mouse.rip/upscaled-images.css"), imageUpscaler = new ImageUpscaler(), imageUpscaler.handleUpscalingImages(), onRequest("*", imageUpscaler.handleUpscalingImages, !0, [], !0), onEvent("mh-improved-init", imageUpscaler.handleUpscalingImages), onDialogShow("all", imageUpscaler.handleUpscalingImages), getFlag("no-image-upscaling-journal-themes") || (addStyles(journals_default, "image-upscaling-journal"), addExternalStyles("https://static.mouse.rip/upscaled-journal-theme-images.css"));
    }), image_upscaling_default = {
      id: "image-upscaling",
      name: "Image Upscaling & Transparency",
      type: "feature",
      default: !0,
      description: "Updates all images to use higher resolution versions with transparent backgrounds.",
      load: init44
    };
  }
});

// src/modules/inline-wiki/styles.css
var styles_default51, init_styles52 = __esm({
  "src/modules/inline-wiki/styles.css"() {
    styles_default51 = `#wiki-iframe{width:100%;height:100%;min-height:100vh}.mousehuntHud-menu .wiki .external_icon{display:none}
`;
  }
});

// src/modules/inline-wiki/index.js
var openWiki, getLink, wikiListener, addMenuListener, removeMenuListener, clickWiki, listener, main16, init45, inline_wiki_default, init_inline_wiki = __esm({
  "src/modules/inline-wiki/index.js"() {
    init_utils2();
    init_styles52();
    openWiki = () => {
      let iframe = document.createElement("iframe");
      iframe.id = "wiki-iframe", iframe.src = "https://mhwiki.hitgrab.com/wiki/index.php/MouseHunt_Wiki", makePage(iframe);
    }, getLink = () => document.querySelector(".mousehuntHud-menu ul li ul li.wiki a"), wikiListener = (e) => {
      e.preventDefault(), openWiki();
    }, addMenuListener = () => {
      let wikiLink = getLink();
      wikiLink && !listener && (listener = wikiLink.addEventListener("click", wikiListener));
    }, removeMenuListener = () => {
      let wikiLink = getLink();
      wikiLink && listener && (wikiLink.removeEventListener("click", wikiListener), listener = null);
    }, clickWiki = () => {
      let wikiLink = getLink();
      wikiLink && wikiLink.click();
    }, listener = null, main16 = () => {
      addMenuListener(), onEvent("mh-improved-open-wiki", clickWiki);
    }, init45 = () => __async(void 0, null, function* () {
      addStyles(styles_default51, "inline-wiki"), main16(), onActivation("inline-wiki", main16), onDeactivation("inline-wiki", removeMenuListener);
    }), inline_wiki_default = {
      id: "inline-wiki",
      name: "Inline Wiki",
      type: "feature",
      default: !0,
      description: "Clicking 'Wiki' in the menu will load it right in the page, rather than opening a new tab.",
      load: init45
    };
  }
});

// src/modules/inventory-lock-and-hide/styles.css
var styles_default52, init_styles53 = __esm({
  "src/modules/inventory-lock-and-hide/styles.css"() {
    styles_default52 = `.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:3px;margin-left:3px}.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 .locked.message_item.inventoryPage-item.small,.mhui-inventory-lock-and-hide-controls-active .locked.bait.inventoryPage-item.small{pointer-events:auto}.mhui-inventory-lock-and-hide-controls-active .tooltip{display:none;visibility:hidden;opacity:0}.locked .inventoryPage-item-content-action,.locked.message_item.inventoryPage-item.small .inventoryPage-item-button,.locked.bait.inventoryPage-item.small .inventoryPage-item-button,.locked .inventoryPage-item-recipeOptions,.locked .campPage-trap-itemBrowser-item-armButton,.locked .inventoryPage-item-imageContainer-action{pointer-events:none;filter:grayscale(1)}.locked.message_item.inventoryPage-item.small,.locked.bait.inventoryPage-item.small{pointer-events:none}.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:-5px;right:110px;font-size:.75em}span.inventoryPage-tagContent-tagTitle.tsitu-lock-convertible button{padding:2px;font-size:1em}.mhui-inventory-lock-and-hide-hidden-count{margin-left:5px}.mhui-inventory-lock-and-hide-controls-lock{min-width:35px}.mhui-inventory-lock-and-hide-controls-hide{min-width:25px}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.locked.hidden .inventoryPage-item-margin{background-color:#e78932}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.locked .inventoryPage-item-recipeOptions li,.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.hidden .inventoryPage-item-recipeOptions li{opacity:.3}.inventory-lock-and-hide-all-hidden{display:none}
`;
  }
});

// src/modules/inventory-lock-and-hide/index.js
var items3, itemSettings, getType, saveSettings, getSettings2, shouldAddLocks, addControlsToItems, updateGroupTitles, maybeLockOrHideItems, addBulkControls, getCurrentTabContainer, addLockAndHideControls, toggleControls, onSetPage, addHideStyles, hideItemsInTrapBrowser, main17, init46, inventory_lock_and_hide_default, init_inventory_lock_and_hide = __esm({
  "src/modules/inventory-lock-and-hide/index.js"() {
    init_utils2();
    init_styles53();
    itemSettings = {}, getType = (itemsToType) => __async(void 0, null, function* () {
      return items3 || (items3 = yield getData("items")), itemsToType.map((item) => {
        let foundItem = items3.find((i) => i.id === item);
        return foundItem ? foundItem.type : void 0;
      }).filter(Boolean);
    }), saveSettings = (shouldUpdateTitles = !0) => __async(void 0, null, function* () {
      itemSettings.locked = itemSettings.locked.map((i) => Number.parseInt(i, 10)), itemSettings.hidden = itemSettings.hidden.map((i) => Number.parseInt(i, 10)), itemSettings = {
        locked: itemSettings.locked,
        hidden: itemSettings.hidden,
        lockedTypes: yield getType(itemSettings.locked),
        hiddenTypes: yield getType(itemSettings.hidden)
      }, saveSetting("inventory-lock-and-hide.items", itemSettings), shouldUpdateTitles && updateGroupTitles();
    }), getSettings2 = () => getSetting("inventory-lock-and-hide.items", {
      locked: [],
      hidden: [],
      lockedTypes: [],
      hiddenTypes: []
    }), shouldAddLocks = (currentTab) => currentTab !== "collectibles" || currentTab !== "bait", addControlsToItems = () => __async(void 0, null, function* () {
      let itemsEl = document.querySelectorAll(".inventoryPage-item");
      if (!itemsEl)
        return;
      let currentTab = getCurrentTab(), locked = (itemSettings == null ? void 0 : itemSettings.locked) || [], hidden = (itemSettings == null ? void 0 : itemSettings.hidden) || [];
      itemsEl.forEach((item) => {
        let id = item.getAttribute("data-item-id");
        if (id = Number.parseInt(id, 10), !id || item.parentElement.querySelector(".mhui-inventory-lock-and-hide-item-controls"))
          return;
        let isLocked = itemSettings != null && itemSettings.locked ? locked.includes(id) : !1, isHidden2 = itemSettings != null && itemSettings.hidden ? hidden.includes(id) : !1, controls = makeElement("div", "mhui-inventory-lock-and-hide-item-controls");
        if (shouldAddLocks(currentTab)) {
          let lock = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-lock"]), lockText = makeElement("span", "", isLocked ? "Unlock" : "Lock");
          lock.append(lockText);
          let clickLock = (e) => {
            e.preventDefault(), e.stopPropagation(), isLocked ? (itemSettings.locked = itemSettings.locked.filter((i) => i !== id), lockText.innerText = "Lock", isLocked = !1, item.classList.remove("locked")) : (itemSettings.locked.push(id), lockText.innerText = "Unlock", isLocked = !0, item.classList.add("locked")), saveSettings();
          };
          lock.addEventListener("click", clickLock), controls.addEventListener("click", (e) => {
            (e.altKey && e.shiftKey || e.metaKey) && clickLock(e);
          }), controls.append(lock);
        }
        let hide = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-hide"]), hideText = makeElement("span", "", isHidden2 ? "Show" : "Hide");
        hide.append(hideText);
        let clickHide = (e) => {
          e.preventDefault(), e.stopPropagation(), isHidden2 ? (itemSettings.hidden = itemSettings.hidden.filter((i) => i !== id), hideText.innerText = "Hide", isHidden2 = !1, item.classList.remove("hidden")) : (itemSettings.hidden.push(id), hideText.innerText = "Show", isHidden2 = !0, item.classList.add("hidden")), saveSettings();
        };
        hide.addEventListener("click", clickHide), controls.addEventListener("click", (e) => {
          e.preventDefault(), e.stopPropagation(), e.altKey && !e.shiftKey && clickHide(e);
        }), controls.append(hide), item.append(controls);
      });
    }), updateGroupTitles = () => {
      let container = getCurrentTabContainer();
      if (!container)
        return;
      let groups2 = container.querySelectorAll(".inventoryPage-tagContent-tagGroup");
      groups2 && groups2.forEach((group) => {
        let title = group.querySelector(".inventoryPage-tagContent-tagTitle");
        if (!title)
          return;
        let hiddenItems = group.querySelectorAll(".inventoryPage-item.hidden");
        if (!hiddenItems)
          return;
        let existingCount = title.querySelector(".mhui-inventory-lock-and-hide-hidden-count");
        if (existingCount && existingCount.remove(), hiddenItems.length === 0)
          return;
        makeElement("span", "mhui-inventory-lock-and-hide-hidden-count", ` (${hiddenItems.length} hidden)`, title);
        let listings = group.querySelectorAll(".inventoryPage-tagContent-listing .inventoryPage-item");
        listings && listings.length === hiddenItems.length && group.classList.add("inventory-lock-and-hide-all-hidden");
      });
    }, maybeLockOrHideItems = () => __async(void 0, null, function* () {
      var _a, _b, _c, _d;
      let itemsEl = document.querySelectorAll(".inventoryPage-item");
      if (itemsEl) {
        for (let item of itemsEl) {
          let id = item.getAttribute("data-item-id");
          if (id = Number.parseInt(id, 10), !id)
            return;
          ((_a = itemSettings == null ? void 0 : itemSettings.locked) == null ? void 0 : _a.length) > 0 && ((_b = itemSettings == null ? void 0 : itemSettings.locked) != null && _b.includes(id)) && item.classList.add("locked"), ((_c = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _c.length) > 0 && ((_d = itemSettings == null ? void 0 : itemSettings.hidden) != null && _d.includes(id)) && item.classList.add("hidden");
        }
        updateGroupTitles();
      }
    }), addBulkControls = () => {
      if (!shouldAddLocks(getCurrentTab()))
        return;
      let container = getCurrentTabContainer();
      if (!container)
        return;
      let groups2 = container.querySelectorAll(".inventoryPage-tagContent-tagGroup");
      groups2 && groups2.forEach((group) => {
        let title = group.querySelector(".inventoryPage-tagContent-tagTitle");
        if (!title || title.querySelector(".mhui-inventory-lock-and-hide-bulk-controls"))
          return;
        let controls = makeElement("div", "mhui-inventory-lock-and-hide-bulk-controls"), lock = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-lock"]);
        makeElement("span", "", "Lock All", lock), lock.addEventListener("click", (e) => {
          e.preventDefault(), e.stopPropagation();
          let itemsEl = group.querySelectorAll(".inventoryPage-item");
          itemsEl && itemsEl.forEach((item) => {
            let id = Number.parseInt(item.getAttribute("data-item-id"), 10);
            if (id && !itemSettings.locked.includes(id)) {
              itemSettings.locked.push(id), item.classList.add("locked");
              let lockButtonText = item.parentElement.querySelector(".mhui-inventory-lock-and-hide-controls-lock span");
              lockButtonText && (lockButtonText.innerText = "Unlock");
            }
          }), saveSettings(!1);
        }), controls.append(lock);
        let unlock = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-lock"]);
        makeElement("span", "", "Unlock All", unlock), unlock.addEventListener("click", (e) => {
          e.preventDefault(), e.stopPropagation();
          let itemsEl = group.querySelectorAll(".inventoryPage-item");
          itemsEl && itemsEl.forEach((item) => {
            let id = Number.parseInt(item.getAttribute("data-item-id"), 10);
            if (id && itemSettings.locked.includes(id)) {
              itemSettings.locked = itemSettings.locked.filter((i) => i !== id), item.classList.remove("locked");
              let lockButtonText = item.parentElement.querySelector(".mhui-inventory-lock-and-hide-controls-lock span");
              lockButtonText && (lockButtonText.innerText = "Lock");
            }
          }), saveSettings(!1);
        }), controls.append(unlock);
        let hide = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-hide"]);
        makeElement("span", "", "Hide All", hide), hide.addEventListener("click", (e) => {
          e.preventDefault(), e.stopPropagation();
          let itemsEl = group.querySelectorAll(".inventoryPage-item");
          itemsEl && itemsEl.forEach((item) => {
            let id = Number.parseInt(item.getAttribute("data-item-id"), 10);
            if (id && !itemSettings.hidden.includes(id)) {
              itemSettings.hidden.push(id), item.classList.add("hidden");
              let hideButtonText = item.parentElement.querySelector(".mhui-inventory-lock-and-hide-controls-hide span");
              hideButtonText && (hideButtonText.innerText = "Show");
            }
          }), saveSettings(!1);
        }), controls.append(hide);
        let show = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-hide"]);
        makeElement("span", "", "Show All", show), show.addEventListener("click", (e) => {
          e.preventDefault(), e.stopPropagation();
          let itemsEl = group.querySelectorAll(".inventoryPage-item");
          itemsEl && itemsEl.forEach((item) => {
            let id = Number.parseInt(item.getAttribute("data-item-id"), 10);
            if (id && itemSettings.hidden.includes(id)) {
              itemSettings.hidden = itemSettings.hidden.filter((i) => i !== id), item.classList.remove("hidden");
              let hideButtonText = item.parentElement.querySelector(".mhui-inventory-lock-and-hide-controls-hide span");
              hideButtonText && (hideButtonText.innerText = "Hide");
            }
          }), saveSettings(!1);
        }), controls.append(show), title.append(controls);
      });
    }, getCurrentTabContainer = () => {
      let currentTab = getCurrentTab();
      return (!currentTab || currentTab === "inventory") && (currentTab = "cheese"), document.querySelector(`.mousehuntHud-page-tabContent.${currentTab} .mousehuntHud-page-subTabContent.active`);
    }, addLockAndHideControls = () => {
      if (getCurrentPage() !== "inventory")
        return;
      let currentTab = getCurrentTab();
      if ((!currentTab || currentTab === "inventory") && (currentTab = "cheese"), currentTab === "crafting" || currentTab === "plankrun")
        return;
      let container = getCurrentTabContainer();
      if (!container || container.hasAttribute("mh-improved-inventory-lock-and-hide"))
        return;
      container.setAttribute("mh-improved-inventory-lock-and-hide", !0);
      let controlsWrapper = makeElement("div", "mhui-inventory-lock-and-hide-controls-wrapper"), controls = makeElement("div", ["mousehuntActionButton", "tiny", "lightBlue", "mhui-inventory-lock-and-hide-controls"]), text = makeElement("span", "", "Toggle Lock/Hide");
      controls.append(text);
      let isEditing3 = !1;
      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);
    }, toggleControls = () => {
      let button = document.querySelector(".mhui-inventory-lock-and-hide-controls");
      button && button.click();
    }, onSetPage = () => {
      main17(), addEvent("ajax_request", main17, { removeAfterFire: !0, id: "inventory-lock-and-hide" });
    }, addHideStyles = (theItems) => {
      var _a;
      if (!theItems || !theItems.components)
        return;
      let classifications = ["base", "weapon", "bait", "trinket"], tagsToHide = {
        base: [],
        weapon: [],
        bait: [],
        trinket: []
      }, itemsByTags = {
        base: {},
        weapon: {},
        bait: {},
        trinket: {}
      };
      theItems.components.forEach((item) => {
        !item.tag_types || !item.classification || classifications.includes(item.classification) && item.tag_types.forEach((tag) => {
          itemsByTags[item.classification][tag] || (itemsByTags[item.classification][tag] = /* @__PURE__ */ new Set()), itemsByTags[item.classification][tag].add(item.item_id);
        });
      }), classifications.forEach((classification) => {
        Object.keys(itemsByTags[classification]).forEach((tag) => {
          [...itemsByTags[classification][tag]].every((id) => {
            var _a2;
            return (_a2 = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _a2.includes(id);
          }) && tagsToHide[classification].push(tag);
        });
      });
      let hideTagsStyles = classifications.flatMap(
        (classification) => tagsToHide[classification].map((tag) => `.${classification} .campPage-trap-itemBrowser-tagGroup.${tag}`)
      ).join(","), hideItemsStyles = (_a = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _a.map((id) => `.campPage-trap-itemBrowser-items .campPage-trap-itemBrowser-item[data-item-id="${id}"]`).join(",");
      addStyles(`${hideTagsStyles}, ${hideItemsStyles} { display: none; }`, "inventory-lock-and-hide-hide-styles");
    }, hideItemsInTrapBrowser = () => {
      var _a, _b;
      if (itemSettings != null && itemSettings.hidden && ((_a = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _a.length) > 0) {
        let hideItemsStyles = (_b = itemSettings == null ? void 0 : itemSettings.hidden) == null ? void 0 : _b.map((id) => `.campPage-trap-itemBrowser-items .campPage-trap-itemBrowser-item[data-item-id="${id}"]`).join(",");
        addStyles(`${hideItemsStyles} { display: none; }`, "inventory-lock-and-hide-hide-styles");
      }
    }, main17 = () => __async(void 0, null, function* () {
      itemSettings = getSettings2(), items3 = yield getData("items"), maybeLockOrHideItems(), addLockAndHideControls();
    }), init46 = () => __async(void 0, null, function* () {
      addStyles(styles_default52, "inventory-lock-and-hide"), itemSettings = getSettings2(), main17(), onNavigation(onSetPage, {
        page: "inventory",
        anyTab: !0,
        anySubTab: !0
      }), hideItemsInTrapBrowser(), onEvent("mh-improved-toggle-inventory-lock", () => {
        toggleControls(), hideItemsInTrapBrowser();
      }), onRequest("users/gettrapcomponents.php", addHideStyles);
    }), inventory_lock_and_hide_default = {
      id: "inventory-lock-and-hide",
      name: "Inventory - Lock and Hide",
      type: "feature",
      default: !0,
      description: "Lock and hide items in your inventory. Will also hide items in the trap browser.",
      load: init46
    };
  }
});

// src/modules/inventory-only-open-multiple/styles.css
var styles_default53, init_styles54 = __esm({
  "src/modules/inventory-only-open-multiple/styles.css"() {
    styles_default53 = `.inventoryPage-item.convertible .inventoryPage-item-content-action input.button: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],.inventoryPage-item.convertible .inventoryPage-item-content-action input[data-item-action=single]{pointer-events:none;filter:grayscale(1)}.inventoryPage-item.convertible .inventoryPage-item-content-action input.allButOne{pointer-events:all;filter:none}.inventoryPage-item.convertible .inventoryPage-item-content-action input:first-of-type:not(:only-of-type),.inventoryPage-item.convertible .inventoryPage-item-content-action input.allButOne{pointer-events:none}
`;
  }
});

// src/modules/inventory-only-open-multiple/index.js
var init47, inventory_only_open_multiple_default, init_inventory_only_open_multiple = __esm({
  "src/modules/inventory-only-open-multiple/index.js"() {
    init_utils2();
    init_styles54();
    init47 = () => __async(void 0, null, function* () {
      addStyles(styles_default53, "only-open-multiple");
    }), inventory_only_open_multiple_default = {
      id: "only-open-multiple",
      name: "Inventory - Only Open Multiple",
      type: "feature",
      default: !1,
      description: "Lock opening things in your inventory unless you have multiple of them.",
      load: init47
    };
  }
});

// src/modules/inventory-open-all/index.js
var inventory_open_all_default, init_inventory_open_all = __esm({
  "src/modules/inventory-open-all/index.js"() {
    init_utils2();
    inventory_open_all_default = {
      id: "open-all",
      name: "Inventory - Open All",
      type: "feature",
      default: !0,
      description: "Adds an 'Open All' button to convertible items in your inventory",
      load: initOpenButtons
    };
  }
});

// src/modules/inventory-open-all-but-one/index.js
var inventory_open_all_but_one_default, init_inventory_open_all_but_one = __esm({
  "src/modules/inventory-open-all-but-one/index.js"() {
    init_utils2();
    inventory_open_all_but_one_default = {
      id: "open-all-but-one",
      name: "Inventory - Open All but One",
      type: "feature",
      default: !0,
      description: "Adds 'Open All But One' button to convertible items in your inventory.",
      load: initOpenButtons
    };
  }
});

// src/modules/journal-changer/journals.json
var journals_default2, init_journals2 = __esm({
  "src/modules/journal-changer/journals.json"() {
    journals_default2 = [
      {
        type: "theme_bristle_woods_rift",
        environments: [
          "rift_bristle_woods"
        ]
      },
      {
        type: "theme_burroughs_rift",
        environments: [
          "rift_burroughs"
        ]
      },
      {
        type: "theme_fungal",
        environments: [
          "fungal_cavern"
        ]
      },
      {
        type: "theme_labyrinth",
        environments: [
          "labyrinth",
          "ancient_city"
        ]
      },
      {
        type: "theme_living_garden",
        environments: [
          "desert_oasis",
          "lost_city",
          "sand_dunes"
        ]
      },
      {
        type: "theme_western",
        environments: [
          "claw_shot_city"
        ]
      },
      {
        type: "theme_moussu_picchu",
        environments: [
          "moussu_picchu"
        ]
      },
      {
        type: "theme_polluted",
        environments: [
          "pollution_outbreak"
        ]
      },
      {
        type: "theme_queso_canyon",
        environments: [
          "queso_river",
          "queso_plains",
          "queso_quarry",
          "queso_geyser"
        ]
      },
      {
        type: "theme_bountiful_beanstalk",
        environments: [
          "bountiful_beanstalk"
        ]
      },
      {
        type: "theme_table_of_contents",
        environments: [
          "table_of_contents",
          "prologue_pond",
          "foreword_farm"
        ]
      },
      {
        type: "school_of_sorcery",
        environments: [
          "school_of_sorcery"
        ]
      }
    ];
  }
});

// src/modules/journal-changer/settings/index.js
var settings_default23, init_settings24 = __esm({
  "src/modules/journal-changer/settings/index.js"() {
    settings_default23 = () => __async(void 0, null, function* () {
      return [
        {
          id: "journal-changer.change-daily",
          title: "Randomize daily",
          default: !1
        },
        {
          id: "journal-changer.change-location",
          title: "Change based on location",
          default: !1
        }
      ];
    });
  }
});

// src/modules/journal-changer/styles.css
var styles_default54, init_styles55 = __esm({
  "src/modules/journal-changer/styles.css"() {
    styles_default54 = `.journalContainer .top{display:flex;gap:3px;align-items:flex-start;justify-content:flex-end}.journalContainer-selectTheme{position:relative;background-color:#e6e6e6}.mh-improved-random-journal{background-image:url(https://i.mouse.rip/mh-improved/journal-random.png)}#journalContainer .journal__privacy-button{margin-right:85px;background:#e6e6e6;border:1px solid #333}
`;
  }
});

// src/modules/journal-changer/index.js
var themes, getJournalThemes, updateJournalTheme, getCurrentJournalTheme, getJournalThemeForLocation, revertToSavedTheme, changeForLocation, randomizeTheme, addRandomButton, changeJournalDaily, _themeSelector, shouldListen, onThemeSelectorChange, init48, journal_changer_default, init_journal_changer = __esm({
  "src/modules/journal-changer/index.js"() {
    init_utils2();
    init_journals2();
    init_settings24();
    init_styles55();
    themes = [], getJournalThemes = () => __async(void 0, null, function* () {
      let req = yield doRequest("managers/ajax/users/journal_theme.php", {
        action: "get_themes"
      });
      return !req || !req.journal_themes ? [] : req.journal_themes.theme_list.filter((theme) => theme.can_equip === !0);
    }), updateJournalTheme = (theme) => __async(void 0, null, function* () {
      let current = getCurrentJournalTheme();
      if (!theme || current == theme)
        return !1;
      shouldListen = !1;
      let req = yield doRequest("managers/ajax/users/journal_theme.php", {
        action: "set_theme",
        theme
      }, !1, {
        skipLastReadJournalEntryId: !0
      });
      if (req.success) {
        let journal = document.querySelector("#journalContainer");
        journal && (journal.classList.remove(current), journal.classList.add(theme));
      }
      return shouldListen = !0, req;
    }), getCurrentJournalTheme = () => {
      let journal = document.querySelector("#journalContainer");
      return journal ? [...journal.classList].find((cls) => cls.startsWith("theme_")) : !1;
    }, getJournalThemeForLocation = () => {
      let location2 = getCurrentLocation(), journalTheme = journals_default2.find((j) => j.environments.includes(location2));
      return journalTheme ? (themes.some((t) => t.type === journalTheme.type), journalTheme.type) : !1;
    }, revertToSavedTheme = () => {
      let chosenTheme = getSetting("journal-changer.chosen-theme", !1);
      getCurrentJournalTheme() !== chosenTheme && updateJournalTheme(chosenTheme);
    }, changeForLocation = () => __async(void 0, null, function* () {
      if (getCurrentPage() !== "camp")
        return;
      let newTheme = getJournalThemeForLocation();
      if (!newTheme) {
        revertToSavedTheme();
        return;
      }
      themes.length === 0 && (themes = yield getJournalThemes());
      let currentTheme = getCurrentJournalTheme();
      if (!currentTheme || currentTheme === newTheme)
        return;
      if (!themes.some((t) => t.type === newTheme)) {
        revertToSavedTheme();
        return;
      }
      updateJournalTheme(newTheme);
      let journal = document.querySelector("#journalContainer");
      journal && (journal.classList.remove(currentTheme), journal.classList.add(newTheme));
    }), randomizeTheme = (skip = !1) => __async(void 0, null, function* () {
      themes.length === 0 && (themes = yield getJournalThemes()), skip && (themes = themes.filter((t) => t.type !== skip));
      let current = getCurrentJournalTheme();
      current && (themes = themes.filter((t) => t.type !== current));
      let theme = themes[Math.floor(Math.random() * themes.length)];
      return !theme || !theme.type ? !1 : (updateJournalTheme(theme.type), theme.type);
    }), addRandomButton = () => {
      let journal = document.querySelector("#journalContainer .top");
      if (!journal)
        return;
      let button = makeElement("a", ["journalContainer-selectTheme", "mh-improved-random-journal"], "Randomize");
      button.addEventListener("click", randomizeTheme), journal.append(button);
    }, changeJournalDaily = () => __async(void 0, null, function* () {
      if (getCurrentLocation() !== "camp")
        return;
      let lastChangeValue = getSetting("journal-changer.last-change", 0), lastChange = new Date(Number.parseInt(lastChangeValue, 10)), now = /* @__PURE__ */ new Date();
      if (!lastChange || lastChange.getDate() !== now.getDate() || lastChange.getMonth() !== now.getMonth() || lastChange.getFullYear() !== now.getFullYear()) {
        let lastTheme = getSetting("journal-changer.last-theme", !1), theme = yield randomizeTheme(lastTheme);
        saveSetting("journal-changer.last-change", now.getTime()), saveSetting("journal-changer.last-theme", theme);
      }
    }), shouldListen = !0, onThemeSelectorChange = () => {
      _themeSelector || (_themeSelector = hg.views.JournalThemeSelectorView.show, hg.views.JournalThemeSelectorView.show = () => __async(void 0, null, function* () {
        _themeSelector(), onRequest("users/journal_theme.php", (request, data) => {
          data.action === "set_theme" && shouldListen && (saveSetting("journal-changer.last-theme", data.theme), saveSetting("journal-changer.chosen-theme", data.theme));
        });
      }));
    }, init48 = () => __async(void 0, null, function* () {
      addStyles(styles_default54, "journal-changer"), getSetting("journal-changer.change-daily", !1) && changeJournalDaily(), getSetting("journal-changer.change-location", !0) && (changeForLocation(), onEvent("travel_complete", changeForLocation)), onNavigation(addRandomButton, {
        page: "camp"
      }), onThemeSelectorChange();
    }), journal_changer_default = {
      id: "journal-changer",
      name: "Journal Theme Changer",
      type: "feature",
      default: !1,
      description: "Randomize your journal theme, randomize it daily, or change it based on your location.",
      load: init48,
      settings: settings_default23
    };
  }
});

// src/modules/journal-privacy/settings/index.js
var settings_default24, init_settings25 = __esm({
  "src/modules/journal-privacy/settings/index.js"() {
    settings_default24 = () => __async(void 0, null, function* () {
      return [
        {
          id: "journal-privacy.show-toggle-icon",
          title: "Show toggle icon in top menu",
          default: !0
        },
        {
          id: "journal-privacy.transparent",
          title: "Hide text, rather than blur",
          default: !1
        }
      ];
    });
  }
});

// src/modules/journal-privacy/styles/icon.css
var icon_default, init_icon = __esm({
  "src/modules/journal-privacy/styles/icon.css"() {
    icon_default = `.mousehuntHeaderView .menuItem.mousehunt-improved-journal-privacy-icon{display:flex;align-items:center;justify-content:center;width:20px;height:25px;padding:0}.mh-journal-privacy-enabled .mousehunt-improved-journal-privacy-icon:before,.mh-journal-privacy-disabled .mousehunt-improved-journal-privacy-icon:before{display:block;width:15px;height:15px;content:"";background-repeat:no-repeat;background-size:contain;opacity:.5}.mousehuntHeaderView .menuItem.mousehunt-improved-journal-privacy-icon:hover:before{opacity:1}.mh-journal-privacy-enabled .mousehunt-improved-journal-privacy-icon:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path d="M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" /><path fill-rule="evenodd" d="M.664 10.59a1.651 1.651 0 0 1 0-1.186A10.004 10.004 0 0 1 10 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0 1 10 17c-4.257 0-7.893-2.66-9.336-6.41ZM14 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" clip-rule="evenodd" /></svg>')}.mh-journal-privacy-disabled .mousehunt-improved-journal-privacy-icon:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M3.28 2.22a.75.75 0 0 0-1.06 1.06l14.5 14.5a.75.75 0 1 0 1.06-1.06l-1.745-1.745a10.029 10.029 0 0 0 3.3-4.38 1.651 1.651 0 0 0 0-1.185A10.004 10.004 0 0 0 9.999 3a9.956 9.956 0 0 0-4.744 1.194L3.28 2.22ZM7.752 6.69l1.092 1.092a2.5 2.5 0 0 1 3.374 3.373l1.091 1.092a4 4 0 0 0-5.557-5.557Z" clip-rule="evenodd" /><path d="m10.748 13.93 2.523 2.523a9.987 9.987 0 0 1-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 0 1 0-1.186A10.007 10.007 0 0 1 2.839 6.02L6.07 9.252a4 4 0 0 0 4.678 4.678Z" /></svg>')}
`;
  }
});

// src/modules/journal-privacy/styles/styles.css
var styles_default55, init_styles56 = __esm({
  "src/modules/journal-privacy/styles/styles.css"() {
    styles_default55 = `.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"],.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6),.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8),.mh-journal-privacy-enabled #journalContainer .journal__hunter-name,.mh-journal-privacy-enabled .mh-journal-privacy-name{display:inline-block;filter:blur(5px);transition:all .3s}.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) #friend-data-wrapper a[href*="profile.php"]{color:#000}.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"]:hover,.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"]:focus,.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a:hover,.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a:focus,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):hover,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):focus,.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):hover,.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):focus #journalContainer .journal__hunter-name:hover,.mh-journal-privacy-enabled #journalContainer .journal__hunter-name:focus,.mh-journal-privacy-enabled .mh-journal-privacy-name:hover,.mh-journal-privacy-enabled .mh-journal-privacy-name:focus{display:inline;filter:initial}
`;
  }
});

// src/modules/journal-privacy/styles/transparent.css
var transparent_default, init_transparent = __esm({
  "src/modules/journal-privacy/styles/transparent.css"() {
    transparent_default = `.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"],.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6),.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8),.mh-journal-privacy-enabled #journalContainer .journal__hunter-name,.mh-journal-privacy-enabled .mh-journal-privacy-name{display:inline-block;color:transparent;transition:color .3s}.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) #friend-data-wrapper a[href*="profile.php"]{color:#000}.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"]:hover,.mh-journal-privacy-enabled #journalContainer .entry:not(.badge) a[href*="profile.php"]:focus,.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a:hover,.mh-journal-privacy-enabled #journalContainer .entry.socialGift .journaltext a:focus,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):hover,.mh-journal-privacy-enabled #journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):focus,.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):hover,.mh-journal-privacy-enabled #journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):focus #journalContainer .journal__hunter-name:hover,.mh-journal-privacy-enabled #journalContainer .journal__hunter-name:focus,.mh-journal-privacy-enabled .mh-journal-privacy-name:hover,.mh-journal-privacy-enabled .mh-journal-privacy-name:focus{display:inline;color:#3b5998}
`;
  }
});

// src/modules/journal-privacy/index.js
var applyClassToNames, removeClassFromNames, enablePrivacy, disablePrivacy, addIcon2, removeIcon, isPrivacyEnabled, init49, journal_privacy_default, init_journal_privacy = __esm({
  "src/modules/journal-privacy/index.js"() {
    init_utils2();
    init_settings25();
    init_icon();
    init_styles56();
    init_transparent();
    applyClassToNames = () => {
      if (!isPrivacyEnabled)
        return;
      let entries = document.querySelectorAll("#journalContainer .entry.relicHunter_start .journaltext");
      entries && entries.forEach((entry) => {
        if (!entry || !entry.textContent || entry.getAttribute("replaced") === "true")
          return;
        let match = entry.textContent.match(/(.*)( has joined the | has left the | used Rare Map Dust |, the map owner, has )/);
        if (match && match[1]) {
          let span = document.createElement("span");
          span.classList.add("mh-journal-privacy-name"), span.textContent = match[1], entry.setAttribute("data-original", match[1]), entry.setAttribute("replaced", "true"), entry.innerHTML = entry.innerHTML.replace(match[1], span.outerHTML);
        }
      });
    }, removeClassFromNames = () => {
      if (isPrivacyEnabled)
        return;
      let entries = document.querySelectorAll("#journalContainer .entry.relicHunter_start .journaltext");
      entries && entries.forEach((entry) => {
        if (!entry || !entry.textContent || entry.getAttribute("replaced") !== "true")
          return;
        let span = entry.querySelector(".mh-journal-privacy-name");
        span && (entry.innerHTML = entry.innerHTML.replace(span.outerHTML, span.textContent), entry.removeAttribute("replaced"));
      });
    }, enablePrivacy = () => {
      addBodyClass("mh-journal-privacy-enabled", !0), removeBodyClass("mh-journal-privacy-disabled"), applyClassToNames();
    }, disablePrivacy = () => {
      removeBodyClass("mh-journal-privacy-enabled"), addBodyClass("mh-journal-privacy-disabled", !0), removeClassFromNames();
    }, addIcon2 = () => {
      if (!getSetting("journal-privacy.show-toggle-icon", !1))
        return;
      let existingIcon = document.querySelector("#mousehunt-improved-journal-privacy");
      if (existingIcon) {
        existingIcon.style.display = "", existingIcon.style.visibility = "";
        return;
      }
      addIconToMenu({
        id: "mousehunt-improved-journal-privacy",
        classname: "mousehunt-improved-journal-privacy-icon",
        title: "Toggle Journal Privacy",
        position: "prepend",
        /**
         * Toggle the privacy.
         */
        action: () => {
          isPrivacyEnabled = !isPrivacyEnabled, isPrivacyEnabled ? disablePrivacy() : enablePrivacy();
        }
      });
    }, removeIcon = () => {
      if (getSetting("journal-privacy.show-toggle-icon", !1))
        return;
      let icon = document.querySelector("#mousehunt-improved-journal-privacy");
      icon && (icon.style.display = "none", icon.style.visibility = "hidden");
    }, isPrivacyEnabled = !0, init49 = () => __async(void 0, null, function* () {
      addStyles([
        getSetting("journal-privacy.transparent", !1) ? transparent_default : styles_default55,
        icon_default
      ], "journal-privacy"), enablePrivacy(), getSetting("journal-privacy.show-toggle-icon", !1) && (addIcon2(), disablePrivacy()), onRequest("pages/journal.php", applyClassToNames), onActivation(() => {
        addIcon2(), enablePrivacy();
      }), onDeactivation(() => {
        removeIcon(), disablePrivacy();
      }), onSettingsChange("journal-privacy.show-toggle-icon", {
        enable: addIcon2,
        disable: removeIcon
      });
    }), journal_privacy_default = {
      id: "journal-privacy",
      name: "Journal Privacy",
      type: "element-hiding",
      default: !1,
      description: "Hides player names in the journal. Good for screenshots that won't dox them.",
      load: init49,
      settings: settings_default24
    };
  }
});

// src/modules/keyboard-shortcuts/actions.js
var actions_default, init_actions = __esm({
  "src/modules/keyboard-shortcuts/actions.js"() {
    init_utils2();
    actions_default = () => {
      let shortcuts = [
        {
          id: "goto-travel",
          key: "t",
          description: "Travel",
          action: () => setPage("Travel"),
          category: "navigation"
        },
        {
          id: "goto-camp",
          key: "j",
          description: "Camp",
          action: () => setPage("Camp"),
          category: "navigation"
        },
        {
          id: "goto-friends",
          key: "f",
          description: "Friends",
          action: () => setPage("Friends"),
          category: "navigation"
        },
        {
          id: "goto-shops",
          key: "s",
          description: "Shops",
          action: () => setPage("Shops"),
          category: "navigation"
        },
        {
          id: "goto-profile",
          key: "p",
          description: "Your Hunter Profile",
          action: () => setPage("HunterProfile"),
          category: "navigation"
        },
        {
          id: "goto-send-supplies",
          description: "Send Supplies",
          action: () => setPage("SupplyTransfer"),
          category: "navigation"
        },
        {
          id: "goto-scoreboards",
          description: "Scoreboards",
          action: () => setPage("Scoreboards"),
          category: "navigation"
        },
        {
          id: "goto-team",
          description: "Team",
          action: () => setPage("Team"),
          category: "navigation"
        },
        {
          id: "goto-tournaments",
          description: "Tournaments",
          action: () => setPage("Tournament"),
          category: "navigation"
        },
        {
          id: "goto-wiki",
          description: "Wiki",
          action: () => setPage("Wiki"),
          category: "navigation"
        },
        {
          id: "goto-marketplace",
          description: "Open the Marketplace",
          action: () => {
            var _a, _b;
            return ((_b = (_a = hg == null ? void 0 : hg.views) == null ? void 0 : _a.MarketplaceView) == null ? void 0 : _b.show) && hg.views.MarketplaceView.show();
          },
          category: "open-dialog"
        },
        {
          id: "open-inbox",
          description: "Open the Inbox",
          action: () => {
            var _a, _b;
            return ((_b = (_a = messenger == null ? void 0 : messenger.UI) == null ? void 0 : _a.notification) == null ? void 0 : _b.togglePopup) && messenger.UI.notification.togglePopup();
          },
          category: "open-dialog"
        },
        {
          id: "open-gifts",
          description: "Open the Gifts popup",
          action: () => {
            var _a, _b;
            return ((_b = (_a = hg == null ? void 0 : hg.views) == null ? void 0 : _a.GiftSelectorView) == null ? void 0 : _b.show) && hg.views.GiftSelectorView.show();
          },
          category: "open-dialog"
        },
        {
          id: "open-map",
          key: "m",
          description: "Open your Map",
          action: () => {
            var _a, _b;
            return ((_b = (_a = hg == null ? void 0 : hg.controllers) == null ? void 0 : _a.TreasureMapController) == null ? void 0 : _b.show) && hg.controllers.TreasureMapController.show();
          },
          category: "open-dialog"
        },
        {
          id: "open-map-invites",
          key: "i",
          description: "Open your Map Invites",
          action: () => {
            var _a, _b;
            return ((_b = (_a = hg == null ? void 0 : hg.controllers) == null ? void 0 : _a.TreasureMapController) == null ? void 0 : _b.showCommunity) && hg.controllers.TreasureMapController.showCommunity();
          },
          category: "open-dialog"
        },
        {
          id: "open-travel-window",
          description: "Open the Travel Window",
          action: () => doEvent2("mh-improved-open-travel-window"),
          category: "open-dialog"
        },
        {
          id: "change-weapon",
          key: "w",
          description: "Change Weapon",
          action: () => hg.views.TrapSelectorView().show("weapon"),
          category: "trap-setup"
        },
        {
          id: "change-base",
          key: "b",
          description: "Change Base",
          action: () => hg.views.TrapSelectorView().show("base"),
          category: "trap-setup"
        },
        {
          id: "change-charm",
          key: "r",
          description: "Change Charm",
          action: () => hg.views.TrapSelectorView().show("trinket"),
          category: "trap-setup"
        },
        {
          id: "change-cheese",
          key: "c",
          description: "Change Cheese",
          action: () => hg.views.TrapSelectorView().show("bait"),
          category: "trap-setup"
        },
        {
          id: "change-skin",
          description: "Change Trap Skin",
          action: () => hg.views.TrapSelectorView().show("skin"),
          category: "trap-setup"
        },
        {
          id: "show-tem",
          key: "e",
          description: 'Show the <abbr title="Trap Effectiveness Meter">TEM</abbr>',
          /**
           * Show the TEM.
           */
          action: () => {
            let tem = document.querySelector("button.campPage-trap-trapEffectiveness.campPage-trap-statsContainer");
            tem && tem.click();
          },
          category: "trap-setup"
        },
        {
          id: "disarm-cheese",
          description: "Disarm your Cheese",
          action: () => {
            var _a, _b, _c, _d;
            return ((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.TrapControl) == null ? void 0 : _b.disarmBait) && ((_d = (_c = hg == null ? void 0 : hg.utils) == null ? void 0 : _c.TrapControl) == null ? void 0 : _d.go) && hg.utils.TrapControl.disarmBait() && hg.utils.TrapControl.go();
          },
          category: "trap-setup"
        },
        {
          id: "disarm-charm",
          description: "Disarm your Charm",
          action: () => {
            var _a, _b, _c, _d;
            return ((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.TrapControl) == null ? void 0 : _b.disarmBait) && ((_d = (_c = hg == null ? void 0 : hg.utils) == null ? void 0 : _c.TrapControl) == null ? void 0 : _d.go) && hg.utils.TrapControl.disarmBait() && hg.utils.TrapControl.go();
          },
          category: "trap-setup"
        },
        {
          id: "travel-to-previous-location",
          description: "Travel to previous location",
          action: () => doEvent2("mh-improved-goto-previous-location"),
          category: "misc"
        },
        {
          id: "toggle-inventory-lock",
          description: "Toggle Inventory Lock & Hide",
          action: () => doEvent2("mh-improved-toggle-inventory-lock"),
          category: "misc"
        },
        {
          id: "favorite-setups",
          description: "Open Favorite Setups",
          action: () => doEvent2("mh-improved-toggle-favorite-setups"),
          category: "trap-setup"
        }
      ];
      return hasMiniCRE() && shortcuts.push({
        id: "show-mini-cre",
        key: "l",
        description: "Open Mini CRE",
        /**
         * Show the Mini CRE.
         */
        action: () => {
          let minluckButton = document.querySelector(".min-luck-button");
          minluckButton && minluckButton.click();
        },
        category: "misc"
      }), shortcuts;
    };
  }
});

// src/modules/keyboard-shortcuts/styles.css
var styles_default56, init_styles57 = __esm({
  "src/modules/keyboard-shortcuts/styles.css"() {
    styles_default56 = `.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}
`;
  }
});

// src/modules/keyboard-shortcuts/index.js
var getBaseShortcuts, getShortcuts, saveShortcut, getKeyForDisplay, isHelpPopupOpen, showHelpPopup, isEditing2, listenForKeypresses, openFromSettings, init50, keyboard_shortcuts_default, init_keyboard_shortcuts = __esm({
  "src/modules/keyboard-shortcuts/index.js"() {
    init_utils2();
    init_actions();
    init_styles57();
    getBaseShortcuts = () => [
      {
        id: "help",
        key: "?",
        shiftKey: !0,
        description: "Help",
        action: showHelpPopup,
        category: "hidden"
      },
      {
        id: "close-popup",
        key: "Escape",
        description: "Close the current popup",
        /**
         * Close the current popup.
         */
        action: () => {
          activejsDialog && activejsDialog.hide && activejsDialog.hide();
        },
        category: "hidden"
      },
      ...actions_default()
    ], getShortcuts = () => {
      let shortcuts = getBaseShortcuts(), saved = getSetting("keyboard-shortcuts.shortcuts", []);
      return !saved || !saved.length || saved.forEach((savedShortcut) => {
        let shortcut = shortcuts.find((s) => s.id === savedShortcut.id);
        shortcut && (shortcut.key = savedShortcut.key, shortcut.ctrlKey = savedShortcut.ctrlKey, shortcut.metaKey = savedShortcut.metaKey, shortcut.altKey = savedShortcut.altKey, shortcut.shiftKey = savedShortcut.shiftKey);
      }), shortcuts;
    }, saveShortcut = (shortcutId, shortcutKey) => {
      let saved = getSetting("keyboard-shortcuts.shortcuts", []);
      (!saved || !saved.length) && (saved = []);
      let toSave = {
        id: shortcutId,
        key: shortcutKey.key,
        ctrlKey: shortcutKey.ctrlKey,
        metaKey: shortcutKey.metaKey,
        altKey: shortcutKey.altKey,
        shiftKey: shortcutKey.shiftKey
      };
      saved.find((s) => s.id === shortcutId) && (saved = saved.filter((s) => s.id !== shortcutId)), toSave.key !== "Backspace" && toSave.key !== "Delete" && toSave.key !== " " && saved.push(toSave), saveSetting("keyboard-shortcuts.shortcuts", saved);
      let savedElement = document.querySelector(`.mh-ui-keyboard-shortcut[data-shortcut-id="${shortcutId}"]`);
      savedElement && (savedElement.classList.add("saved"), setTimeout(() => {
        savedElement.classList.remove("saved");
      }, 300));
    }, getKeyForDisplay = (keyEvent) => {
      let keyString = "", keysToShow = [];
      switch (keyEvent.metaKey && keysToShow.push(isAppleOS() ? "\u2318" : "\u229E"), keyEvent.ctrlKey && keysToShow.push(isAppleOS() ? "\u2303" : "Ctrl"), keyEvent.altKey && keysToShow.push(isAppleOS() ? "\u2325" : "Alt"), keyEvent.shiftKey && keysToShow.push("Shift"), 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:
          keyEvent.key && keyEvent.key.length === 1 ? keysToShow.push(keyEvent.key.toUpperCase()) : keysToShow.push(keyEvent.key);
          break;
      }
      return keyString = keysToShow.join('<span class="connector"> + </span>'), keyString;
    }, isHelpPopupOpen = () => {
      let overlay = getCurrentDialog();
      return overlay ? overlay === "mh-ui-keyboard-shortcuts-popup" : !1;
    }, showHelpPopup = () => {
      if (activejsDialog && activejsDialog.hide) {
        if (isHelpPopupOpen()) {
          activejsDialog.hide();
          return;
        }
        activejsDialog.hide();
      }
      let shortcuts = getShortcuts(), innerContent = "";
      [
        {
          id: "navigation",
          name: "Page Navigation",
          startOpen: !0
        },
        {
          id: "open-dialog",
          name: "Open Dialogs/Popups",
          startOpen: !0
        },
        {
          id: "trap-setup",
          name: "Modify Trap Setup",
          startOpen: !1
        },
        {
          id: "misc",
          name: "Miscellaneous",
          startOpen: !1
        }
      ].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">`;
        let categoryShortcuts = shortcuts.filter((s) => s.category === category.id);
        categoryShortcuts.sort((a, b) => a.description < b.description ? -1 : a.description > b.description ? 1 : 0), categoryShortcuts.forEach((shortcut) => {
          shortcut.category !== "hidden" && (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>";
      });
      let 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: !0,
        show: !0,
        className: "mh-ui-keyboard-shortcuts-popup"
      });
      let shortcutsWrapper = document.querySelector(".mh-ui-keyboard-shortcuts-popup-content");
      document.querySelectorAll(".mh-ui-keyboard-shortcuts-popup-content-list .mh-ui-keyboard-shortcut").forEach((shortcut) => {
        let shortcutId = shortcut.getAttribute("data-shortcut-id"), editButton = shortcut.querySelector(".edit"), resetButton = shortcut.querySelector(".reset"), clearButton = shortcut.querySelector(".clear"), kbd = shortcut.querySelector("kbd"), startEditing = () => {
          isEditing2 = !0, editButton.innerText = "Cancel", shortcut.classList.add("editing"), shortcutsWrapper.classList.add("editing"), document.addEventListener("keydown", keypressListener);
        }, finishEditing = (id = !1, key = !1) => {
          isEditing2 = !1, editButton.innerText = "Edit", shortcut.classList.remove("editing"), shortcutsWrapper.classList.remove("editing"), document.removeEventListener("keydown", keypressListener), !(!id || !key) && (saveShortcut(id, key), kbd.innerHTML = getKeyForDisplay(key));
        }, keypressListener = (event) => {
          if (["Alt", "Shift", "Control", "Meta"].includes(event.key))
            return;
          let theShortcut = getShortcuts().find((s) => s.key === event.key && event.ctrlKey === (s.ctrlKey || !1) && event.metaKey === (s.metaKey || !1) && event.altKey === (s.altKey || !1) && event.shiftKey === (s.shiftKey || !1));
          if (theShortcut) {
            let 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", () => {
          isEditing2 ? finishEditing() : startEditing();
        }), resetButton.addEventListener("click", () => {
          let defaultShortcut = getBaseShortcuts().find((s) => s.id === shortcutId);
          defaultShortcut && finishEditing(shortcutId, defaultShortcut);
        }), clearButton.addEventListener("click", () => {
          finishEditing(shortcutId, {
            key: "",
            ctrlKey: !1,
            metaKey: !1,
            altKey: !1,
            shiftKey: !1
          });
        });
      });
    }, isEditing2 = !1, listenForKeypresses = () => {
      document.addEventListener("keydown", (event) => {
        var _a, _b;
        if (isHelpPopupOpen() || isEditing2 || user.has_puzzle)
          return;
        let tagName = (_b = (_a = event == null ? void 0 : event.target) == null ? void 0 : _a.tagName) == null ? void 0 : _b.toLowerCase();
        if (tagName === "input" || tagName === "textarea" || tagName === "select")
          return;
        let shortcut = getShortcuts().find((s) => (s.ctrlKey = s.ctrlKey || !1, s.metaKey = s.metaKey || !1, s.altKey = s.altKey || !1, s.shiftKey = s.shiftKey || !1, s.key === event.key && s.ctrlKey === event.ctrlKey && s.metaKey === event.metaKey && s.altKey === event.altKey && s.shiftKey === event.shiftKey));
        shortcut && shortcut.action && (event.preventDefault(), event.stopPropagation(), shortcut.action());
      });
    }, openFromSettings = () => {
      if (getCurrentPage() !== "preferences")
        return;
      let openLink = document.querySelector(".mh-ui-keyboard-shortcuts-edit");
      openLink && openLink.addEventListener("click", (event) => {
        event.preventDefault(), showHelpPopup();
      });
    }, init50 = () => __async(void 0, null, function* () {
      addStyles(styles_default56, "keyboard-shortcuts"), 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: !0,
      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: init50
    };
  }
});

// src/modules/larger-codices/styles.css
var styles_default57, init_styles58 = __esm({
  "src/modules/larger-codices/styles.css"() {
    styles_default57 = `.campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-leftBar,.campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-content{display:block;width:auto}.campPage-trap-itemBrowser-item.codex{position:relative;display:flex;flex-direction:column;align-items:center}.campPage-trap-itemBrowser-item.codex a.campPage-trap-itemBrowser-item-image{width:125px;height:125px}.campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-description{position:absolute;inset:-10px 0 0;padding:15px;overflow-y:scroll;background-color:#fffc;opacity:0;transition:.5s}.campPage-trap-itemBrowser-item.codex:hover .campPage-trap-itemBrowser-item-description{opacity:1}.mh-dark-mode .campPage-trap-itemBrowser-item.codex .campPage-trap-itemBrowser-item-description{background-color:#000c}.codex .campPage-trap-itemBrowser-item-image:after{border:none;box-shadow:none}
`;
  }
});

// src/modules/larger-codices/index.js
var init51, larger_codices_default, init_larger_codices = __esm({
  "src/modules/larger-codices/index.js"() {
    init_utils2();
    init_styles58();
    init51 = () => {
      addStyles(styles_default57, "larger-codices");
    }, larger_codices_default = {
      id: "larger-codices",
      name: "Larger Codices",
      type: "feature",
      default: !0,
      description: "Shows larger images for codices in the trap selector.",
      load: init51
    };
  }
});

// src/modules/larger-skin-images/styles.css
var styles_default58, init_styles59 = __esm({
  "src/modules/larger-skin-images/styles.css"() {
    styles_default58 = `.skin .campPage-trap-itemBrowser-items{top:50px}.skin .campPage-trap-itemBrowser-item-description.shortDescription,.skin .campPage-trap-itemBrowser-item-image{display:none}.skin .campPage-trap-itemBrowser-item-content .campPage-trap-itemBrowser-item-name{margin-top:11px}.trapSelectorView__itemBrowserContainer.skin .campPage-trap-itemBrowser-tagGroup-name{display:none}.trapSelectorView__itemBrowserContainer.skin .campPage-trap-itemBrowser-items{right:5px;left:5px}
`;
  }
});

// src/modules/larger-skin-images/index.js
var skinImages, isAdding2, addSkinImages, triggerFromClick, init52, larger_skin_images_default, init_larger_skin_images = __esm({
  "src/modules/larger-skin-images/index.js"() {
    init_utils2();
    init_styles59();
    skinImages = {}, isAdding2 = !1, addSkinImages = (panel, force = !1) => __async(void 0, null, function* () {
      if (panel !== "item_browser" || isAdding2)
        return;
      isAdding2 = !0;
      let blueprint = document.querySelector(".trapSelectorView__blueprint--active .trapSelectorView__browserStateParent");
      if (!blueprint) {
        isAdding2 = !1;
        return;
      }
      if (!force) {
        let type = blueprint.getAttribute("data-blueprint-type");
        if (!type || type !== "skin") {
          isAdding2 = !1;
          return;
        }
      }
      let items5 = document.querySelectorAll(".campPage-trap-itemBrowser-item.skin");
      if (!items5) {
        isAdding2 = !1;
        return;
      }
      for (let item of items5) {
        let id = item.getAttribute("data-item-id");
        if (!id)
          return;
        let skin;
        if (skinImages[id])
          skin = skinImages[id];
        else {
          let cachedData = yield dbGet("cache", `skin-image-${id}`);
          if (cachedData && cachedData.data && cachedData.data.skin)
            skin = cachedData.data.skin;
          else {
            let itemData = yield fetch(`https://api.mouse.rip/item/${id}`).then((res) => res.json());
            if (!(itemData && itemData.images.trap))
              return;
            skin = itemData.images.trap, dbSet("cache", {
              id: `skin-image-${id}`,
              skin
            });
          }
          skinImages[id] = skin;
        }
        let imageWrapper = makeElement("div", "itembrowser-skin-image-wrapper"), imageEl = makeElement("img", "itembrowser-skin-image");
        imageEl.setAttribute("src", skin), imageEl.setAttribute("data-item-classification", "skin"), imageEl.setAttribute("data-item-id", id), imageWrapper.append(imageEl), item.querySelector(".itembrowser-skin-image-wrapper") || item.insertBefore(imageWrapper, item.firstChild);
      }
      let searchInput = document.querySelector(".campPage-trap-itemBrowser-filter input");
      searchInput && searchInput.addEventListener("keyup", debounce(() => {
        addSkinImages("item_browser", !0);
      }, 300)), isAdding2 = !1;
    }), triggerFromClick = () => {
      let button = document.querySelector(".trapSelectorView__armedItem[data-item-classification=skin]");
      button && button.addEventListener("click", () => {
        addSkinImages("item_browser", !0);
      });
    }, init52 = () => {
      addStyles(styles_default58, "larger-skin-images"), onEvent("camp_page_toggle_blueprint", addSkinImages), onRequest("users/gettrapcomponents.php", (data) => {
        var _a;
        data != null && data.components && ((_a = data == null ? void 0 : data.components[0]) == null ? void 0 : _a.classification) === "skin" && setTimeout(() => {
          addSkinImages("item_browser");
        }, 250);
      }), onRequest("users/changetrap.php", (data) => {
        data.skin && data.skin.length && addSkinImages("item_browser");
      }), onNavigation(triggerFromClick, {
        page: "camp"
      });
    }, larger_skin_images_default = {
      id: "larger-skin-images",
      name: "Larger Skin Images",
      type: "feature",
      default: !0,
      description: "Shows larger images for skins in the trap selector.",
      load: init52
    };
  }
});

// src/modules/legacy-hud/settings/index.js
var settings_default25, init_settings26 = __esm({
  "src/modules/legacy-hud/settings/index.js"() {
    settings_default25 = () => __async(void 0, null, function* () {
      return [
        {
          id: "legacy-hud.menu",
          title: "Enable the legacy menu",
          default: !1
        },
        {
          id: "legacy-hud.stats",
          title: "Enable the legacy stats bar",
          default: !1
        },
        {
          id: "legacy-hud.tweaks",
          title: "Enable tweaks to the legacy HUD",
          default: !0
        }
      ];
    });
  }
});

// src/modules/legacy-hud/styles/styles.css
var styles_default59, init_styles60 = __esm({
  "src/modules/legacy-hud/styles/styles.css"() {
    styles_default59 = `.huntersHornView__timer.huntersHornView__timer.countdown:after{display:none}
`;
  }
});

// src/modules/legacy-hud/styles/menu.css
var menu_default2, init_menu2 = __esm({
  "src/modules/legacy-hud/styles/menu.css"() {
    menu_default2 = `.mousehuntHud-environment,.mousehuntHud-menu .camp,.mousehuntHud-menu .friends .team,.mousehuntHud-menu .friends .tournaments,.mousehuntHud-menu .friends .tournament_scoreboards,.mousehuntHud-menu .team .friend_list,.mousehuntHud-menu .team .hunter_community,.mousehuntHud-menu .team .community_maps,.mousehuntHud-menu .team .free_gifts,.mousehuntHud-menu .team .send_supplies,.mousehuntHud-menu .scoreboards .forum,.mousehuntHud-menu .scoreboards .news,.mousehuntHud-menu .kingdom .wiki,.mousehuntHud-menu .kingdom .guide,.mousehuntHud-menu .kingdom .feedback_friday,.mousehuntHud-menu .kingdom .merch_store,.mh-legacy-mode-remove{display:none}
`;
  }
});

// src/modules/legacy-hud/styles/stats.css
var stats_default2, init_stats2 = __esm({
  "src/modules/legacy-hud/styles/stats.css"() {
    stats_default2 = `.headsup .cheeseped a.baiticon img{height:45px}.headsup .cheeseped a.baiticon{top:-4px;right:2px}span.hud_titlePercentage:after{content:"%"}.mousehuntHud-userStat.bait:hover .value,.mousehuntHud-userStat.trinket:hover .value,.mousehuntHud-userStat.treasureMap:hover .value{margin-top:0}
`;
  }
});

// src/modules/legacy-hud/styles/tweaks.css
var tweaks_default, init_tweaks = __esm({
  "src/modules/legacy-hud/styles/tweaks.css"() {
    tweaks_default = `.hud_titleIcon{width:auto;height:32px;padding:2px;overflow:visible;background-color:#d9c9a0;border-radius:50%;box-shadow:0 0 0 3px #d9c9a0}.headsup .shieldped{width:50px;height:50px;padding:8px 0 0 14px}.headsup .hudstatlist{margin-right:20px}.mousehuntHud-menu.legacy .mice .mousehuntHud-menu-item.root{filter:hue-rotate(174deg)}.mousehuntHud-menu.legacy .shops .mousehuntHud-menu-item.root{filter:hue-rotate(254deg)}.mousehuntHud-menu.legacy .friends .mousehuntHud-menu-item.root{filter:hue-rotate(87deg)}.mousehuntHud-menu.legacy .travel .mousehuntHud-menu-item.root{filter:hue-rotate(57deg)}.mousehuntHud-menu.legacy .inventory .mousehuntHud-menu-item.root{filter:hue-rotate(340deg)}.hudstatlist.legacyFix .mousehuntHud-userStat.trinket .label{width:auto}.headsup .hudstatlist:nth-child(5) ul li:nth-child(1),.headsup .hudstatlist:nth-child(5) ul li:nth-child(2),.headsup .hudstatlist:nth-child(5) ul li:nth-child(3){display:flex;justify-content:space-between;width:150px}.mousehuntHud-marbleDrawer #hudLocationContent{margin-top:0}
`;
  }
});

// src/modules/legacy-hud/index.js
var getMapText, getEquippedStat, getStat, getLegacyHudHtml, replaceMenuBar, replaceStatsBar, getUserShield, init53, legacy_hud_default, init_legacy_hud = __esm({
  "src/modules/legacy-hud/index.js"() {
    init_utils2();
    init_settings26();
    init_styles60();
    init_menu2();
    init_stats2();
    init_tweaks();
    getMapText = () => {
      var _a, _b, _c, _d, _e;
      if ((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.maps) != null && _c.length)
        return user.quests.QuestRelicHunter.label.replace("Treasure Map", "").trim();
      let amount = ((_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestRelicHunter) == null ? void 0 : _e.num_invites) || 0;
      return amount > 1 ? `${amount} invites` : amount === 1 ? `${amount} invite` : "Start new";
    }, getEquippedStat = (type, label, id, name, quantity) => `<li class="mousehuntHud-userStat ${type}" data-item-id="${id}" data-itemId="${id}">
  <span class="hudstatlabel">${label}:</span>
  <span id="hud_${type}" class="hudstatvalue">
    <a href="#" class="label" onclick="hg.utils.PageUtil.setPage('Inventory', {tab:'traps', sub_tab:'${type}'}); return false;">
      ${name}
    </a>
  </span>
  ${quantity ? `<span class="hud_baitQuantity value">${quantity}</span>` : ""}
</li>`, getStat = (type, label, value) => `<li>
  <span class="hudstatlabel">${label}:</span>
  <span class="hud_${type} hudstatvalue">${value}</span>
</li>`, getLegacyHudHtml = () => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
      return `<div id="#legacy-hud" class="headsup">
  <div class="shieldped">
    <div class="titleicon">
      <a href="#" onclick="hg.utils.PageUtil.setPage('Title'); return false;">
        <img src="${user == null ? void 0 : user.title_icon}" width="12" height="14" border="0" class="hud_titleIcon">
      </a>
    </div>
  </div>
  <div id="hud_statList1" class="hudstatlist">
    <ul>
      <li>
        <span class="hudstatlabel">Location:</span>
        <a href="#" class="hudstatvalue hud_location" onclick="hg.utils.PageUtil.setPage('Travel'); return false;">
          ${user == null ? void 0 : user.environment_name}
        </a>
      </li>
      <li>
        <span class="hudstatlabel">Title:</span>
        <span class="hud_title">
          <a href="#" class="hudstatvalue" onclick="hg.utils.PageUtil.setPage('Title'); return false;">
            ${user == null ? void 0 : user.title_name}
          </a>
        </span> (<span class="hud_titlePercentage">${user == null ? void 0 : user.title_percent}</span>)
      </li>
      <li>
        <div class="mousehuntHud-titleProgressBar">
          <span class="dot"></span>
          <div class="wrapper">
            <span class="bar" style="width: ${user == null ? void 0 : user.title_percent}%"></span>
          </div>
        </div>
      </li>
    </ul>
  </div>
  <div id="cheeseped" class="cheeseped">
    <a href="#" class="baiticon" target="_parent" onclick="hg.utils.PageUtil.setPage('Inventory', {tab:'cheese'}); return false;">
      <img id="hud_baitIcon" src="${user == null ? void 0 : user.bait_thumb}" border="0">
    </a>
  </div>
  <div class="hudstatlist legacyFix">
    <ul>
      ${getEquippedStat("base", "Base", user == null ? void 0 : user.base_item_id, user == null ? void 0 : user.base_name)}
      ${getEquippedStat("weapon", "Weapon", user == null ? void 0 : user.weapon_item_id, user == null ? void 0 : user.weapon_name)}
      ${getEquippedStat("trinket", "Charm", user == null ? void 0 : user.trinket_item_id, user == null ? void 0 : user.trinket_name)}
    </ul>
  </div>
  <div class="hudstatlist legacyFix">
    <ul>
      ${getStat("gold", "Gold", user == null ? void 0 : user.gold.toLocaleString())}
      ${getStat("points", "Points", user == null ? void 0 : user.points.toLocaleString())}
      ${getEquippedStat("bait", "Bait", user == null ? void 0 : user.bait_item_id, user == null ? void 0 : user.bait_name, user == null ? void 0 : user.bait_quantity)}
    </ul>
  </div>
  <div class="hudstatlist">
    <ul>
      <li>
        <span class="hudstatlabel">Team:</span>
        <span id="hud_team">
          <a href="https://www.mousehuntgame.com/team.php?team_id=${user == null ? void 0 : user.team.id}" class="hud_team_name hudstatvalue" onclick="app.pages.TeamPage.showUserTeamPage(); return false;">
            ${user == null ? void 0 : user.team.name}
          </a>
          <div class="corkboardUpdate ${user != null && user.team.new_chat ? "active" : ""}"></div>
        </span>
      </li>
      <a class="mousehuntHud-userStat treasureMap ${(_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.maps) != null && _c.length ? "active" : "empty"}" onclick="hg.controllers.TreasureMapController.show();return false;" href="#">
        <div class="icon" style="${(_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestRelicHunter) == null ? void 0 : _e.maps) != null && _f.length ? `background-image: url(${(_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestRelicHunter) == null ? void 0 : _h.image})` : ""}">
          <div class="notification ${(_k = (_j = (_i = user == null ? void 0 : user.quests) == null ? void 0 : _i.QuestRelicHunter) == null ? void 0 : _j.notifications) != null && _k.length ? "active" : ""}">${(_m = (_l = user == null ? void 0 : user.quests) == null ? void 0 : _l.QuestRelicHunter) == null ? void 0 : _m.notifications}</div>
          <div class="corkboardUpdate ${(_o = (_n = user == null ? void 0 : user.quests) == null ? void 0 : _n.QuestRelicHunter) != null && _o.new_chat ? "active" : ""}"></div>
          <div class="miceWarning ${(_q = (_p = user == null ? void 0 : user.quests) == null ? void 0 : _p.QuestRelicHunter) != null && _q.mice_warning ? "active" : ""}"></div>
        </div>
        <span class="label">Treasure Maps</span>
        <span class="value">${getMapText()}</span>
      </a>
    </ul>
  </div>
  <div class="marblebevel"></div>
</div>`;
    }, replaceMenuBar = () => {
      if (!document.querySelector("body"))
        return;
      let mpLink = document.querySelector(".mousehuntHud-marketPlace");
      if (mpLink && !document.querySelector(".mh-legacy-mode-camp-button")) {
        let oldCampButton = makeElement("a", ["mousehuntHud-campButton", "mh-legacy-mode-camp-button"]);
        oldCampButton.href = "https://www.mousehuntgame.com/", oldCampButton.onclick = () => (hg.utils.PageUtil.setPage("Camp"), !1), mpLink.parentNode.insertBefore(oldCampButton, mpLink.nextSibling);
      }
      let menu = document.querySelector(".mousehuntHud-menu");
      menu && (menu.classList.remove("default"), menu.classList.add("legacy"));
      let timer = document.querySelector(".huntersHornView__timer");
      timer && (timer.classList.remove("huntersHornView__timer--default"), timer.classList.add("huntersHornView__timer--legacy"));
      let kingdomMenu = document.querySelector(".mousehuntHud-menu .kingdom"), friendsMenu = document.querySelector(".mousehuntHud-menu .friends");
      if (kingdomMenu && friendsMenu) {
        if (!document.querySelector(".mh-legacy-mode-teams")) {
          let teams = friendsMenu.cloneNode(!0);
          teams.classList.remove("friends"), teams.classList.add("team", "mh-legacy-mode-teams"), kingdomMenu.parentNode.insertBefore(teams, kingdomMenu.nextSibling);
        }
        if (!document.querySelector(".mh-legacy-mode-lore")) {
          let lore = kingdomMenu.cloneNode(!0);
          lore.classList.remove("kingdom"), lore.classList.add("scoreboards", "mh-legacy-mode-lore"), kingdomMenu.parentNode.insertBefore(lore, kingdomMenu.nextSibling);
        }
      }
    }, replaceStatsBar = () => {
      let hudStats = document.querySelector(".headsUpDisplayView-stats");
      if (hudStats && !document.querySelector(".mh-legacy-mode-hud")) {
        let legacyHud = makeElement("div", ["headsup", "mh-legacy-mode-hud"], getLegacyHudHtml());
        hudStats.parentNode.insertBefore(legacyHud, hudStats.nextSibling);
      }
      let oldStats = document.querySelector(".mousehuntHud-userStatBar");
      oldStats && oldStats.remove();
    }, getUserShield = () => {
      let titleImgs = {
        novice: "84bc1109b5cd7aa8c24d195bc8207c38.png",
        recruit: "3f1e44bbaa7138da4c326819e9f3f0a8.png",
        apprentice: "6f4673dd2d9d1e98b4569667d702a775.png",
        initiate: "e96387f7261b95c0eeab9291e4e594e1.png",
        journeyman: "ad6875955f541159133c6d3798519f81.png",
        master: "35ee6056a09037fb13a9195881875045.png",
        grandmaster: "0da3761747914f497c16dc2051ba132d.png",
        legendary: "fca35751046f4bcc972716ca484b6d61.png",
        hero: "0567284d6e12aaaed35ca5912007e070.png",
        knight: "398dca9a8c7703de969769491622ca32.png",
        lord: "9a6acd429a9a3a4849ed13901288b0b8.png",
        baron: "ea9c0ec2e6d3d81c14e61f5ce924d0e1.png",
        count: "dd11711a25b80db90e0306193f2e8d78.png",
        duke: "eb46ac1e8197b13299ab860f07d963db.png",
        grandduke: "87937fa96bbb3b2dd3225df883002642.png",
        archduke: "043efe31de4f0f2e0ddca590fe829032.png",
        viceroy: "e2e79f6f9201a4d4e7a89684fbb5356f.png",
        elder: "0f3cf224bf98457f6b5bad91ab1c7bd2.png",
        sage: "cb49e43c5e4460da7c09fe28ca4f44ce.png",
        fabled: "5daba92a8d609834aa8b789f37544e08.png"
      }, title = getUserTitle();
      return titleImgs[title] || titleImgs.novice;
    }, init53 = () => __async(void 0, null, function* () {
      let stylesToAdd = [], loadMenu = getSetting("legacy-hud.menu", !1), loadStats = getSetting("legacy-hud.stats", !1), loadBoth = loadMenu === loadStats;
      (loadMenu || loadBoth) && (stylesToAdd.push(menu_default2), replaceMenuBar()), (loadStats || loadBoth) && (stylesToAdd.push(stats_default2), replaceStatsBar()), (loadStats || loadMenu || loadBoth) && stylesToAdd.push(styles_default59), getSetting("legacy-hud.tweaks", !0) && stylesToAdd.push(tweaks_default, `.headsup .shieldped { background-image: url(${getUserShield()}); }`), addStyles(stylesToAdd, "legacy-hud");
    }), legacy_hud_default = {
      id: "legacy-hud",
      name: "Legacy HUD & Legacy HUD Tweaks",
      type: "feature",
      default: !1,
      description: "Enable the legacy HUD or tweaks to it.",
      load: init53,
      settings: settings_default25
    };
  }
});

// src/modules/lgs-reminder/settings/index.js
var settings_default26, init_settings27 = __esm({
  "src/modules/lgs-reminder/settings/index.js"() {
    settings_default26 = () => __async(void 0, null, function* () {
      return [
        {
          id: "lgs-reminder.new-style",
          title: 'Use "new" style'
        },
        {
          id: "lgs-reminder.days-and-lower",
          title: "Convert weeks and months to days"
        }
      ];
    });
  }
});

// src/modules/lgs-reminder/styles.css
var styles_default60, init_styles61 = __esm({
  "src/modules/lgs-reminder/styles.css"() {
    styles_default60 = `.mousehunt-improved-lgs-reminder,.default.mhui-custom-shield .mousehunt-improved-lgs-reminder{position:absolute;right:8px;bottom:4px;left:13px;z-index:1;font-size:11px;color:#684434;text-align:center;background-color:#ddcda2d9;border:1px solid #9d9a91;border-radius:5px}.default .mousehunt-improved-lgs-reminder{left:-5px}.default-fancy .mousehunt-improved-lgs-reminder{right:15px}.mousehuntHud-shield.color .mousehunt-improved-lgs-reminder{right:20px;left:0}.mhui-custom-shield .mousehunt-improved-lgs-reminder.exact{font-size:10px}.mousehunt-improved-lgs-reminder-new.lgs-warning,.mousehunt-improved-lgs-reminder.lgs-warning,.default.mhui-custom-shield .mousehunt-improved-lgs-reminder.lgs-warning{background-color:#ffbfbf}.mousehunt-improved-lgs-reminder-new.lgs-danger,.mousehunt-improved-lgs-reminder.lgs-danger,.default.mhui-custom-shield .mousehunt-improved-lgs-reminder.lgs-danger{color:#f1d7d7;background-color:#b32d26;border-color:#af8080;transition:1.75s;animation:mh-improved-fade-slightly 1.75s infinite}@media (prefers-reduced-motion: reduce){.mousehunt-improved-lgs-reminder-new.lgs-danger,.mousehunt-improved-lgs-reminder.lgs-danger,.default.mhui-custom-shield .mousehunt-improved-lgs-reminder-new.lgs-danger{animation:none}}.mousehunt-improved-lgs-reminder-wrapper{position:absolute;right:642px;bottom:0;left:15px;font-size:9px}.mousehunt-improved-lgs-reminder-new{display:flex;align-items:center;justify-content:center;padding:2px 5px;text-align:center;background:linear-gradient(#fff 45%,#f8e7bb 55%);border:1px solid #d4af37;border-bottom:none;border-radius:6px 6px 0 0}.mousehunt-improved-lgs-reminder-new.lgs-warning{background:linear-gradient(#fff,#ffbfbf)}.mousehunt-improved-lgs-reminder-new.lgs-danger{background:#b32d26;border:none}
`;
  }
});

// src/modules/lgs-reminder/index.js
var humanizer, isExact, getShieldEndDateTime, getShieldTime, getShieldTimeFormatted, updateLgsReminder, main18, setOffset, offset, init54, lgs_reminder_default2, init_lgs_reminder2 = __esm({
  "src/modules/lgs-reminder/index.js"() {
    init_utils2();
    init_settings27();
    init_styles61();
    humanizer = setupHumanizer(), isExact = () => getSetting("lgs-reminder.show-seconds"), getShieldEndDateTime = () => {
      let shieldExpiry = user.shield_expiry;
      if (!shieldExpiry)
        return new Date(Date.now() - 60 * 1e3);
      let realExpiry = Date.parse(shieldExpiry) - offset;
      return new Date(realExpiry);
    }, getShieldTime = () => {
      let expiry = getShieldEndDateTime();
      return Math.floor(expiry - /* @__PURE__ */ new Date());
    }, getShieldTimeFormatted = () => {
      let time = getShieldTime();
      if (!time)
        return "";
      let units = ["y", "mo", "w", "d", "h", "m"];
      return getSetting("lgs-reminder.days-and-lower") && (units = ["d", "h", "m"]), isExact() && units.push("s"), humanizer(time, {
        round: !0,
        units,
        spacer: " ",
        delimiter: " "
      });
    }, updateLgsReminder = (el) => {
      let time = getShieldTime();
      time <= 60 * 60 * 24 * 2 && el.classList.add("lgs-warning"), time <= 60 * 60 && el.classList.add("lgs-danger"), el.innerText = getShieldTimeFormatted();
    }, main18 = () => {
      startingTime = getShieldTime();
      let shieldEl = document.querySelector(".mousehuntHud-shield.golden");
      if (!shieldEl)
        return;
      let newStyle = getSetting("lgs-reminder.new-style", !1), wrapper, reminder;
      newStyle ? (wrapper = makeElement("div", "mousehunt-improved-lgs-reminder-wrapper"), reminder = makeElement("div", "mousehunt-improved-lgs-reminder-new")) : reminder = makeElement("div", "mousehunt-improved-lgs-reminder"), isExact() && reminder.classList.add("exact");
      let endDate = getShieldEndDateTime().toLocaleDateString("en-US", {
        weekday: "long",
        year: "numeric",
        month: "long",
        day: "numeric",
        hour: "numeric",
        minute: "numeric",
        second: "numeric"
      });
      if (reminder.title = `LGS Expires on ${endDate} (${getShieldTimeFormatted()} remaining)`, newStyle) {
        let existing = document.querySelector(".mousehunt-improved-lgs-reminder-wrapper");
        existing && existing.remove(), wrapper.append(reminder), shieldEl.after(wrapper);
      } else {
        let existing = document.querySelector(".mousehunt-improved-lgs-reminder");
        existing && existing.remove(), shieldEl.append(reminder);
      }
      updateLgsReminder(reminder), document.addEventListener("horn-countdown-tick-minute", () => updateLgsReminder(reminder));
    }, setOffset = () => {
      let userShieldExpiry = new Date(Date.parse(user.shield_expiry)), userShieldSeconds = new Date((/* @__PURE__ */ new Date()).setSeconds((/* @__PURE__ */ new Date()).getSeconds() + user.shield_seconds)), difference = userShieldExpiry - userShieldSeconds;
      offset = Math.round(difference / 1e3) * 1e3;
    }, init54 = () => __async(void 0, null, function* () {
      user.has_shield && (setOffset(), addStyles(styles_default60, "lgs-reminder"), main18(), onSettingsChange("lgs-reminder.new-style", () => {
        [
          ".mousehunt-improved-lgs-reminder",
          ".mousehunt-improved-lgs-reminder-new",
          ".mousehunt-improved-lgs-reminder-wrapper"
        ].forEach((selector) => {
          let el = document.querySelector(selector);
          el && el.remove();
        }), main18();
      }), onActivation("lgs-reminder", main18), onDeactivation("lgs-reminder", () => {
        let reminder = document.querySelector(".mousehunt-improved-lgs-reminder");
        reminder && reminder.remove();
      }));
    }), lgs_reminder_default2 = {
      id: "lgs-reminder",
      name: `${getSetting("experiments.new-settings-styles-columns", !1) ? "LGS" : "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: !1,
      load: init54,
      settings: settings_default26
    };
  }
});

// src/modules/links/index.js
var addHelpLinks, init55, links_default, init_links2 = __esm({
  "src/modules/links/index.js"() {
    init_utils2();
    addHelpLinks = () => {
      let supportDropdown = document.querySelector(".menuItem.dropdown.support .dropdownContent");
      if (!supportDropdown)
        return;
      [
        {
          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."
        }
      ].forEach((helpLink) => {
        let 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"), link.setAttribute("rel", "noopener noreferrer"), supportDropdown.append(link);
      });
    }, init55 = () => __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: !0
      });
    }), links_default = {
      id: "links",
      type: "required",
      alwaysLoad: !0,
      load: init55
    };
  }
});

// src/modules/location-catch-stats/styles.css
var styles_default61, init_styles62 = __esm({
  "src/modules/location-catch-stats/styles.css"() {
    styles_default61 = `#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}
`;
  }
});

// src/modules/location-catch-stats/index.js
var getMouseStats, buildMouseMarkup, showModal, init56, location_catch_stats_default, init_location_catch_stats = __esm({
  "src/modules/location-catch-stats/index.js"() {
    init_utils2();
    init_styles62();
    getMouseStats = () => __async(void 0, null, function* () {
      var _a, _b;
      let 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"
      }), mouseData = (_b = (_a = data == null ? void 0 : data.mouse_list_category) == null ? void 0 : _a.subgroups[0]) == null ? void 0 : _b.mice;
      return mouseData ? (mouseData.sort((a, b) => b.num_catches - a.num_catches), mouseData != null ? mouseData : []) : [];
    }), buildMouseMarkup = (mouseData) => {
      let mouse = Object.assign({}, {
        name: "",
        type: "",
        image: "",
        crown: "none",
        num_catches: 0
      }, mouseData), mouseEl = document.createElement("a");
      mouseEl.classList.add("mh-catch-stats"), mouseEl.title = mouse.name, mouseEl.addEventListener("click", () => {
        var _a, _b;
        ((_b = (_a = hg == null ? void 0 : hg.views) == null ? void 0 : _a.MouseView) == null ? void 0 : _b.show) !== "undefined" && hg.views.MouseView.show(mouse.type);
      });
      let image = document.createElement("div");
      if (image.classList.add("mh-catch-stats-image"), image.style.backgroundImage = `url('${mouse.image}')`, mouse.crown && mouse.crown !== "none") {
        let 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);
      }
      let name = document.createElement("div");
      name.classList.add("mh-catch-stats-name"), name.innerText = mouse.name;
      let imageNameContainer = document.createElement("div");
      imageNameContainer.append(image), imageNameContainer.append(name);
      let catches = document.createElement("div");
      return catches.classList.add("mh-catch-stats-catches"), catches.innerText = mouse.num_catches, mouseEl.append(imageNameContainer), mouseEl.append(catches), mouseEl;
    }, showModal = () => __async(void 0, null, function* () {
      let existing = document.querySelector("#mh-catch-stats");
      existing && existing.remove();
      let modalWrapper = document.createElement("div");
      modalWrapper.id = "mh-catch-stats";
      let modal = document.createElement("div");
      modal.classList.add("mh-catch-stats-wrapper");
      let header = document.createElement("div");
      header.classList.add("mh-catch-stats-header");
      let title = document.createElement("h1");
      title.innerText = "Location Catch Stats", header.append(title);
      let 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");
      let 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);
      let mouseBody = document.createElement("div");
      mouseBody.classList.add("mh-catch-stats-body"), (yield getMouseStats()).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");
    }), init56 = () => __async(void 0, null, function* () {
      addStyles(styles_default61, "location-catch-stats"), 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: !0,
      description: 'Adds a "Location Catch Stats" to the Mice menu to see your catch stats for the current location.',
      load: init56
    };
  }
});

// src/modules/location-dashboard/styles.css
var styles_default62, init_styles63 = __esm({
  "src/modules/location-dashboard/styles.css"() {
    styles_default62 = `.mousehuntHeaderView-gameTabs .menuItem.chat,.mousehuntHeaderView-gameTabs .community{display:none}.mousehuntHeaderView .dashboard .dropdownContent{width:420px;border-radius:0}.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);background-position-x:354px;background-size:354px}.dashboard-fi-tiles .glass,.dashboard-fi-tiles .gem_bonus{background-position-x:0}.dashboard-fi-tiles .ore,.dashboard-fi-tiles .ore_bonus{background-position-x:6.6%}.dashboard-fi-tiles .curd,.dashboard-fi-tiles .sky_cheese{background-position-x:13.3%}.dashboard-fi-tiles .pirate,.dashboard-fi-tiles .sky_pirates{background-position-x:20%}.dashboard-fi-tiles .key,.dashboard-fi-tiles .loot_cache{background-position-x:26.6%}.dashboard-fi-tiles .warden-wind,.dashboard-fi-tiles .wind_shrine{background-position-x:33.3%}.dashboard-fi-tiles .warden-rain,.dashboard-fi-tiles .rain_shrine{background-position-x:40%}.dashboard-fi-tiles .warden-frost,.dashboard-fi-tiles .frost_shrine{background-position-x:46.6%}.dashboard-fi-tiles .warden-fog,.dashboard-fi-tiles .fog_shrine{background-position-x:53.3%}.dashboard-fi-tiles .sprocket,.dashboard-fi-tiles .paragon_cache_a{background-position-x:60%}.dashboard-fi-tiles .bangle,.dashboard-fi-tiles .paragon_cache_d{background-position-x:66.6%}.dashboard-fi-tiles .wing,.dashboard-fi-tiles .paragon_cache_c{background-position-x:73.3%}.dashboard-fi-tiles .silk,.dashboard-fi-tiles .paragon_cache_b{background-position-x:80%}.dashboard-fi-tiles .glore,.dashboard-fi-tiles .ore_gem_bonus{background-position-x:86.6%}.dashboard-fi-tiles .seal,.dashboard-fi-tiles .cloudstone_bonus{background-position-x:93.3%}.dashboard-fi-tiles .jade,.dashboard-fi-tiles .charm_bonus{background-position-x:100%}.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}.location-refresh-item.traveling .locationName .progress:after{position:absolute;top:0;right:100%;bottom:0;width:100%;content:"";background:#f3c019;animation:mh-improved-right-to-left 1s linear forwards}@media (prefers-reduced-motion: reduce){.location-refresh-item.traveling .locationName .progress:after{animation:none}}.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}.dashboard-fi-tiles{vertical-align:middle}.dashboard-fi-wrap{display:flex;flex-direction:row;gap:5px;justify-content:flex-end;margin-bottom:-5px}.dashboard-bb-wrap .tile{display:inline-block;width:20px;height:20px;color:transparent;background-image:url(https://www.mousehuntgame.com/images/ui/hud/bountiful_beanstalk/chevrons.png);background-size:100%}.dashboard-bb-wrap .tile.standard{background-position-y:0%}.dashboard-bb-wrap .tile.super{background-position-y:34%}.dashboard-bb-wrap .tile.extreme{background-position-y:67%}.dashboard-bb-wrap .tile.ultimate{background-position-y:100%}.dashboard-bb-wrap.room-name{display:flex;gap:5px;align-items:center;justify-content:flex-end}.dashboard-bb-wrap.embellishments .tile{display:inline-block;width:20px;height:20px;color:transparent}.dashboard-bb-wrap.embellishments .tile.golden_key{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/d855937c33e0fc0db25fbdf1aea70aa2.png)}.dashboard-bb-wrap.embellishments .tile.golden_feather{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/654d4e0c8308c3ab0ee99d32503bf82a.png)}.dashboard-bb-wrap.embellishments .tile.ruby_remover{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/6753553ca41cb4754fba0ebf7600378b.png)}.locationImageWrapper:hover,.locationName:hover{text-decoration:underline;cursor:pointer}
`;
  }
});

// src/modules/location-dashboard/locations/desert-warpath.js
var getFieryWarpathText, setFieryWarpathData, init_desert_warpath = __esm({
  "src/modules/location-dashboard/locations/desert-warpath.js"() {
    init_utils2();
    getFieryWarpathText = (quests) => {
      var _a, _b, _c, _d;
      if (!quests.QuestFieryWarpath)
        return "";
      let 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
      }, streakText = "";
      return quest.streak !== 0 && (streakText = ` \xB7 ${quest.streak} streak`), quest.wave === "portal" ? `Portal: ${Math.max(0, quest.remaining - 1)} guards remaining ` : `Wave ${quest.wave}: ${100 - quest.percent}% remaining${streakText} `;
    }, setFieryWarpathData = () => {
      if (getCurrentLocation() !== "desert_warpath")
        return !1;
      let wave = 0, streak = "No Streak", remaining2 = 0, percent = 0, waveEl = document.querySelector(".warpathHUD.showPortal");
      waveEl && (wave = [...waveEl.classList].find((className) => className.startsWith("wave")).replace("wave", "").replace("_", ""));
      let streakEl = document.querySelector(".warpathHUD-streakBoundingBox");
      streakEl && (streak = Number.parseInt(streakEl.innerText.replaceAll(`
`, " ").replace(" 0", "").trim()) || 0);
      let remainingEl = document.querySelectorAll(`.warpathHUD-wave.wave_${wave} .warpathHUD-wave-mouse-population`);
      remainingEl.length && (remaining2 = [...remainingEl].reduce((sum, el) => (el.innerText && (sum += Number.parseInt(el.innerText)), sum), 0));
      let percentEl = document.querySelector(".warpathHUD-moraleBar span");
      if (percentEl) {
        let style = percentEl.getAttribute("style");
        style && (percent = Number.parseInt(style.replace("width:", "").replace("%;", "")));
      }
      return {
        wave,
        streak,
        remaining: remaining2,
        percent
      };
    };
  }
});

// src/modules/location-dashboard/locations/seasonal-garden.js
var getSeasonalGardenText, setSeasonalGardenData, init_seasonal_garden = __esm({
  "src/modules/location-dashboard/locations/seasonal-garden.js"() {
    getSeasonalGardenText = (quests) => {
      var _a, _b;
      if (!quests.QuestSeasonalGarden)
        return "";
      let amp = ((_a = quests.QuestSeasonalGarden) == null ? void 0 : _a.amp) || 0, max = ((_b = quests.QuestSeasonalGarden) == null ? void 0 : _b.max) || 0;
      return amp === 0 && max === 0 ? "Amp: 0%" : `Amp: ${amp}% / ${max}%`;
    }, setSeasonalGardenData = () => {
      let quest = {
        amp: 0,
        max: 0
      }, amp = document.querySelector(".seasonalGardenHUD-currentAmplifier-value");
      amp && (quest.amp = Number.parseInt(amp.textContent, 10));
      let max = document.querySelector(".seasonalGardenHUD-maxAmplifier-value");
      return max && (quest.max = Number.parseInt(max.textContent, 10)), quest;
    };
  }
});

// src/modules/location-dashboard/locations/zugzwang-tower.js
var getChessProgress, getZugzwangTowerText, setZugzwangTowerData, init_zugzwang_tower = __esm({
  "src/modules/location-dashboard/locations/zugzwang-tower.js"() {
    getChessProgress = (pieces) => pieces <= 8 ? "Pawns" : pieces <= 10 ? "Knights" : pieces <= 12 ? "Bishops" : pieces <= 14 ? "Rooks" : pieces <= 15 ? "Queen" : "King", getZugzwangTowerText = (quests) => {
      if (!quests.QuestZugzwangTower)
        return "";
      let returnText = `${quests.QuestZugzwangTower.amp || 0}%`, techProgress = quests.QuestZugzwangTower.tech_progress || 0, mythProgress = quests.QuestZugzwangTower.myth_progress || 0;
      return techProgress >= 16 && mythProgress >= 16 ? `${returnText} Amp, Chessmaster` : `${returnText} Amp, Technic: ${getChessProgress(techProgress)}, Mystic: ${getChessProgress(mythProgress)}`;
    }, setZugzwangTowerData = () => {
      let ampEl = document.querySelector(".zuzwangsTowerHUD-currentAmplifier span"), amp = ampEl ? Number.parseInt(ampEl.innerText, 10) : 0, techProgressEl = document.querySelectorAll(".zuzwangsTowerHUD-progress.tech img"), techProgress = techProgressEl ? techProgressEl.length : 0, mythProgressEl = document.querySelectorAll(".zuzwangsTowerHUD-progress.magic img"), mythProgress = mythProgressEl ? mythProgressEl.length : 0;
      return {
        amp,
        techProgress,
        mythProgress
      };
    };
  }
});

// src/modules/location-dashboard/locations/bountiful-beanstalk.js
var bountiful_beanstalk_default2, init_bountiful_beanstalk2 = __esm({
  "src/modules/location-dashboard/locations/bountiful-beanstalk.js"() {
    bountiful_beanstalk_default2 = (quests) => {
      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;
      if (!quests.QuestBountifulBeanstalk)
        return "";
      if (!((_a = quests == null ? void 0 : quests.QuestBountifulBeanstalk) != null && _a.in_castle)) {
        let room = ((_d = (_c = (_b = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _b.beanstalk) == null ? void 0 : _c.current_zone) == null ? void 0 : _d.name) || "", huntsRemaining2 = ((_f = (_e = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _e.beanstalk) == null ? void 0 : _f.hunts_remaining_text) || "", isBoss2 = ((_h = (_g = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _g.beanstalk) == null ? void 0 : _h.is_boss_encounter) || !1;
        return `${room} (Beanstalk) <div class="stats">${isBoss2 ? "At Boss \xB7 " : ""}${huntsRemaining2}</div>`;
      }
      let huntsRemaining = ((_j = (_i = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _i.castle) == null ? void 0 : _j.hunts_remaining_text) || "", isBoss = ((_l = (_k = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _k.castle) == null ? void 0 : _l.is_boss_encounter) || !1, isChase = ((_n = (_m = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _m.castle) == null ? void 0 : _n.is_boss_chase) || !1, noise = ((_p = (_o = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _o.castle) == null ? void 0 : _p.noise_level) || 0, maxNoise = ((_r = (_q = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _q.castle) == null ? void 0 : _r.max_noise_level) || 0, roomQuality = (_u = (_t = (_s = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _s.castle) == null ? void 0 : _t.current_room) == null ? void 0 : _u.type.replace("_room", "").split("_").pop().trim(), roomName = (_x = (_w = (_v = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _v.castle) == null ? void 0 : _w.current_room) == null ? void 0 : _x.name.replace(" Room", "").replace(`${roomQuality.charAt(0).toUpperCase() + roomQuality.slice(1).toLowerCase()} `, "").trim(), noiseString = isBoss ? "Boss" : isChase ? "Chase" : `\u266A ${noise.toLocaleString()}/${maxNoise.toLocaleString()}`, embellishmentsText = (_y = quests == null ? void 0 : quests.QuestBountifulBeanstalk) == null ? void 0 : _y.embellishments.filter((item) => item.is_active).map((item) => `<span class="tile ${item.type}"></span>`), returnText = '<div class="dashboard-bb">';
      return returnText += `<div class="dashboard-bb-wrap room-name"><span class="tile ${roomQuality}"></span><div class="name">${roomName}</div>`, returnText += `<div class="dashboard-bb-wrap embellishments">${embellishmentsText.join("")}</div>`, returnText += "</div>", returnText += `<div class="stats">${noiseString} \xB7 ${huntsRemaining}</div>`, returnText;
    };
  }
});

// src/modules/location-dashboard/locations/rift-bristle-woods.js
var rift_bristle_woods_default, init_rift_bristle_woods = __esm({
  "src/modules/location-dashboard/locations/rift-bristle-woods.js"() {
    rift_bristle_woods_default = (quests) => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i;
      if (!quests.QuestRiftBristleWoods)
        return "";
      let quest = {
        progress_goal: ((_a = quests.QuestRiftBristleWoods) == null ? void 0 : _a.progress_goal) || null,
        progress_remaining: ((_b = quests.QuestRiftBristleWoods) == null ? void 0 : _b.progress_remaining) || null,
        chamber_name: ((_c = quests.QuestRiftBristleWoods) == null ? void 0 : _c.chamber_name) || null,
        chamber_type: ((_d = quests.QuestRiftBristleWoods) == null ? void 0 : _d.chamber_type) || null,
        obelisk_percent: ((_e = quests.QuestRiftBristleWoods) == null ? void 0 : _e.obelisk_percent) || null,
        aco_sand: ((_f = quests.QuestRiftBristleWoods) == null ? void 0 : _f.acolyte_sand) || 0,
        time_sand: ((_i = (_h = (_g = quests.QuestRiftBristleWoods) == null ? void 0 : _g.items) == null ? void 0 : _h.rift_hourglass_sand_stat_item) == null ? void 0 : _i.quantity) || 0
      };
      return quest.chamber_type === "acolyte_chamber" ? `Acolyte chamber: ${quest.obelisk_percent}% charged<div class="stats">${quest.aco_sand} Acolyte sand \xB7 ${quest.time_sand} time sand</div>` : `${quest.chamber_name} \xB7 ${quest.progress_goal - quest.progress_remaining} / ${quest.progress_goal} loot`;
    };
  }
});

// src/modules/location-dashboard/locations/rift-burroughs.js
var rift_burroughs_default, init_rift_burroughs = __esm({
  "src/modules/location-dashboard/locations/rift-burroughs.js"() {
    rift_burroughs_default = (quests) => {
      var _a;
      return quests.QuestRiftBurroughs ? `Mist: ${((_a = quests.QuestRiftBurroughs) == null ? void 0 : _a.mist_released) || 0} / 20` : "";
    };
  }
});

// src/modules/location-dashboard/locations/floating-islands.js
var floating_islands_default2, init_floating_islands2 = __esm({
  "src/modules/location-dashboard/locations/floating-islands.js"() {
    floating_islands_default2 = (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 "";
      let powerTypes = {
        arcn: "Arcane",
        frgttn: "Forgotten",
        hdr: "Hydro",
        shdw: "Shadow",
        drcnc: "Draconic",
        law: "Law",
        phscl: "Physical",
        tctcl: "Tactical",
        launch_pad_island: "Launch Pad"
      }, 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) || !1,
        isSp: ((_j = (_i = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _i.hunting_site_atts) == null ? void 0 : _j.is_vault_island) || !1,
        isLai: !1,
        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
      };
      if (quest.isLai = !quest.isHai && !quest.isSp, quest.island_power_type === "launch_pad_island")
        return `Launch Pad \xB7 <p>${quest.wardens_caught} wardens caught`;
      let type = "LAI";
      quest.isHai ? type = "HAI" : quest.isSp && (type = "SP");
      let tileText = "";
      quest.island_mod_panels.forEach((panel) => {
        let panelType = panel.type.toLowerCase().replaceAll("loot_cache", "key").replaceAll("charm_bonus", "J"), complete = panel.is_complete ? "complete" : "incomplete";
        tileText += `<span class="tile ${panelType} ${complete}">${panelType}</span>`;
      });
      let powerType = powerTypes[quest.island_power_type], returnText = '<div class="dashboard-fi-wrap">';
      if (returnText += `<div class='dashboard-fi-tiles'>${tileText}</div>`, returnText += `<div class='dashboard-fi-type'>${powerType} ${type}</div>`, returnText += "</div>", quest.isLai)
        returnText += `<div class="stats">${quest.hunts_remaining} hunts remaining \xB7 ${quest.wardens_caught} wardens caught</div>`;
      else
        return returnText += ` \xB7 ${quest.hunts_remaining} hunts remaining`;
      return returnText;
    };
  }
});

// src/modules/location-dashboard/locations/foreword-farm.js
var foreword_farm_default, init_foreword_farm = __esm({
  "src/modules/location-dashboard/locations/foreword-farm.js"() {
    foreword_farm_default = (quests) => {
      if (!quests.QuestForewordFarm)
        return "";
      let plants = {
        empty: 0,
        ordinary_farm_plant: 0,
        legendary_farm_plant: 0,
        twisted_legendary_magic_farm_plant: 0
      };
      if (quests.QuestForewordFarm.plots.forEach((plot) => {
        let name = plot.is_growing ? plot.plant.type : "empty";
        plants[name] += 1;
      }), plants.empty === 3)
        return "No plants growing";
      let returnText = "";
      return plants.ordinary_farm_plant > 0 && (returnText += `${plants.ordinary_farm_plant} Mulch, `), plants.legendary_farm_plant > 0 && (returnText += `${plants.legendary_farm_plant} Papyrus, `), plants.twisted_legendary_magic_farm_plant > 0 && (returnText += `${plants.twisted_legendary_magic_farm_plant} Twisted Papyrus, `), returnText = returnText.slice(0, -2), `Growing ${returnText}`;
    };
  }
});

// src/modules/location-dashboard/locations/fort-rox.js
var fort_rox_default, init_fort_rox = __esm({
  "src/modules/location-dashboard/locations/fort-rox.js"() {
    fort_rox_default = (quests) => {
      if (!quests.QuestFortRox)
        return "";
      let 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 || !1
      }, phase = "Day", phases = {
        stage_none: "Day",
        stage_one: "Twilight",
        stage_two: "Midnight",
        stage_three: "Pitch",
        stage_four: "Utter Darkness",
        stage_five: "First Light"
      };
      return quests.is_lair ? "In Lair" : (phase = quest.is_dawn ? "Dawn" : phases[quest.stage], `${phase}: ${quest.hp}/${quest.max_hp} HP`);
    };
  }
});

// src/modules/location-dashboard/locations/rift-furoma.js
var rift_furoma_default, init_rift_furoma = __esm({
  "src/modules/location-dashboard/locations/rift-furoma.js"() {
    rift_furoma_default = (quests) => {
      if (!quests.QuestRiftFuroma)
        return "";
      let q = quests.QuestRiftFuroma, map = {
        one: 1,
        two: 2,
        three: 3,
        four: 4,
        five: 5,
        six: 6,
        seven: 7,
        eight: 8,
        nine: 9,
        ten: 10
      };
      if ((q.view_state.includes("pagoda") ? "inside" : "outside") === "inside") {
        let droidLevel = map[q.droid.charge_level.split("_")[2]], batteryPercent = Math.floor(q.batteries[q.droid.charge_level].percent);
        return `Pagoda \xB7 Battery ${droidLevel} (${batteryPercent}%)<div class="stats">${q.droid.remaining_energy} Enerchi</div>`;
      }
      return `Outside \xB7 Battery ${Object.keys(q.batteries).filter((battery) => q.batteries[battery].status.includes("unlocked")).reduce((highest, battery) => {
        let batteryLevel = map[battery.split("_")[2]];
        return batteryLevel > highest ? batteryLevel : highest;
      }, 0)}<div class="stats">${q.items.combat_energy_stat_item.quantity} Enerchi</div>`;
    };
  }
});

// src/modules/location-dashboard/locations/iceberg.js
var iceberg_default2, init_iceberg2 = __esm({
  "src/modules/location-dashboard/locations/iceberg.js"() {
    iceberg_default2 = (quests) => {
      if (!quests.QuestIceberg)
        return "";
      let quest = quests.QuestIceberg;
      return `${quest.current_phase || "Iceberg"}: ${quest.user_progress || 0} ft.<div class="stats">Hunt #${quest.turns_taken || 0}</div>`;
    };
  }
});

// src/modules/location-dashboard/locations/labyrinth.js
var labyrinth_default3, init_labyrinth3 = __esm({
  "src/modules/location-dashboard/locations/labyrinth.js"() {
    labyrinth_default3 = (quests) => {
      var _a, _b, _c;
      if (!quests.QuestLabyrinth)
        return "";
      let 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
      }, clueText = "";
      if (quest.clues) {
        let clueTexts = [];
        quest.clues.forEach((clue) => {
          let clueName = clue.name.replace("Farming", "Farm").replace("Dead End", "DEC");
          clueTexts.push(`${clue.quantity} ${clueName}`);
        }), clueTexts.length > 0 && (clueText = `: ${clueTexts.join(", ")} clues`);
      }
      let hallwayName = quest.hallway_name.replace(" Hallway", "");
      return `${quest.status === "intersection" ? "Intersection" : hallwayName}${clueText}`;
    };
  }
});

// src/modules/location-dashboard/locations/desert-oasis.js
var desert_oasis_default, init_desert_oasis = __esm({
  "src/modules/location-dashboard/locations/desert-oasis.js"() {
    desert_oasis_default = (quests) => {
      var _a, _b;
      if (!quests.QuestLivingGarden)
        return "";
      let quest = quests.QuestLivingGarden, twistedText = quest.is_normal ? "Not twisted" : "Twisted";
      return ((_a = quest == null ? void 0 : quest.minigame) == null ? void 0 : _a.vials_state) === "dumped" && ((_b = quest == null ? void 0 : quest.minigame) != null && _b.timer) ? `${twistedText} \xB7 Pouring${quest != null && quest.minigame.timer ? ` for ${quest == null ? void 0 : quest.minigame.timer} hunts` : ""}` : `${twistedText}`;
    };
  }
});

// src/modules/location-dashboard/locations/lost-city.js
var lost_city_default, init_lost_city = __esm({
  "src/modules/location-dashboard/locations/lost-city.js"() {
    lost_city_default = (quests) => {
      var _a, _b;
      if (!quests.QuestLostCity)
        return "";
      let quest = quests.QuestLostCity, twistedText = quest.is_normal ? "Not twisted" : "Twisted";
      if (!((_a = quest == null ? void 0 : quest.minigame) != null && _a.is_cursed))
        return `${twistedText} \xB7 Not cursed`;
      let cursesText = ((_b = quest == null ? void 0 : quest.minigame) == null ? void 0 : _b.curses).map((curse) => curse.name).join(", ").replaceAll("!", "").replace(/,([^,]*)$/, "$1");
      return `${twistedText} \xB7 Cursed with ${cursesText}`;
    };
  }
});

// src/modules/location-dashboard/locations/mousoleum.js
var mousoleum_default2, init_mousoleum2 = __esm({
  "src/modules/location-dashboard/locations/mousoleum.js"() {
    mousoleum_default2 = (quests) => {
      if (!quests.QuestMousoleum)
        return "";
      let quest = quests.QuestMousoleum;
      return quest != null && quest.has_wall ? `Wall \xB7 ${(quest == null ? void 0 : quest.wall_health) || 0}/${(quest == null ? void 0 : quest.max_wall_health) || 0} HP` : `No Wall \xB7 ${(quest == null ? void 0 : quest.wall_materials) || 0} planks`;
    };
  }
});

// src/modules/location-dashboard/locations/moussu-picchu.js
var moussu_picchu_default, init_moussu_picchu = __esm({
  "src/modules/location-dashboard/locations/moussu-picchu.js"() {
    init_utils2();
    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 "";
      let 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
      };
      return quest.rainPercent === 100 && quest.windPercent === 100 ? "Max Storm \xB7 Wind (100%) \xB7 Rain (100%)" : `${uppercaseFirstLetter(quest.windLevel)} Wind (${quest.windPercent}%) \xB7 ${uppercaseFirstLetter(quest.rainLevel)} \xB7 Rain (${quest.rainPercent}%)`;
    };
  }
});

// src/modules/location-dashboard/locations/queso-geyser.js
var queso_geyser_default, init_queso_geyser = __esm({
  "src/modules/location-dashboard/locations/queso-geyser.js"() {
    queso_geyser_default = (quests) => {
      if (!quests.QuestQuesoGeyser)
        return "";
      let quest = quests.QuestQuesoGeyser;
      return `${(quest == null ? void 0 : quest.state_name) || "Cork Gathering"}: ${(quest == null ? void 0 : quest.hunts_remaining) || 0} hunts remaining`;
    };
  }
});

// src/modules/location-dashboard/locations/sand-dunes.js
var sand_dunes_default, init_sand_dunes = __esm({
  "src/modules/location-dashboard/locations/sand-dunes.js"() {
    sand_dunes_default = (quests) => {
      var _a, _b;
      if (!quests.QuestSandDunes)
        return "";
      let quest = quests.QuestSandDunes, twistedText = quest.is_normal ? "Not twisted" : "Twisted";
      return quest != null && quest.is_normal ? `${twistedText} \xB7 ${(_a = quest == null ? void 0 : quest.minigame) != null && _a.has_stampede ? "Stampeding" : "Not stampeding"}` : `${twistedText} \xB7 ${((_b = quest == null ? void 0 : quest.minigame) == null ? void 0 : _b.salt_charms_used) || 0} salt`;
    };
  }
});

// src/modules/location-dashboard/locations/sunken-city.js
var sunken_city_default, init_sunken_city = __esm({
  "src/modules/location-dashboard/locations/sunken-city.js"() {
    sunken_city_default = (quests) => {
      var _a;
      if (!quests.QuestSunkenCity)
        return "";
      let quest = quests.QuestSunkenCity, oxygen = ((_a = quest == null ? void 0 : quest.items) == null ? void 0 : _a.oxygen_stat_item) || 0;
      if (!(quest != null && quest.is_diving))
        return `Docked (${quest != null && quest.can_dive ? "can dive" : "cannot dive"}), ${oxygen} O\u2082`;
      let zone = (quest == null ? void 0 : quest.zone_name) || "", depth = (quest == null ? void 0 : quest.distance) || 0;
      return `${zone}, ${depth}m, ${oxygen} O\u2082`;
    };
  }
});

// src/modules/location-dashboard/locations/table-of-contents.js
var table_of_contents_default, init_table_of_contents = __esm({
  "src/modules/location-dashboard/locations/table-of-contents.js"() {
    table_of_contents_default = (quests) => {
      if (!quests.QuestTableOfContents)
        return "";
      let q = quests.QuestTableOfContents;
      return q != null && q.is_writing ? `Writing: ${(q == null ? void 0 : q.current_book.name) || ""} (${(q == null ? void 0 : q.current_book.percent) || 0}%) <div class="stats">${(q == null ? void 0 : q.current_book.word_count_formatted) || 0} words \xB7 ${(q == null ? void 0 : q.current_book.hunts_remaining) || 0} hunts remaining</div>` : "Not writing";
    };
  }
});

// src/modules/location-dashboard/locations/pollution-outbreak.js
var pollution_outbreak_default, init_pollution_outbreak = __esm({
  "src/modules/location-dashboard/locations/pollution-outbreak.js"() {
    pollution_outbreak_default = (quests) => {
      var _a, _b, _c, _d, _e, _f, _g;
      if (!quests.QuestPollutionOutbreak)
        return "";
      let crude = ((_c = (_b = (_a = quests.QuestPollutionOutbreak) == null ? void 0 : _a.items) == null ? void 0 : _b.crude_pollutinum_stat_item) == null ? void 0 : _c.quantity) || 0, refined = ((_f = (_e = (_d = quests.QuestPollutionOutbreak) == null ? void 0 : _d.items) == null ? void 0 : _e.refined_pollutinum_stat_item) == null ? void 0 : _f.quantity) || 0, max = ((_g = quests.QuestPollutionOutbreak) == null ? void 0 : _g.max_pollutinum) || 0;
      return `${crude.toLocaleString()}/${max} Pollutinum<div class="stats">${refined.toLocaleString()} Refined Pollutinum</div>`;
    };
  }
});

// src/modules/location-dashboard/locations/rift-valour.js
var rift_valour_default, init_rift_valour = __esm({
  "src/modules/location-dashboard/locations/rift-valour.js"() {
    rift_valour_default = (quests) => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
      if (!quests.QuestRiftValour)
        return "";
      let 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,
        uu: ((_o = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _o.is_eclipse_mode) || !1
      }, text = "";
      return text = quest.floor === 0 ? "Outside" : `Floor ${quest.floor} (${quest.floor_name}) \xB7 ${quest.hunts_remaining} hunts remaining`, `<div>${quest.uu ? "Ultimate Umbra" : ""}</div> ${text} <div class="stats">Speed ${quest.speed} \xB7 Sync ${quest.sync} \xB7 Siphon ${quest.siphon}</div>`;
    };
  }
});

// src/modules/location-dashboard/locations/whisker-woods-rift.js
var whisker_woods_rift_default, init_whisker_woods_rift = __esm({
  "src/modules/location-dashboard/locations/whisker-woods-rift.js"() {
    whisker_woods_rift_default = (quests) => {
      var _a, _b, _c;
      if (!(quests.QuestRiftWhiskerWoods && quests.QuestRiftWhiskerWoods.zones))
        return "";
      let zones = quests.QuestRiftWhiskerWoods.zones || {};
      return `Rage: ${((_a = zones == null ? void 0 : zones.clearing) == null ? void 0 : _a.level) || 0} / ${((_b = zones == null ? void 0 : zones.lagoon) == null ? void 0 : _b.level) || 0} / ${((_c = zones == null ? void 0 : zones.tree) == null ? void 0 : _c.level) || 0}`;
    };
  }
});

// src/modules/location-dashboard/locations/ancient-city.js
var ancient_city_default, init_ancient_city = __esm({
  "src/modules/location-dashboard/locations/ancient-city.js"() {
    ancient_city_default = (quests) => {
      var _a, _b;
      if (!quests.QuestAncientCity)
        return "";
      let 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
      };
      return !quest.district_name || !quest.remaining ? "" : `${quest.district_name.replace("The ", "")}, ${quest.remaining} stealth`;
    };
  }
});

// src/modules/location-dashboard/index.js
var cacheLocationData, waitForTravel, disarmBait, doLocationRefresh, makeDashboardTab, makeRegionMarkup, makeLocationMarkup, getDashboardContents, environments4, init57, location_dashboard_default, init_location_dashboard = __esm({
  "src/modules/location-dashboard/index.js"() {
    init_utils2();
    init_utils2();
    init_styles63();
    init_desert_warpath();
    init_seasonal_garden();
    init_zugzwang_tower();
    init_bountiful_beanstalk2();
    init_rift_bristle_woods();
    init_rift_burroughs();
    init_floating_islands2();
    init_foreword_farm();
    init_fort_rox();
    init_rift_furoma();
    init_iceberg2();
    init_labyrinth3();
    init_desert_oasis();
    init_lost_city();
    init_mousoleum2();
    init_moussu_picchu();
    init_queso_geyser();
    init_sand_dunes();
    init_sunken_city();
    init_table_of_contents();
    init_pollution_outbreak();
    init_rift_valour();
    init_whisker_woods_rift();
    init_ancient_city();
    cacheLocationData = () => __async(void 0, null, function* () {
      if (!user.environment_type || !user.quests)
        return;
      if (user.environment_type === "desert_warpath") {
        let fwQuestData = setFieryWarpathData();
        fwQuestData && (user.quests.QuestFieryWarpath = fwQuestData);
      } else if (user.environment_type === "zugzwang_tower") {
        let ztQuestData = setZugzwangTowerData();
        ztQuestData && (user.quests.QuestZugzwangTower = ztQuestData);
      } else if (user.environment_type === "seasonal_garden") {
        let sgQuestData = setSeasonalGardenData();
        sgQuestData && (user.quests.QuestSeasonalGarden = sgQuestData);
      }
      let questsCached = yield cacheGet("quests", {}), questsCombined = Object.assign({}, questsCached, user.quests);
      user.environment_type === "labyrinth" ? questsCombined.QuestAncientCity = {} : user.environment_type === "ancient_city" ? questsCombined.QuestLabyrinth = {} : user.environment_type === "zugzwang_tower" ? questsCombined.QuestSeasonalGarden = {} : user.environment_type === "seasonal_garden" && (questsCombined.QuestZugzwangTower = {});
      try {
        cacheSet("quests", questsCombined);
      } catch (error) {
        debug("Error saving location data to localStorage:", error);
      }
    }), 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}.`);
      });
    }), disarmBait = () => __async(void 0, null, function* () {
      return new Promise((resolve) => {
        hg.utils.TrapControl.disarmBait().go(() => {
          resolve();
        }, () => {
          reject();
        });
      });
    }), doLocationRefresh = () => __async(void 0, null, function* () {
      sessionSet("doing-location-refresh", !0);
      let locationProgress = [], environmentsToUse = /* @__PURE__ */ new Set([
        "ancient_city",
        "bountiful_beanstalk",
        "desert_warpath",
        "floating_islands",
        "foreword_farm",
        "fort_rox",
        "iceberg",
        "labyrinth",
        "desert_oasis",
        "lost_city",
        "mousoleum",
        "moussu_picchu",
        "pollution_outbreak",
        "queso_geyser",
        "rift_bristle_woods",
        "rift_burroughs",
        "rift_furoma",
        "rift_valour",
        "rift_whisker_woods",
        "sand_dunes",
        "seasonal_garden",
        "sunken_city",
        "table_of_contents",
        "zugzwang_tower"
      ]), environmentsToTravel = environments4.filter((env) => environmentsToUse.has(env.id) && isUserTitleAtLeast(env.title));
      debug(`Environments to travel: ${environmentsToTravel.map((env) => env.name).join(", ")}`), environmentsToTravel.sort((a, b) => 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.`);
      });
      let 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: !1,
        show: !0
      }), originalLocation = user.environment_type;
      debug(`Original location: ${user.environment_type}.`);
      let equippedBait = user.bait_item_id || "disarmed";
      debug(`Equipped bait: ${equippedBait}.`), yield disarmBait();
      for (let location2 of locationProgress) {
        if (originalLocation === location2)
          continue;
        let locationData = environments4.find((env) => env.id === location2);
        if (!locationData)
          continue;
        debug(`Traveling to ${locationData.name}.`);
        let progressItem = document.querySelector(`.location-refresh-item[data-environment-type="${location2}"]`);
        progressItem && (progressItem.classList.add("traveling"), yield waitForTravel(location2), 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();
      let dashboardMenu = document.querySelector(".mousehuntHeaderView .menuItem.dropdown.dashboard");
      if (dashboardMenu) {
        dashboardMenu.classList.add("expanded");
        let existing = document.querySelector(".dashboardContents");
        if (existing) {
          let refreshedContents = yield getDashboardContents();
          existing.replaceWith(refreshedContents);
        }
        let wrapper = document.querySelector(".dashboardWrapper");
        wrapper && (wrapper.scrollTop = 0);
      }
      sessionSet("doing-location-refresh", !1), doEvent2("travel_complete");
    }), makeDashboardTab = () => {
      let tabsContainer = document.querySelector(".mousehuntHeaderView-dropdownContainer");
      if (!tabsContainer)
        return;
      let menuTab = document.createElement("div");
      menuTab.classList.add("menuItem"), menuTab.classList.add("dropdown"), menuTab.classList.add("dashboard"), menuTab.addEventListener("click", () => __async(void 0, null, function* () {
        menuTab.classList.toggle("expanded");
        let existing = document.querySelector(".dashboardContents");
        if (existing) {
          let refreshedContents = yield getDashboardContents();
          existing.replaceWith(refreshedContents);
        }
        sessionSet("doing-location-refresh", !1);
      })), makeElement("span", "", "Dashboard", menuTab), makeElement("div", "arrow", "", menuTab);
      let dropdownContent = makeElement("div", "dropdownContent"), dashboardWrapper = makeElement("div", "dashboardWrapper");
      makeElement("div", "dashboardContents", "", dashboardWrapper);
      let refreshWrapper = makeElement("div", "refreshWrapper"), refreshButton = makeElement("button", ["mousehuntActionButton", "dashboardRefresh"]);
      makeElement("span", "", "Refresh", refreshButton), refreshButton.addEventListener("click", () => {
        let 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>Start Traveling</span></div>
        </div>
      </div>
    </div>`,
          className: "mh-improved-location-refresh-confirm-popup",
          hasCloseButton: !1,
          show: !0
        }), cancelButton = document.querySelector(".mh-improved-location-refresh-confirm-popup-button-cancel");
        cancelButton && cancelButton.addEventListener("click", () => {
          confirmPopup.hide();
        });
        let confirmButton = document.querySelector(".mh-improved-location-refresh-confirm-popup-button-confirm");
        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) => {
      if (!childContent.firstChild)
        return;
      let regionWrapper = makeElement("div", "regionWrapper");
      makeElement("div", "regionName", name, regionWrapper), regionWrapper.append(childContent), appendTo.append(regionWrapper);
    }, makeLocationMarkup = (id, name, progress, appendTo, quests) => {
      let markup = progress(quests);
      if (!markup)
        return;
      let locationWrapper = makeElement("div", "locationWrapper");
      locationWrapper.setAttribute("data-location", id), locationWrapper.classList.add(`locationWrapper-${id}`);
      let locationImageWrapper = makeElement("div", "locationImageWrapper"), environment = environments4.find((env) => env.id === id);
      if (environment.image) {
        let locationImage = makeElement("img", "locationImage");
        locationImage.setAttribute("src", environment.image), locationImageWrapper.append(locationImage);
      }
      locationImageWrapper.addEventListener("click", () => __async(void 0, null, function* () {
        travelTo(environment.id);
      })), locationWrapper.append(locationImageWrapper);
      let nameEl = makeElement("div", "locationName", name);
      nameEl.addEventListener("click", () => __async(void 0, null, function* () {
        travelTo(environment.id);
      })), locationWrapper.append(nameEl), makeElement("div", "locationProgress", markup, locationWrapper), appendTo.append(locationWrapper);
    }, getDashboardContents = () => __async(void 0, null, function* () {
      let quests = yield cacheGet("quests", {});
      debuglog("location-dashboard", "quests", quests);
      let contentsWrapper = document.createElement("div");
      contentsWrapper.classList.add("dashboardContents");
      let burroughs = document.createElement("div");
      makeLocationMarkup("mousoleum", "Mousoleum", mousoleum_default2, burroughs, quests), makeLocationMarkup("pollution_outbreak", "Toxic Spill", pollution_outbreak_default, burroughs, quests), makeRegionMarkup("Burroughs", burroughs, contentsWrapper);
      let varmintValley = document.createElement("div");
      makeLocationMarkup("fort_rox", "Fort Rox", fort_rox_default, varmintValley, quests), makeRegionMarkup("Varmint Valley", varmintValley, contentsWrapper);
      let sandtailDesert = document.createElement("div");
      makeLocationMarkup("desert_warpath", "Fiery Warpath", getFieryWarpathText, sandtailDesert, quests), makeLocationMarkup("desert_oasis", "Living Garden", desert_oasis_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);
      let 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_default2, rodentia, quests), makeLocationMarkup("sunken_city", "Sunken City", sunken_city_default, rodentia, quests), makeRegionMarkup("Rodentia", rodentia, contentsWrapper);
      let quesoCanyon = document.createElement("div");
      makeLocationMarkup("queso_geyser", "Queso Geyser", queso_geyser_default, quesoCanyon, quests), makeRegionMarkup("Queso Canyon", quesoCanyon, contentsWrapper);
      let hollowHeights = document.createElement("div");
      makeLocationMarkup("labyrinth", "Labyrinth", labyrinth_default3, hollowHeights, quests), makeLocationMarkup("ancient_city", "Zokor", ancient_city_default, hollowHeights, quests), makeLocationMarkup("moussu_picchu", "Moussu Picchu", moussu_picchu_default, hollowHeights, quests), makeLocationMarkup("floating_islands", "Floating Islands", floating_islands_default2, hollowHeights, quests), makeRegionMarkup("Hollow Heights", hollowHeights, contentsWrapper);
      let folkloreForest = document.createElement("div");
      makeLocationMarkup("bountiful_beanstalk", "Bountiful Beanstalk", bountiful_beanstalk_default2, folkloreForest, quests), 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);
      let rift = document.createElement("div");
      if (makeLocationMarkup("rift_burroughs", "Burroughs Rift", rift_burroughs_default, rift, quests), makeLocationMarkup("rift_whisker_woods", "Whisker Woods Rift", whisker_woods_rift_default, rift, quests), makeLocationMarkup("rift_furoma", "Furoma Rift", rift_furoma_default, rift, quests), makeLocationMarkup("rift_bristle_woods", "Bristle Woods Rift", rift_bristle_woods_default, rift, quests), makeLocationMarkup("rift_valour", "Valour Rift", rift_valour_default, rift, quests), makeRegionMarkup("Rift", rift, contentsWrapper), 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) {
        let noLocation = makeElement("div", "noLocationDataWrapper");
        makeElement("div", "noLocationData", "No location data found. Refresh data to populate the dashboard.", noLocation), contentsWrapper.append(noLocation);
      }
      return contentsWrapper;
    }), environments4 = [], init57 = () => __async(void 0, null, function* () {
      addStyles(styles_default62, "location-dashboard"), environments4 = yield getData("environments"), sessionSet("doing-location-refresh", !1), cacheLocationData(), onEvent("travel_complete", cacheLocationData), onRequest("*", cacheLocationData), makeDashboardTab();
    }), location_dashboard_default = {
      id: "location-dashboard",
      name: "Location Dashboard",
      type: "feature",
      default: !0,
      description: "See location HUD information in a dashboard available in the top dropdown menu.",
      load: init57
    };
  }
});

// src/modules/location-huds/toggle-icon.js
var getCurrentLocationForSettings, getIconSettings, toggle_icon_default, init_toggle_icon = __esm({
  "src/modules/location-huds/toggle-icon.js"() {
    init_utils2();
    getCurrentLocationForSettings = () => __async(void 0, null, function* () {
      let currentLocation = getCurrentLocation();
      return (yield getData("environments-events")).find((event) => event.id === currentLocation) ? "event-locations" : currentLocation;
    }), getIconSettings = () => __async(void 0, null, function* () {
      let key = yield getCurrentLocationForSettings();
      key = `location-huds-enabled.${key}`;
      let value = getSetting(key, !0);
      return {
        id: "mousehunt-improved-location-huds",
        classname: "mousehunt-improved-location-huds-icon",
        text: value ? "Disable HUD" : "Enable HUD",
        position: "prepend",
        /**
         * The action to perform when the icon is clicked.
         *
         * @param {Event}   e    The event object.
         * @param {Element} icon The icon element.
         */
        action: (e, icon) => {
          value = getSetting(key, !0), saveSetting(key, !value), value ? (icon.textContent = "Enable HUD", icon.classList.add("disabled"), icon.classList.remove("enabled")) : (icon.textContent = "Disable HUD", icon.classList.remove("disabled"), icon.classList.add("enabled")), window.location.reload();
        }
      };
    }), toggle_icon_default = () => __async(void 0, null, function* () {
      addIconToMenu(yield getIconSettings());
    });
  }
});

// src/modules/location-huds/settings.js
var settings_default27, init_settings28 = __esm({
  "src/modules/location-huds/settings.js"() {
    init_utils2();
    settings_default27 = () => __async(void 0, null, function* () {
      let 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",
        "training_grounds",
        "zugzwang_library"
      ]), locationsToAdd = [
        {
          name: "Region: Living Garden",
          id: "region-living-garden"
        },
        {
          name: "Region: Queso Canyon",
          id: "region-queso"
        },
        {
          name: "Event Locations",
          id: "event-locations"
        }
      ], options2 = [], environments5 = yield getData("environments"), eventEnvironments2 = yield getData("environments-events");
      for (let environment of environments5)
        locationsToUnset.has(environment.id) || eventEnvironments2.some((event) => event.id === environment.id) || options2.push(environment);
      options2.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0), locationsToAdd.forEach((location2) => {
        options2.push(location2);
      });
      let optionsToReturn = [];
      for (let location2 of options2)
        optionsToReturn.push({
          id: `location-huds-enabled.${location2.id}`,
          title: location2.name,
          default: !0,
          description: location2.description
        });
      return optionsToReturn;
    });
  }
});

// src/modules/location-huds/styles.css
var styles_default63, init_styles64 = __esm({
  "src/modules/location-huds/styles.css"() {
    styles_default63 = `.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;outline:1px solid #3d4d6c;box-shadow:none}.mh-ui-cheese-selector .townOfGnawniaHUD-bait-image{left:2px;background-color:transparent;filter:none;background-repeat:no-repeat;background-size:cover;border:none}.mh-ui-cheese-selector .townOfGnawniaHUD-bait-name{margin-left:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mh-ui-cheese-selector .townOfGnawniaHUD-bait.active,.mh-ui-cheese-selector .townOfGnawniaHUD-bait:hover{background-color:#c2dbef}.mh-ui-cheese-selector .townOfGnawniaHUD-bait.active .townOfGnawniaHUD-bait-name{text-shadow:none}.mh-ui-cheese-selector .townOfGnawniaHUD-bait-quantity{color:#eee;background:linear-gradient(to bottom,#2a354b,#485a7f)}.mh-ui-cheese-selector .townOfGnawniaHUD-bait.active .townOfGnawniaHUD-bait-quantity,.mh-ui-cheese-selector .townOfGnawniaHUD-bait:hover .townOfGnawniaHUD-bait-quantity{background:linear-gradient(to bottom,#4f638c,#798db4)}.mh-ui-cheese-selector .townOfGnawniaHUD-bait.active .townOfGnawniaHUD-bait-name,.mh-ui-cheese-selector .townOfGnawniaHUD-bait:hover .townOfGnawniaHUD-bait-name{color:#000;text-shadow:none}
`;
  }
});

// src/modules/location-huds/shared/cheese-selectors/index.js
var makeCheeseSelectorElement, makeCheeseSelector, getCheeses, replaced, replaceCampShowTab, cheese_selectors_default, init_cheese_selectors = __esm({
  "src/modules/location-huds/shared/cheese-selectors/index.js"() {
    init_utils2();
    makeCheeseSelectorElement = (cheesesToUse) => __async(void 0, null, function* () {
      let wrapper = makeElement("div", ["townOfGnawniaHUD", "allBountiesComplete", "mh-ui-cheese-selector-wrapper"]), cheesesContainer = makeElement("div", ["townOfGnawniaHUD-baitContainer", "mh-ui-cheese-selector"]), cheeses = yield getUserItems(cheesesToUse);
      for (let cheese of cheeses) {
        let cheeseContainer = makeElement("div", ["townOfGnawniaHUD-bait", `mh-ui-cheese-selector-${cheese.type}`]);
        cheeseContainer.setAttribute("data-item-type", cheese.type), cheeseContainer.setAttribute("data-item-classification", "bait"), cheeseContainer.setAttribute("onclick", "hg.utils.TrapControl.toggleItem(this); return false;"), user.bait_item_id === cheese.item_id ? cheeseContainer.classList.add("active") : cheeseContainer.classList.remove("active");
        let cheeseImage = makeElement("div", "townOfGnawniaHUD-bait-image");
        cheeseImage.style.backgroundImage = `url(${cheese.thumbnail_transparent || cheese.thumbnail})`, cheeseContainer.append(cheeseImage), makeElement("div", ["townOfGnawniaHUD-bait-name", "quantity"], cheese.name.replace(" Cheese", ""), cheeseContainer), makeElement("div", ["townOfGnawniaHUD-bait-quantity", "quantity"], cheese.quantity.toLocaleString(), cheeseContainer), cheesesContainer.append(cheeseContainer);
      }
      return wrapper.append(cheesesContainer), wrapper;
    }), makeCheeseSelector = (location2, cheesesToUse) => __async(void 0, null, function* () {
      if (location2.replaceAll("-", "_") !== getCurrentLocation()) {
        let existingCheeseSelector2 = document.querySelector(".mh-ui-cheese-selector-wrapper");
        existingCheeseSelector2 && existingCheeseSelector2.remove();
        return;
      }
      let hud5 = document.querySelector("#hudLocationContent");
      if (!hud5)
        return;
      let cheeseSelector = yield makeCheeseSelectorElement(cheesesToUse), existingCheeseSelector = document.querySelector(".mh-ui-cheese-selector-wrapper");
      existingCheeseSelector ? existingCheeseSelector.replaceWith(cheeseSelector) : hud5.after(cheeseSelector), doEvent2("mh-improved-cheese-selector-added", location2, cheesesToUse);
    }), getCheeses = (cheeses) => {
      let defaultCheeses = [
        "cheddar_cheese",
        "brie_cheese",
        "gouda_cheese",
        "super_brie_cheese"
      ];
      for (; cheeses.length < 4; )
        cheeses.unshift(defaultCheeses.pop());
      return cheeses;
    }, replaced = !1, replaceCampShowTab = () => {
      if (replaced)
        return;
      replaced = !0;
      let _original2 = app.pages.CampPage.showTab;
      app.pages.CampPage.showTab = (...args) => {
        _original2(...args), doEvent2("set_camp_tab", ...args);
      };
    }, cheese_selectors_default = (location2, cheeses) => {
      replaceCampShowTab(), makeCheeseSelector(location2, getCheeses(cheeses)), onRequest("*", () => makeCheeseSelector(location2, getCheeses(cheeses)));
    };
  }
});

// src/modules/location-huds/locations/acolyte-realm/index.js
var acolyte_realm_default, init_acolyte_realm = __esm({
  "src/modules/location-huds/locations/acolyte-realm/index.js"() {
    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-huds/locations/ancient-city/styles.css
var styles_default64, init_styles65 = __esm({
  "src/modules/location-huds/locations/ancient-city/styles.css"() {
    styles_default64 = `.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{margin-left:1px;background:#e8da17;border-radius:1px}span.ancientCityHUD-alertLevel{position:absolute;bottom:1px;left:3px;text-shadow:1px 1px 2px #171717}.ancientCityHUD-districtName{display:flex;flex-direction:row;gap:10px;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}.ancientCityHUD.secret .ancientCityHUD-bossContainer:active{background-position:0 0}.ancientCityHUD{filter:drop-shadow(0 3px 5px #0a0803)}.ancientCityHUD-bossContainer.active .ancientCityHUD-bossLabel.active,.ancientCityHUD-bossContainer.defeated .ancientCityHUD-bossLabel.defeated{top:20px;left:46px;font-size:12px;line-height:1.5;color:#fff}.ancientCityHUD-districtName-f .ancientCityHUD-bossName{color:#11f400}.ancientCityHUD-districtName-h .ancientCityHUD-bossName{color:#21e2ff}.ancientCityHUD-districtName-s .ancientCityHUD-bossName{color:#e96300}.ancientCityHUD-districtName-y .ancientCityHUD-bossName{color:#d851ff}.ancientCityHUD-districtName-t .ancientCityHUD-bossName{color:#ffe400}.huntersHornView__message.huntersHornView__message--active.oil-charm-warning .huntersHornMessageView--unknown_error .huntersHornMessageView__content:before{display:none}.huntersHornView__message.huntersHornView__message--active.oil-charm-warning .huntersHornMessageView--unknown_error{border-image-source:url(https://i.mouse.rip/horn-message-blank-pink.png)}
`;
  }
});

// src/modules/location-huds/locations/ancient-city/index.js
var addBossName, warnForOilCharms, ancient_city_default2, init_ancient_city2 = __esm({
  "src/modules/location-huds/locations/ancient-city/index.js"() {
    init_utils2();
    init_styles65();
    addBossName = () => {
      var _a, _b;
      let types = {
        y: "Paladin Weapon Master",
        // Fealty
        h: "Manaforge Smith",
        // Tech
        s: "Soul Binder",
        // Scholar
        t: "Molten Midas",
        // Treasury
        f: ""
        // Farming
      }, type = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestAncientCity) == null ? void 0 : _b.district_type;
      if (!type || !types[type])
        return;
      let hudText = document.querySelector(".ancientCityHUD-districtName");
      if (!hudText || hudText.getAttribute("data-boss-name"))
        return;
      hudText.setAttribute("data-boss-name", !0), hudText.classList.add(`ancientCityHUD-districtName-${type}`);
      let existing = document.querySelector(".ancientCityHUD-bossName");
      existing && existing.remove(), makeElement("div", "ancientCityHUD-bossName", types[type], hudText);
    }, warnForOilCharms = () => {
      if (user.trinket_item_id != 2142 && user.trinket_item_id != 2652)
        return;
      let isSuper = user.trinket_item_id == 2652;
      showHornMessage({
        title: "Don't waste your charm!",
        text: `You have a ${isSuper ? "Super " : " "}Lantern Oil Charm equipped.`,
        image: `https://www.mousehuntgame.com/images/items/trinkets/large/${isSuper ? "e4411478eb95a955daa3a71b3de078fd" : "e90252a8e76d6e5e75209db95acee4d4"}.png`,
        dismiss: 4e4,
        button: "Disarm",
        type: "unknown_error",
        classname: "oil-charm-warning",
        action: () => {
          var _a, _b, _c, _d;
          (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.TrapControl) != null && _b.disarmTrinket && ((_d = (_c = hg == null ? void 0 : hg.utils) == null ? void 0 : _c.TrapControl) != null && _d.go) && (hg.utils.TrapControl.disarmTrinket(), hg.utils.TrapControl.go());
        }
      });
    }, ancient_city_default2 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default64), addBossName(), warnForOilCharms(), onRequest("users/changetrap.php", warnForOilCharms);
    });
  }
});

// src/modules/location-huds/locations/balacks-cove/styles.css
var styles_default65, init_styles66 = __esm({
  "src/modules/location-huds/locations/balacks-cove/styles.css"() {
    styles_default65 = `.balacksCoveHUD-tideContainer-timeLeft{position:absolute;top:9px;right:55px;padding:3px 10px;font-size:12.5px;color:#382924;text-shadow:1px 1px 1px #c7e9ea;background-color:#8ad3d5;border-radius:23% 23% 0 0;box-shadow:0 -.5px 1px 1px #d6f1f2}
`;
  }
});

// src/modules/location-huds/locations/balacks-cove/index.js
var getClosingText, updateClosingTime, balacks_cove_default, init_balacks_cove = __esm({
  "src/modules/location-huds/locations/balacks-cove/index.js"() {
    init_utils2();
    init_styles66();
    init_cheese_selectors();
    getClosingText = (closes, stage, nextStageOffsetMinutes, nextStageText) => {
      let hours = Math.floor(closes), minutes = Math.ceil((closes - Math.floor(closes)) * 60), timeLeftText = `${hours > 0 ? `${hours}h ` : ""}${minutes}m until ${stage}`;
      if (nextStageOffsetMinutes && nextStageText) {
        let totTimeMinutes = hours * 60 + minutes + nextStageOffsetMinutes;
        timeLeftText += `, <span class="offset">${hours > 0 ? `${Math.floor(totTimeMinutes / 60)}h ` : ""}${totTimeMinutes % 60}m until ${nextStageText}</span>`;
      }
      return timeLeftText;
    }, updateClosingTime = () => {
      let hudBar = document.querySelector(".balacksCoveHUD-tideContainer");
      if (!hudBar)
        return;
      let timeLeftText = "", today = /* @__PURE__ */ new Date(), rotationLength = 18.66666, rotationsExact = (today.getTime() / 1e3 - 1294680060) / 3600 / rotationLength, rotationsInteger = Math.floor(rotationsExact), partialRotation = (rotationsExact - rotationsInteger) * rotationLength;
      partialRotation < 16 ? timeLeftText = getClosingText(16 - partialRotation, "Mid Tide", 60, "High Tide") : partialRotation >= 16 && partialRotation < 17 ? timeLeftText = getClosingText(1 - (partialRotation - 16), "High Tide", 40, "Low Tide") : partialRotation >= 17 && partialRotation < 17.66666 && (timeLeftText = getClosingText(0.66666 - (partialRotation - 17), "Mid Tide", 60, "Low Tide"));
      let existing = document.querySelector(".balacksCoveHUD-tideContainer-timeLeft");
      existing ? existing.innerHTML = timeLeftText : makeElement("div", "balacksCoveHUD-tideContainer-timeLeft", timeLeftText, hudBar);
    }, balacks_cove_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default65), cheese_selectors_default("balacks-cove", [
        "vanilla_stilton_cheese",
        "vengeful_vanilla_stilton_cheese"
      ]), updateClosingTime(), document.addEventListener("horn-countdown-tick-minute", updateClosingTime);
    });
  }
});

// src/modules/location-huds/locations/bazaar/index.js
var bazaar_default, init_bazaar = __esm({
  "src/modules/location-huds/locations/bazaar/index.js"() {
    init_cheese_selectors();
    bazaar_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("bazaar", ["gilded_cheese"]);
    });
  }
});

// src/modules/location-huds/shared/folklore-forest/keep-inventory-open.js
var keepInventoryToggled, keep_inventory_open_default, init_keep_inventory_open = __esm({
  "src/modules/location-huds/shared/folklore-forest/keep-inventory-open.js"() {
    init_utils2();
    keepInventoryToggled = (opts) => __async(void 0, null, function* () {
      let {
        setting,
        buttonSelector,
        inventorySelector,
        inventoryOpenClass,
        buttonOpenClass
      } = opts, toggleButton = document.querySelector(buttonSelector);
      if (!toggleButton)
        return;
      let inventory = document.querySelector(inventorySelector);
      if (!inventory)
        return;
      let isSetOpen = getSetting(setting, "not-set");
      isSetOpen ? (inventory.classList.add(inventoryOpenClass), toggleButton.classList.add(buttonOpenClass)) : isSetOpen === "not-set" && (isSetOpen = !1), toggleButton.addEventListener("click", (e) => {
        e.preventDefault(), isSetOpen ? (isSetOpen = !1, inventory.classList.remove(inventoryOpenClass), toggleButton.classList.remove(buttonOpenClass)) : (isSetOpen = !0, inventory.classList.add(inventoryOpenClass), toggleButton.classList.add(buttonOpenClass)), saveSetting(setting, isSetOpen);
      });
    }), keep_inventory_open_default = keepInventoryToggled;
  }
});

// src/modules/location-huds/shared/folklore-forest/styles.css
var styles_default66, init_styles67 = __esm({
  "src/modules/location-huds/shared/folklore-forest/styles.css"() {
    styles_default66 = `.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);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}.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}.folkloreForestRegionView-helpButton{top:13px;width:22px;height:22px;background:url(https://www.mousehuntgame.com/images/ui/events/egg_sweeper/help_button.png);background-position:center;background-size:26px;border-radius:10px;mix-blend-mode:darken;opacity:.3}.folkloreForestRegionView-helpButton:hover{opacity:1}a.folkloreForestRegionView-travelButton{top:16px;left:226px;width:17px;height:17px;background:url(https://www.mousehuntgame.com/images/ui/hud/menu/treasure_chests.png);background-size:cover;opacity:.3;transform:scaleX(-1) rotate(99deg)}a.folkloreForestRegionView-travelButton:hover{opacity:1}.folkloreForestRegionView-dialog-blockContainer.basicBaits .folkloreForestRegionView-dialog-block-description{background-color:#668d53;border-top:1px solid #143708}.folkloreForestRegionView-dialog-blockContainer.travel .folkloreForestRegionView-dialog-block{background-color:#668d53}.folkloreForestRegionView-dialog-blockContainer.travel .folkloreForestRegionView-dialog-block-description{border-top:1px solid #143708}.folkloreForestRegionView-dialog-recipeResult-content{max-height:110px}
`;
  }
});

// src/modules/location-huds/locations/bountiful-beanstalk/small-inv.css
var small_inv_default, init_small_inv = __esm({
  "src/modules/location-huds/locations/bountiful-beanstalk/small-inv.css"() {
    small_inv_default = `.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--animating,.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--open .headsUpDisplayBountifulBeanstalk__inventoryContainerPanel:nth-child(2){display:grid;grid-template-columns:repeat(4,50px);width:160px}.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--animating{grid-template-columns:95px auto}.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--open{display:grid;grid-template-columns:100px 0;width:300px;height:50px}.headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent{display:grid;grid-template-columns:105px 0;width:100px;height:50px}.headsUpDisplayBountifulBeanstalk__inventoryContainer{top:unset;bottom:75px}.headsUpDisplayBountifulBeanstalk__inventoryContainerPanel:nth-child(1){display:grid;grid-template-columns:50px 50px}
`;
  }
});

// src/modules/location-huds/locations/bountiful-beanstalk/styles.css
var styles_default67, init_styles68 = __esm({
  "src/modules/location-huds/locations/bountiful-beanstalk/styles.css"() {
    styles_default67 = `.headsUpDisplayBountifulBeanstalkView__baitQuantity.quantity{display:flex;align-items:center;justify-content:flex-end;font-size:12px}.headsUpDisplayBountifulBeanstalk__inventoryBlockQuantity.quantity{padding:1px 2px}.bountifulBeanstalkCastleView__noiseLevel,.bountifulBeanstalkCastleView__maxNoiseLevel{padding:0 2px;font-size:17px}.bountifulBeanstalkCastleView__noiseMeterLabel{color:#ffefc7;text-shadow:0 0 1px #5b4200;filter:drop-shadow(1px 1px 1px #000)}.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:45px;right:245px;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:-20px;bottom:unset;left:-60px;z-index:30;width:447px;line-height:1.75;color:#f2e3a6;background:#192518;border:2px solid #85d523}.bountifulBeanstalkCastleView__plinthOverlay .mousehuntTooltip-arrow{display:none}.bountifulBeanstalkCastleView__currentRoomName{font-size:12px}.bountifulBeanstalkCastleView__currentRoomLoot b{font-size:10px}.bountifulBeanstalkCastleView__plinthOverlay.mousehuntTooltipParent{left:190px;width:330px}.bountifulBeanstalkCastleView__currentRoomLootMultiplier{font-size:12px}.bountifulBeanstalkPlayHarpDialogView__optionActionLabel{margin-bottom:5px}.headsUpDisplayBountifulBeanstalk__embellishmentBlock:hover .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{filter:brightness(1.3) drop-shadow(0 0 1px #224e1c) drop-shadow(0 0 1px #224e1c);transform:scale(1.3)}.headsUpDisplayBountifulBeanstalk__embellishmentBlock .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{transition:.3s;animation:adminShimmer 1s 3}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton--autoPlaying .headsUpDisplayBountifulBeanstalkView__playHarpDialogButtonHarpImage{transition:.3s;animation:mh-improved-shake .5s 2}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer .headsUpDisplayBountifulBeanstalkView__loot:hover{animation:mh-improved-shake .5s infinite}.bountifulBeanstalkCastleView__content:hover .bountifulBeanstalkCastleView__bossMarker{transform:scale(1.1)}@media (prefers-reduced-motion: reduce){.headsUpDisplayBountifulBeanstalk__embellishmentBlock:hover .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{filter:none;transform:none}.headsUpDisplayBountifulBeanstalk__embellishmentBlock .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{transition:none;animation:none}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton--autoPlaying .headsUpDisplayBountifulBeanstalkView__playHarpDialogButtonHarpImage{animation:none}.bountifulBeanstalkCastleView__bossMarker:hover{transform:none}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer .headsUpDisplayBountifulBeanstalkView__loot:hover{animation-iteration-count:1}}.mh-improved-room-data--open,.mh-improved-room-data--open .headsUpDisplayBountifulBeanstalkView__lootMultiplierDetailsContainer,.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer{z-index:28;display:block}.headsUpDisplayBountifulBeanstalk__inventoryContainer{z-index:28}.headsUpDisplayBountifulBeanstalk__inventoryContainer:hover{z-index:31}.headsUpDisplayBountifulBeanstalkView__playHarpDialogButton--autoPlaying:hover .headsUpDisplayBountifulBeanstalkView__playHarpDialogButtonHarpImage{transform:scale(1.1) rotate(3deg) translate(5px)}.folkloreForestRegionView-dialog-recipeResult-image.itemImage .quantity{background:#ffffffbf}.bountifulBeanstalkCastleView__content:hover .bountifulBeanstalkCastleView__bos{filter:drop-shadow(1px -1px 2px #63496a);transition:.3s ease-in-out;transform-origin:bottom}.bountifulBeanstalkCastleView__step--chase_past .bountifulBeanstalkCastleView__stepImage{z-index:2}.headsUpDisplayBountifulBeanstalkView__climbNextRoomText,.headsUpDisplayBountifulBeanstalkView__castleNextRoomText{font-size:12px}.bountifulBeanstalkCastleView__background{transition:opacity .3s}.headsUpDisplayBountifulBeanstalk__inventoryBlockImage{width:37px;height:37px}.bountifulBeanstalkCastleView__plinthOverlay .mousehuntTooltip.mh-improved-tooltip-stay-open,.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer.mh-improved-room-data--open{z-index:30;border-color:#75a23d}.headsUpDisplayBountifulBeanstalkView__ingredientQuantity.quantity{top:26px}.headsUpDisplayBountifulBeanstalkView__baitCraftableContainer .mousehuntTooltip{right:-40px;left:-40px;line-height:1.5;text-align:center}.headsUpDisplayBountifulBeanstalkView__baitCraftableContainer[data-item-type=leaping_lavish_beanster_cheese] .mousehuntTooltip{right:-40px;left:-40px}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer .mousehuntTooltip{line-height:1.4}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer .mousehuntTooltip>b:first-of-type{display:inline-block;margin-bottom:4px;font-size:11px;border-bottom:1px solid #d5d5d5}.headsUpDisplayBountifulBeanstalkView__fuelQuantity.quantity{font-size:13px;color:#fff;background-color:#2c4d26}.active .headsUpDisplayBountifulBeanstalkView__fuelQuantity.quantity{text-shadow:0 0 2px #5ac976}.headsUpDisplayBountifulBeanstalkView__fuelContainer:hover{cursor:pointer}.folkloreForestRegionView-helpButton{top:13px;width:22px;height:22px;background:url(https://www.mousehuntgame.com/images/ui/events/egg_sweeper/help_button.png);background-position:center;background-size:26px;border-radius:10px;mix-blend-mode:darken;opacity:.3}.folkloreForestRegionView-helpButton:hover{opacity:1}.folkloreForestRegionView-helpButton:active{filter:grayscale(1);background-position-y:center;opacity:1}.headsUpDisplayBountifulBeanstalk__embellishmentBlock .mousehuntTooltip{right:-70px;bottom:50px;left:-70px}.folkloreForestRegionView-dialog-help .beanstalkHelp__image{flex:1;width:100%;height:150px;background-size:contain}.folkloreForestRegionView-dialog-help .beanstalkHelp__section{flex-wrap:wrap;padding-top:20px;margin-bottom:10px;border-top:1px solid #487426}.folkloreForestRegionView-dialog-help .beanstalkHelp__section:nth-child(3){border-top:none}.folkloreForestRegionView-dialog-help .beanstalkHelp__section:nth-child(4) .beanstalkHelp__image{order:-1}.headsUpDisplayBountifulBeanstalkView__frame{filter:drop-shadow(0 1px 2px #333)}.headsUpDisplayBountifulBeanstalkView__multiplier div:nth-child(2){font-size:13px}.headsUpDisplayBountifulBeanstalkView__lootMultiplierDetailsContainer>div{align-items:center;margin:2px}.headsUpDisplayBountifulBeanstalk__embellishmentBlock{top:-5px;left:-10px;width:34px;height:34px}.headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{width:30px;height:30px;filter:drop-shadow(0 0 1px #224e1c) drop-shadow(0 0 1px #224e1c);background-position:center;transform:scale(1)}.headsUpDisplayBountifulBeanstalk__embellishmentBlock.golden_feather{left:-6px}.headsUpDisplayBountifulBeanstalk__embellishmentBlock.ruby_remover{left:-2px}.headsUpDisplayBountifulBeanstalkView__multiplier.headsUpDisplayBountifulBeanstalkView__multiplier--feather,.headsUpDisplayBountifulBeanstalkView__multiplier.headsUpDisplayBountifulBeanstalkView__multiplier--condensed_creativity{font-size:10px}.folkloreForestRegionView-dialog-block-name{display:flex;justify-content:center;height:40px;padding:0;font-size:13px;text-align:center}.folkloreForestRegionView-dialog-blockContainer.basicBaits .mousehuntArmNowButton{transform:scale(1.2)}.bountifulBeanstalkCastleView__noiseMeterBar{padding-right:1px}button.headsUpDisplayBountifulBeanstalkView__baitBuyButton{right:3px}.active button.headsUpDisplayBountifulBeanstalkView__baitBuyButton{right:2px}.bountifulBeanstalkClimbView__playerUserThumb,.bountifulBeanstalkCastleView__playerMarkerUserThumb{border:1px solid #0aaa62;box-shadow:inset 0 1px 3px #3d3d3d}.bountifulBeanstalkCastleView__playerMarker--player_marker_chase .bountifulBeanstalkCastleView__playerMarkerUserThumb{border:1px solid #d7440d}.mh-crafting-actions{display:flex;gap:10px;justify-content:center;margin-top:5px;transition:.2s ease-in}.headsUpDisplayBountifulBeanstalkView__baitCraftableContainer.mousehuntTooltipParent:after{position:absolute;inset:-30px 20px 5px;content:""}.mh-crafting-popup.loading:after,.mh-crafting-popup.error:after,.mh-crafting-popup.success:after{position:absolute;right:0;bottom:7px;left:0;display:block;height:20px;content:"";background:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif) center no-repeat}.mh-crafting-popup.error:after{background:url(https://www.mousehuntgame.com/images/icons/bad_idea.png) center no-repeat;background-size:contain}.mh-crafting-popup.success:after{background:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png) center no-repeat;background-size:contain}.loading .mh-crafting-actions,.error .mh-crafting-actions,.success .mh-crafting-actions{opacity:.1}.folkloreForestRegionView-trapWarningContainer.active{z-index:35}.headsUpDisplayBountifulBeanstalk__embellishmentBlock--disabled{display:block;background:#11250e;opacity:.3}.headsUpDisplayBountifulBeanstalk__embellishmentBlock--disabled:hover{opacity:1}.headsUpDisplayBountifulBeanstalk__embellishmentBlock--disabled .headsUpDisplayBountifulBeanstalk__embellishmentBlockImage{width:25px;height:25px;opacity:.3}.bountifulBeanstalkPlayHarpDialogView__pointerLabel{padding:5px;margin:3px 0;border:1px solid #e0e0e0;border-radius:5px;box-shadow:0 1px 1px -1px #ccc}.bountifulBeanstalkPlayHarpDialogView__input{padding:2px;border:1px solid #000}.bountifulBeanstalkPlayHarpDialogView__room{border-radius:5px}.bountifulBeanstalkPlayHarpDialogView__tabButtonContainer{padding:0 20px;margin-right:-5px;margin-left:-5px;border-bottom:1px solid #416f2a}.bountifulBeanstalkPlayHarpDialogView__tabButton{background-color:#4d3d00;border:1px solid #416f2a;border-bottom:none}.bountifulBeanstalkPlayHarpDialogView__pointerIcon:hover{cursor:ew-resize}.bountifulBeanstalkPlayHarpDialogView__noiseMeterLabel{user-select:none}.bountifulBeanstalkCastleView__noiseMeter:hover .bountifulBeanstalkCastleView__noiseMeterBar.bountifulBeanstalkCastleView__noiseMeterBar--min:before{position:absolute;top:0;right:5px;bottom:0;align-self:center;content:"Miss"}.bountifulBeanstalkCastleView__noiseMeter:hover .bountifulBeanstalkCastleView__noiseMeterBar.bountifulBeanstalkCastleView__noiseMeterBar--max:before{position:absolute;top:0;right:5px;bottom:0;align-self:center;content:"Catch"}.headsUpDisplayBountifulBeanstalkView__castleNextRoomLevel.headsUpDisplayBountifulBeanstalkView__chevron{position:relative}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron:after{position:absolute;right:0;bottom:-10px;left:0;font-size:11px;font-weight:900;color:#e1dacd;text-align:center;content:""}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron--standard:after{content:"x1"}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron--super:after{content:"x2"}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron--extreme:after{content:"x4"}.headsUpDisplayBountifulBeanstalkView__castleChevronContainer:hover .headsUpDisplayBountifulBeanstalkView__chevron--ultimate:after{content:"x8"}
`;
  }
});

// src/modules/location-huds/locations/bountiful-beanstalk/index.js
var keepRoomDataToggled, keepTooltipToggled, funTime, makeGiantMoreVisible, toggleFuelWithIcon, updateLootText, baitAmounts, addCraftingButtons, addCommaToNoiseMeter, addCommaToNoiseMeterTimeout, bountiful_beanstalk_default3, init_bountiful_beanstalk3 = __esm({
  "src/modules/location-huds/locations/bountiful-beanstalk/index.js"() {
    init_utils2();
    init_keep_inventory_open();
    init_styles67();
    init_small_inv();
    init_styles68();
    keepRoomDataToggled = () => __async(void 0, null, function* () {
      let roomData = document.querySelector(".headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer");
      if (!roomData)
        return;
      let isSetOpen = getSetting("location-huds.bountiful-beanstalk-room-data-toggled", "not-set");
      isSetOpen ? roomData.classList.add("mh-improved-room-data--open") : isSetOpen === "not-set" && (isSetOpen = !1), roomData.addEventListener("click", (e) => {
        e.preventDefault(), isSetOpen ? (isSetOpen = !1, roomData.classList.remove("mh-improved-room-data--open")) : (isSetOpen = !0, roomData.classList.add("mh-improved-room-data--open")), saveSetting("location-huds.bountiful-beanstalk-room-data-toggled", isSetOpen);
      });
    }), keepTooltipToggled = () => __async(void 0, null, function* () {
      let tooltip = document.querySelector(".bountifulBeanstalkCastleView__plinthOverlay.mousehuntTooltipParent .mousehuntTooltip");
      tooltip && tooltip.addEventListener("click", (e) => {
        e.preventDefault(), tooltip.classList.toggle("mh-improved-tooltip-stay-open");
      });
    }), funTime = () => __async(void 0, null, function* () {
      let meter = document.querySelector(".bountifulBeanstalkCastleView__noiseMeterFrame");
      if (!meter)
        return;
      let isRotating = !1;
      meter.addEventListener("click", () => {
        if (isRotating)
          return;
        isRotating = !0;
        let time = 1e3, hue = 0, interval = setInterval(() => {
          hue >= 360 && (clearInterval(interval), isRotating = !1), hue += 1, meter.style.filter = `hue-rotate(${hue}deg)`;
        }, time / 360);
      });
    }), makeGiantMoreVisible = () => __async(void 0, null, function* () {
      var _a, _b, _c;
      let background = document.querySelector(".bountifulBeanstalkCastleView__background");
      if (!background)
        return;
      ((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestBountifulBeanstalk) == null ? void 0 : _b.castle) == null ? void 0 : _c.is_boss_chase) || !1 ? background.classList.add("is-boss-chase") : background.classList.remove("is-boss-chase");
    }), toggleFuelWithIcon = () => __async(void 0, null, function* () {
      let icon = document.querySelector(".headsUpDisplayBountifulBeanstalkView__fuelContainer");
      if (!icon)
        return;
      let button = document.querySelector(".headsUpDisplayBountifulBeanstalkView__fuelToggleButton");
      button && icon.addEventListener("click", () => {
        button.click();
      });
    }), updateLootText = () => __async(void 0, null, function* () {
      let ccLoot = document.querySelector(".headsUpDisplayBountifulBeanstalkView__multiplier.headsUpDisplayBountifulBeanstalkView__multiplier--condensed_creativity div");
      ccLoot && (ccLoot.innerText = "Con. Creativity:");
      let featherLoot = document.querySelector(".headsUpDisplayBountifulBeanstalkView__multiplier.headsUpDisplayBountifulBeanstalkView__multiplier--feather div");
      featherLoot && (featherLoot.innerText = "Golden Feather:");
    }), baitAmounts = {
      beanster_cheese: {
        amounts: ["160-normal", 160],
        shop: "beanster_pack_small_convertible",
        shopNormal: "beanster_cheese"
      },
      lavish_beanster_cheese: {
        amounts: [4, 8, 80],
        shop: "lavish_beanster_pack_small_convertible"
      },
      leaping_lavish_beanster_cheese: {
        amounts: [2, 4, 8],
        shop: "leaping_lavish_beanster_pack_small_convertible"
      },
      royal_beanster_cheese: {
        amounts: [2, 18, 20],
        shop: "royal_beanster_pack_small_convertible"
      }
    }, addCraftingButtons = () => __async(void 0, null, function* () {
      let baits = document.querySelectorAll(".headsUpDisplayBountifulBeanstalkView__baitCraftableContainer");
      if (!baits)
        return;
      let purchaseBait = (shopItem, quantity, popup) => __async(void 0, null, function* () {
        popup.classList.add("loading");
        let results = yield doRequest("managers/ajax/purchases/itempurchase.php", {
          type: shopItem,
          quantity,
          buy: 1,
          is_kings_cart_item: 0
        });
        if (!results || !results.success)
          return popup.classList.remove("loading"), popup.classList.add("error"), setTimeout(() => {
            popup.classList.remove("error");
          }, 1e3), !1;
        if (!results.inventory || !results.items)
          return !1;
        results.inventory = (results == null ? void 0 : results.inventory) || {}, results.items = (results == null ? void 0 : results.items) || {};
        let newInventoryQuantities = Object.keys(results.inventory).reduce((acc, key) => (acc[key] = results.inventory[key].quantity, acc), {}), newItemsQuantities = Object.keys(results.items).reduce((acc, key) => (acc[key] = results.items[key].num_owned, acc), {}), newQuantities = __spreadValues(__spreadValues({}, newInventoryQuantities), newItemsQuantities);
        return baits.forEach((bait) => {
          let baitQuantity = bait.querySelector(".headsUpDisplayBountifulBeanstalkView__baitQuantity");
          if (!baitQuantity)
            return;
          let baitQuantityType = baitQuantity.getAttribute("data-item-type");
          baitQuantityType && newQuantities[baitQuantityType] && (baitQuantity.innerText = newQuantities[baitQuantityType].toLocaleString());
          let baitCraftQty = bait.querySelector(".headsUpDisplayBountifulBeanstalkView__ingredientQuantity");
          if (!baitCraftQty)
            return;
          let baitIngredientType = baitCraftQty.getAttribute("data-item-type");
          baitIngredientType && newQuantities[baitIngredientType] && (baitCraftQty.innerText = newQuantities[baitIngredientType].toLocaleString());
        }), popup.classList.remove("loading"), popup.classList.add("success"), setTimeout(() => {
          popup.classList.remove("success");
        }, 1e3), results && results.success;
      });
      baits.forEach((bait) => {
        let quantity = bait.querySelector(".headsUpDisplayBountifulBeanstalkView__baitQuantity");
        if (!quantity || bait.querySelector(".mh-crafting-popup"))
          return;
        quantity.classList.add("mousehuntTooltipParent");
        let popup = makeElement("div", ["mh-crafting-popup"]), existingPopup = bait.querySelector(".mousehuntTooltip");
        existingPopup ? existingPopup.classList.remove("noEvents") : popup.classList.add("mousehuntTooltip", "tight", "top");
        let actions = makeElement("div", "mh-crafting-actions"), baitType = bait.getAttribute("data-item-type"), amounts = baitAmounts[baitType].amounts;
        for (let amount of amounts) {
          let isNormal = amount.toString().includes("-normal"), qty = isNormal ? amount.toString().replace("-normal", "") : amount;
          isNormal || (qty = qty / 2);
          let className = isNormal ? "mh-crafting-action" : "mh-crafting-action lightBlue", title = isNormal ? `Craft ${amount.toString().replace("-normal", "")}` : `Craft ${amount} using Magic Essence`, type = isNormal ? baitAmounts[baitType].shopNormal : baitAmounts[baitType].shop;
          makeMhButton({
            text: `Craft ${amount.toString().replace("-normal", "")}`,
            className,
            title,
            size: "tiny",
            /**
             * Button action.
             */
            callback: () => {
              purchaseBait(type, qty, popup);
            },
            appendTo: actions
          });
        }
        popup.append(actions), existingPopup ? existingPopup.insertBefore(popup, existingPopup.lastChild) : bait.append(popup);
      });
    }), addCommaToNoiseMeter = () => __async(void 0, null, function* () {
      let noise = document.querySelector(".bountifulBeanstalkCastleView__noiseLevel");
      noise && noise.innerText && Number.parseInt(noise.innerText) > 999 && (noise.innerText = Number.parseInt(noise.innerText).toLocaleString());
    }), addCommaToNoiseMeterTimeout = () => __async(void 0, null, function* () {
      setMultipleTimeout(addCommaToNoiseMeter, [0, 500, 1e3]);
    }), bountiful_beanstalk_default3 = () => __async(void 0, null, function* () {
      let stylesToAdd = [styles_default66, styles_default67];
      getFlag("flip-bountiful-beanstalk-avatar") && stylesToAdd.push(".bountifulBeanstalkCastleView__playerMarkerUserThumb { transform: scaleX(-1); }"), getSetting("location-huds.bountiful-beanstalk-invetory-in-one-row", !1) && stylesToAdd.push(small_inv_default), addHudStyles(stylesToAdd), keep_inventory_open_default({
        setting: "location-huds.bountiful-beanstalk-inventory-toggled",
        buttonSelector: ".headsUpDisplayBountifulBeanstalk__inventoryContainer .headsUpDisplayBountifulBeanstalk__inventoryContainerButton",
        inventorySelector: ".headsUpDisplayBountifulBeanstalk__inventoryContainer .headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent",
        inventoryOpenClass: "headsUpDisplayBountifulBeanstalk__inventoryContainerBlockContent--open",
        buttonOpenClass: "headsUpDisplayBountifulBeanstalk__inventoryContainerButton--open"
      }), keepRoomDataToggled(), keepTooltipToggled(), makeGiantMoreVisible(), toggleFuelWithIcon(), updateLootText(), addCraftingButtons(), addCommaToNoiseMeterTimeout(), funTime(), onTurn(() => {
        makeGiantMoreVisible(), addCommaToNoiseMeterTimeout();
      }, 1e3);
    });
  }
});

// src/modules/location-huds/locations/calm-clearing/index.js
var calm_clearing_default, init_calm_clearing = __esm({
  "src/modules/location-huds/locations/calm-clearing/index.js"() {
    init_cheese_selectors();
    calm_clearing_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("calm-clearing", ["cherry_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/cape-clawed/index.js
var cape_clawed_default, init_cape_clawed = __esm({
  "src/modules/location-huds/locations/cape-clawed/index.js"() {
    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-huds/locations/catacombs/index.js
var catacombs_default, init_catacombs = __esm({
  "src/modules/location-huds/locations/catacombs/index.js"() {
    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-huds/locations/claw-shot-city/styles.css
var styles_default68, init_styles69 = __esm({
  "src/modules/location-huds/locations/claw-shot-city/styles.css"() {
    styles_default68 = `.clawShotCityHud .gangs_caught,.clawShotCityHud .fools_gold_quantity{font-size:27px;color:#e7c37d}
`;
  }
});

// src/modules/location-huds/locations/claw-shot-city/index.js
var claw_shot_city_default, init_claw_shot_city = __esm({
  "src/modules/location-huds/locations/claw-shot-city/index.js"() {
    init_utils2();
    init_styles69();
    claw_shot_city_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default68);
    });
  }
});

// src/modules/location-huds/locations/derr-dunes/index.js
var derr_dunes_default, init_derr_dunes = __esm({
  "src/modules/location-huds/locations/derr-dunes/index.js"() {
    init_cheese_selectors();
    derr_dunes_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("derr-dunes", ["crunchy_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/desert-city/styles.css
var styles_default69, init_styles70 = __esm({
  "src/modules/location-huds/locations/desert-city/styles.css"() {
    styles_default69 = `.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)}
`;
  }
});

// src/modules/location-huds/locations/desert-city/index.js
var desert_city_default, init_desert_city = __esm({
  "src/modules/location-huds/locations/desert-city/index.js"() {
    init_utils2();
    init_styles70();
    desert_city_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default69);
    });
  }
});

// src/modules/location-huds/locations/desert-warpath/styles.css
var styles_default70, init_styles71 = __esm({
  "src/modules/location-huds/locations/desert-warpath/styles.css"() {
    styles_default70 = `.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:16px;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{position:absolute;bottom:-3px;left:-3px;width:70px;height:25px;font-size:15px;line-height:20px;background:url(https://www.mousehuntgame.com/images/ui/hud/desert_warpath/desert_warpath_opponent.png) no-repeat bottom center / 75px;border-radius:20px}.warpathHUD-wave-mouse.mousehuntTooltipParent.active.laser_targetted{color:#ff824c;filter:drop-shadow(0 -2px 3px #ea4700)}.warpathHUD-wave-mouse-powerType{width:30px;height:30px;margin-top:0}.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{height:33px;line-height:2.5}.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}.warpathHUD-waveContainer.warpathHUD-engaged .warpathHUD-wave{border-radius:5px;box-shadow:inset 0 0 10px 4px #fc4848}.warpathHUD-engaged .warpathHUD-wave-mouse .mousehuntTooltip.tight.top{display:none}.warpathHud-missle-activate{position:absolute;top:-15px;left:-150px;cursor:pointer;opacity:.4;transition:.3s;transform:rotate(270deg) scale(.8);animation:none}.wave_4 .warpathHud-missle-activate,.wave_portal .warpathHud-missle-activate{left:-26px}.warpathHud-missle-activate:hover{opacity:1;transform:rotate(270deg) scale(1)}.warpathHUD-engaged .warpathHud-missle-activate{filter:hue-rotate(281deg);opacity:.9}.warpathHUD-streakContainer.streak_0 .warpathHUD-streak-image-empty{color:transparent;text-shadow:none}.warpathHUD-streak-victories{top:36px;left:7px;z-index:1;width:43px;height:18px;font-size:12px;line-height:18px;text-align:center;background-color:#000;border-radius:3px;box-shadow:inset 1px 0 2px 1px #633e2a,inset 1px 0 2px 1px #8f5d42}.warpathHUD-enterPortalButton.disabled{opacity:.6;transition:opacity .3s ease-in}.warpathHUD-enterPortalButton.disabled:hover{opacity:1}.warpathHUD-wave-mouse-image{outline:1px solid #915931}.warpathHUD-wave-mouse:hover .warpathHUD-wave-mouse-image{outline:1px solid #e1ae3e}.warpathHUD-streakContainer.streak_7 .warpathHUD-streak-quantity{animation:.9s quesoGesyerBackgroundFlare 10}@media (prefers-reduced-motion: reduce){.warpathHUD-streakContainer.streak_7 .warpathHUD-streak-quantity{animation:none}}
`;
  }
});

// src/modules/location-huds/locations/desert-warpath/index.js
var engaged, addMissiles, desert_warpath_default, init_desert_warpath2 = __esm({
  "src/modules/location-huds/locations/desert-warpath/index.js"() {
    init_utils2();
    init_styles71();
    engaged = !1, addMissiles = () => {
      let container = document.querySelector(".warpathHUD-waveContainer");
      if (!container || container.querySelector(".warpathHud-missle-activate"))
        return;
      let trigger = makeElement("div", ["warpathHud-missle-activate", "warpathHUD-missile"]);
      container.append(trigger), trigger.addEventListener("click", () => {
        engaged = !engaged, engaged ? container.classList.add("warpathHUD-engaged") : container.classList.remove("warpathHUD-engaged");
      });
      let launchMissile = (event) => {
        if (!container.classList.contains("warpathHUD-engaged") || event.target.classList.contains("warpathHUD-missile") || !engaged)
          return;
        let x = event.clientX ? event.clientX - container.getBoundingClientRect().left : Math.floor(Math.random() * container.getBoundingClientRect().width);
        x += Math.floor(Math.random() * 50) - 25, hg.views.HeadsUpDisplayDesertWarpathView.spawnMissile(x, 1);
        let missile;
        setTimeout(() => {
          missile = container.querySelectorAll('.warpathHUD-missile[style*="left: ' + x + 'px"]'), !(!missile || missile.length === 0) && missile.forEach((m) => {
            setTimeout(() => {
              m.classList.add("mh-ui-fade");
            }, 50), setTimeout(() => {
              m.classList.add("mh-ui-fade-out");
            }, 100), setTimeout(() => {
              m.remove();
            }, 500);
          });
        }, 700);
      };
      container.addEventListener("click", launchMissile);
    }, desert_warpath_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default70), addMissiles();
    });
  }
});

// src/modules/location-huds/locations/dojo/index.js
var dojo_default, init_dojo = __esm({
  "src/modules/location-huds/locations/dojo/index.js"() {
    init_cheese_selectors();
    dojo_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("dojo", ["maki_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/dracano/index.js
var dracano_default, init_dracano = __esm({
  "src/modules/location-huds/locations/dracano/index.js"() {
    init_cheese_selectors();
    dracano_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("dracano", ["inferno_havarti_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/elub-shore/index.js
var elub_shore_default, init_elub_shore = __esm({
  "src/modules/location-huds/locations/elub-shore/index.js"() {
    init_cheese_selectors();
    elub_shore_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("elub-shore", ["shell_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/floating-islands/styles.css
var styles_default71, init_styles72 = __esm({
  "src/modules/location-huds/locations/floating-islands/styles.css"() {
    styles_default71 = `.floatingIslandsHUD-islandLoot-label{color:transparent}.floatingIslandsHUD-islandLoot-label:before{position:absolute;top:2px;right:3px;bottom:3px;width:85px;font-size:13px;font-variant:small-caps;color:#e2d8b6;text-shadow:1px 1px #43311c;content:"Mice can drop";background-color:#78502d;border-bottom-left-radius:10px}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:inset 0 0 13px 3px gold,2px 0 1px gold}.floatingIslandsAdventureBoardSkyMap-horizontalPowerTypes .floatingIslandsHUD-powerType.active:before{border-radius:5px 5px 50px 50px;box-shadow:0 0 20px gold inset}.floatingIslandsAdventureBoardSkyMap-verticalPowerTypes .floatingIslandsHUD-powerType.active:before{top:1px;border-radius:50px 5px 5px 50px;box-shadow:0 0 20px 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:11px}.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{display:flex;align-items:center;justify-content:center;width:70%;height:15px;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{color:#0c3e0e;text-shadow:1px 1px 1px #9ab59a}.mh-ui-fi-enemy-countdown{position:absolute;top:0;bottom:-2px;left:-1px;z-index:4;width:auto;min-width:70px;padding-right:2px;padding-left:6px;font-size:11px;line-height:26px;white-space:nowrap;background-color:#51250a;border-radius:6px 5px 5px 0;box-shadow:1px -1px #b2630e,inset 1px 0 0 1px #7d5430}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{margin-right:4px;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{box-shadow:inset 1px -1px 5px 7px #fb7660}.floatingIslandsHUD-enemy-thumbContainer{overflow:hidden}.floatingIslandsAdventureBoard-info span{line-height:1.5}.floatingIslandsHUD-jetstream{position:absolute;top:15px;right:15px;z-index:10;width:30px;height:30px}.launch_pad_island .floatingIslandsHUD-jetstream{top:12px;right:47px}.floatingIslandsHUD-jetstream .trapImageView-trapAura.active{width:30px;height:30px;margin:0;visibility:visible;opacity:.5}.floatingIslandsHUD-jetstream .trapImageView-trapAura.active:hover{opacity:1}.floatingIslandsHUD-jetstream .trapImageView-trapAura.active .mousehuntTooltip{top:-20px;left:-250px;z-index:15;width:235px}.floatingIslandsHUD-jetstream-time{position:absolute;top:-20px;right:0;width:auto;min-width:100px;font-size:13px;color:#71d0ff;text-align:right;text-shadow:1px 1px 0 rgb(0 0 0 / 50%)}.floatingIslandsHUD-inventoryBag-item .floatingIslandsHUD-item-image,.floatingIslandsHUD-inventoryBag-item.active .floatingIslandsHUD-item-image{height:50px;background-color:transparent;border:none;box-shadow:none;transition:.2s ease-in}.floatingIslandsHUD-inventoryBag-item:hover .floatingIslandsHUD-item-image{background-size:55px}.inventoryBag .floatingIslandsHUD-inventoryBag-item-quantity.quantity{top:35px;padding:2px;font-size:12px;box-shadow:0 0 100px #fffc inset,0 0 2px #333}.floatingIslandsHUD-statItem-quantity{z-index:1}.inventoryBag .floatingIslandsHUD-inventoryBag-item-name{margin:5px 0;font-size:10px}.floatingIslandPaperDoll-mod.sky_pirates.level_1{animation:dirigibleFloat 5s infinite}.floatingIslandsWorkshop-dirigiblePreview .floatingIslandsAirship:before{position:absolute;top:45px;right:-10px;left:-30px;display:block;height:170px;overflow:hidden;content:"";background:url(https://i.mouse.rip/airship-shadow.png) no-repeat;background-position:bottom center;background-size:190px;opacity:.2;transform:perspective(600px) rotateX(67deg)}.floatingIslandsWorkshop-dirigiblePreview .floatingIslandsAirship.animate:before{animation:mh-improved-dirigible-float-shadow 2s infinite}@keyframes mh-improved-dirigible-float-shadow{0%{top:45px;background-size:180px}50%{top:40px;background-size:190px}to{top:45px;background-size:180px}}@media (prefers-reduced-motion: reduce){.floatingIslandPaperDoll-mod{animation:none}.floatingIslandsWorkshop-dirigiblePreview .floatingIslandsAirship:before{animation:none}}.floatingIslandsHUD-warningContainer{top:20px;left:548px}.floatingIslandsHUD-statItemContainer{left:250px;justify-content:space-evenly;width:350px}.floatingIslandsHUD-inventoryBagButton{right:110px}.floatingIslandsHUD-statItem.active{display:flex;flex-direction:column;align-items:center}.floatingIslandsHUD-bait-image{inset:1px;background-repeat:no-repeat;background-size:32px;box-shadow:1px 1px 1px #b75d06 inset,1px 1px 1px #b75d06 inset}a.floatingIslandsHUD-bait-image:hover{background-size:32px;box-shadow:0 0 2px 2px #10ff00 inset}.floatingIslandsHUD-bait-craftingItem-image{background-repeat:no-repeat;background-position:1px 2px;background-size:23px;box-shadow:1px 1px 1px #b75d06 inset,1px 1px 1px #b75d06 inset,1px -1px 1px #b75d06 inset}.sky_pirate_cheese .floatingIslandsHUD-bait-craftingItem-image{background-position:1px 0;background-size:22px;box-shadow:1px 1px 1px #b75d06 inset,1px 1px 1px #b75d06 inset}.floatingIslandsHUD-bait.sky_cheese.extra_rich_sky_cheese .floatingIslandsHUD-bait-craftingItem-image{top:24px}.floatingIslandsHUD-bait.sky_cheese.extra_rich_sky_cheese .floatingIslandsHUD-bait-image.extra_rich_sky_cheese{background-position:3px 4px;background-size:29px}.floatingIslandsWorkshop-dirigiblePreview .floatingIslandsAirship-part{top:-10px;background-repeat:no-repeat}.floatingIslandsWorkshop-part.active .floatingIslandsWorkshop-part-border,.floatingIslandsWorkshop-part:hover .floatingIslandsWorkshop-part-border{background-color:#fcfcef;border:1px solid #edd28a}.floatingIslandsWorkshop-part.active{order:-1}.floatingIslandsWorkshop-part.active .floatingIslandsWorkshop-part-border:after{border-width:2px}.floatingIslandsWorkshop-part-state.active .mousehuntActionButton.selected,.floatingIslandsWorkshop-part-state.active .mousehuntActionButton.selected:before{background:none;border:none;box-shadow:none}.floatingIslandsWorkshop-part-state.active .mousehuntActionButton span{font-style:normal}.floatingIslandsWorkshop-part .floatingIslandsWorkshop-part-border{border:1px solid #edd28a;box-shadow:inset 0 -1px 5px 2px #edd28a}.floatingIslandsWorkshop-part-state .mousehuntActionButton.lightBlue{box-shadow:none}.floatingIslandsWorkshop-part{display:flex;flex-direction:column;align-items:center;margin-bottom:10px}.floatingIslandsHUD .floatingIslandsHUD-enemyContainer.hasEnemy:hover .floatingIslandsHUD-enemy-thumb{transform:scale(1.3)}.floatingIslandsHUD .floatingIslandsHUD-enemyContainer.hasEnemy:active .floatingIslandsHUD-enemy-thumb{transform:scale(1.3) rotate(360deg)}.floatingIslandsHUD .floatingIslandsHUD-enemyContainer.hasEnemy .floatingIslandsHUD-enemy-thumb{transition:.4s ease-in}.floatingIslandsHUD-modPanelTooltip-islandEffects.active .floatingIslandsHUD-modPanelTooltip-effectContainer.specialEffect:after,.floatingIslandsHUD-modPanelTooltip-islandEffects.active .floatingIslandsHUD-modPanelTooltip-effectContainer.reward:after,.floatingIslandsHUD-modPanelTooltip-islandEffects.complete .floatingIslandsHUD-modPanelTooltip-effectContainer.specialEffect:after,.floatingIslandsHUD-modPanelTooltip-islandEffects.complete .floatingIslandsHUD-modPanelTooltip-effectContainer.reward:after,.floatingIslandsHUD-modPanelTooltip-islandEffects.complete .floatingIslandsHUD-modPanelTooltip-effectContainer.oneTimeReward:after{bottom:3px}.floatingIslandsHUD-modPanelTooltip-effect{font-size:12px;text-align:center}.floatingIslandsHUD-item-image.cloud_curd_crafting_item{margin-right:3px;background-position:50% 10%;background-size:30px}.floatingIslandsHUD-modPanelTooltip .floatingIslandsHUD-item-image.cloud_curd_crafting_item{background-position:50% 2px}.floatingIslandsHUD-bait.sky_cheese.extra_rich_sky_cheese .floatingIslandsHUD-bait-quantity.sky_cheese{top:8px}.floatingIslandsHUD-navigationButtons.showSkyPalace .floatingIslandsHUD-skyPalaceFuel .quantity{font-size:13px}.floatingIslandsAdventureBoardSkyMap-rerollButton{animation:mh-improved-fade-busy 3s 1}.floatingIslandsAdventureBoardSkyMap-rerollButton.busy{pointer-events:none;animation:none}.floatingIslandsHUD-modPanel.highlight:after{border:1px solid #f5d98d;box-shadow:0 0 3px 3px #ffdcbe inset}.floatingIslandsHUD-modPanelTooltip-effect-label{color:#f4d78c;text-align:center;text-shadow:1px 1px 1px #754426}.floatingIslandsHUD-statItem{width:auto}.floatingIslandsWorkshop-unlockButton.complete,.floatingIslandsWorkshop-unlockSkyPalaceItemButton.complete{filter:hue-rotate(300deg)}.floatingIslandsWorkshop-unlockSkyPalaceItemButton{top:unset;bottom:21px;left:340px;width:100%;height:37px;background-size:110px}.floatingIslandsWorkshop-skyPalace:hover .floatingIslandsWorkshop-skyPalace-upgradeImage.active{animation-name:mh-improved-shake;animation-duration:.5s;animation-iteration-count:infinite}.floatingIslandsHUD-modPanel-progress-pip{box-shadow:inset 0 0 2px 1px #6c3718}.floatingIslandsHUD-modPanel-progress-pip.active,.floatingIslandsHUD-modPanel-progress-pip.enemy,.floatingIslandsHUD-modPanel-progress-pip.player{box-shadow:none}.floatingIslandsHUD-statItem.active.hidden{display:none}.floatingIslandsHUD.island .floatingIslandsHUD-trapLibraryButton:hover{cursor:pointer}.floatingIslandsHUD-modPanel-progress,.floatingIslandsHUD-modPanel-progress-pip.player:before{counter-reset:tile tile-bw}.floatingIslandsHUD-modPanel-progress-pip:before{position:absolute;right:-3px;bottom:18px;font-size:14px;text-shadow:1px 1px #000;visibility:hidden;content:"";counter-increment:tile 1}.usingFuel .floatingIslandsHUD-modPanel-progress-pip:nth-child(odd):before{counter-increment:tile-bw}.floatingIslandsHUD-modPanel-progress-pip.enemy:before,.floatingIslandsHUD-modPanel-progress-pip.current:before{counter-increment:tile -1}.usingFuel .floatingIslandsHUD-modPanel-progress-pip.current:before{counter-increment:tile-bw -1}.usingFuel .floatingIslandsHUD-modPanel-progress-pip.enemy:before{counter-increment:tile 1}.active .floatingIslandsHUD-modPanel-progress-pip:before{text-shadow:1px 1px #fff}.usingFuel .floatingIslandsHUD-modPanel-progress-pip:before{color:#e0f8fa}.usingFuel .active .floatingIslandsHUD-modPanel-progress-pip:before{color:#023a56}.floatingIslandsHUD-modPanel-content:hover .floatingIslandsHUD-modPanel.active .floatingIslandsHUD-modPanel-progress-pip:last-child:before{visibility:visible;content:counter(tile)}.usingFuel .floatingIslandsHUD-modPanel-progress-pip:last-child:before{content:counter(tile)}.complete .floatingIslandsHUD-modPanel-progress-pip:before{visibility:hidden}.floatingIslandsAdventureBoardSkyMap-rerollImage:after{top:3px;background-image:url(https://i.mouse.rip/cyclone-stone.png)}.floatingIslandsAdventureBoardSkyMap-rerollButton:hover{border-radius:5px;box-shadow:inset 0 0 2px 1px #587565}.floatingIslandsAdventureBoardSkyMap-verticalPowerTypes .floatingIslandsHUD-powerType.active:after,.floatingIslandsAdventureBoardSkyMap-horizontalPowerTypes .floatingIslandsHUD-powerType.active:after{border-color:transparent}.floatingIslandsHUD-enemy-wardenProgress{top:-11px}
`;
  }
});

// src/modules/location-huds/locations/floating-islands/index.js
var humanizer2, toggleFuelClass, toggleFuel, addBossCountdown, addEnemyClass, getNextOcUpgradeCost, showGloreProgress, onSkyMapShow, showBWReminder, maybeChangeWarning, updateJetstreamTime, jsClone, showJetstream, makeAirshipDraggable, run, hud, floating_islands_default3, init_floating_islands3 = __esm({
  "src/modules/location-huds/locations/floating-islands/index.js"() {
    init_utils2();
    init_styles72();
    humanizer2 = setupHumanizer(), toggleFuelClass = (fuelCount, isActive) => {
      isActive ? fuelCount.classList.remove("active") : fuelCount.classList.add("active");
    }, toggleFuel = (skip = !1) => {
      var _a, _b, _c;
      let fuel = document.querySelector(".floatingIslandsHUD-fuel-button");
      if (!fuel)
        return;
      let fuelCount = document.querySelector(".floatingIslandsHUD-fuel-quantity");
      !fuelCount || (((_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) || !1 ? fuelCount.classList.add("active") : fuelCount.classList.remove("active"), skip) || fuel.addEventListener("click", (e) => {
        toggleFuelClass(fuelCount, e.target.classList.contains("active")), hg.views.HeadsUpDisplayFloatingIslandsView.toggleFuel(fuel);
      });
    }, addBossCountdown = () => __async(void 0, null, function* () {
      var _a, _b, _c;
      let existing = document.querySelector(".mh-ui-fi-enemy-countdown");
      existing && existing.remove();
      let 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;
      let name = ((_c = atts.enemy) == null ? void 0 : _c.abbreviated_name) || "Enemy";
      name = name.split(" ")[0];
      let huntsRemaining = atts.enemy_encounter_hunts_remaining || 0, bossCountdown = document.createElement("div");
      if (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), atts.has_encountered_enemy || atts.has_defeated_enemy)
        return;
      let goalContainer = document.querySelector(".floatingIslandsHUD-goalContainer");
      if (goalContainer) {
        goalContainer.append(bossCountdown);
        return;
      }
      let tries = 0, maxTries = 10, interval = setInterval(() => {
        goalContainer = document.querySelector(".floatingIslandsHUD-goalContainer"), goalContainer && (goalContainer.append(bossCountdown), clearInterval(interval)), tries += 1, tries >= maxTries && clearInterval(interval);
      }, 1e3 * tries);
    }), addEnemyClass = () => __async(void 0, null, function* () {
      var _a, _b, _c, _d, _e, _f, _g, _h;
      let 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) || !1, 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) || !1;
      if (!name || !type)
        return;
      let exists = document.querySelector(".mh-ui-fi-enemy-name");
      if (exists)
        exists.innerText = name;
      else {
        let enemyContainer = document.querySelector(".floatingIslandsHUD-islandTitle");
        if (!enemyContainer)
          return;
        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 !1;
      }
    }, showGloreProgress = () => __async(void 0, null, function* () {
      var _a, _b, _c;
      let items5 = yield getUserItems(["floating_islands_cloud_gem_stat_item", "floating_islands_sky_ore_stat_item"]);
      if (!(items5 && items5.length))
        return;
      let glass = document.querySelector(".floatingIslandsHUD-craftingItem.floating_islands_cloud_gem_stat_item"), ore = document.querySelector(".floatingIslandsHUD-craftingItem.floating_islands_sky_ore_stat_item");
      if (!glass || !ore)
        return;
      let existing = document.querySelectorAll(".mh-ui-fi-glore-progress");
      existing && existing.length && existing.forEach((el) => {
        el.remove();
      });
      let 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);
      nextUpgrade && (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 = () => {
      let roll = document.querySelector(".floatingIslandsAdventureBoardSkyMap-rerollButton");
      roll && 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;
      let 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), bwOff = !((_e = (_d = user.enviroment_atts) == null ? void 0 : _d.hunting_site_atts) != null && _e.is_fuel_enabled), 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", hasBw = Number.parseInt(bw.toString().replaceAll(",", ""), 10) >= 50;
      isStart && bwOff && hasBw && showHornMessage({
        title: "Bottled Wind Reminder",
        text: "Don't forget to activate your Bottled Wind!",
        button: "Activate",
        /**
         * Action to click the Bottled Wind button.
         */
        action: () => {
          setTimeout(() => {
            let button = document.querySelector(".floatingIslandsHUD-fuel-button");
            button && button.click();
          }, 750);
        },
        dismiss: 4e3,
        image: "https://www.mousehuntgame.com/images/ui/hud/floating_islands/items/bottled_wind_stat_item.png"
      });
    }, maybeChangeWarning = () => __async(void 0, null, function* () {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i;
      let isLAI = (_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_low_tier_island, isAtBoss = ((_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestFloatingIslands) == null ? void 0 : _e.hunting_site_atts) == null ? void 0 : _f.has_encountered_enemy) && !((_i = (_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestFloatingIslands) == null ? void 0 : _h.hunting_site_atts) != null && _i.has_defeated_enemy);
      if (!isLAI || !isAtBoss)
        return;
      let bossWarning = document.querySelector(".floatingIslandsHUD-warning.floatingIslandsHUD-powerTypeWarning.active");
      bossWarning && (bossWarning.innerHTML = "Use your most powerful setup!");
    }), updateJetstreamTime = () => __async(void 0, null, function* () {
      var _a, _b;
      let container = document.querySelector(".floatingIslandsHUD-jetstream-time");
      if (!container)
        return;
      if (!((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) != null && _b.jet_stream_active)) {
        container.innerHTML = "";
        return;
      }
      let expiry = document.querySelector(".floatingIslandsHUD-jetstream .trapImageView-tooltip-trapAura-expiry span");
      if (!expiry) {
        container.innerHTML = "";
        return;
      }
      let dateParts = expiry.innerText.split(" ");
      if (!dateParts.length || dateParts.length < 5) {
        container.innerHTML = "";
        return;
      }
      let month = dateParts[0], day = dateParts[1].replace(",", ""), year = dateParts[2], timeParts = dateParts[4].split(":"), hours = Number.parseInt(timeParts[0]), minutes = timeParts[1].slice(0, 2);
      dateParts[4].includes("pm") && hours !== 12 ? hours += 12 : dateParts[4].includes("am") && hours === 12 && (hours = 0);
      let expiryDate = Date.parse(`${month} ${day}, ${year} ${hours}:${minutes}`);
      if (Number.isNaN(expiryDate))
        return;
      let timeRemaining = expiryDate - /* @__PURE__ */ new Date(), duration = humanizer2(timeRemaining, {
        round: !0,
        units: ["d", "h", "m"],
        spacer: "",
        delimiter: " "
      });
      container.innerText !== duration && (container.innerText = duration);
    }), showJetstream = () => __async(void 0, null, function* () {
      var _a, _b;
      let exists = document.querySelector(".floatingIslandsHUD-jetstream");
      if (exists && exists.remove(), !((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) != null && _b.jet_stream_active) || document.querySelector(".floatingIslandsHUD-jetstream"))
        return;
      let container = document.querySelector(".floatingIslandsHUD");
      if (!container)
        return;
      let hudAura;
      if (getCurrentPage() === "camp") {
        let aura = document.querySelector(".trapImageView-trapAura.mousehuntTooltipParent.QuestJetStreamAura.active");
        if (!aura)
          return;
        hudAura = aura.cloneNode(!0), jsClone = hudAura;
      } else
        hudAura = jsClone;
      if (!hudAura)
        return;
      let tooltip = hudAura.querySelector(".mousehuntTooltip");
      tooltip && (tooltip.classList.remove("right"), tooltip.classList.add("left"));
      let auraContainer = makeElement("div", "floatingIslandsHUD-jetstream");
      auraContainer.append(hudAura), container.append(auraContainer);
      let timeRemainingEl = makeElement("div", "floatingIslandsHUD-jetstream-time");
      auraContainer.append(timeRemainingEl), updateJetstreamTime();
    }), makeAirshipDraggable = () => {
      let airship = document.querySelector(".floatingIslandsHUD.island .floatingIslandsHUD-airshipContainer");
      if (!airship)
        return;
      let isDragging = !1, startX, startY2, startTop, startLeft, moveAirship = (e) => {
        if (!isDragging)
          return;
        let dx = e.clientX - startX, dy = e.clientY - startY2;
        airship.style.top = `${startTop + dy}px`, airship.style.left = `${startLeft + dx}px`;
      };
      airship.addEventListener("mousedown", (e) => {
        e.preventDefault(), isDragging = !0, startX = e.clientX, startY2 = e.clientY, startTop = airship.offsetTop, startLeft = airship.offsetLeft, document.addEventListener("mousemove", moveAirship), document.addEventListener("mouseup", () => {
          isDragging = !1, document.removeEventListener("mousemove", moveAirship);
        }, { once: !0 });
      });
    }, run = () => __async(void 0, null, function* () {
      yield showJetstream(), yield addEnemyClass(), yield addBossCountdown(), yield maybeChangeWarning();
    }), hud = () => {
      toggleFuel(), showGloreProgress(), run(), showBWReminder(), onTravel(() => setTimeout(showBWReminder, 1500)), onEvent("ajax_response", run), document.addEventListener("horn-countdown-tick-minute", updateJetstreamTime), onDialogShow("floatingIslandsAdventureBoard.floatingIslandsDialog.skyPalace", onSkyMapShow), onRequest("environment/floating_islands.php", (request, data) => {
        run(), toggleFuel(!0), (data == null ? void 0 : data.action) === "launch" && setTimeout(() => {
          run(), showBWReminder();
        }, 2e3), setTimeout(() => run(), 2e3);
      });
    }, floating_islands_default3 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default71), hud(), getSetting("experiments.fi-draggable-airship") && makeAirshipDraggable();
    });
  }
});

// src/modules/location-huds/locations/forbidden-grove/styles.css
var styles_default72, init_styles73 = __esm({
  "src/modules/location-huds/locations/forbidden-grove/styles.css"() {
    styles_default72 = `.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}
`;
  }
});

// src/modules/location-huds/locations/forbidden-grove/index.js
var updateClosingTime2, hud2, forbidden_grove_default, init_forbidden_grove = __esm({
  "src/modules/location-huds/locations/forbidden-grove/index.js"() {
    init_utils2();
    init_styles73();
    init_cheese_selectors();
    updateClosingTime2 = () => {
      let timeLeftText = "", today = /* @__PURE__ */ new Date(), rotationLength = 20, rotationsExact = (today.getTime() / 1e3 - 1285704e3) / 3600 / rotationLength, rotationsInteger = Math.floor(rotationsExact), partialRotation = (rotationsExact - rotationsInteger) * rotationLength;
      if (partialRotation < 16) {
        let closes = (16 - partialRotation).toFixed(3), hours = Math.floor(closes), minutes = Math.ceil((closes - Math.floor(closes)) * 60);
        timeLeftText = `${hours}h ${minutes}m remaining`;
      }
      let timeLeftEl = document.createElement("div");
      return timeLeftEl.classList.add("forbiddenGroveHUD-grovebar-timeLeft"), timeLeftEl.innerText = timeLeftText, timeLeftEl;
    }, hud2 = () => {
      if (getCurrentLocation() !== "forbidden_grove")
        return;
      let hudBar = document.querySelector(".forbiddenGroveHUD-grovebar");
      if (!hudBar)
        return;
      let existing = document.querySelector(".forbiddenGroveHUD-grovebar-timeLeft");
      existing && existing.remove();
      let timeLeftEl = updateClosingTime2();
      hudBar.append(timeLeftEl);
      let timer = setInterval(updateClosingTime2, 60 * 1e3);
      onEvent("travel_complete", () => {
        clearInterval(timer);
      });
    }, forbidden_grove_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default72), cheese_selectors_default("forbidden-grove", [
        "ancient_cheese",
        "radioactive_blue_cheese",
        "magical_radioactive_blue_cheese",
        "moon_cheese",
        "crescent_cheese"
      ]), hud2();
    });
  }
});

// src/modules/location-huds/shared/folklore-forest/index.js
var saveHidden, isHidden, getToggleVisibilityMapping, toggleAllVisibility, isUnlocked, hideOrShowBlock, addToggle, addUpgradeVisibilityToggles, hasAddedUpgradeVisibilityToggles, folklore_forest_default2, init_folklore_forest2 = __esm({
  "src/modules/location-huds/shared/folklore-forest/index.js"() {
    init_utils2();
    saveHidden = (upgradeId, isHidden2) => {
      let upgradeIds = getSetting("location-huds.folklore-forest-visibility-toggles", {});
      upgradeIds[upgradeId] = isHidden2, saveSetting("location-huds.folklore-forest-visibility-toggles", upgradeIds);
    }, isHidden = (upgradeId) => getSetting("location-huds.folklore-forest-visibility-toggles", {})[upgradeId] || !1, getToggleVisibilityMapping = () => ({
      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 = () => {
      let mapping = getToggleVisibilityMapping(), upgradeIds = Object.keys(mapping);
      upgradeIds.length !== 0 && upgradeIds.forEach((upgradeId) => {
        hideOrShowBlock(upgradeId, isHidden(upgradeId));
      });
    }, isUnlocked = (upgradeId) => {
      var _a, _b, _c;
      let userQuest;
      if ((_a = user.quests) != null && _a.QuestTableOfContents)
        userQuest = user.quests.QuestTableOfContents;
      else if ((_b = user.quests) != null && _b.QuestProloguePond)
        userQuest = user.quests.QuestProloguePond;
      else if ((_c = user.quests) != null && _c.QuestForewordFarm)
        userQuest = user.quests.QuestForewordFarm;
      else
        return !1;
      if (!userQuest || !userQuest.upgrades)
        return !1;
      let upgrade = userQuest.upgrades.find((u) => u.type === upgradeId);
      return upgrade ? upgrade.is_unlocked : !1;
    }, hideOrShowBlock = (blockId, isBlockToggled) => {
      let mapping = getToggleVisibilityMapping();
      if (!mapping[blockId]) {
        let quill = document.querySelector(".tableOfContentsProgressView-quillContainer");
        if (!quill)
          return;
        if (isBlockToggled) {
          blockId === "golden_quill" ? quill.classList.remove("quill--gold") : blockId === "silver_quill" && quill.classList.remove("quill--silver");
          return;
        }
        blockId === "golden_quill" && isUnlocked("golden_quill") ? quill.classList.add("quill--gold") : blockId === "silver_quill" && isUnlocked("silver_quill") && quill.classList.add("quill--silver");
        return;
      }
      let selector = mapping[blockId];
      if (!selector)
        return;
      let element = document.querySelector(selector);
      element && element.classList.toggle("active", !isBlockToggled);
    }, addToggle = (upgradeBlock) => {
      if (upgradeBlock.classList.contains("toggle-added"))
        return;
      let blockId = upgradeBlock.classList.value.replace("folkloreForestRegionView-dialog-block", "").replace("active", "").replace("prologue_pond", "").replace("table_of_contents", "").trim(), isBlockToggled = isHidden(blockId), toggle = makeElement("div", ["mhui-folklore-forest-upgrade-toggle", "mousehuntActionButton", "tiny", "lightBlue"]), 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);
      });
      let action = upgradeBlock.querySelector(".folkloreForestRegionView-dialog-block-action");
      action ? action.append(toggle) : upgradeBlock.append(toggle), upgradeBlock.classList.add("toggle-added"), upgradeBlock.classList.add(isBlockToggled ? "toggle-is-hidden" : "toggle-is-visible");
    }, addUpgradeVisibilityToggles = () => {
      if (hasAddedUpgradeVisibilityToggles)
        return;
      hasAddedUpgradeVisibilityToggles = !0;
      let pondUpgrades = document.querySelectorAll(".folkloreForestRegionView-dialog-blockContainer.upgrades .folkloreForestRegionView-dialog-block.prologue_pond.active"), bookUpgrades = document.querySelectorAll(".folkloreForestRegionView-dialog-blockContainer.upgrades .folkloreForestRegionView-dialog-block.table_of_contents.active");
      if (!(!pondUpgrades || !bookUpgrades)) {
        for (let upgrade of pondUpgrades)
          addToggle(upgrade);
        for (let upgrade of bookUpgrades)
          addToggle(upgrade);
      }
    }, hasAddedUpgradeVisibilityToggles = !1, folklore_forest_default2 = () => __async(void 0, null, function* () {
      toggleAllVisibility(), onDialogShow("fabledForestDialog", addUpgradeVisibilityToggles), onDialogHide(() => hasAddedUpgradeVisibilityToggles = !1), onTurn(toggleAllVisibility, 500), onRequest("*", toggleAllVisibility);
    });
  }
});

// src/modules/location-huds/locations/foreword-farm/styles.css
var styles_default73, init_styles74 = __esm({
  "src/modules/location-huds/locations/foreword-farm/styles.css"() {
    styles_default73 = `.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:20px}.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{height:40px}.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}.folkloreForestRegionView-dialog-block-name{justify-content:center;padding:0;text-align:center}.folkloreForestRegionView-dialog-title{padding-top:5px}.forewordFarmPlantDialogView-plant-header .folkloreForestRegionView-dialog-block-icon{width:32px;height:32px;margin-top:4px;margin-left:5px;border:1px solid #897225;box-shadow:none}.folkloreForestRegionView-button.disabled{opacity:.5}.forewordFarmPlantDialogView-plant:hover .folkloreForestRegionView-button.disabled{opacity:1}.forewordFarmPlantDialogView-plant-costContainer .folkloreForestRegionView-dialog-block-item-image{background-color:transparent;border:none}.forewordFarmHarvestBin{filter:drop-shadow(0 3px 5px #161616)}
`;
  }
});

// src/modules/location-huds/locations/foreword-farm/index.js
var foreword_farm_default2, init_foreword_farm2 = __esm({
  "src/modules/location-huds/locations/foreword-farm/index.js"() {
    init_utils2();
    init_folklore_forest2();
    init_keep_inventory_open();
    init_styles67();
    init_styles74();
    foreword_farm_default2 = () => __async(void 0, null, function* () {
      addHudStyles([styles_default66, styles_default73]), folklore_forest_default2(), keep_inventory_open_default({
        setting: "location-huds.foreward-farm-inventory-toggled",
        buttonSelector: ".folkloreForestRegionView-environmentInventory-expandButton",
        inventorySelector: ".folkloreForestRegionView-environmentInventoryContainer",
        inventoryOpenClass: "expanded",
        buttonOpenClass: "expanded"
      });
    });
  }
});

// src/modules/location-huds/locations/fort-rox/styles.css
var styles_default74, init_styles75 = __esm({
  "src/modules/location-huds/locations/fort-rox/styles.css"() {
    styles_default74 = `.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);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)}.fortRoxHUD .quantity{padding:2px;font-size:12px}.fortRoxHUD-lairBaitContainer .fortRoxHUD .quantity{padding:0;font-size:14px}.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}
`;
  }
});

// src/modules/location-huds/locations/fort-rox/index.js
var phaseLengths, makeTooltip2, updateNightBar, updateUpgradeTooltips, updateWallHP, addPortalClass, fort_rox_default2, init_fort_rox2 = __esm({
  "src/modules/location-huds/locations/fort-rox/index.js"() {
    init_utils2();
    init_styles75();
    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 = []) => {
      let existing = document.querySelectorAll(".added-frox-tooltip");
      existing.length && existing.forEach((tooltip2) => {
        tooltip2.remove();
      });
      let tooltip = makeElement("div", ["added-frox-tooltip", "mousehuntTooltip", "tight", direction, ...customClass]);
      return makeElement("div", "mousehuntTooltip-content", text, tooltip), makeElement("div", "mousehuntTooltip-arrow", "", tooltip), tooltip;
    }, updateNightBar = () => {
      let bar = document.querySelector(".fortRoxHUD-timeline-phases");
      if (!bar)
        return;
      let phaseBars = bar.querySelectorAll(".fortRoxHUD-timeline-phase-marker");
      phaseBars.length && phaseBars.forEach((phaseBar) => {
        var _a, _b, _c, _d;
        let phaseClass = [...phaseBar.classList].find((className) => className.startsWith("stage_")), phaseLength = phaseLengths[phaseClass];
        if (!phaseLength)
          return;
        document.createElement("div").classList.add("fortRoxHUD-timeline-phase-time");
        let tooltipText = [];
        phaseBar.classList.contains("past") ? tooltipText.push("Phase complete.") : 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>`) : tooltipText.push(`${phaseLength.hunts} hunts. <div class='tooltip-power'>Use ${phaseLength.powerType} power type.</div>`);
        let tooltip = makeTooltip2(tooltipText.join(" "), "bottom", "fortRoxHUD-timeline-phase-time-tooltip");
        phaseBar.append(tooltip), phaseBar.classList.add("mousehuntTooltipParent");
      });
    }, updateUpgradeTooltips = () => {
      let upgradeTooltips = document.querySelectorAll(".fortRoxHUD-fort-upgrade-boundingBox");
      if (!upgradeTooltips.length)
        return;
      let upgradeInfo = document.querySelectorAll(".fortRoxHUD-fort-upgrade-level-info");
      upgradeInfo.length && upgradeInfo.forEach((info) => {
        info.remove();
      }), upgradeTooltips.forEach((tooltip) => {
        var _a, _b;
        let type = tooltip.getAttribute("onclick").replace("app.views.HeadsUpDisplayView.hud.fortRoxShowConfirm('upgradeFort', ", "").replace("); return false;", "").replaceAll("'", ""), upgradeProgress = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFortRox) == null ? void 0 : _b.upgrades[type], upgradeKeys = Object.keys(upgradeProgress), completedUpgrades = upgradeKeys.reduce((count2, key) => (upgradeProgress[key].includes("complete") && count2++, count2), 0), name = tooltip.querySelector(`.fortRoxHUD-fort-upgrade-boundingBox-level.level_${completedUpgrades}`), upgradeText = `(Level ${completedUpgrades}/${upgradeKeys.length - 1})`;
        completedUpgrades === upgradeKeys.length - 1 && (upgradeText = "(Max Level)"), makeElement("div", "fortRoxHUD-fort-upgrade-level-info", upgradeText, name).classList.add("frox-upgrade-level-info");
      });
    }, updateWallHP = () => {
      let exists = document.querySelector(".mh-frox-wall-hp");
      exists && exists.remove();
      let hpBox = document.querySelector(".fortRoxHUD-hp");
      if (!hpBox)
        return;
      let wallPercent = user.quests.QuestFortRox.hp_percent.toFixed(0), 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"
      );
      let hp = Number.parseInt(user.quests.QuestFortRox.hp_percent, 10);
      hp === 100 ? hpBox.classList.add("frox-wall-perfect") : hp >= 75 ? hpBox.classList.add("frox-wall-high") : hp >= 50 ? hpBox.classList.add("frox-wall-medium") : hp >= 25 ? hpBox.classList.add("frox-wall-low") : hpBox.classList.add("frox-wall-very-low");
    }, addPortalClass = () => {
      var _a, _b, _c, _d;
      let portal = document.querySelector(".fortRoxHUD.dawn .fortRoxHUD-enterLairButton");
      if (!portal)
        return;
      portal.classList.remove("frox-no-portal", "frox-has-portal");
      let 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");
    }, fort_rox_default2 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default74), updateNightBar(), updateUpgradeTooltips(), updateWallHP(), addPortalClass();
    });
  }
});

// src/modules/location-huds/locations/fungal-cavern/styles.css
var styles_default75, init_styles76 = __esm({
  "src/modules/location-huds/locations/fungal-cavern/styles.css"() {
    styles_default75 = `.fungalCavernHUD-craftingItem-quantity.quantity{position:absolute;top:1px;left:-7px;width:52px;height:15px;font-size:12px;font-weight:400;line-height:1.3;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}.active .fungalCavernHUD-bait-quantity.quantity,.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)}.fungalCavernHUD-zoneHelpContainer{font-size:12px}
`;
  }
});

// src/modules/location-huds/locations/fungal-cavern/index.js
var fungal_cavern_default, init_fungal_cavern = __esm({
  "src/modules/location-huds/locations/fungal-cavern/index.js"() {
    init_utils2();
    init_styles76();
    fungal_cavern_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default75);
    });
  }
});

// src/modules/location-huds/locations/great-gnarled-tree/index.js
var great_gnarled_tree_default, init_great_gnarled_tree = __esm({
  "src/modules/location-huds/locations/great-gnarled-tree/index.js"() {
    init_cheese_selectors();
    great_gnarled_tree_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("great-gnarled-tree", ["gnarled_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/harbour/styles.css
var styles_default76, init_styles77 = __esm({
  "src/modules/location-huds/locations/harbour/styles.css"() {
    styles_default76 = `.harbourHUD-map-mapImage{height:155px;transition:.3s ease-in-out;transform-origin:bottom center}.harbourHUD-mapContainer:hover .harbourHUD-map-mapImage{transform:scale(1.1)}.harbourHUD-mouse-name{text-shadow:1px 1px 2px #000,0 0 4px #fff}.harbourHUD-popup-title{text-shadow:none}.harbour-popup .harbourHUD-area-mice{display:flex;justify-content:center}.harbourHUD-mouse.uncaught{transition:.2s ease-in-out}.harbourHUD-mouse.uncaught:hover{transform:scale(1.1)}
`;
  }
});

// src/modules/location-huds/locations/harbour/index.js
var harbour_default2, init_harbour2 = __esm({
  "src/modules/location-huds/locations/harbour/index.js"() {
    init_utils2();
    init_styles77();
    harbour_default2 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default76);
    });
  }
});

// src/modules/location-huds/locations/iceberg/styles/bob-iceberg.css
var bob_iceberg_default, init_bob_iceberg = __esm({
  "src/modules/location-huds/locations/iceberg/styles/bob-iceberg.css"() {
    bob_iceberg_default = `.icebergHud .timeline .icebergContainer .iceberg{z-index:1;width:110px;height:44px;background-position:bottom;background-size:contain;border-bottom-left-radius:8px;transition:.4s;transform-origin:top;animation:6s dirigibleFloat ease-in-out infinite}@media (prefers-reduced-motion: reduce){.icebergHud .timeline .icebergContainer .iceberg{animation:none}}.icebergHud .timeline:after{position:absolute;right:22px;bottom:-8px;left:22px;box-sizing:border-box;display:block;width:auto;height:10px;content:"";background-color:#6185c5;border:1px solid #5974a6;border-bottom-right-radius:5px}.icebergHud .cutaway{z-index:5}.icebergHud .timeline .chest{z-index:4}.icebergHud .timeline{top:5px}.icebergHud .timeline .icebergContainer .iceberg:hover{transform-origin:bottom center;animation:3s mh-improved-shake infinite}.icebergHud .timeline .icebergContainer .iceberg:active{animation-duration:1s}.waterline{pointer-events:none}
`;
  }
});

// src/modules/location-huds/locations/iceberg/styles/styles.css
var styles_default77, init_styles78 = __esm({
  "src/modules/location-huds/locations/iceberg/styles/styles.css"() {
    styles_default77 = `.icebergHud.bonus .bonus_timeline .turnsLeft{top:0;display:inline-flex;align-items:center;font-size:14px;border-color:#666;border-radius:0}.remaining-distance,.remaining-stage-distance{margin:2px 0;font-size:10px}.remaining-stage-distance{padding-top:2px;border-top:1px solid #a4b5bf}.icebergHud .cutaway .currentPhase{position:absolute;bottom:2px;padding-top:5px;margin-top:3px;font-size:14px;border-top:1px solid #a4b5bf}.icebergStatusTooltip{bottom:-3px;left:180px;width:325px;padding:8px 7px 6px 0;background-color:#fafafae5;border:1px solid #a4b5bf;box-shadow:0 1px 3px -1px #141414}.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:15px}.icebergStatusTooltip .hunts-wrapper div{display:flex;align-items:center;justify-content:space-evenly;width:100%;margin:0}.icebergStatusTooltip .hunts-wrapper div:first-child{margin-top:0;text-align:center}.icebergStatusTooltip .iceberg-sections{width:160px}.icebergStatusTooltip .iceberg-section{position:relative;display:flex;place-items:center start;justify-content:space-between;width:auto;margin-bottom:.25em;overflow:visible}.icebergStatusTooltip .iceberg-section.complete{color:#989898;opacity:.6}.icebergStatusTooltip .iceberg-section.complete .iceberg-section-name:before{position:absolute;top:1px;left:-10px;width:10px;height:10px;content:"";background:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png) 0 0 no-repeat;background-size:contain;opacity:1}.icebergStatusTooltip .iceberg-section.incomplete{color:#488589}.icebergStatusTooltip .iceberg-section.current:before{position:absolute;top:1px;left:-7px;font-size:8px;color:#6aa9af;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}.icebergHud .cutaway .wax .quantity,.icebergHud .cutaway .sticky .quantity{box-sizing:border-box;width:38px;padding:0;margin-top:22px;margin-left:4px;font-size:12px;font-weight:400;border-color:#89989e;border-radius:2px 2px 5px 5px}.icebergHud .cutaway .sticky .quantity{margin-top:26px}.icebergHud .cutaway .drill .quantity{top:28px;left:110px;font-size:14px;text-align:left;text-shadow:1px 1px #000}.iceberg-section.current{font-weight:900}.icebergHud .cutaway .depth,.icebergHud .cutaway .depth.early{top:3px;bottom:8px;left:25px;z-index:4;min-width:100px;padding-top:5px;font-size:11px;color:#000;background:#fafafae5;border-color:#8d98a0;border-bottom:1px solid #9aa8b2;border-radius:0;box-shadow:2px 0 2px -3px #8a949d}.icebergHud .cutaway .drill .heatContainer .heat{mix-blend-mode:overlay}.icebergStatusTooltip .hunts-wrapper strong{margin:0;font-size:11px;font-weight:900;line-height:1.125;text-align:center}.icebergStatusTooltip.mousehuntTooltip{pointer-events:all}.icebergStatusTooltip.mousehuntTooltip .mousehuntTooltip-arrow{top:70%;left:-24px;border-color:transparent #a4b5bf transparent transparent;border-width:12px}.icebergStatusTooltip.mousehuntTooltip .mousehuntTooltip-arrow:after{bottom:-10px;left:-8px;border-color:transparent #edf1f8 transparent transparent;border-width:10px}.icebergHud .cutaway .icebergContainer .label{padding:5px;font-size:12px;color:#142e2c;border-radius:5px}.icebergMap img{width:600px}.icebergHud .cutaway .drill .help b.warning{display:block}.icebergHud .cutaway .drill .help{position:absolute;top:90px;right:-55px;width:400px}.mh-improved-stick-iceberg-tooltip .icebergStatusTooltip.mousehuntTooltip{display:block}.mh-improved-stick-iceberg-tooltip .icebergStatusTooltip.mousehuntTooltip .mousehuntTooltip-arrow{display:none}.mh-improved-stick-iceberg-tooltip.depth.mousehuntTooltipParent:hover>.mousehuntTooltip{animation:none!important}.icebergHud .cutaway{filter:drop-shadow(0 1px 2px #141414)}.icebergHud .timeline .chest{transition:.2s ease-out}.icebergHud .timeline .chest:hover{transform:scale(1.5)}.icebergHud .timeline .chest:hover .mousehuntTooltip{transform:scale(.75);animation:none}.icebergHud .timeline .chest:active{animation:.4s mh-improved-shake-scaled infinite}@media (prefers-reduced-motion: reduce){.icebergHud .timeline .chest:active{animation:none}}span.user_progress_container .user_progress{color:#000!important}.icebergHud .cutaway .charm .mousehuntTooltip{width:65px}.icebergHud .cutaway .charm.sticky .mousehuntTooltip{width:83px}.icebergHud .cutaway .charm.sticky .mousehuntTooltip .mousehuntArmNowButton{top:15px}.icebergHud .cutaway .icebergContainer .label.phase_2{border:1px solid #bbe0f5}.icebergHud .cutaway .icebergContainer .label.phase_1{border:1px solid #9fd5e3;box-shadow:none}.icebergHud.bonus .bonus_timeline .help{top:5px;left:120px;padding:5px;background-color:#e4f6fe}
`;
  }
});

// src/modules/location-huds/locations/iceberg/index.js
var getSections, calculateRemaining, calculateCompletion, calculateAverage, calculateStageHunts, getQuestProgress, roundProgress, getTooltipText, addDeepWarning, hud3, makeTooltipSticky, iceberg_default3, init_iceberg3 = __esm({
  "src/modules/location-huds/locations/iceberg/index.js"() {
    init_utils2();
    init_bob_iceberg();
    init_styles78();
    getSections = (quest) => {
      let 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
        }
      ];
      return quest.isDeep && sections.push({
        name: "Hidden Depths",
        where: "1800-2000 ft",
        length: 200,
        complete: !1
      }), sections;
    }, calculateRemaining = (depth, stageStart, stageEnd) => {
      let stage = stageEnd - depth, stagePercent = stage / (stageEnd - stageStart) * 100;
      return { stage, stagePercent };
    }, calculateCompletion = (depth, stages) => stages.map((stageEnd) => depth >= stageEnd), calculateAverage = (progress, hunts, isDeep, depth) => isDeep ? (depth + 1800) / hunts : progress / hunts, calculateStageHunts = (stage, avg) => Math.ceil(stage / avg), getQuestProgress = () => {
      var _a;
      let quest = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestIceberg;
      if (!quest)
        return !1;
      let data = {
        progress: quest.user_progress || 0,
        hunts: quest.turns_taken || 0,
        chests: quest.chests || [],
        isDeep: quest.in_bonus || !1
      }, depth = data.progress, stages = [300, 600, 1600, 1800], stageIndex = stages.findIndex((stageEnd) => depth < stageEnd), { stage, stagePercent } = calculateRemaining(depth, stages[stageIndex - 1] || 0, stages[stageIndex]), complete = calculateCompletion(depth, stages), avg = calculateAverage(data.progress, data.hunts, data.isDeep, depth), stageHunts = calculateStageHunts(stage, avg), remaining2 = {
        stage,
        stagePercent: 100 - stagePercent,
        total: 1800 - depth,
        totalPercent: depth / 1800 * 100,
        complete: {
          tunnels: complete[0],
          bulwark: complete[1],
          bombing: complete[2],
          depths: complete[3],
          lair: depth >= 1800
        },
        isLair: depth >= 1800,
        avg,
        stageHunts
      };
      return __spreadValues(__spreadValues({}, data), remaining2);
    }, roundProgress = (progress) => Number.isNaN(progress) || progress <= 0 ? "0" : progress >= 100 ? "100" : Number(progress.toFixed(2)).toString(), getTooltipText = (quest) => {
      let wrapper = makeElement("div", "mousehuntTooltip-content"), progress = makeElement("div", "hunts-wrapper");
      if (makeElement("div", "average-hunts", `Avg. ${roundProgress(quest.avg)} ft/hunt`, progress), !quest.isLair) {
        let stageProgressPercent = makeElement("div", "stage-progress-percent");
        if (makeElement("span", "progress-label", "Stage Progress: ", stageProgressPercent), makeElement("span", ["progress-label-short", "hidden"], "Stage: ", stageProgressPercent), makeElement("strong", "", `${roundProgress(quest.stagePercent)}%`, stageProgressPercent), progress.append(stageProgressPercent), !quest.isDeep) {
          let totalProgressPercent = makeElement("div", "total-progress-percent");
          makeElement("span", "progress-label", "Total Progress: ", totalProgressPercent), makeElement("span", ["progress-label-short", "hidden"], "Total: ", totalProgressPercent), makeElement("strong", "", `${roundProgress(quest.totalPercent)}%`, totalProgressPercent), progress.append(totalProgressPercent);
        }
      }
      wrapper.append(progress);
      let sectionsWrapper = makeElement("div", "iceberg-sections"), sections = getSections(quest), currentSection = !1;
      return sections.forEach((sectionData) => {
        quest.isDeep && sectionData.name !== "Hidden Depths" && (sectionData.complete = !0);
        let section = makeElement("div", ["iceberg-section", sectionData.complete ? "complete" : "incomplete"]);
        !currentSection && !sectionData.complete && (section.classList.add("current"), currentSection = !0), makeElement("div", "iceberg-section-name", sectionData.name, section), makeElement("div", "iceberg-section-length", sectionData.where, section), sectionsWrapper.append(section);
      }), wrapper.append(sectionsWrapper), wrapper;
    }, addDeepWarning = () => __async(void 0, null, function* () {
      let equippedBase = Number.parseInt(user.base_item_id) || 0;
      if (equippedBase === 899 || // Deep Freeze Base
      equippedBase === 3256 || // Iceberg Boiler Base
      equippedBase === 2392)
        return;
      let bases = yield getUserItems([
        "deep_freeze_base",
        "iceberg_boiler_base",
        "ultimate_iceberg_base"
      ]), equippableBases = [], hasBase = !1;
      if (bases.forEach((base) => {
        base.quantity > 0 && (hasBase = !0, equippableBases.push({ name: base.name, id: base.item_id }));
      }), !hasBase)
        return;
      let appendTo = document.querySelector(".cutawayClippingMask");
      if (!appendTo)
        return;
      let equippableBasesText = equippableBases.map((base, index) => index === 0 ? base.name : index === equippableBases.length - 1 ? `or ${base.name}` : base.name).join(" "), warning = makeElement("div", "deep-warning"), warningText = makeElement("div", "deep-warning-text", `To access the Hidden Depths, make sure you equip ${equippableBasesText}.`), warningIcon = makeElement("img", "deep-warning-icon");
      warningIcon.src = "https://www.mousehuntgame.com/images/ui/journal/pillage.gif", warning.append(warningIcon), warning.append(warningText);
      let existingWarning = appendTo.querySelector(".deep-warning");
      existingWarning ? existingWarning.replaceWith(warning) : appendTo.append(warning);
    }), hud3 = () => __async(void 0, null, function* () {
      if (getCurrentLocation() !== "iceberg" || !user.quests.QuestIceberg)
        return;
      let huntInfo = document.querySelector(".icebergHud .depth");
      if (!huntInfo)
        return;
      let quest = getQuestProgress();
      if (!quest.isLair) {
        let remainingStageDistance = document.createElement("div");
        remainingStageDistance.classList.add("remaining-stage-distance");
        let destination = quest.isDeep ? "Hidden Depths" : "next stage";
        if (quest.stage !== quest.total) {
          let feet = quest.stage.toLocaleString();
          quest.isDeep && (feet = feet - 100), remainingStageDistance.innerHTML = `<strong>${feet}</strong> feet until ${destination}`, quest.stageHunts > 0 && (remainingStageDistance.innerHTML += ` (~${quest.stageHunts} hunts)`);
        }
        let existingStage = huntInfo.querySelector(".remaining-stage-distance");
        existingStage ? existingStage.replaceWith(remainingStageDistance) : huntInfo.insertBefore(remainingStageDistance, huntInfo.lastChild);
      }
      if (!quest.isLair && !quest.isDeep) {
        let remainingDistance = makeElement("div", "remaining-distance");
        if (quest.total === 0)
          remainingDistance.innerHTML = "";
        else {
          let feet = quest.total.toLocaleString();
          remainingDistance.innerHTML = `<strong>${feet}</strong> feet until Icewing's Lair`, quest.totalHunts > 0 && (remainingDistance.innerHTML += `(~${quest.totalHunts} hunts)`);
        }
        let existingDistance = huntInfo.querySelector(".remaining-distance");
        existingDistance ? existingDistance.replaceWith(remainingDistance) : huntInfo.insertBefore(remainingDistance, huntInfo.lastChild);
      } else {
        let existingDistance = huntInfo.querySelector(".remaining-distance");
        existingDistance && existingDistance.remove();
      }
      huntInfo.classList.add("mousehuntTooltipParent");
      let tooltip = makeElement("div", "icebergStatusTooltip");
      tooltip.classList.add("mousehuntTooltip", "right", "noEvents");
      let tooltipContent = getTooltipText(quest), existingTooltip = huntInfo.querySelector(".icebergStatusTooltip");
      tooltip.append(tooltipContent), makeElement("div", "mousehuntTooltip-arrow", "", tooltip), existingTooltip ? existingTooltip.replaceWith(tooltip) : huntInfo.append(tooltip), quest.isLair && addDeepWarning();
    }), makeTooltipSticky = () => {
      if (!document.querySelector(".icebergStatusTooltip"))
        return;
      let huntInfo = document.querySelector(".icebergHud .depth");
      if (!huntInfo)
        return;
      let isStuck = getSetting("location-huds.iceberg-sticky-tooltip", !1);
      isStuck && huntInfo.classList.add("mh-improved-stick-iceberg-tooltip"), huntInfo.addEventListener("click", () => {
        isStuck = !isStuck, huntInfo.classList.toggle("mh-improved-stick-iceberg-tooltip"), saveSetting("location-huds.iceberg-sticky-tooltip", isStuck);
      });
    }, iceberg_default3 = () => __async(void 0, null, function* () {
      addHudStyles([styles_default77, bob_iceberg_default]), hud3(), makeTooltipSticky(), onTurn(hud3, 1e3), onRequest("environment/iceberg.php", hud3);
    });
  }
});

// src/modules/location-huds/locations/jungle-of-dread/index.js
var jungle_of_dread_default, init_jungle_of_dread = __esm({
  "src/modules/location-huds/locations/jungle-of-dread/index.js"() {
    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-huds/locations/kings-arms/index.js
var kings_arms_default, init_kings_arms = __esm({
  "src/modules/location-huds/locations/kings-arms/index.js"() {
    init_cheese_selectors();
    kings_arms_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("kings-arms", ["gilded_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/kings-gauntlet/index.js
var kings_gauntlet_default, init_kings_gauntlet = __esm({
  "src/modules/location-huds/locations/kings-gauntlet/index.js"() {
    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-huds/locations/laboratory/styles.css
var styles_default78, init_styles79 = __esm({
  "src/modules/location-huds/locations/laboratory/styles.css"() {
    styles_default78 = `.laboratoryHUD .mousehuntItem-image{background-color:transparent}.laboratoryHUD .laboratoryHUD-areaBaitContainer .mousehuntItem-image{box-sizing:border-box;width:64px;height:64px;margin-top:-4px;margin-left:-5px;background-color:#d0e9ec;border:1px solid #d0e9ec;outline:5px solid #d0e9ec;box-shadow:none}.laboratoryHUD .mousehuntItem-quantity.quantity{padding:3px 4px;font-size:12px}.laboratoryHUD .laboratoryHUD-basicBaitContainer .mousehuntItem-image{background-color:#a6c0c4}.laboratoryHUD-state{text-shadow:0 1px 3px #000}.laboratoryHUD-basicBaitContainer .mousehuntTooltip>div{display:flex;justify-content:center}.laboratoryHUDArmNowButton.active{filter:hue-rotate(90deg)}.laboratoryHUD-basicBaitContainer .mousehuntTooltip{width:180px}
`;
  }
});

// src/modules/location-huds/locations/laboratory/index.js
var laboratory_default, init_laboratory = __esm({
  "src/modules/location-huds/locations/laboratory/index.js"() {
    init_utils2();
    init_styles79();
    laboratory_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default78);
    });
  }
});

// src/modules/location-huds/locations/labyrinth/styles.css
var styles_default79, init_styles80 = __esm({
  "src/modules/location-huds/locations/labyrinth/styles.css"() {
    styles_default79 = `.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;outline:2px solid #000}.labyrinthHUD-clue{display:flex;align-items:center;justify-content:space-evenly;font-size:12px;box-shadow:inset 0 0 3px -1px #000}.labyrinthHUD-clue-name{font-size:11px}.labyrinthHUD-clue:hover .labyrinthHUD-clue-name{z-index:10;overflow:visible}.mh-ui-labyrinth-clue-count{display:flex;align-items:center;height:20px;padding-right:3px;padding-left:3px;font-weight:900;color:#050505;border-radius:0 5px 5px 0}.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) 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:#343434;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"}.labyrinthHUD-hallway-tile.active{z-index:6;outline:1px solid #bbf8fa}.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) 0 0 no-repeat;filter:drop-shadow(1px 0 8px #f6eac3);background-size:contain;transform-origin:bottom;animation:mh-improved-shake-light 1s ease-out 1}.labyrinthHUD-toggleLantern-name.active{animation:mh-improved-scale 1.5s 2}.labyrinthHUD-scrambleClues-boundingBox:after{position:absolute;bottom:4px;left:131px;z-index:12;width:34px;height:33px;content:"";background:url(https://i.mouse.rip/laby-compass.png) 0 0 no-repeat;background-size:contain;transition:.3s ease-in-out}.labyrinthHUD-scrambleClues-boundingBox:hover:after{transform:scale(1.2)}@media (prefers-reduced-motion: reduce){.mh-ui-labyrinth-lantern-reminder,.labyrinthHUD-toggleLantern-name.active{animation:none}.labyrinthHUD-scrambleClues-boundingBox:hover:after{transform: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)}.labyrinthHUD-clueBar-totalContainer.mh-ui-labyrinth-100clues{background-color:#479f49}.mh-ui-labyrinth-tile-clicked{opacity:0;transition:opacity .3s ease}.mh-ui-labyrinth-tile-clicked-fade-in{opacity:1}.labyrinthHUD-secretContainer{font-weight:900;background-color:transparent;border:none;box-shadow:none;mix-blend-mode:overlay}.labyrinthHUD-confirmDescription .labyrinthHUD-exit{top:-4px}.labyrinthHUD-hallwayDescription-f .labyrinthHUD-hallwayName{color:#11f400}.labyrinthHUD-hallwayDescription-h .labyrinthHUD-hallwayName{color:#21e2ff}.labyrinthHUD-hallwayDescription-s .labyrinthHUD-hallwayName{color:#e96300}.labyrinthHUD-hallwayDescription-y .labyrinthHUD-hallwayName{color:#d851ff}.labyrinthHUD-hallwayDescription-t .labyrinthHUD-hallwayName{color:#ffe400}
`;
  }
});

// src/modules/location-huds/locations/labyrinth/index.js
var highlightDoors, scrambleGems, expandClueBar, addLanternReminder, updateDoorText, highlight100Clues, highlightTileForMinigame, minigame, refreshHud, labyrinth_default4, init_labyrinth4 = __esm({
  "src/modules/location-huds/locations/labyrinth/index.js"() {
    init_utils2();
    init_styles80();
    highlightDoors = () => {
      var _a, _b;
      if (((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.status) !== "intersection")
        return;
      let existingHighlight = document.querySelector(".mh-ui-labyrinth-highlight");
      existingHighlight && existingHighlight.classList.remove("mh-ui-labyrinth-highlight");
      let clue = (user.quests.QuestLabyrinth.clues || []).reduce((a, b) => a.quantity > b.quantity ? a : b);
      if (clue) {
        let matchingDoors = (user.quests.QuestLabyrinth.doors || []).filter((door) => door.choice && door.choice.length ? door.choice.includes(clue.type) : !1);
        if (!matchingDoors.length)
          return;
        let bestDoor = matchingDoors.reduce((a, b) => a.choice.length > b.choice.length ? a : b);
        if (bestDoor) {
          let highlight = document.querySelector(`.labyrinthHUD-door.${bestDoor.css_class.replaceAll(" ", ".")}`);
          highlight && highlight.classList.add("mh-ui-labyrinth-highlight");
        }
      }
    }, scrambleGems = () => {
      let gems = document.querySelectorAll(".labyrinthHUD-scrambleGem");
      gems && gems.forEach((gem) => {
        gem.removeAttribute("onclick"), gem.addEventListener("click", () => {
          gems.forEach((g) => {
            hg.views.HeadsUpDisplayLabyrinthView.labyrinthScrambleGem(g, 2);
          });
        });
      });
    }, expandClueBar = () => {
      let clueProgresses = document.querySelectorAll(".mh-ui-labyrinth-clue-count");
      clueProgresses && clueProgresses.forEach((progress) => {
        progress.remove();
      });
      let clueProgress = document.querySelectorAll(".labyrinthHUD-clue");
      clueProgress && clueProgress.forEach((progress) => {
        let clueType = progress.classList.value.replace("labyrinthHUD-clue", "").replace("clueFound", "").trim(), clue = (user.quests.QuestLabyrinth.clues || []).find((c) => c.type === clueType);
        if (clue) {
          progress.setAttribute("title", `${clue.quantity} found`);
          let text = makeElement("span", "mh-ui-labyrinth-clue-count", `${clue.quantity}`);
          progress.append(text);
        }
      });
    }, addLanternReminder = () => {
      var _a, _b, _c, _d;
      ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.lantern_status) === "inactive" && ((_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestLabyrinth) == null ? void 0 : _d.hallway_tier) >= 2 && setTimeout(() => {
        let existingLanternReminder = document.querySelector(".mh-ui-labyrinth-lantern-reminder");
        existingLanternReminder && existingLanternReminder.classList.remove("hidden");
        let labyHud = document.querySelector(".labyrinthHUD-intersection");
        if (labyHud) {
          let lanternReminder = document.createElement("div");
          lanternReminder.classList.add("mh-ui-labyrinth-lantern-reminder"), labyHud.append(lanternReminder);
        }
      }, 500);
    }, updateDoorText = () => {
      var _a, _b;
      let doorTextExisting = document.querySelector(".mh-ui-labyrinth-door-text");
      doorTextExisting && doorTextExisting.remove();
      let appendTo = document.querySelector(".labyrinthHUD-hallwayDescription");
      if (!appendTo)
        return;
      let existing = document.querySelector(".mh-ui-labyrinth-step-counter");
      existing && existing.remove();
      let existingStepsToGo = document.querySelector(".mh-ui-labyrinth-steps-to-go");
      existingStepsToGo && existingStepsToGo.remove();
      let hallwayLength = user.quests.QuestLabyrinth.hallway_length || 0, tiles = user.quests.QuestLabyrinth.tiles || [], completed = tiles.filter((tile) => tile.status.includes("complete"));
      completed.length !== hallwayLength && makeElement("span", "mh-ui-labyrinth-step-counter", `${completed.length}/${hallwayLength} steps completed.`, appendTo);
      let stepsToGo = hallwayLength - completed.length, existingIntersectionText = document.querySelector(".mh-ui-labyrinth-door-text");
      existingIntersectionText && existingIntersectionText.remove();
      let stepsExisting = document.querySelector(".mh-ui-laby-steps");
      stepsExisting && stepsExisting.remove();
      let cptExisting = document.querySelector(".mh-ui-laby-cpt");
      if (cptExisting && cptExisting.remove(), stepsToGo !== 0) {
        let intersectionDoors = document.querySelector(".labyrinthHUD-doorContainer");
        if (intersectionDoors) {
          let cluesPerTile = (tiles.filter((tile) => tile.status.includes("good")).reduce((a, b) => a + Number.parseInt(b.status.replace("complete", "").replace("good_", "").trim()), 0) / completed.length).toFixed(1).replace(".0", ""), intersectionText = makeElement("div", "mh-ui-labyrinth-door-text"), stepsNoun = "hunt";
          if ((stepsToGo > 1 || stepsToGo < 1) && (stepsNoun = "hunts"), makeElement("div", "mh-ui-laby-steps", `${stepsToGo} ${stepsNoun} left in the hallway`, intersectionText), cluesPerTile !== "NaN") {
            let clueNoun = "clue";
            (cluesPerTile > 1 || cluesPerTile < 1) && (clueNoun = "clues"), makeElement("div", "mh-ui-laby-cpt", `Avg. ${cluesPerTile} ${clueNoun} per tile`, intersectionText);
          }
          intersectionDoors.append(intersectionText);
        }
      }
      ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.status) === "intersection" && highlightDoors();
    }, highlight100Clues = () => {
      var _a;
      let clues = document.querySelector(".labyrinthHUD-clueBar-totalContainer");
      clues && (Number.parseInt(((_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth.total_clues) || 0) < 100 ? clues.classList.remove("mh-ui-labyrinth-100clues") : clues.classList.add("mh-ui-labyrinth-100clues"));
    }, highlightTileForMinigame = (tile) => {
      var _a, _b;
      tile.classList.add("mh-ui-labyrinth-tile-clicked");
      let id = tile.getAttribute("data-index"), length = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.hallway_length) || 10, degree = id / length * 360;
      tile.style.filter = `brightness(1.5) hue-rotate(${Math.floor(degree)}deg)`, setTimeout(() => {
        tile.classList.add("mh-ui-labyrinth-tile-clicked-fade-in");
      }, 100), setTimeout(() => {
        tile.style.filter = "brightness(1) hue-rotate(0deg)";
      }, 500), setTimeout(() => {
        tile.classList.remove("mh-ui-labyrinth-tile-clicked-fade-in"), tile.classList.remove("mh-ui-labyrinth-tile-clicked"), tile.style.filter = "";
      }, 510);
    }, minigame = () => __async(void 0, null, function* () {
      let tiles = document.querySelectorAll(".labyrinthHUD-hallway-tile");
      tiles && tiles.forEach((tile) => {
        [...tile.classList].includes("active") && tile.addEventListener("click", () => {
          let delay = 0;
          tiles.forEach((t) => {
            setTimeout(() => {
              highlightTileForMinigame(t);
            }, delay), delay += 50;
          });
        });
      });
    }), refreshHud = () => __async(void 0, null, function* () {
      getCurrentLocation() === "labyrinth" && (expandClueBar(), updateDoorText(), highlight100Clues(), minigame());
    }), labyrinth_default4 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default79), scrambleGems(), refreshHud(), addLanternReminder(), onRequest("*", refreshHud), onTurn(refreshHud, 1e3);
    });
  }
});

// src/modules/location-huds/locations/lagoon/index.js
var lagoon_default, init_lagoon = __esm({
  "src/modules/location-huds/locations/lagoon/index.js"() {
    init_cheese_selectors();
    lagoon_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("lagoon", ["gnarled_cheese", "wicked_gnarly_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/meditation-room/index.js
var meditation_room_default, init_meditation_room = __esm({
  "src/modules/location-huds/locations/meditation-room/index.js"() {
    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-huds/locations/mountain/styles.css
var styles_default80, init_styles81 = __esm({
  "src/modules/location-huds/locations/mountain/styles.css"() {
    styles_default80 = `.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 ease-in}.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-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-conduit-suggestions .mousehuntItem-image{background-size:125%}.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}.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(https://i.mouse.rip/upscaled/625bef6da38dc44ddcd70d0da47244ae.png)}.mountainHUD-conduit-suggestions .mousehuntItem-image.weak_power_trinket{background-image:url(https://www.mousehuntgame.com/images/items/trinkets/large/47a2b0f87d6ec8a9d86f39417a619f85.png)}.active .mousehuntItem-image.power_trinket{box-shadow:0 0 5px 3px #00e505 inset}.mountainHUD-minibossHelper{padding:2px;margin-left:-3px;font-size:10px}.mountainHUD-mouse{transition:.2s ease-in ease-out;transform-origin:bottom;will-change:transform}.mountainHUD-mouse:nth-child(1):hover{transform:scale(1.1) rotate(-3deg)}.mountainHUD-mouse:nth-child(2):hover{transform:scale(1.1)}.mountainHUD-mouse:nth-child(3):hover{transform:scale(1.1) rotate(3deg)}.mountainHUD-mouse .mountainHUD-mouse-image{border-radius:15px 15px 0 0}.mountainHUD-conduit-suggestions .mountainHUD-conduit-suggestion-item:hover .mousehuntItem-image{background-size:150%}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-percent{font-size:10px}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-percent span{font-size:12px}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-progressBar{top:7px;height:11px;background-color:#815026;box-shadow:inset 0 0 1px 1px #100802}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-progressBar span{box-shadow:inset 1px 0 2px 1px #000;transition:.2s ease-in}.mountainHUD-miniBoulder-state{filter:drop-shadow(0 0 1px #fff15b);transition:all .2s ease-out;transform-origin:center}.mountainHUD-miniBoulder-state:hover{filter:drop-shadow(0 0 3px #fff15b);transform:scale(1.4)}.mountainHUD-mouse-difficulty{font-size:13px}.mountainHUD-miniBoulderContainer .mountainHUD-miniBoulder-health-progressBar:hover span{filter:hue-rotate(105deg)}
`;
  }
});

// src/modules/location-huds/locations/mountain/index.js
var mountain_default, init_mountain = __esm({
  "src/modules/location-huds/locations/mountain/index.js"() {
    init_utils2();
    init_styles81();
    mountain_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default80);
    });
  }
});

// src/modules/location-huds/locations/mousoleum/styles.css
var styles_default81, init_styles82 = __esm({
  "src/modules/location-huds/locations/mousoleum/styles.css"() {
    styles_default81 = `.mousoleumHUD-buildWall.mousoleumHUD-wall-state{transform:scale(1.1)}.mousoleumHUD-bait .mousehuntItem-image{background-color:transparent}.mousoleumHUD-plankContainer{font-size:13px}.mousoleumHUD-plankContainer .mousoleumHUD-quantity{margin-left:-3px;font-size:12px;background:linear-gradient(90deg,#2f2f55,#0000);background-color:#2f2f55;border-radius:30px}
`;
  }
});

// src/modules/location-huds/locations/mousoleum/index.js
var mousoleum_default3, init_mousoleum3 = __esm({
  "src/modules/location-huds/locations/mousoleum/index.js"() {
    init_utils2();
    init_styles82();
    mousoleum_default3 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default81);
      let plankContainer = document.querySelector(".mousoleumHUD-plankContainer");
      plankContainer && plankContainer.addEventListener("click", () => {
        hg.views.HeadsUpDisplayMousoleumView.spawnShards(Math.floor(Math.random() * 20));
      });
    });
  }
});

// src/modules/location-huds/locations/moussu-picchu/styles.css
var styles_default82, init_styles83 = __esm({
  "src/modules/location-huds/locations/moussu-picchu/styles.css"() {
    styles_default82 = `.moussuPicchuHUD-torchQuantity.quantity{width:35px;font-size:12px;color:#fff;background-color:#320918;border-radius:4px}.moussuPicchuHUD .mousehuntItem-quantity.quantity{right:1px;bottom:-10px;left:1px;font-size:10px;color:#fff;background-color:#8d3f4d;box-shadow:none}.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(60deg) opacity(.8);background-position:center;box-shadow:none}.moussuPicchuHUD-powerType.rain,.moussuPicchuHUD-powerType.rain.active{background-image:url(https://www.mousehuntgame.com/images/powertypes/shadow.png)}.moussuPicchuHUD-powerType.wind,.moussuPicchuHUD-powerType.wind.active{background-image:url(https://www.mousehuntgame.com/images/powertypes/arcane.png)}.moussuPicchuHUD-powerType.wind.active{filter:opacity(.8)}a.moussuPicchuHUD-powerType{transition:transform .2s ease-out;transform:scale(1.2)}a.moussuPicchuHUD-powerType:hover{transform:scale(1.5)}.moussuPicchuHUD-element-status.max{filter:hue-rotate(50deg)}.moussuPicchuHUD{border-radius:10px 10px 5px 5px;box-shadow:inset -10px 5px #2c181a,inset 10px 5px 0 1px #2c181a,inset -10px 5px #2c181a,0 13px #2c181a,0 -3px #2c181a}.moussuPicchuHUD .mousehuntItem.potion .mousehuntItem-image,.moussuPicchuHUD .mousehuntItem-image{margin-top:-2px;background-color:#783642;border:none;box-shadow:none}.moussuPicchuHUD .mousehuntItem-image:after{inset:-1px}.moussuPicchuHUD .mousehuntItem.crafting_item .mousehuntItem-image,.moussuPicchuHUD .mousehuntItem.potion .mousehuntItem-image{width:33px;height:33px;margin-top:-3px;background-position:center;background-size:30px}.moussuPicchuHUD .mousehuntItem.potion .mousehuntItem-image{width:32px;height:32px}.moussuPicchuHUD .mousehuntItem.active .mousehuntItem-quantity.quantity{right:-1px;left:-1px;color:#000;background-color:#9ee184}.moussuPicchuHUD-elementContainer.wind .moussuPicchuHUD-element-progressBarContainer span[style="width:100%;"]:after,.moussuPicchuHUD-elementContainer.rain .moussuPicchuHUD-element-progressBarContainer span[style="width:100%;"]:after{border:none;border-radius:0}.moussuPicchuHUD-elementContainer.wind .moussuPicchuHUD-element-progressBarContainer,.moussuPicchuHUD-elementContainer.rain .moussuPicchuHUD-element-progressBarContainer,.moussuPicchuHUD-element-progressBarContainer{overflow:hidden;border-color:#978787;border-radius:3px}.moussuPicchuHUD-elementContainer.rain .moussuPicchuHUD-element-progressBarContainer span,.moussuPicchuHUD-elementContainer.wind .moussuPicchuHUD-element-progressBarContainer span{border-radius:2px}.moussuPicchuHUD-torchButton.selected:after{filter:drop-shadow(0 -2px 5px #f5a8fc)}.moussuPicchuHUD .mousehuntItem:hover .mousehuntItem-quantity.quantity{right:-1px;left:-1px}.moussuPicchuHUD .mousehuntItem:hover .mousehuntItem-quantity.quantity:after{position:absolute;inset:0 0 -1px;content:"";border:2px solid #ccc;border-top:none;border-radius:0 0 5px 5px}.moussuPicchuHUD .mousehuntItem.active:hover .mousehuntItem-quantity.quantity:after{border:none}
`;
  }
});

// src/modules/location-huds/locations/moussu-picchu/index.js
var moussu_picchu_default2, init_moussu_picchu2 = __esm({
  "src/modules/location-huds/locations/moussu-picchu/index.js"() {
    init_utils2();
    init_styles83();
    moussu_picchu_default2 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default82);
    });
  }
});

// src/modules/location-huds/locations/nerg-plains/index.js
var nerg_plains_default, init_nerg_plains = __esm({
  "src/modules/location-huds/locations/nerg-plains/index.js"() {
    init_cheese_selectors();
    nerg_plains_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("nerg-plains", ["gumbo_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/pinnacle-chamber/index.js
var pinnacle_chamber_default, init_pinnacle_chamber = __esm({
  "src/modules/location-huds/locations/pinnacle-chamber/index.js"() {
    init_cheese_selectors();
    pinnacle_chamber_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("pinnacle-chamber", [
        "rumble_cheese",
        "onyx_gorgonzola_cheese"
      ]);
    });
  }
});

// src/modules/location-huds/locations/pollution-outbreak/styles.css
var styles_default83, init_styles84 = __esm({
  "src/modules/location-huds/locations/pollution-outbreak/styles.css"() {
    styles_default83 = `.pollutionOutbreakHUD{z-index:1;filter:drop-shadow(0 2px 1px #000)}.pollutionOutbreakHUD-item-image{height:30px;padding:0;margin:0;background-color:#ffffffbf;background-repeat:no-repeat;background-position:top;background-size:contain;box-shadow:none}.active .pollutionOutbreakHUD-item-image{background-color:#fff}.pollutionOutbreakHUD-timer{top:2px;bottom:unset;left:18px;z-index:29;padding:2px 7px 2px 3px;font-size:12px;border-top:1px solid #999;border-radius:5px 0 10px}.pollutionOutbreakHUD-totalPollution-direction-status{font-size:10px}.pollutionOutbreakHUD-hunters{top:5px;right:145px;left:unset;padding:2px 5px;font-size:12px;border-right:none;border-left:1px solid #999;border-radius:0 5px 0 10px}.pollutionOutbreakHUD-timer,.pollutionOutbreakHUD-hunters,.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip{background:#f4f4f4cc}.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)!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)!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)!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)!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)!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)!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)!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)!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:0;left:-1px;width:13px;height:15px;background-color:#9b9d9d;background-position:center;background-size:contain;border-radius:0}.pollutionOutbreakHUD-pollution-title-block-name{right:0;left:16px;font-size:11px;line-height:21px;text-align:center}.pollutionOutbreakHUD-pollution-title-block-icon{top:-2px;left:1px;width:16px;height:15px;background-color:transparent;background-position:center;background-size:contain}.pollutionOutbreakHUD-layer{z-index:7}.pollutionOutbreakHUD-pollution-title-block-progressBar{background-color:#469d30bf;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;box-shadow:inset 0 2px 1px #6a6969}.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{margin-top:-1px;font-weight:900}.pollutionOutbreakHUD-pollutinumContainer.active .pollutionOutbreakHUD-refineQuantityContainer,.pollutionOutbreakHUD-refineQuantityContainer{display:inline-block;width:23px;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;overflow:hidden;background-color:#2a2a2a}.pollutionOutbreakHUD-scumContainer:after{display:none}.pollutionOutbreakHUD-scumContainer .quantity,.pollutionOutbreakHUD-scumContainer .maxQuantity{font-size:12px;line-height:17px}span.pollutionOutbreakHUD-refineQuantity{font-size:11px;font-weight:900}.pollutionOutbreakHUD-refineQuantity:before{content:"+"}a.pollutionOutbreakHUD-refineButton{top:0;width:52px;height:17px;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:center;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:4px;display:block;width:auto;padding:2px 5px;font-size:12px;background:url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png) top right;background-color:#f4f4f4cc;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;animation:none!important}.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip-arrow{display:none}.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip b{font-weight:400}.pollutionOutbreakHUD-item-quantity.quantity{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:1px 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{background-color:#fff}.pollutionOutbreakHUD-item.active .pollutionOutbreakHUD-item-image a{z-index:1;border-top-left-radius:5px;border-top-right-radius:5px;box-shadow:inset 0 0 20px #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:41px;content:"30 hrs"}.pollutionOutbreakHUD-pollution-title-block.knight:after{width:41px;content:"16 hrs"}.pollutionOutbreakHUD-pollution-title-block.lord_lady:after{width:41px;content:"18 hrs"}.pollutionOutbreakHUD-pollution-title-block.baron_baroness:after{width:41px;content:"18 hrs"}.pollutionOutbreakHUD-pollution-title-block.count_countess:after,.pollutionOutbreakHUD-pollution-title-block.duke_dutchess:after{width:56px;content:"1 day"}.pollutionOutbreakHUD-pollution-title-block.grand_duke:after{right:1px;width:67px;content:"1 day"}.pollutionOutbreakHUD-pollution-title-block.archduke_archduchess:after{right:0;width:62px;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}.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}.pollutionOutbreakHUD-totalPollution-direction-image{width:24px;height:22px;margin-left:-1px}.pollutionOutbreakHUD-pollution-title-block.active .pollutionOutbreakHUD-pollution-title-block-name{right:2px;font-weight:400}.pollutionOutbreakHUD.rising .pollutionOutbreakHUD-pollution-title-blockContainer:after,.pollutionOutbreakHUD.falling .pollutionOutbreakHUD-pollution-title-blockContainer:after{position:absolute;inset:5px 0 0 25px;pointer-events:none;content:"";background-image:linear-gradient(-45deg,rgb(255 255 255 / 25%) 25%,transparent 25%,transparent 50%,rgb(255 255 255 / 25%) 50%,rgb(255 255 255 / 25%) 75%,transparent 75%,transparent);background-size:50px 50px;opacity:0;transition:opacity .5s}.pollutionOutbreakHUD.rising:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after,.pollutionOutbreakHUD.falling:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after{opacity:1;animation:mh-improved-background-to-right 3s linear infinite}.pollutionOutbreakHUD.falling:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after{animation-name:mh-improved-background-to-left}@media (prefers-reduced-motion: reduce){.pollutionOutbreakHUD.rising:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after,.pollutionOutbreakHUD.falling:hover .pollutionOutbreakHUD-pollution-title-blockContainer:after{animation:none}}.pollutionOutbreakHUD-scumContainer:before{position:absolute;right:0;bottom:0;display:block;width:var(--pollution-outbreak-width, 0%);height:5px;content:"";background-color:#418132}
`;
  }
});

// src/modules/location-huds/locations/pollution-outbreak/index.js
var addWidthToPolluntiumBar, pollution_outbreak_default2, init_pollution_outbreak2 = __esm({
  "src/modules/location-huds/locations/pollution-outbreak/index.js"() {
    init_utils2();
    init_styles84();
    addWidthToPolluntiumBar = () => {
      let gauge = document.querySelector(".pollutionOutbreakHUD-scumContainer");
      if (!gauge)
        return;
      let quantityEl = gauge.querySelector(".quantity"), maxQuantityEl = gauge.querySelector(".maxQuantity");
      if (!quantityEl || !maxQuantityEl)
        return;
      let quantity = Number.parseInt(quantityEl.innerText, 10), maxQuantity = Number.parseInt(maxQuantityEl.innerText.replace("/", ""), 10), percentage = Math.round(quantity / maxQuantity * 100);
      gauge.style.setProperty("--pollution-outbreak-width", `${percentage}%`);
    }, pollution_outbreak_default2 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default83), setMultipleTimeout(addWidthToPolluntiumBar, [0, 100, 500]), onTurn(addWidthToPolluntiumBar, 500);
    });
  }
});

// src/modules/location-huds/locations/prologue-pond/boats.css
var boats_default, init_boats = __esm({
  "src/modules/location-huds/locations/prologue-pond/boats.css"() {
    boats_default = `.prologuePondView-fishingBoat-paperDoll{background:url(https://i.mouse.rip/mh-improved/boat-test.png) no-repeat 1px -1px,url(https://www.mousehuntgame.com/images/ui/hud/prologue_pond/boat/base.png) no-repeat 0 0;background-size:96%}
`;
  }
});

// src/modules/location-huds/locations/prologue-pond/styles.css
var styles_default84, init_styles85 = __esm({
  "src/modules/location-huds/locations/prologue-pond/styles.css"() {
    styles_default84 = `.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.1)}.prologuePondView-fishingBoat:hover{filter:brightness(1.1)}.prologuePondView-background-layer.water{top:19px;filter:brightness(.9);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:translate(0)}}@keyframes mh-improved-chum-floating{0%{transform:translate(0)}50%{transform:translateY(-5px)}to{transform:translate(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){left:180px;animation-delay:6s}.prologuePondView-chumDooberContainer .prologuePondView-chumDoober:nth-child(3){left:180px;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)}.folkloreForestRegionView-dialog-recipeResult-content{max-height:unset}
`;
  }
});

// src/modules/location-huds/locations/prologue-pond/index.js
var addDisarmedClass, updatePondLootQuantity, prologue_pond_default, init_prologue_pond = __esm({
  "src/modules/location-huds/locations/prologue-pond/index.js"() {
    init_utils2();
    init_folklore_forest2();
    init_keep_inventory_open();
    init_boats();
    init_styles67();
    init_styles85();
    addDisarmedClass = () => {
      let hud5 = document.querySelector("#hudLocationContent");
      hud5 && (user.bait_disarmed ? hud5.classList.add("disarmed") : hud5.classList.remove("disarmed"));
    }, updatePondLootQuantity = () => {
      var _a, _b, _c, _d, _e, _f;
      let 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, 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, lootMaxEl = document.querySelector(".prologuePondView-currentLoot-value-max");
      lootMaxEl && (lootMin === lootMax ? lootMaxEl.classList.add("hidden") : lootMaxEl.classList.remove("hidden"));
    }, prologue_pond_default = () => __async(void 0, null, function* () {
      let stylesToAdd = [styles_default66, styles_default84];
      getSetting("experiments.prologue-pond-wood-boat", !1) && stylesToAdd.push(boats_default), addHudStyles(stylesToAdd), folklore_forest_default2(), addDisarmedClass(), onRequest("users/changetrap.php", addDisarmedClass), updatePondLootQuantity(), onRequest("environment/prologue_pond.php", updatePondLootQuantity), keep_inventory_open_default({
        setting: "location-huds.prologue-pond-inventory-toggled",
        buttonSelector: ".folkloreForestRegionView-environmentInventory-expandButton",
        inventorySelector: ".folkloreForestRegionView-environmentInventoryContainer",
        inventoryOpenClass: "expanded",
        buttonOpenClass: "expanded"
      });
    });
  }
});

// src/modules/location-huds/locations/rift-bristle-woods/styles.css
var styles_default85, init_styles86 = __esm({
  "src/modules/location-huds/locations/rift-bristle-woods/styles.css"() {
    styles_default85 = `.riftBristleWoodsHUD-footer-item-quantity.quantity{top:30px;padding:2px 4px;font-size:12px}.riftBristleWoodsHUD-footer-item-tooltip-baitRow-image .riftBristleWoodsHUD-footer-item-quantity{top:15px;right:-3px;padding:0 3px;font-size:9px}.riftBristleWoodsHUD-footer-itemGroup.wide .riftBristleWoodsHUD-footer-item-image:first-child .riftBristleWoodsHUD-footer-item-quantity{top:27px}.riftBristleWoodsHUD-chamberProgressQuantity{top:71px;left:7px;z-index:1;width:50px;padding:0 6px;text-shadow:none;background-color:#fefae9;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-footer-item-tooltip-baitRow .mousehuntArmNowButton{display:block}.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}.riftBristleWoodsHUD-acolyteStats.bronze:after{position:absolute;top:1px;right:40px;width:20px;height:17px;padding:0 5px;content:"";background-color:#4b3d30;background-image:url(https://www.mousehuntgame.com//images/ui/crowns/crown_bronze.png);background-position:center;background-size:cover;border-radius:8px 8px 0 0;box-shadow:0 -1px 0 1px #5b5041}.riftBristleWoodsHUD-acolyteStats{top:-1px;right:0;box-sizing:border-box;padding:0 5px;background-color:#4b3d30;background-blend-mode:multiply;border:1px solid #5b5041;border-bottom:none;border-radius:8px 8px 0 0}.riftBristleWoodsHUD-acolyteStats:before{position:absolute;right:0;bottom:0;left:-1px;height:2px;content:"";background-color:#4b3d30}.mousehuntTooltip .riftBristleWoodsHUD-footer-item-quantity.quantity{top:4px;left:31px;width:33px;border:1px solid #a6a6a6;box-shadow:none}.mousehuntTooltip .riftBristleWoodsHUD-footer-item-tooltip-baitRow-name{margin-left:50px}.mousehuntTooltip .riftBristleWoodsHUD-footer-item-tooltip-baitRow .mousehuntArmNowButton{right:-3px}.riftBristleWoodsHUD-footer-item-image{background-color:#e0cdbd}.riftBristleWoodsHUD-portalEquipment.disabled .riftBristleWoodsHUD-footer-item-quantity{top:27px;padding:0 3px;font-size:9px;opacity:.9}.riftBristleWoodsHUD-portalContainer{margin-top:-1px;border-top:2px solid #5b4d3f;border-top-left-radius:3px;box-shadow:-4px 2px 0 -2px #2e2014,-1px -1px 0 1px #514236}.riftBristleWoodsHUD-chamberDetails{background-color:#312822}.riftBristleWoodsHUD-chamberSpecificText.icebreak_chamber,.riftBristleWoodsHUD-chamberSpecificText.silence_chamber,.riftBristleWoodsHUD-chamberSpecificText.stalker_chamber,.riftBristleWoodsHUD-chamberSpecificText.treasury_chamber,.riftBristleWoodsHUD-chamberSpecificText.lucky_chamber{line-height:2}.riftBristleWoodsHUD-chamberSpecificText.potion_chamber{line-height:1.5}.riftBristleWoodsHUD-chamberDetails-image-padding{margin-right:4px;margin-left:-2px;background-color:#817871;border-color:#d1caaa;border-radius:10px}.riftBristleWoodsHUD-chamberDetails-imageContainer.floatl{margin:0}.riftBristleWoodsHUD-chamberDetails-imageContainer{display:flex;align-items:center;justify-content:space-evenly}.riftBristleWoodsHUD-chamberDetails-image:nth-last-child(3),.riftBristleWoodsHUD-chamberDetails-image:nth-last-child(3)~.riftBristleWoodsHUD-chamberDetails-image{width:auto}a.riftBristleWoodsHUD-portal.timewarp_chamber{filter:drop-shadow(0 1px 4px #fbd400)}.riftBristleWoodsHUD-portal-name span{font-size:11px;text-shadow:0 2px #000}
`;
  }
});

// src/modules/location-huds/locations/rift-bristle-woods/index.js
var maybeAddUserscriptStyles, rift_bristle_woods_default2, init_rift_bristle_woods2 = __esm({
  "src/modules/location-huds/locations/rift-bristle-woods/index.js"() {
    init_utils2();
    init_styles86();
    maybeAddUserscriptStyles = () => {
      if (!document.querySelector(".riftBristleWoodsHUD .item_container .item-Btn"))
        return;
      let userscriptStyles = [
        ".riftBristleWoodsHUD .item_container, .riftBristleWoodsHUD .charm_container { margin-top: 15px; }",
        ".riftBristleWoodsHUD { margin-bottom: 30px; }"
      ].join(`
`);
      addStyles(userscriptStyles, "riftBristleWoodsHUD", "mh-improved-rift-bristle-woods-userscript-styles");
    }, rift_bristle_woods_default2 = () => {
      addHudStyles(styles_default85), setTimeout(() => {
        maybeAddUserscriptStyles();
      }, 1e3);
    };
  }
});

// src/modules/location-huds/locations/rift-burroughs/styles.css
var styles_default86, init_styles87 = __esm({
  "src/modules/location-huds/locations/rift-burroughs/styles.css"() {
    styles_default86 = `.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}.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}.mist-display:after{position:absolute;right:0;bottom:6px;left:0;font-weight:900;color:#2f3b1c;text-align:center;content:"\\2193"}.is_misting .mist-display:after{top:9px;bottom:unset;content:"\\2191"}.is_misting .mist-display.state-red:after{content:""}.riftBurroughsHud .mistQuantity{left:-7px;font-size:11px;letter-spacing:-1px}.riftBurroughsHud{border-radius:10px;box-shadow:6px 7px 5px -1px #161616}.riftBurroughsHud .mistMeter .mistStatus{top:20px}.riftBurroughsHud .mistMeter .mistWrapper span{filter:hue-rotate(60deg)}.riftBurroughsHud .baitContainer .baitOption .itemImage{background:url(https://www.mousehuntgame.com/images/ui/hud/rift_burroughs/mist_meter.png) -5px -15px no-repeat;box-shadow:inset 0 0 3px #cbdde0}.riftBurroughsHud .baitContainer .baitOption:hover .itemImage{box-shadow:inset 0 0 3px 2px #cbdde0}.riftBurroughsHud .mistCanisters.itemImage{margin-top:-2px;margin-left:-3px}.riftBurroughsHud .mistCanisters.itemImage,.riftBurroughsHud .mistCanisters.itemImage img{width:55px;height:55px;border-radius:3px;box-shadow:inset 0 0 3px #171717}.riftBurroughsHud .mistButton{background:none}.riftBurroughsHud .mistButton:after{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;text-shadow:1px 1px #000;text-transform:uppercase;content:"Mist";background:#24cde6;border-radius:3px;box-shadow:inset 0 0 4px 1px #067a90;transition:.15s ease-in}.riftBurroughsHud.is_misting .mistButton:after{letter-spacing:-.25px;content:"Misting";background:#967fbb;box-shadow:inset 0 0 4px 1px #644e88}.riftBurroughsHud .mistButton:hover:after{background:#08adc6;box-shadow:inset 0 0 4px 1px #067a90}.riftBurroughsHud .mistButton:hover{box-shadow:none}
`;
  }
});

// src/modules/location-huds/locations/rift-burroughs/area-mice.json
var area_mice_default, init_area_mice = __esm({
  "src/modules/location-huds/locations/rift-burroughs/area-mice.json"() {
    area_mice_default = {
      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"
        ]
      }
    };
  }
});

// src/modules/location-huds/locations/rift-burroughs/mice-name-images.json
var mice_name_images_default, init_mice_name_images = __esm({
  "src/modules/location-huds/locations/rift-burroughs/mice-name-images.json"() {
    mice_name_images_default = {
      rift_amplified_brown: {
        name: "Amplified Brown Mouse",
        image: "9547c50891ce66c00188a0ce278cd9e0.gif"
      },
      rift_amplified_grey: {
        name: "Amplified Grey Mouse",
        image: "b6a9a248439e08367139cba601583781.gif"
      },
      rift_amplified_white: {
        name: "Amplified White Mouse",
        image: "877fd4f1831f1ffd76e6ab9334e96efc.gif"
      },
      rift_automated_sentry: {
        name: "Automated Sentry Mouse",
        image: "d57b33cdbb0d14bb138fe91c166325fa.gif"
      },
      rift_cybernetic_specialist: {
        name: "Cybernetic Specialist Mouse",
        image: "5a0d95f2211444717f29f74959b89366.gif"
      },
      rift_doktor: {
        name: "Doktor Mouse",
        image: "a44277c1d72f76fb507df2a7a4938542.gif"
      },
      rift_evil_scientist: {
        name: "Evil Scientist Mouse",
        image: "fc4030fcea4bb7e0118aa4d46705f37e.gif"
      },
      rift_portable_generator: {
        name: "Portable Generator Mouse",
        image: "f0437620c8c86379e6f8fefb9e82d2c3.gif"
      },
      rift_bio_engineer: {
        name: "Rift Bio Engineer",
        image: "1d91dc3220b096af75ca0423a77ccc83.gif"
      },
      rift_surgeon_bot: {
        name: "Surgeon Bot Mouse",
        image: "6678f8a7003093b081c941a3d571abb8.gif"
      },
      rift_count_vampire: {
        name: "Count Vampire Mouse",
        image: "851f1d4c760d0f263a38d0fa28bbf2fa.gif"
      },
      rift_phase_zombie: {
        name: "Phase Zombie",
        image: "c9675fb32b01e91d43f5ebbbf3bf8f02.gif"
      },
      rift_prototype: {
        name: "Prototype Mouse",
        image: "8be0e48b2fa241e65312726433612871.gif"
      },
      rift_robat: {
        name: "Robat Mouse",
        image: "fa345c83ff784adfbe79230f279be2c6.gif"
      },
      rift_tech_ravenous_zombie: {
        name: "Tech Ravenous Zombie",
        image: "6249796e35d572687db2aa4a4e391335.gif"
      },
      rift_clump: {
        name: "Clump Mouse",
        image: "a901fe9feea2e04ca1da1a3769dd7f77.gif"
      },
      rift_cyber_miner: {
        name: "Cyber Miner Mouse",
        image: "b3768e070c9b40fdfbfef4f39025acc3.gif"
      },
      rift_itty_bitty_burroughs: {
        name: "Itty Bitty Rifty Burroughs Mouse",
        image: "723735735fcbc38d75c5d980b454dc4e.gif"
      },
      rift_pneumatic_dirt_displacement: {
        name: "Pneumatic Dirt Displacement Mouse",
        image: "70bc4cb7409df8be9e1942e27b75c05f.gif"
      },
      rift_rifterranian: {
        name: "Rifterranian Mouse",
        image: "7abd07fac15972db28231f80fd03c075.gif"
      },
      rift_mecha_tail: {
        name: "Mecha Tail Mouse",
        image: "e329e623c6ff501d03c7077b8ecfabf9.gif"
      },
      rift_spore: {
        name: "Radioactive Ooze Mouse",
        image: "f037c2df0d654caaadfe4c8a58a13431.gif"
      },
      rift_toxikinetic: {
        name: "Toxikinetic Mouse",
        image: "bae7062027162025735a5ccbcaf58e5f.gif"
      },
      rift_lycan: {
        name: "Lycanoid",
        image: "18c987fe4ec5ee678114cb748dedfb6d.gif"
      },
      rift_revenant: {
        name: "Revenant Mouse",
        image: "a0060e929e11030025f6609a5cb81c51.gif"
      },
      rift_zombot_unipire: {
        name: "Zombot Unipire the Third",
        image: "95be1a40ec7cf3868fb9041bf43658a8.gif"
      },
      rift_boulder_biter: {
        name: "Boulder Biter Mouse",
        image: "7da77ad10f719afce4f17453cb964f40.gif"
      },
      rift_lambent: {
        name: "Lambent Mouse",
        image: "b301f96263690c2a3dc02a4625aa1c9b.gif"
      },
      rift_master_exploder: {
        name: "Master Exploder Mouse",
        image: "6d04a2ec4e21296272e080df7033a29a.gif"
      },
      rift_rancid_bog_beast: {
        name: "Rancid Bog Beast Mouse",
        image: "5a7f8551ed42a6344e7948b18687e97d.gif"
      },
      rift_radioactive_gold: {
        name: "Super Mega Mecha Ultra RoboGold Mouse",
        image: "022763eaba9d7f6fdbd5cddb3813d6b8.gif"
      },
      rift_toxic_avenger: {
        name: "Toxic Avenger Mouse",
        image: "74891cb924851366d67a3632ed56fa6b.gif"
      },
      rift_monstrous_abomination: {
        name: "Monstrous Abomination Mouse",
        image: "12dc2f226fd5e26144deb154d293e6db.gif"
      },
      rift_big_bad_burroughs: {
        name: "Big Bad Behemoth Burroughs Mouse",
        image: "dfb15f35c1fe4bb07e2b276071a7c439.gif"
      },
      rift_assassin_beast: {
        name: "Assassin Beast Mouse",
        image: "ddb77d3c8cad610f4270f6d1b401602c.gif"
      },
      rift_menace: {
        name: "Menace of the Rift Mouse",
        image: "a286833ada1c4718096e30db734514a2.gif"
      },
      rift_plutonium_tentacle: {
        name: "Plutonium Tentacle Mouse",
        image: "97c996e63dab24de6ed6a089f318012e.gif"
      }
    };
  }
});

// src/modules/location-huds/locations/rift-burroughs/index.js
var makeMiceList, hud4, rift_burroughs_default2, init_rift_burroughs2 = __esm({
  "src/modules/location-huds/locations/rift-burroughs/index.js"() {
    init_utils2();
    init_styles87();
    init_area_mice();
    init_mice_name_images();
    makeMiceList = (type, title, mice, currentType, appendTo) => {
      let wrapper = makeElement("div", ["mouse-type", type]);
      currentType === type && wrapper.classList.add("active");
      let mTitle = makeElement("a", "mouse-type-title", title);
      mTitle.addEventListener("click", () => {
        let id = 1426;
        type === "terra" ? id = 1551 : type === "polluted" && (id = 1550), hg.utils.TrapControl.setBait(id), hg.utils.TrapControl.go();
      }), wrapper.append(mTitle);
      let miceWrapper = makeElement("div", "mouse-type-mice");
      return mice.forEach((mouse) => {
        let mouseWrapper = makeElement("div", "mouse-type-mouse"), mouseLink = makeElement("a", "mouse-type-mouse-link");
        mouseLink.addEventListener("click", (e) => {
          hg.views.MouseView.show(mouse), e.preventDefault();
        });
        let mouseImage = makeElement("img", "mouse-type-mouse-image");
        mouseImage.src = `https://www.mousehuntgame.com/images/mice/thumb/${mice_name_images_default[mouse].image}`, mouseLink.append(mouseImage), makeElement("div", "mouse-type-mouse-name", mice_name_images_default[mouse].name, mouseLink), mouseWrapper.append(mouseLink), miceWrapper.append(mouseWrapper);
      }), wrapper.append(miceWrapper), appendTo.append(wrapper), wrapper;
    }, hud4 = () => {
      var _a;
      if (!((_a = user == null ? void 0 : user.quests) != null && _a.QuestRiftBurroughs))
        return;
      let quest = user.quests.QuestRiftBurroughs, armedBait = (quest == null ? void 0 : quest.armed_bait) || "disarmed", mistLevel = (quest == null ? void 0 : quest.mist_released) || 0, mistTier = (quest == null ? void 0 : quest.mist_tier) || "tier_0", hudEl = document.querySelector("#hudLocationContent .riftBurroughsHud");
      if (!hudEl)
        return;
      let color = "yellow";
      mistLevel >= 6 && (color = "green"), mistLevel >= 19 && (color = "red");
      let existing = document.querySelector(".brift-ui");
      existing && existing.remove();
      let wrapper = makeElement("div", ["brift-ui"]), mist = makeElement("div", ["mist-display", `state-${color}`], `${mistLevel} / 20 `);
      mist.addEventListener("click", (e) => {
        hg.views.HeadsUpDisplayRiftBurroughsView.toggleMist(e.target);
      }), wrapper.append(mist);
      let availableMice = area_mice_default[mistTier], mouseWrapper = makeElement("div", "mouse-list"), 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_default2 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default86), hud4(), onRequest("*", hud4);
    });
  }
});

// src/modules/location-huds/locations/rift-furoma/styles.css
var styles_default87, init_styles88 = __esm({
  "src/modules/location-huds/locations/rift-furoma/styles.css"() {
    styles_default87 = `.riftFuromaHUD-battery-energyRemaining{top:22px;right:1px;left:1px;width:auto;font-size:11px;font-style:normal;color:#fff;background-color:#8caaaabf;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-chargeLevel-stat.luck .riftFuromaHUD-chargeLevel-stat-label,.riftFuromaHUD-chargeLevel-stat.power .riftFuromaHUD-chargeLevel-stat-label{padding-bottom:2px;margin-left:-8px}span.riftFuromaHUD-craftingPopup-recipe-part-quantity,.riftFuromaHUD-craftingPopup-recipe-part-padding span.quantity{font-size:12px}a.riftFuromaHUD-battery.hidden{display:inline-block}a.riftFuromaHUD-battery:before{position:absolute;top:10px;right:0;left:0;z-index:1;font-size:9px;color:#073833;text-align:center}a.riftFuromaHUD-battery.hidden:before{display:none}a.riftFuromaHUD-battery.disabled:before{color:#97a8a6}a.riftFuromaHUD-battery[data-type=charge_level_one]:before{right:6px;left:5px;content:"1"}a.riftFuromaHUD-battery[data-type=charge_level_two]:before{right:6px;left:7px;content:"2"}a.riftFuromaHUD-battery[data-type=charge_level_three]:before{right:6px;left:8px;content:"3"}a.riftFuromaHUD-battery[data-type=charge_level_four]:before{right:8px;left:11px;content:"4"}a.riftFuromaHUD-battery[data-type=charge_level_five]:before{right:9px;left:12px;content:"5"}a.riftFuromaHUD-battery[data-type=charge_level_six]:before{right:9px;left:14px;content:"6"}a.riftFuromaHUD-battery[data-type=charge_level_seven]:before{right:11px;left:16px;content:"7"}a.riftFuromaHUD-battery[data-type=charge_level_eight]:before{right:12px;left:18px;content:"8"}a.riftFuromaHUD-battery[data-type=charge_level_nine]:before{right:12px;left:20px;content:"9"}a.riftFuromaHUD-battery[data-type=charge_level_ten]:before{right:12px;left:24px;content:"10"}.riftFuromaHUD-battery.locked .riftFuromaHUD-battery-progressContainer{background:transparent;box-shadow:none}.riftFuromaHUD-battery-image{transform:none}.riftFuromaHUD-chargeLevel-stat-label.riftFuromaHUD-chargeLevel-stat-label-meowth-furoma-calc,.riftFuromaHUD-chargeLevel-stat-value.riftFuromaHUD-chargeLevel-stat-value-meowth-furoma-calc{display:none}.riftFuromaHUD-droid-details .riftFuromaHUD-chargeLevel-stat.droid_energy .riftFuromaHUD-chargeLevel-stat-label{padding-top:0;margin-right:-5px;margin-left:-5px;font-size:7.5px}.riftFuromaHUD-droid-details .riftFuromaHUD-chargeLevel-stat.droid_energy .riftFuromaHUD-chargeLevel-stat-value{min-height:18px;padding-top:2px}.riftFuromaHUD-chargeLevel-stat.droid_energy{padding-top:1px}.mh-improved-recall{margin-right:-5px;margin-left:-6px;border-top:2px solid #6f7374}.mh-improved-riftFuromaHUD-leavePagoda-amount{position:absolute;top:13px;right:0;left:0;padding:1px 1px 5px;font-size:11px;color:#39e4eb;text-align:center;background-color:#333;border-radius:0 0 5px 5px;box-shadow:0 1px 3px -1px #3a3a3a}.riftFuromaHUD-leavePagoda:hover,.riftFuromaHUD-leavePagoda:hover .mh-improved-riftFuromaHUD-leavePagoda-amount{background-color:#1b1b1b}.riftFuromaHUD-leavePagoda{border-bottom-right-radius:0;border-bottom-left-radius:0}.riftFuromaHUD-item .itemImage{background-color:#fff}
`;
  }
});

// src/modules/location-huds/locations/rift-furoma/index.js
var getEnergyStats, addRecallCaclulation, rift_furoma_default2, init_rift_furoma2 = __esm({
  "src/modules/location-huds/locations/rift-furoma/index.js"() {
    init_utils2();
    init_styles88();
    getEnergyStats = () => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
      let droid = Number.parseInt(`${((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRiftFuroma) == null ? void 0 : _b.droid) == null ? void 0 : _c.remaining_energy) || 0}`.replaceAll(",", "")), lost = Number.parseInt(`${((_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestRiftFuroma) == null ? void 0 : _e.droid) == null ? void 0 : _f.energy_lost) || 0}`.replaceAll(",", "")), recall = Math.floor((droid - lost) / 2), energy = Number.parseInt(`${((_j = (_i = (_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestRiftFuroma) == null ? void 0 : _h.items) == null ? void 0 : _i.combat_energy_stat_item) == null ? void 0 : _j.quantity) || 0}`.replaceAll(",", ""));
      return {
        droid,
        lost,
        recall,
        energy,
        afterRecall: energy + recall
      };
    }, addRecallCaclulation = () => {
      let { recall, afterRecall } = getEnergyStats(), statBlocks = document.querySelector(".riftFuromaHUD-droid-details .riftFuromaHUD-chargeLevel-stat.droid_energy");
      if (statBlocks) {
        let existingRecall = document.querySelector(".mh-improved-recall"), afterRecallEl = makeElement("div", "mh-improved-recall");
        if (user.quests.QuestRiftFuroma.droid.remaining_energy === "---") {
          existingRecall && existingRecall.remove(), afterRecallEl && afterRecallEl.remove();
          return;
        }
        makeElement("div", "riftFuromaHUD-chargeLevel-stat-label", "After Recall", afterRecallEl), makeElement("div", "riftFuromaHUD-chargeLevel-stat-value", afterRecall.toLocaleString(), afterRecallEl), existingRecall ? existingRecall.replaceWith(afterRecallEl) : statBlocks.append(afterRecallEl);
      }
      let leave = document.querySelector(".riftFuromaHUD-leavePagoda");
      if (leave) {
        let existing = document.querySelector(".mh-improved-riftFuromaHUD-leavePagoda-amount"), amountEl = makeElement("div", "mh-improved-riftFuromaHUD-leavePagoda-amount", `+ ${recall.toLocaleString()}`);
        existing ? existing.replaceWith(amountEl) : leave.append(amountEl);
      }
    }, rift_furoma_default2 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default87), addRecallCaclulation(), onTurn(addRecallCaclulation);
    });
  }
});

// src/modules/location-huds/locations/rift-gnawnia/styles.css
var styles_default88, init_styles89 = __esm({
  "src/modules/location-huds/locations/rift-gnawnia/styles.css"() {
    styles_default88 = `.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:flex;align-items:center;width:auto;font-size:11px;text-align:center;background-color:#d6e8e4;border:1px solid #29c7cb;opacity:.9}.riftGnawniaHud-targets.mousehuntTooltipParent:hover .mousehuntTooltip{display:flex}.riftGnawniaHud-targets{right:-10px}.riftGnawniaHud-targets .mousehuntTooltip .mousehuntTooltip-arrow{display:none}.riftGnawniaHud .riftGnawniaHud-stringBait>.itemImage,.riftGnawniaHud .riftGnawniaHud-potion>.itemImage,.riftGnawniaHud .riftGnawniaHud-craftingBait>.itemImage{background-color:#a39d99}.riftGnawniaHud .mousehuntTooltip.top{width:280px;min-height:40px}.riftGnawniaHud .riftGnawniaHud-tooltip-content{margin-right:0}.riftGnawniaHud .riftGnawniaHud-stringBait.mousehuntTooltipParent:hover .mousehuntTooltip,.riftGnawniaHud .riftGnawniaHud-potion.mousehuntTooltipParent:hover .mousehuntTooltip,.riftGnawniaHud .riftGnawniaHud-craftingBait.mousehuntTooltipParent:hover .mousehuntTooltip{display:grid;grid-template-columns:1fr 1fr;place-items:center stretch}.riftGnawniaHud .mousehuntTooltipParent:hover .mousehuntTooltip .riftGnawniaHud-tooltip-result{position:relative;bottom:0;display:flex;align-items:center;justify-content:center;width:100%}.riftGnawniaHud-tooltip-quantity{box-sizing:border-box;width:50px;padding:2px}.riftGnawniaHud-label{text-shadow:1px 1px #333,0 0 1px #333,-1px 0 1px #333}
`;
  }
});

// src/modules/location-huds/locations/rift-gnawnia/index.js
var rift_gnawnia_default, init_rift_gnawnia = __esm({
  "src/modules/location-huds/locations/rift-gnawnia/index.js"() {
    init_utils2();
    init_styles89();
    rift_gnawnia_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default88);
    });
  }
});

// src/modules/location-huds/locations/rift-valour/styles.css
var styles_default89, init_styles90 = __esm({
  "src/modules/location-huds/locations/rift-valour/styles.css"() {
    styles_default89 = `#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{min-width:30px;font-size:12px;font-weight:900;line-height:20px;text-align:center;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:9px;right:8px;width:23px;padding:2px;font-size:15px;line-height:27px;color:#fff;background:radial-gradient(circle,#4d3bac,#1a115b);border:none;border-radius:10px 15px 15px 10px;box-shadow:inset 0 0 2px 1px #171717}.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;left:580px;filter:grayscale(1);opacity:.6}.valourRiftHUD-previewTower.mh-vrift-sim-link{top:43px;left:550px;width:21px;height:21px;color:transparent;background-image:url(https://i.mouse.rip/mh-improved/sim.png);filter:grayscale(1);opacity:.4}.valourRiftHUD-previewTower.mh-vrift-sim-link:hover{opacity:.8}span.valourRiftHUD-huntsRemaining-value{margin-right:5px;font-size:15px;font-weight:900;line-height:14px}span.valourRiftHUD-stepsTaken-value{font-size:13px;font-weight:900;color:#2d2964}#mh-vrift-floor-name{position:absolute;top:2px;right:25px;left:25px;z-index:1;height:20px;font-family:Rockwell,Rockwell Nova,Roboto Slab,"DejaVu Serif",Sitka Small,serif;font-size:21px;font-variant:petite-caps;color:#ebfffd;text-shadow:0 0 1px #62fff3;background-color:#231857;opacity:0;transition:opacity .2s ease-in-out;-webkit-text-stroke:1px #4fc5bc}.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:-60px;bottom:-40px;left:-70px;font-size:11px}.bottom.mh-vrift-floor-tooltip .mousehuntTooltip-arrow{display:none}.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}.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 6px;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 .valourRiftHUD-tower-sprite.player,.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.step,.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.player,.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.floor .valourRiftHUD-tower-sprite-image:before{opacity:.4}.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.player:hover{opacity:1}.valourRiftHUD-tower-sprite.floor .valourRiftHUD-tower-sprite-name{font-size:11px;mix-blend-mode:hard-light}.valourRiftHUD.tower .valourRiftHUD-huntsRemaining .valourRiftHUD-state.tower,.valourRiftHUD.tower .valourRiftHUD-stepsTaken .valourRiftHUD-state.tower{display:flex;gap:5px;align-items:center;justify-content:flex-end}.valourRiftHUD.tower .valourRiftHUD-state.tower{font-size:10px}.valourRiftHUD-powerUp .valourRiftHUD-powerUpIcon{top:2px;left:2px;width:44px;height:45px}.valourRiftHUD-powerUp-title{margin-top:-3px;margin-left:2px;font-size:13px}a.valourRiftHUD-gauntletBait-image{background-color:#694481;outline:1px solid #564065}a.valourRiftHUD-bait-image{background-color:#6d90de;outline:2px solid #4f71bc;box-shadow:0 0 0 2px #5071bc}.valourRiftHUD-towerLoot-thumb:hover{transform:scale(2.2)}.valourRiftHUD-towerLoot-thumb{background-size:80%;transition:.2s ease-in;transform:scale(1.7)}a.valourRiftHUD-gauntletBait-image.active{filter:drop-shadow(0 5px 5px #68b868)}.floor_8 .valourRiftHUD-currentFloor{filter:hue-rotate(125deg);mix-blend-mode:color-dodge}.floor_8 .valourRiftHUD-floorProgress-barContainer{filter:hue-rotate(110deg)}.eclipse.floor_8 .valourRiftHUD-floorProgress-barContainer{filter:brightness(1.2);animation:fortRoxlairPulse 2s 3}.valourRiftHUD-tower-sprite.floor_8 .valourRiftHUD-tower-sprite-image{filter:saturate(1.2);box-shadow:inset 0 10px 25px 5px #000}.valourRiftHUD-floorProgress-boss{top:-2px;z-index:2;width:32px;height:32px;border-radius:3px;outline:2px solid #6c87be;box-shadow:0 0 2px 2px #231855}.mh-improved-player-spin{animation:mh-improved-spin .7s linear 1}.flipped .mh-improved-player-spin{animation:mh-improved-spin-flipped .7s linear 1}.mh-improved-player-spin.mh-improved-player-large{animation:mh-improved-spin-large .7s linear 1}.flipped .mh-improved-player-spin.mh-improved-player-large{animation:mh-improved-spin-large-flipped .7s linear 1}@media (prefers-reduced-motion: reduce){.eclipse.floor_8 .valourRiftHUD-floorProgress-barContainer,.mh-improved-player-spin,.mh-improved-player-spin.mh-improved-player-large,.flipped .mh-improved-player-spin,.flipped .mh-improved-player-spin.mh-improved-player-large{animation:none}}.valourRiftHUD-crafting-image{background-position:center;background-size:120%}.valourRiftHUD-tower-sprite.player .valourRiftHUD-tower-sprite-image.mh-improved-player-large{transform:scale(2)}.valourRiftHUD-tower-sprite.player.flipped .valourRiftHUD-tower-sprite-image.mh-improved-player-large{transform:scale(-2,2)}.valourRiftHUD{filter:drop-shadow(0 2px 1px #25266a)}.valourRiftHUD.tower .valourRiftHUD-huntsRemaining .valourRiftHUD-state.tower{gap:0;margin-right:-3px}.valourRiftHUD-fuelContainer-armButton{font-size:12px}.valourRiftHUD-warningContainer.active.hidden,.valourRiftHUD-powerTypeWarning.active.hidden{display:none}.uc-text-highlight,.valourRiftHUD-powerUp-currentLevel.uc-text-highlight{color:#90ffe1}
`;
  }
});

// src/modules/location-huds/locations/rift-valour/simulator.js
function getCacheLoot(floor) {
  let idx = floor > 1 ? floor - 1 : 0;
  return idx >= cacheLoot.length && (idx = cacheLoot.length - 1), cacheLoot[idx];
}
function convertToCR(power, luck, stats) {
  let mPower = stats[0], 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 = !0) {
  let time = Date.now() / 1e3, lvSpeed = window.user.enviroment_atts.power_up_data.long_stride.current_value, lvSync = window.user.enviroment_atts.power_up_data.hunt_limit.current_level + 1, lvSiphon = window.user.enviroment_atts.power_up_data.boss_extension.current_level + 1, siphon = window.user.enviroment_atts.power_up_data.boss_extension.current_value, sync = window.user.enviroment_atts.hunts_remaining, steps = window.user.enviroment_atts.current_step, torchState = window.user.enviroment_atts.is_fuel_enabled, torchEclipse = !0, umbra = window.user.enviroment_atts.active_augmentations.tu, superSiphon = window.user.enviroment_atts.active_augmentations.ss, strStep = window.user.enviroment_atts.active_augmentations.sste, curFloor = window.user.enviroment_atts.floor, sh = window.user.enviroment_atts.active_augmentations.hr, sr = window.user.enviroment_atts.active_augmentations.sr, bail = 999, power = window.user.trap_power, luck = window.user.trinket_name == "Ultimate Charm" ? 1e5 : window.user.trap_luck;
  try {
    let altpower = Number(document.querySelectorAll(".campPage-trap-trapStat.power")[0].children[1].innerText.match(/\d/g).join("")), altluck = Number(document.querySelectorAll(".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 (error) {
    console.log(error);
  }
  let mouseCR = mouseStats.map(function(stats) {
    return convertToCR(power, luck, stats);
  }), mouseAR = umbra ? umbraAR : normalAR, eclipseCR = umbra ? mouseCR[17] : mouseCR[9], eclipseSG = umbra ? mouseDrops[17][0] : mouseDrops[9][0], eclipseSC = umbra ? mouseDrops[17][2] : mouseDrops[9][2], eclipseGold = umbra ? mouseDrops[17][4] : mouseDrops[9][4], 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);
  let speed = torchState ? Number(lvSpeed) + 1 : lvSpeed;
  siphon = superSiphon ? siphon * 2 : siphon;
  let sigils = 0, secrets = 0, gold = 0, cfDrops = 0, totalHunts = 0, catches = 0;
  function addRate(step2, hunts, change) {
    runValues[step2] == null && (runValues[step2] = []), 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, checkLap = Math.floor(Math.pow((step2 + 1) / 35 + 2809 / 1225, 0.5) - 53 / 35) + 1, toEC = checkLap * (106 + 35 * checkLap) - 1, floorLength = 10 * (lap + 1), onEC = lap * (106 + 35 * lap) - 1, flFromEC = Math.ceil((onEC - step2) / floorLength), 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 = Math.min(strStep ? step2 + 4 * speed : step2 + 2 * speed, toEC), stepDetails[step2].toKB = Math.max(umbra === !0 ? step2 - 5 : 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;
  let valuesDistribution = Array.from({ length: 500 });
  for (var i = 0; i < 500; i++)
    valuesDistribution[i] = [];
  var stepDetails = [];
  let loopActive = 1, startActive = steps, endActive = steps, loopEnd;
  for (let element of valuesDistribution)
    element[0] = 0;
  for (var runValues = [], 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++)
    for (loopActive = 0, loopEnd = endActive, step = startActive; step <= loopEnd; step++)
      if (runValues[step] == null)
        runValues[step] = [];
      else {
        let rate = runValues[step][hunts - 1];
        rate != null && rate > 1e-8 && (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, (torchState && stepDetails[step].floor % 8 != 0 || torchEclipse && stepDetails[step].floor % 8 == 0) && (sigils += rate * stepDetails[step].sgi, secrets += rate * stepDetails[step].sci), 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)) : (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);
  });
  let loopDistribution = Array.from({ length: 25 }).fill(0).map(
    function(a, index) {
      let sum = 0;
      return valuesDistribution.slice(index * 8, (index + 1) * 8).map(
        function(a2) {
          sum += Number(a2);
        }
      ), Number(sum);
    }
  ), runningProbability = 1, loopCumulative = loopDistribution.map(function(a) {
    let result = runningProbability;
    return runningProbability -= a, result;
  }), loopCopy = [...loopDistribution].filter(function(a) {
    return a > 1e-3;
  }), avgFloor = Math.round(averageFloor), curCache = getCacheLoot(curFloor), avgCache = getCacheLoot(avgFloor), mult = [sh ? 1.5 : 1, sr ? 1.5 : 1], 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])], display = [
    "VRift Sim: " + lvSpeed + "/" + lvSync + "/" + lvSiphon + (torchState ? " CF" : "") + (superSiphon ? " SS" : "") + (umbra ? " UU" : "") + (strStep ? " SSt" : ""),
    "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],
    ""
  ], startDisplay = display.length, fullDisplay = [
    "VRift Run Simulation: " + (Date.now() / 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),
    ""
  ], startFullDisplay = fullDisplay.length, eclipses = [];
  for (i = 0; i < loopCopy.length; i++) {
    let loopIndex = loopDistribution.indexOf(loopCopy[i]), eEntry = (loopCopy[i] * 100).toFixed(1), cEntry = (loopCumulative[loopIndex] * 100).toFixed(1), entry = "Eclipse #" + loopIndex.toString() + ": ", fullEntry = entry + eEntry + "% (" + cEntry + "% cumulative)";
    entry += cEntry + "%", display[startDisplay + i] = entry, fullDisplay[startFullDisplay + i] = fullEntry, eclipses.push({
      number: loopIndex,
      percent: eEntry,
      cumulative: cEntry
    });
  }
  if (shouldDisplay)
    console.log(fullDisplay.join(`
`)), alert(display.join(`
`));
  else
    return {
      speed: lvSpeed,
      sync: lvSync,
      siphon: lvSiphon,
      cfOn: torchState,
      superSiphon,
      umbra,
      strStep,
      ucEclipse: !1,
      steps,
      power,
      luck,
      avgFloor,
      avgHunts: Math.round(totalHunts),
      lootSigils: Math.round(sigils),
      lootSecrets: Math.round(secrets),
      cacheSigils: deltaCache[0],
      cacheSecrets: deltaCache[1],
      eclipses
    };
}
var cacheLoot, normalAR, umbraAR, mouseDrops, mouseStats, simulator_default, init_simulator = __esm({
  "src/modules/location-huds/locations/rift-valour/simulator.js"() {
    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-huds/locations/rift-valour/index.js
var displayResults, doSimulation, addUIComponents, modifyPlayerIcon, addSimulatorEvents, removeWarningIfUcEquipped, highlightQuantitiesIfUcEquipped, ifUcEquipped, rift_valour_default2, init_rift_valour2 = __esm({
  "src/modules/location-huds/locations/rift-valour/index.js"() {
    init_utils2();
    init_styles90();
    init_simulator();
    displayResults = (results) => {
      let eclipseText = "";
      return 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>`;
      }), `<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>`;
    }, doSimulation = (selector) => {
      let simPopup = document.querySelector(selector);
      simPopup && simPopup.addEventListener("click", () => {
        let data = simulator_default(!1), popup = createPopup({
          title: "Valour Rift Run Simulation",
          content: displayResults(data),
          show: !1
        });
        popup.setAttributes({ className: "mh-vrift-popup" }), popup.show();
      });
    }, addUIComponents = () => {
      var _a, _b;
      let existing = document.querySelector("#mh-vrift-floor-name");
      existing && existing.remove();
      let floor = document.querySelector(".valourRiftHUD-currentFloor");
      if (floor) {
        let 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);
      }
      let floorTooltipParent = document.querySelector(".valourRiftHUD-floorProgress.mousehuntTooltipParent");
      if (!floorTooltipParent)
        return;
      let tooltip = floorTooltipParent.querySelector(".mousehuntTooltip");
      if (!tooltip)
        return;
      tooltip.classList.add("bottom", "mh-vrift-floor-tooltip"), tooltip.classList.remove("top");
      let stepsRemaining = tooltip.querySelector(".valourRiftHUD-stepsRemaining");
      if (!stepsRemaining)
        return;
      let floorBar = document.querySelector(".valourRiftHUD-floorProgress-barContainer");
      if (!floorBar)
        return;
      let stepsExisting = document.querySelector(".mh-vrift-steps-remaining");
      stepsExisting && stepsExisting.remove(), makeElement("div", "mh-vrift-steps-remaining", stepsRemaining.textContent, floorBar);
    }, modifyPlayerIcon = () => {
      let playerIcon = document.querySelector(".valourRiftHUD-tower-sprite.player .valourRiftHUD-tower-sprite-image");
      if (!playerIcon)
        return;
      let timeout;
      playerIcon.addEventListener("click", (event) => {
        if (event.shiftKey) {
          playerIcon.classList.toggle("mh-improved-player-large");
          return;
        }
        playerIcon.classList.add("mh-improved-player-spin"), clearTimeout(timeout), timeout = setTimeout(() => {
          playerIcon.classList.remove("mh-improved-player-spin");
        }, 700);
      });
    }, addSimulatorEvents = () => {
      doSimulation(".valourRiftHUD-floorProgress-barContainer");
      let magnifyingGlass = document.querySelector(".valourRiftHUD-previewTower");
      if (!magnifyingGlass)
        return;
      let existing = document.querySelector(".mh-vrift-sim-link");
      existing && existing.remove();
      let simLink = makeElement("a", ["valourRiftHUD-previewTower", "mh-vrift-sim-link"], "Simulate Run");
      simLink.title = "Simulate Valour Rift Run", magnifyingGlass.after(simLink), doSimulation(".mh-vrift-sim-link");
    }, removeWarningIfUcEquipped = () => {
      let warningContainer = document.querySelector(".valourRiftHUD-warningContainer.active");
      if (!warningContainer)
        return;
      warningContainer.classList.remove("hidden");
      let powerTypeWarning = warningContainer.querySelector(".valourRiftHUD-powerTypeWarning.active");
      powerTypeWarning && (powerTypeWarning.classList.remove("hidden"), user.trinket_item_id == 1075 && (warningContainer.classList.add("hidden"), powerTypeWarning.classList.add("hidden")));
    }, highlightQuantitiesIfUcEquipped = () => __async(void 0, null, function* () {
      [
        ".valourRiftHUD-gauntletBait-quantity.quantity",
        ".valourRiftHUD-towerLoot-quantity.quantity",
        ".valourRiftHUD-powerUp-currentLevel"
      ].forEach((selector) => {
        let existing = document.querySelectorAll(selector);
        existing && existing.forEach((e) => {
          user.trinket_item_id == 1075 ? e.classList.add("uc-text-highlight") : e.classList.remove("uc-text-highlight");
        });
      });
    }), ifUcEquipped = () => {
      removeWarningIfUcEquipped(), highlightQuantitiesIfUcEquipped();
    }, rift_valour_default2 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default89), addUIComponents(), addSimulatorEvents(), modifyPlayerIcon(), onTrapChange(ifUcEquipped);
    });
  }
});

// src/modules/location-huds/locations/rift-whisker-woods/styles.css
var styles_default90, init_styles91 = __esm({
  "src/modules/location-huds/locations/rift-whisker-woods/styles.css"() {
    styles_default90 = `.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;font-size:10px}.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}.mhui-taunting-warning{top:36px;left:150px;width:414px;padding:10px 20px;border-color:#992023}.mhui-taunting-warning-close{position:absolute;top:-6px;right:-6px;z-index:15;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:18px;height:17px;padding:5px;font-size:12px;font-weight:700;line-height:15px;color:#fff;text-align:center;background-color:#e03a3a;border:1px solid #992023;border-color:#d1d0cf;border-radius:20px}.mhui-taunting-warning-close:hover{color:#ffb4b4;background-color:#992023}@keyframes mhui-glow-eyes{0%{filter:saturate(1)}40%{filter:saturate(2.5)}to{filter:saturate(1)}}.riftWhiskerWoodsHUD.boss_bait .riftWhiskerWoodsHUD-boss{animation:mhui-glow-eyes 30s ease-in-out infinite}.riftWhiskerWoodsHUD-zone-charm-image-container{top:-5px;width:32px;height:32px}.clearing .riftWhiskerWoodsHUD-zone-charm-image-container{top:-6px}
`;
  }
});

// src/modules/location-huds/locations/rift-whisker-woods/index.js
var hasHiddenTauntingWarning, showTauntingWarning, checkAndWarnWhenNoTauntingCharm, rift_whisker_woods_default, init_rift_whisker_woods = __esm({
  "src/modules/location-huds/locations/rift-whisker-woods/index.js"() {
    init_utils2();
    init_styles91();
    hasHiddenTauntingWarning = !1, showTauntingWarning = () => {
      if (document.querySelector(".mhui-taunting-warning"))
        return;
      let baitWarning = document.querySelector(".riftWhiskerWoodsHUD-bossBaitWarning");
      if (!baitWarning || hasHiddenTauntingWarning)
        return;
      let warning = baitWarning.cloneNode(!0);
      warning.classList.add("mhui-taunting-warning", "active"), warning.innerHTML = "You don't have a Taunting Charm equipped! You may reset your rage!";
      let warningClose = makeElement("div", "mhui-taunting-warning-close");
      warningClose.innerHTML = "\xD7", warningClose.onclick = (e) => {
        e.preventDefault(), hasHiddenTauntingWarning = !0, warning.classList.remove("active");
      }, warning.append(warningClose), baitWarning.after(warning);
    }, checkAndWarnWhenNoTauntingCharm = () => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
      if (user.trinket_item_id == "1647")
        return;
      let rage = [
        ((_d = (_c = (_b = (_a = user.quests) == null ? void 0 : _a.QuestRiftWhiskerWoods) == null ? void 0 : _b.zones) == null ? void 0 : _c.clearing) == null ? void 0 : _d.level) || 0,
        ((_h = (_g = (_f = (_e = user.quests) == null ? void 0 : _e.QuestRiftWhiskerWoods) == null ? void 0 : _f.zones) == null ? void 0 : _g.lagoon) == null ? void 0 : _h.level) || 0,
        ((_l = (_k = (_j = (_i = user.quests) == null ? void 0 : _i.QuestRiftWhiskerWoods) == null ? void 0 : _j.zones) == null ? void 0 : _k.tree) == null ? void 0 : _l.level) || 0
      ], rage48 = rage.filter((val) => val >= 48).length, rage49 = rage.filter((val) => val >= 49).length, rage50 = rage.filter((val) => val >= 50).length;
      (rage48 === 3 || // If all 3 are 48.
      rage49 === 2 || // If 2 are 49.
      rage50 === 1 || // If 1 is 50.
      user.bait_item_id == "1646") && showTauntingWarning();
    }, rift_whisker_woods_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default90), checkAndWarnWhenNoTauntingCharm(), onRequest("*", checkAndWarnWhenNoTauntingCharm);
    });
  }
});

// src/modules/location-huds/locations/school-of-sorcery/styles.css
var styles_default91, init_styles92 = __esm({
  "src/modules/location-huds/locations/school-of-sorcery/styles.css"() {
    styles_default91 = `.folkloreForestRegionView-trapWarningContainer{top:40%}.headsUpDisplaySchoolOfSorceryView .folkloreForestRegionView-trapWarningContainer{right:160px;left:160px;padding:5px}.schoolOfSorceryCourseView__powerTypeWarningIcon{background-image:url(https://i.mouse.rip/map-marker.png)}.folkloreForestRegionView-warning{border:none}.schoolOfSorceryCourseView__dropOutButton{height:19px}.schoolOfSorceryTranscriptDialogView__courseSummaryIcon{width:30px;height:30px;background-size:cover}
`;
  }
});

// src/modules/location-huds/locations/school-of-sorcery/index.js
var school_of_sorcery_default, init_school_of_sorcery = __esm({
  "src/modules/location-huds/locations/school-of-sorcery/index.js"() {
    init_utils2();
    init_styles67();
    init_styles92();
    school_of_sorcery_default = () => __async(void 0, null, function* () {
      addHudStyles([styles_default66, styles_default91]);
    });
  }
});

// src/modules/location-huds/locations/seasonal-garden/styles.css
var styles_default92, init_styles93 = __esm({
  "src/modules/location-huds/locations/seasonal-garden/styles.css"() {
    styles_default92 = `.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)}.seasonalGardenHUD-season.sr:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/summer_icon.png)}.seasonalGardenHUD-season.fl:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/fall_icon.png)}.seasonalGardenHUD-season.wr:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/winter_icon.png)}.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);transform-origin:left;will-change:transform}.seasonalGardenHUD-amplifierProgress-bar--animating{animation:.3s mh-improved-bounce-and-stretch 2}@media (prefers-reduced-motion: reduce){.seasonalGardenHUD-amplifierProgress-bar--animating{animation:none}}.seasonalGardenHUD-amplifierBoundingBox .mousehuntTooltip{top:-10px;left:120px;width:460px;font-size:11px;line-height:1.6}.seasonalGardenHUD-amplifierBoundingBox .mousehuntTooltip .mousehuntTooltip-arrow{display:none}
`;
  }
});

// src/modules/location-huds/locations/seasonal-garden/index.js
var makeProgressDraggable, changeBarColor, seasonal_garden_default, init_seasonal_garden2 = __esm({
  "src/modules/location-huds/locations/seasonal-garden/index.js"() {
    init_utils2();
    init_styles93();
    makeProgressDraggable = () => {
      let progressBar = document.querySelector(".seasonalGardenHUD-amplifierProgress");
      if (!progressBar)
        return;
      let progressBarMarker = document.querySelector(".seasonalGardenHUD-amplifierProgress-bar");
      if (!progressBarMarker)
        return;
      let originalWidth = progressBarMarker.style.width, timeout = null;
      progressBar.addEventListener("click", (e) => {
        let rect = progressBar.getBoundingClientRect(), x = e.clientX - rect.left, width = rect.width, percent = Math.round(x / width * 100);
        progressBarMarker.style.width = `${percent}%`, setTimeout(() => {
          progressBarMarker.classList.add("seasonalGardenHUD-amplifierProgress-bar--animating");
        }, 50), timeout && clearTimeout(timeout), timeout = setTimeout(() => {
          progressBarMarker.style.width = originalWidth, setTimeout(() => {
            progressBarMarker.classList.remove("seasonalGardenHUD-amplifierProgress-bar--animating");
          }, 300);
        }, 600);
      });
    }, changeBarColor = () => {
      let trigger = document.querySelector(".seasonalGardenHUD-season");
      if (!trigger)
        return;
      let bar = document.querySelector(".seasonalGardenHUD-amplifierProgress-bar");
      bar && trigger.addEventListener("click", () => {
        let hue = Math.round(Math.random() * 360);
        bar.style.filter = `hue-rotate(${hue}deg)`;
      });
    }, seasonal_garden_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default92), makeProgressDraggable(), changeBarColor();
    });
  }
});

// src/modules/location-huds/locations/slushy-shoreline/index.js
var slushy_shoreline_default, init_slushy_shoreline = __esm({
  "src/modules/location-huds/locations/slushy-shoreline/index.js"() {
    init_cheese_selectors();
    slushy_shoreline_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("slushy-shoreline", ["toxic_super_brie_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/ss-huntington-ii/index.js
var ss_huntington_ii_default, init_ss_huntington_ii = __esm({
  "src/modules/location-huds/locations/ss-huntington-ii/index.js"() {
    init_cheese_selectors();
    ss_huntington_ii_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("ss-huntington-ii", ["galleon_gouda_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/sunken-city/styles.css
var styles_default93, init_styles94 = __esm({
  "src/modules/location-huds/locations/sunken-city/styles.css"() {
    styles_default93 = `.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;line-height:.9}.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}
`;
  }
});

// src/modules/location-huds/locations/sunken-city/index.js
var updateHudImages, makeCharmElement, addMoreCharms, sunken_city_default2, init_sunken_city2 = __esm({
  "src/modules/location-huds/locations/sunken-city/index.js"() {
    init_utils2();
    init_styles94();
    updateHudImages = () => {
      let 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.
      }, upscaleImage = (image) => {
        let normalizedImage = image.src.replace("https://www.mousehuntgame.com/images/items", "").replace("?cv=1", "").replace("?cv=2", "").replace("?cv=3", "").replace("?v=1", "").replace("?v=2", "").replace("?v=3", "");
        upscaleMapping[normalizedImage] && (image.src = `https://www.mousehuntgame.com/images/items/${upscaleMapping[normalizedImage]}`);
      };
      document.querySelectorAll(".sunkenCityHud .leftSidebar .craftingItems a img").forEach((image) => {
        upscaleImage(image);
      });
      let baitImage = document.querySelector(".sunkenCityHud .sunkenBait .itemImage img");
      baitImage && upscaleImage(baitImage), document.querySelectorAll(".sunkenCityHud .sunkenCharms a .itemImage img").forEach((charm) => {
        upscaleImage(charm);
      });
    }, makeCharmElement = (charm, appendTo) => {
      let existing = document.querySelector(`.mhui-sunken-charm[data-item-type="${charm.type}"]`);
      existing && existing.remove();
      let wrapper = makeElement("a", ["charm", "mhui-sunken-charm"]);
      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;");
      let clearBlock = makeElement("div", "clear-block"), itemImage = makeElement("div", "itemImage"), image = makeElement("img");
      image.setAttribute("src", charm.thumbnail_transparent), itemImage.append(image), clearBlock.append(itemImage);
      let quantity = makeElement("div", "item quantity", charm.quantity);
      quantity.setAttribute("data-item-type", charm.type), clearBlock.append(quantity), wrapper.append(clearBlock), charm.type == "smart_water_jet_trinket" ? charm.description = "Overcharge your engine for a 500m boost with an automatic unequip after the hunt." : charm.type == "brilliant_water_jet_trinket" ? charm.description = "Supercharge your engine for a boost to the end of the current zone!" : charm.type == "spiked_anchor_trinket" ? charm.description = "Slow down your sub while also boosting your power!" : charm.type == "golden_anchor_trinket" && (charm.description = "Set your sub to super-slow and also find additional sand dollars!");
      let 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* () {
      let charmsWrapper = document.querySelector(".sunkenCityHud .sunkenCharms");
      if (!charmsWrapper)
        return;
      let existingCharms = charmsWrapper.querySelectorAll(".mhui-sunken-charm");
      for (let charm of existingCharms)
        charm.remove();
      let itemsData = yield getUserItems([
        "spiked_anchor_trinket",
        "smart_water_jet_trinket",
        "golden_anchor_trinket",
        "brilliant_water_jet_trinket"
      ]);
      if (user.trinket_item_id == 1517) {
        let waterJetCharm = document.querySelector('.sunkenCityHud .sunkenCharms a[data-item-type="water_jet_trinket"]');
        waterJetCharm && waterJetCharm.classList.add("active");
      }
      if (user.trinket_item_id == 423) {
        let anchorCharm = document.querySelector('.sunkenCityHud .sunkenCharms a[data-item-type="anchor_trinket"]');
        anchorCharm && anchorCharm.classList.add("active");
      }
      for (let item of itemsData)
        makeCharmElement(item, charmsWrapper);
    }), sunken_city_default2 = () => __async(void 0, null, function* () {
      addHudStyles(styles_default93), updateHudImages(), addMoreCharms();
    });
  }
});

// src/modules/location-huds/locations/table-of-contents/simulator.js
var MousePool, MouseStats, simulate2, updateWords, updateCR, getCatchRate2, getEncounteredMouse, simulator_default2, init_simulator2 = __esm({
  "src/modules/location-huds/locations/table-of-contents/simulator.js"() {
    init_utils2();
    MousePool = {
      PreEncyclopedia: {
        Grammarian: 1
      },
      Encyclopedia: {
        Grammarian: 0.6,
        Mythweaver: 0.4
      }
    }, MouseStats = {
      Grammarian: {
        Power: 9e4,
        Eff: 4,
        Points: 25e4
      },
      Mythweaver: {
        Power: 2e5,
        Eff: 7,
        Points: 1e6
      }
    }, simulate2 = (options2) => {
      updateWords(options2.Upgrades), updateCR(options2.TrapPower, options2.TrapLuck);
      let debug4 = {}, volumeCountByVolume = {}, huntsByVolume = {};
      for (let i = 0; i < options2.TotalSimulations; i++) {
        let wordCount = options2.WritingSession.WordsWritten, huntsRemaining = options2.WritingSession.HuntsRemaining;
        for (; huntsRemaining > 0; ) {
          let stage = wordCount < 4e3 ? "PreEncyclopedia" : "Encyclopedia", mouse = getEncounteredMouse(stage), mouseStats2 = MouseStats[mouse];
          Math.random() <= mouseStats2.CatchRate && (wordCount += mouseStats2.Words * (options2.WritingSession.FuelEnabled ? 2 : 1), mouse === "Mythweaver" && (huntsRemaining += 2)), huntsRemaining -= 1;
        }
        let totalVolumes = Math.floor(wordCount / 4e3);
        volumeCountByVolume[totalVolumes] || (volumeCountByVolume[totalVolumes] = 0), volumeCountByVolume[totalVolumes] += 1, huntsByVolume[totalVolumes] || (huntsByVolume[totalVolumes] = 0), debug4[totalVolumes] || (debug4[totalVolumes] = []), debug4[totalVolumes].push({
          wordCount,
          totalVolumes
        });
      }
      let volumesWritten = Object.keys(volumeCountByVolume).map(Number);
      volumesWritten.sort((a, b) => a - b);
      let minVolume = volumesWritten.at(0), maxVolume = volumesWritten.at(-1), results = {
        chances: [],
        mostLikely: {}
      }, cumulativeChance = 1;
      for (let volume = minVolume; volume <= maxVolume; volume++) {
        if (!volumeCountByVolume[volume])
          continue;
        let chance = volumeCountByVolume[volume] / options2.TotalSimulations;
        cumulativeChance -= chance, results.chances.push({
          volume,
          gnawbels: volume * 54,
          words: volume * 4e3,
          chance,
          cumulativeChance
        });
      }
      let mostLikelyVolume = Number(Object.keys(volumeCountByVolume).reduce((a, b) => volumeCountByVolume[a] > volumeCountByVolume[b] ? a : b));
      return results.mostLikely = {
        volume: mostLikelyVolume,
        gnawbels: mostLikelyVolume * 54,
        words: mostLikelyVolume * 4e3
      }, debuglog("location-huds-table-of-contents", `Simulated ${options2.TotalSimulations} ToC runs.`, results), results;
    }, updateWords = (upgrades) => {
      Object.entries(MouseStats).forEach(([key, mouseStats2]) => {
        let words = mouseStats2.Points / 1e3;
        upgrades.HasSilverQuill && (words = Math.ceil(words * 1.25)), upgrades.HasGoldenQuill && (words = Math.ceil(words * 1.5)), MouseStats[key].Words = words;
      });
    }, updateCR = (power, luck) => {
      Object.entries(MouseStats).forEach(([key, mouseStats2]) => {
        MouseStats[key].CatchRate = getCatchRate2(mouseStats2.Power, mouseStats2.Eff, power, luck);
      });
    }, getCatchRate2 = (mousePower, effectiveness2, power, luck) => Math.min(
      1,
      (effectiveness2 * power + 2 * Math.pow(Math.floor(Math.min(effectiveness2, 1.4) * luck), 2)) / (effectiveness2 * power + mousePower)
    ), getEncounteredMouse = (stage) => {
      let totalWeight = 0, selected = "";
      for (let [mouse, weight] of Object.entries(MousePool[stage]))
        Math.random() >= totalWeight && (selected = mouse), totalWeight += weight;
      return selected;
    }, simulator_default2 = simulate2;
  }
});

// src/modules/location-huds/locations/table-of-contents/simulator-styles.css
var simulator_styles_default, init_simulator_styles = __esm({
  "src/modules/location-huds/locations/table-of-contents/simulator-styles.css"() {
    simulator_styles_default = `#overlayPopup.mh-toc-popup .jsDialogContainer{background:linear-gradient(#2b622e,#142e16,#2b622e);outline:1px solid #2b622e}#overlayPopup.mh-toc-popup .jsDialogContainer .content{padding:10px 0 20px}#overlayPopup.mh-toc-popup .title{position:relative;padding:5px 5px 5px 45px;font-size:18px;color:#fff}.mh-toc-sim-results{display:grid;grid-template-columns:40% 45%;justify-content:space-evenly;justify-items:stretch;margin:0 1em;color:#fff}.mh-toc-sim-results .stats{display:flex;flex-direction:column;gap:3em;align-items:stretch;justify-content:space-between}.mh-toc-sim-results .stats .group{display:grid;gap:1em}.mh-toc-sim-results .result{display:grid;grid-template-columns:2fr 1fr;gap:1em;place-items:stretch;align-items:center}.mh-toc-sim-results .label{padding-left:10px;font-size:13px;line-height:30px;background-color:#c3c3c31a;border-radius:5px}.mh-toc-sim-results .value{position:relative;left:-5px;font-size:14px;line-height:30px;color:#eaeaea;text-align:center;background:linear-gradient(#146114,#549241);border:1px solid #123d1c;border-radius:5px}.mh-toc-sim-results .percents{margin-top:-30px}.mh-toc-sim-results ol{display:flex;flex-direction:column;align-items:stretch;height:100%;max-height:290px;overflow-x:auto;font-size:13px;color:#d2e5d2;background-color:#c3c3c31a;border-radius:3px;::-webkit-scrollbar{display:none}-ms-overflow-style:none;scrollbar-width:none}.mh-toc-sim-results .percents li{display:grid;grid-template-columns:repeat(4,1fr);place-items:center;padding:3px;margin-bottom:.25em;text-align:right}.mh-toc-sim-results .percents h3{padding-bottom:11px;font-size:16px;color:#fff}.mh-toc-sim-results .percents .header{position:sticky;top:0;padding:3px 0;font-size:13px;color:#c4c4c4;backdrop-filter:blur(8px);border-bottom:1px solid rgb(150 150 150 / 35%)}.mh-toc-sim-results .percents li:nth-child(odd){background-color:#c3c3c333}.mh-toc-sim-results .percents .guaranteed .number,.mh-toc-sim-results .percents .guaranteed .volume{color:#9ff593}.mh-toc-sim-results .percents .good .number,.mh-toc-sim-results .percents .good .volume{color:#7ebe7e}.mh-toc-sim-results .percents .maybe .number,.mh-toc-sim-results .percents .maybe .volume{color:#faee9e}.mh-toc-sim-results .percents .bad .number,.mh-toc-sim-results .percents .bad .volume{color:#fcd6b6}.mh-toc-sim-results .percents .worst .number,.mh-toc-sim-results .percents .worst .volume{color:#ff8181}.mh-toc-sim-results .percents li.expected{background-color:#2ba1c7b3}.mh-toc-sim-results .percents li.result .volume{font-size:16px}.mh-toc-sim-results .percents .words,.mh-toc-sim-results .percents .gnawbels{font-size:12px}.mh-toc-sim-results .percents .header .words{justify-self:center;font-size:10px;text-align:center}#overlayPopup.mh-toc-popup .title:before{position:absolute;top:0;bottom:0;left:0;width:35px;height:35px;content:"";background:url(https://www.mousehuntgame.com/images/folklore_forest_upgrades/leather_cover_thumb.png) no-repeat 0 0 / cover;opacity:.8}a.mh-toc-sim-link{position:absolute;right:20px;bottom:95px;width:40px;height:40px;color:transparent;background:url(https://i.mouse.rip/toc-sim.png) no-repeat bottom center / 40px;background-blend-mode:multiply;border-radius:50%}a.mh-toc-sim-link:hover{background:url(https://i.mouse.rip/toc-sim.png) no-repeat top center / 40px}a.mh-toc-sim-link .mousehuntTooltip{top:120%;right:-15px;width:60px;text-align:center}.tableOfContentsView-libraryButton{bottom:6px}.tableOfContentsView-disarmPreferenceButton{bottom:50px}.mh-toc-popup .info{position:absolute;bottom:30px;left:20px;margin:0;font-size:10px;color:#000}
`;
  }
});

// src/modules/location-huds/locations/table-of-contents/styles.css
var styles_default94, init_styles95 = __esm({
  "src/modules/location-huds/locations/table-of-contents/styles.css"() {
    styles_default94 = `.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{margin-right:2px;font-size:14px;border-radius:3px}.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}.tableOfContentsView-wordMeterContainer{margin-right:-15px}.tableOfContentsView-wordMeter-label{width:50px}.folkloreForestRegionView-baitTOCCraftableContainer .folkloreForestRegionView-bait-image{position:absolute;top:0;left:-2px;width:40px;height:40px}.folkloreForestRegionView-bait-image:hover{background-size:100%;transform:scale(1.2)}a.folkloreForestRegionView-bait-image{transition:.2s ease-in}.folkloreForestRegionView-bait-range{padding-top:5px;font-size:13px;font-weight:900;text-align:center}.folkloreForestRegionView-baitTOCCraftableContainer .mousehuntTooltip{right:-40px;left:-40px;text-align:center}.folkloreForestRegionView-baitTOCCraftableContainer[data-item-type=thousandth_draft_derby_cheese] .mousehuntTooltip{right:-55px;left:-55px}.folkloreForestRegionView-baitTOCCraftableContainer .mousehuntTooltip b{font-size:12px;line-height:18px}.folkloreForestRegionView-environmentInventory-blockContainer{width:auto}.expanded .folkloreForestRegionView-environmentInventory-blockContainer{width:110px}.folkloreForestRegionView.table_of_contents .folkloreForestRegionView-environmentInventory.table_of_contents{width:80px}.folkloreForestRegionView.table_of_contents .expanded .folkloreForestRegionView-environmentInventory.table_of_contents{width:auto}.folkloreForestRegionView-environmentInventory-label{overflow:hidden;text-overflow:ellipsis}
`;
  }
});

// src/modules/location-huds/locations/table-of-contents/index.js
var displayResults2, getOptions, triggerSimPopup, doSimulation2, addSimulatorEvents2, addSimulatorIcon, updateWordLootQuantity, updateNextWordCount, table_of_contents_default2, init_table_of_contents2 = __esm({
  "src/modules/location-huds/locations/table-of-contents/index.js"() {
    init_utils2();
    init_folklore_forest2();
    init_keep_inventory_open();
    init_simulator2();
    init_styles67();
    init_simulator_styles();
    init_styles95();
    displayResults2 = (results, timeTaken) => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
      let currentVolume = ((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestTableOfContents) == null ? void 0 : _b.current_book) == null ? void 0 : _c.volume) || 0, currentWordCount = ((_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestTableOfContents) == null ? void 0 : _e.current_book) == null ? void 0 : _f.word_count) || 0, expectedVolume = ((_g = results == null ? void 0 : results.mostLikely) == null ? void 0 : _g.volume) < currentVolume ? currentVolume : (_h = results == null ? void 0 : results.mostLikely) == null ? void 0 : _h.volume, expectedWords = ((_i = results == null ? void 0 : results.mostLikely) == null ? void 0 : _i.words) < currentWordCount ? currentWordCount : (_j = results == null ? void 0 : results.mostLikely) == null ? void 0 : _j.words, text = `<div class="mh-toc-sim-results">
<div class="stats">
  <div class="group current">
    <div class="result">
      <div class="label">Current Volume</div>
      <div class="value">${currentVolume}</div>
    </div>
    <div class="result">
      <div class="label">Current Words</div>
      <div class="value">${currentWordCount == null ? void 0 : currentWordCount.toLocaleString()}</div>
    </div>
  </div>
  <div class="group mean">
    <div class="result">
      <div class="label">Expected Volume</div>
      <div class="value">${expectedVolume.toLocaleString()}</div>
    </div>
    <div class="result">
      <div class="label">Expected Words</div>
      <div class="value">${expectedWords == null ? void 0 : expectedWords.toLocaleString()}</div>
    </div>
  </div>
  <div class="group gnawbels">
    <div class="result">
      <div class="label">Expected Gnawbels</div>
      <div class="value">${(_l = (_k = results == null ? void 0 : results.mostLikely) == null ? void 0 : _k.gnawbels) == null ? void 0 : _l.toLocaleString()}</div>
    </div>
  </div>
</div>

<div class="percents">
  <ol>
    <li class="header">
      <span class="percent">Volume</span>
      <span class="number">Chance</span>
      <span class="words">Words Remaining</span>
      <span class="gnabels">Gnawbels</span>
    </li>`;
      for (let chance of (results == null ? void 0 : results.chances) || []) {
        chance.cumulativeChance >= 0.999 && (chance.cumulativeChance = 1);
        let chancePercent = Math.floor(chance.cumulativeChance * 1e3) / 10;
        if (chancePercent < 1 || chance.volume === currentVolume)
          continue;
        let classname = "normal";
        switch (!0) {
          case chancePercent >= 99:
            classname = "guaranteed";
            break;
          case chancePercent >= 75:
            classname = "good";
            break;
          case chancePercent >= 30:
            classname = "maybe";
            break;
          case chancePercent <= 2:
            classname = "worst";
            break;
          case chancePercent <= 10:
            classname = "bad";
            break;
        }
        chance.volume === expectedVolume && (classname += " expected");
        let wordsToGo = chance.words - currentWordCount;
        wordsToGo < 0 && (wordsToGo = 0), text += `<li class="result ${classname}">
    <span class="volume">${chance.volume}</span>
    <span class="number">${chancePercent.toFixed(1)}%</span>
    <span class="words">${wordsToGo == null ? void 0 : wordsToGo.toLocaleString()}</span>
    <span class="gnawbels">${(_m = chance.gnawbels) == null ? void 0 : _m.toLocaleString()}</span>
  </li>`;
      }
      return text += "</ol></div></div>", text += `<div class="info">Simulated ${getOptions().TotalSimulations.toLocaleString()} writing sessions with Final Draft Derby equipped in ${(timeTaken / 1e3).toFixed(3)}s.</div>`, text;
    }, getOptions = () => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
      return {
        TotalSimulations: 1e5,
        TrapPower: (user == null ? void 0 : user.trap_power) || 0,
        TrapLuck: (user == null ? void 0 : user.trap_luck) || 0,
        Upgrades: {
          HasEdgeGilding: ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestTableOfContents) == null ? void 0 : _b.has_improved_paper) || !1,
          HasGoldFoilPrinting: ((_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestTableOfContents) == null ? void 0 : _d.has_gold_foil) || !1,
          HasSilverQuill: ((_f = (_e = user == null ? void 0 : user.quests) == null ? void 0 : _e.QuestTableOfContents) == null ? void 0 : _f.has_silver_quill) || !1,
          HasGoldenQuill: ((_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestTableOfContents) == null ? void 0 : _h.has_golden_quill) || !1
        },
        WritingSession: {
          HuntsRemaining: ((_j = (_i = user == null ? void 0 : user.quests) == null ? void 0 : _i.QuestTableOfContents) == null ? void 0 : _j.current_book.hunts_remaining) || 0,
          WordsWritten: ((_l = (_k = user == null ? void 0 : user.quests) == null ? void 0 : _k.QuestTableOfContents) == null ? void 0 : _l.current_book.word_count) || 0,
          FuelEnabled: ((_n = (_m = user == null ? void 0 : user.quests) == null ? void 0 : _m.QuestTableOfContents) == null ? void 0 : _n.is_fuel_enabled) || !1
        }
      };
    }, triggerSimPopup = () => {
      let startTimestamp = Date.now(), data = simulator_default2(getOptions()), timeTaken = Date.now() - startTimestamp, popup = createPopup({
        title: "Encyclopedia Simulation",
        content: displayResults2(data, timeTaken),
        show: !1
      });
      popup.setAttributes({ className: "mh-toc-popup" }), popup.show();
    }, doSimulation2 = (selector) => {
      let simPopup = document.querySelector(selector);
      simPopup && simPopup.addEventListener("click", triggerSimPopup);
    }, addSimulatorEvents2 = () => {
      doSimulation2(".tableOfContentsProgressView-book-wordCount"), doSimulation2(".tableOfContentsProgressView-book-huntsRemaining");
    }, addSimulatorIcon = () => {
      let bookHud = document.querySelector(".folkloreForestRegionView-environmentHud");
      if (!bookHud)
        return;
      let existing = document.querySelector(".mh-toc-sim-link");
      existing && existing.remove();
      let simLink = makeElement("a", ["mh-toc-sim-link", "mousehuntTooltipParent"], "View Encyclopedia Simulation");
      simLink.title = "Simulate Encyclopedia writing";
      let tooltip = makeElement("div", ["mousehuntTooltip", "tight", "bottom", "noEvents"], "View Encyclopedia Simulation");
      makeElement("div", "mousehuntTooltip-arrow", "", tooltip), simLink.append(tooltip), simLink.addEventListener("click", triggerSimPopup), bookHud.append(simLink);
    }, updateWordLootQuantity = () => {
      let lootSpan = document.querySelector(".tableOfContentsView-wordMeter-value");
      if (!lootSpan)
        return;
      let lootParts = lootSpan.innerText.split("-");
      lootParts.length > 1 && lootParts[0] === lootParts[1] && (lootSpan.innerText = lootParts[0]);
    }, updateNextWordCount = () => {
      let wordsRequired = document.querySelector(".tableOfContentsProgressView-nextBook-wordsRequired");
      wordsRequired && (wordsRequired.innerText = wordsRequired.getAttribute("title").replace(" words", ""));
    }, table_of_contents_default2 = () => __async(void 0, null, function* () {
      addHudStyles([styles_default66, simulator_styles_default, styles_default94]), folklore_forest_default2(), addSimulatorIcon(), addSimulatorEvents2(), updateWordLootQuantity(), onRequest("environment/table_of_contents.php", updateWordLootQuantity), updateNextWordCount(), onTurn(() => {
        updateNextWordCount(), setTimeout(updateNextWordCount, 500), setTimeout(updateNextWordCount, 1e3);
      }), keep_inventory_open_default({
        setting: "location-huds.table-of-contents-inventory-toggled",
        buttonSelector: ".folkloreForestRegionView-environmentInventory-expandButton",
        inventorySelector: ".folkloreForestRegionView-environmentInventoryContainer",
        inventoryOpenClass: "expanded",
        buttonOpenClass: "expanded"
      });
    });
  }
});

// src/modules/location-huds/locations/tournament-hall/index.js
var tournament_hall_default, init_tournament_hall = __esm({
  "src/modules/location-huds/locations/tournament-hall/index.js"() {
    init_cheese_selectors();
    tournament_hall_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("tournament-hall", ["runny_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/town-of-digby/index.js
var town_of_digby_default, init_town_of_digby = __esm({
  "src/modules/location-huds/locations/town-of-digby/index.js"() {
    init_cheese_selectors();
    town_of_digby_default = () => __async(void 0, null, function* () {
      cheese_selectors_default("town-of-digby", ["limelight_cheese"]);
    });
  }
});

// src/modules/location-huds/locations/town-of-gnawnia/styles.css
var styles_default95, init_styles96 = __esm({
  "src/modules/location-huds/locations/town-of-gnawnia/styles.css"() {
    styles_default95 = `.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)}}
`;
  }
});

// src/modules/location-huds/locations/town-of-gnawnia/index.js
var town_of_gnawnia_default, init_town_of_gnawnia = __esm({
  "src/modules/location-huds/locations/town-of-gnawnia/index.js"() {
    init_utils2();
    init_styles96();
    town_of_gnawnia_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default95);
    });
  }
});

// src/modules/location-huds/locations/train-station/styles.css
var styles_default96, init_styles97 = __esm({
  "src/modules/location-huds/locations/train-station/styles.css"() {
    styles_default96 = `.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}.pendingTrainContainer .trainRow:hover,.pendingTrainContainer .trainRow:nth-child(2n):hover{background-color:#645052}
`;
  }
});

// src/modules/location-huds/locations/train-station/index.js
var train_station_default, init_train_station = __esm({
  "src/modules/location-huds/locations/train-station/index.js"() {
    init_utils2();
    init_styles97();
    train_station_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default96);
    });
  }
});

// src/modules/location-huds/locations/windmill/styles.css
var styles_default97, init_styles98 = __esm({
  "src/modules/location-huds/locations/windmill/styles.css"() {
    styles_default97 = `.windmillHud-helpContainer-section-quantity{font-size:12px;font-weight:49;color:#000}.windmillHud-bossContainer.complete:after{position:absolute;inset:0;display:block;content:"";background:url(https://www.mousehuntgame.com/images/ui/hud/windmill/boss.png) 0 100% no-repeat;filter:drop-shadow(2px 4px 4px #16240a)}.windmillHud-helpContainer-section-content{top:-5px;right:0;left:57px;height:80px;line-height:13px}.windmillHud-helpContainer-section-title{margin-bottom:5px}.windmillHud-bonusContainer{top:34px;left:110px;display:flex;align-items:center;justify-content:center;width:105px;height:67px;padding:0;font-size:11px;text-align:center}.windmillHud-bonusContainer.none .windmillHud-bonus.none,.windmillHud-bonusContainer.low .windmillHud-bonus.low,.windmillHud-bonusContainer.ultra_low .windmillHud-bonus.ultra_low,.windmillHud-bonusContainer.medium .windmillHud-bonus.medium,.windmillHud-bonusContainer.high .windmillHud-bonus.high,.windmillHud-bonusContainer.max .windmillHud-bonus.max{line-height:1.4}.windmillHud-bonusContainer.none{font-size:13px}.windmillHud-bonusContainer.low .windmillHud-bonus.low,.windmillHud-bonusContainer.medium .windmillHud-bonus.medium{font-size:12px}.windmillHud-speed{left:17px;display:flex;align-items:center;justify-content:center;width:80px;height:20px;font-size:13px;font-weight:900;user-select:none}.windmillHud-speed span{margin-right:5px}
`;
  }
});

// src/modules/location-huds/locations/windmill/index.js
var start, spinNeedle, windmill_default, init_windmill = __esm({
  "src/modules/location-huds/locations/windmill/index.js"() {
    init_utils2();
    init_styles98();
    spinNeedle = () => {
      let needle = document.querySelector(".windmillHud-needle");
      if (!needle)
        return;
      let speed = document.querySelector(".windmillHud-speed");
      if (!speed || (start = needle.style.transform.match(/rotate\(([^)]+)\)/), !start.length > 1))
        return;
      start = Number.parseInt(start[1].replace("deg", ""), 10);
      let timeout, spins = 1;
      speed.addEventListener("click", () => {
        needle.style.transition = "transform 0.4s", needle.style.transform = `rotate(${start + 360 * spins}deg)`, spins += 1, clearTimeout(timeout), timeout = setTimeout(() => {
          needle.style.transition = "none", needle.style.transform = `rotate(${start}deg)`, spins = 1;
        }, spins * 400);
      });
    }, windmill_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default97), spinNeedle();
    });
  }
});

// src/modules/location-huds/locations/zugzwang-tower/styles.css
var styles_default98, init_styles99 = __esm({
  "src/modules/location-huds/locations/zugzwang-tower/styles.css"() {
    styles_default98 = `.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}
`;
  }
});

// src/modules/location-huds/locations/zugzwang-tower/index.js
var zugzwang_tower_default, init_zugzwang_tower2 = __esm({
  "src/modules/location-huds/locations/zugzwang-tower/index.js"() {
    init_utils2();
    init_styles99();
    zugzwang_tower_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default98);
    });
  }
});

// src/modules/location-huds/locations/region-living-garden/styles.css
var styles_default99, init_styles100 = __esm({
  "src/modules/location-huds/locations/region-living-garden/styles.css"() {
    styles_default99 = `.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{border-radius:7px;box-shadow:inset 0 0 5px 2px #8cffde}.livingGardenHud .essenceContainer .item.essence_a_crafting_item{display:inline;padding-left:0;margin-left:23px;text-align:center}.itemImage.dewthief_petal_crafting_item:before,.itemImage.dreamfluff_herbs_crafting_item:before,.itemImage.duskshade_petal_crafting_item:before{position:absolute;top:-26px;left:-2px;z-index:1;padding:4px;font-size:12px;font-weight:900;text-align:center;text-shadow:1px 1px 0 #2e1800;content:"Garden";background-color:#412200}.itemImage.dewthief_petal_crafting_item:before{right:-2px;left:-9px;padding-left:6px;color:#2f9d31;border-top-left-radius:10px}.livingGardenHud.desert_oasis .itemImage.dewthief_petal_crafting_item:before{color:#7fd981}.itemImage.dreamfluff_herbs_crafting_item:before{right:-2px;left:-3px;color:#079dbb;content:"City"}.livingGardenHud.lost_city .itemImage.dreamfluff_herbs_crafting_item:before{color:#91e9fb}.itemImage.duskshade_petal_crafting_item:before{right:-8px;left:-3px;padding-left:2px;color:#d48321;content:"Desert";border-top-right-radius:10px}.livingGardenHud.sand_dunes .itemImage.duskshade_petal_crafting_item:before{color:#f4daba}.livingGardenHud .itemContainer .itemImage,.livingGardenHud .itemContainer .itemImage:hover img,.livingGardenHud .itemContainer .itemImage:hover .quantity,.livingGardenHud .itemContainer .itemImage.faded:hover img,.livingGardenHud .itemContainer .itemImage.faded:hover .quantity{overflow:visible;opacity:1}.livingGardenHud .itemContainer .itemImage.faded img,.livingGardenHud .itemContainer .itemImage.faded .quantity{opacity:.4}.travelHudLg>div{display:none}.livingGardenHud.corrupted .minigameContainer .curseContainer .curse.active:after{position:absolute;right:13px;bottom:0;left:15px;padding:2px;font-size:11px;font-weight:900;text-align:center;content:"cursed!";background-color:#050605;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.livingGardenHud.corrupted .minigameContainer .curseContainer .curse.mist.active:after{color:#086c6a;content:"Clarity";background-color:#8bf7f5;box-shadow:-3px 0 5px 1px #8bf7f5,3px 0 5px -1px #8bf7f5}.livingGardenHud.corrupted .minigameContainer .curseContainer .curse.darkness.active:after{color:#68a856;text-shadow:0 0 3px #63765f;content:"Shine";background-color:#050605;box-shadow:-7px 4px 5px -1px #649e53,7px 2px 5px -1px #649e53}.livingGardenHud.corrupted .minigameContainer .curseContainer .curse.fear.active:after{text-shadow:0 0 1px #fee236;content:"Bravery";background-color:#f09036;box-shadow:-7px 2px 5px -1px #da7b34,5px 2px 5px -1px #da7b34}.livingGardenHud.lost_city.corrupted .curse.active .curseActive{display:flex;flex-direction:column;align-items:center;text-align:center}.livingGardenHud .minigameContainer .curseContainer .curse.active .help{inset:20px 18px 20px 20px;display:block;width:unset;height:unset;padding:5px;visibility:hidden;background-color:transparent}.livingGardenHud .minigameContainer .curseContainer .curse.active .help img{inset:5px 0 0 6px;width:45px;height:45px;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px #fff) drop-shadow(0 0 4px #fff) drop-shadow(0 0 5px #fff)}.livingGardenHud .minigameContainer .curseContainer .curse.active:hover .help{visibility:visible}.livingGardenHud .minigameContainer .curseContainer .curse.active .help b{position:absolute;top:-22px;right:-5px;left:-5px;padding-top:2px;font-size:12px;visibility:visible;border-top-left-radius:5px;border-top-right-radius:5px}.livingGardenHud .minigameContainer .curseContainer .curse.mist.active .help b{color:#086c6a;content:"Clarity";background-color:#8bf7f5;box-shadow:-3px 0 5px 1px #8bf7f5,3px 0 5px -1px #8bf7f5}.livingGardenHud .minigameContainer .curseContainer .curse.darkness.active .help b{color:#68a856;text-shadow:0 0 3px #63765f;content:"Shine";background-color:#050605;box-shadow:-5px -3px 5px -2px #649e53,6px -2px 5px -2px #649e53}.livingGardenHud .minigameContainer .curseContainer .curse.fear.active .help b{text-shadow:0 0 1px #fee236;content:"Bravery";background-color:#f09036;box-shadow:-7px 2px 5px -1px #da7b34,5px 2px 5px -1px #da7b34}.livingGardenHud .minigameContainer .curseContainer .curse.active{cursor:pointer}.livingGardenHud .minigameContainer .curseContainer .curse.active .help span{display:none}.livingGardenHud.lost_city.corrupted .curse{display:block!important;visibility:hidden}.livingGardenHud.lost_city.corrupted .curse .corruptedispelled{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;visibility:visible;background-color:#f6ffd4;box-shadow:inset 0 0 5px #000}.livingGardenHud.lost_city.corrupted .curse.active{visibility:visible}.livingGardenHud.lost_city.corrupted .curse .corruptedispelled b{font-size:11px;text-decoration:line-through}.livingGardenHud.lost_city.corrupted .curse .corruptedispelled br{display:none}.livingGardenHud .minigameContainer{z-index:1}.livingGardenHud{margin-top:25px;margin-bottom:20px}.livingGardenHud .spongeDoubleYellow{width:55px}.livingGardenHud .essenceContainer a.livingGardenRecipes:hover{background-image:url(https://i.mouse.rip/living-garden/recipe_rollover-new.png)}.livingGardenHud.desert_oasis.normal{background-image:url(https://i.mouse.rip/living-garden/living_garden_bg.png)}.livingGardenHud.desert_oasis.corrupted{background-image:url(https://i.mouse.rip/living-garden/twisted_garden_bg.png)}.livingGardenHud.lost_city.normal{background-image:url(https://i.mouse.rip/living-garden/lost_city_bg.png);border-bottom-right-radius:35px;border-bottom-left-radius:15px}.livingGardenHud.lost_city.corrupted{background-image:url(https://i.mouse.rip/living-garden/cursed_city_bg.png)}.livingGardenHud.sand_dunes.normal{background-image:url(https://i.mouse.rip/living-garden/grubling_bg.png)}.livingGardenHud.sand_dunes.corrupted{background-image:url(https://i.mouse.rip/living-garden/king_grub_bg.png)}.livingGardenHud .minigameContainer .minigameHelp{bottom:25px;font-size:11px;line-height:1.5}.livingGardenHud.lost_city.corrupted .minigameContainer.blessed{visibility:visible}
`;
  }
});

// src/modules/location-huds/locations/region-living-garden/index.js
var clickCharmsToEquip, region_living_garden_default, init_region_living_garden = __esm({
  "src/modules/location-huds/locations/region-living-garden/index.js"() {
    init_utils2();
    init_styles100();
    clickCharmsToEquip = () => {
      let charms = document.querySelectorAll(".livingGardenHud .minigameContainer .curseContainer .curse.active"), charmMap = {
        fear: 1011,
        darkness: 1019,
        mist: 1012
      };
      charms.forEach((charm) => {
        let charmClass = [...charm.classList].find((c) => c !== "curse" && c !== "active");
        charm.addEventListener("click", () => {
          charmClass in charmMap && (hg.utils.TrapControl.armItem(charmMap[charmClass], "trinket"), hg.utils.TrapControl.go());
        }), charm.title = "Click to equip charm";
      });
    }, region_living_garden_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default99), clickCharmsToEquip();
    });
  }
});

// src/modules/location-huds/locations/region-queso/styles.css
var styles_default100, init_styles101 = __esm({
  "src/modules/location-huds/locations/region-queso/styles.css"() {
    styles_default100 = `.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:0;left:-2px;width:25px;height:25px;background-color:transparent;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{font-size:12px}.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-shake-light .45s 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}.quesoGeyserHUD-craftingItem-image,.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}.quesoHUD-crafting-recipe-part .itemImage{background-color:transparent;box-shadow:none}.quesoCanyonHUD-basicBait-item .mousehuntItem.hidden{display:block;margin:0 auto}.quesoCanyonHUD-basicBait-item .mousehuntItem,.quesoCanyonHUD-basicBait-item .mousehuntItem.hidden{margin-bottom:10px}.quesoCanyonHUD-basicBait-item .mousehuntItem-boundingBox.hidden{display:block}.quesoCanyonHUD-basicBait-item .mousehuntItem,.quesoCanyonHUD-basicBait-item .mousehuntItem-image{background-color:transparent;border:none;box-shadow:none}.quesoCanyonHUD-basicBait-item .mousehuntItem-image:after{border:none}.mousehuntItem-quantity.quantity{padding:2px;font-size:10px;box-shadow:0 0 100px #fff inset,0 0 2px #333}.quesoHUD-crafting-recipe-actionContainer .mousehuntActionButton{margin-right:-5px;margin-left:-5px}.quesoHUD-crafting-recipe.queso_river_boss_cheese .quesoHUD-crafting-recipe-actionContainer .mousehuntActionButton{margin-right:-7px;margin-left:-7px}.quesoCanyonHUD-basicBait-item .mousehuntItem-boundingBox.hidden:after{position:absolute;top:-10px;content:"Arm"}.quesoHUD-crafting-recipe{display:flex;flex-direction:row;align-items:stretch;height:145px}.quesoHUD-crafting-recipe-actionContainer{align-self:center}.quesoHUD-crafting-recipe.queso_river_boss_cheese .quesoHUD-crafting-recipe-part{width:18%}.quesoHUD-crafting-recipe.queso_river_boss_cheese .quesoHUD-crafting-recipe-actionContainer{width:28%}.quesoCanyonHUD-pump-level{font-size:14px;text-shadow:-1px 1px 1px #000}.quesoHUD-crafting-recipe.queso_river_boss_cheese .quesoHUD-crafting-recipe-part .itemImage{width:75px;height:75px}.quesoHUD-crafting-recipe-action-quantity{font-size:9px}.quesoHUD-crafting-recipe-action-quantity span{font-size:13px}.quesoHUD-crafting-recipe-quantity{padding:1px 8px}.quesoCanyonHUD-basicBait-item .mousehuntItem-boundingBox:after{position:absolute;bottom:-40px;display:flex;align-items:center;width:53px;height:17px;content:"";background:url(https://www.mousehuntgame.com/images/ui/hud/train_station/phasetab_button.png) 0 0 no-repeat}.quesoCanyonHUD-basicBait-item .mousehuntItem-boundingBox:hover:after{background-position:0 -17px}.quesoCanyonHUD-basicBait-item .active .mousehuntItem-boundingBox:after{filter:hue-rotate(131deg);background-position:0 -34px}.quesoCanyonHUD-basicBait-item-name{padding-bottom:15px}.quesoHUD-warning.quesoHUD-powerTypeWarning{left:286px}.quesoHUD-warning{font-size:12px;background-color:#ffc5c5;border-color:#992023}
`;
  }
});

// src/modules/location-huds/locations/region-queso/index.js
var region_queso_default, init_region_queso = __esm({
  "src/modules/location-huds/locations/region-queso/index.js"() {
    init_utils2();
    init_styles101();
    region_queso_default = () => __async(void 0, null, function* () {
      addHudStyles(styles_default100);
    });
  }
});

// src/modules/location-huds/locations/event-locations/shared.js
var updateDateTooltip, spaceNumbers, updateDateDates, init_shared = __esm({
  "src/modules/location-huds/locations/event-locations/shared.js"() {
    updateDateTooltip = (selector) => {
      let tooltip = document.querySelector(selector);
      tooltip && (tooltip.getAttribute("data-changed") || (tooltip.classList.add("bottom"), tooltip.classList.remove("top"), tooltip.setAttribute("data-changed", "true")));
    }, spaceNumbers = (text) => text.replaceAll(/(\d+)/g, " $1 ").trim(), updateDateDates = (remainingSelector, textSelector = !1) => {
      let badge = document.querySelector(remainingSelector);
      if (badge) {
        if (badge.getAttribute("data-changed"))
          return;
        badge.innerHTML = spaceNumbers(badge.innerHTML), badge.setAttribute("data-changed", "true");
      }
      if (!textSelector)
        return;
      let tooltip = document.querySelector(textSelector);
      if (tooltip) {
        if (tooltip.getAttribute("data-changed"))
          return;
        tooltip.innerHTML = spaceNumbers(tooltip.innerHTML), tooltip.setAttribute("data-changed", "true");
      }
    };
  }
});

// src/modules/location-huds/locations/event-locations/birthday/styles.css
var styles_default101, init_styles102 = __esm({
  "src/modules/location-huds/locations/event-locations/birthday/styles.css"() {
    styles_default101 = `.superBrieFactoryHUD-vendingMachine-quantity.quantity,.superBrieFactoryHUD-item-quantity.quantity{font-size:12px;line-height:15px}.superBrieFactoryHUD-itemContainer.boss_ticket .superBrieFactoryHUD-item-quantity.quantity{padding:1px;margin-right:-2px;font-size:12px;line-height:12px;background-color:#f6f3eb;border:1px solid #aeb1b0;border-radius:2px}.superBrieFactoryHUD-pipeProgress{font-size:10px}.superBrieFactoryHUD-vendingMachine-quantity{min-width:30px;margin-right:4px;text-align:right}.superBrieFactoryHUD-factoryRoom.mixing_room,.superBrieFactoryHUD-factoryRoom.break_room,.superBrieFactoryHUD-factoryRoom.pumping_room,.superBrieFactoryHUD-factoryRoom.quality_assurance_room{box-sizing:border-box;padding:2px;border:1px solid #000}.superBrieFactoryHUD-factoryRoom.mixing_room,.superBrieFactoryHUD-factoryRoom.break_room,.superBrieFactoryHUD-factoryRoom.pumping_room,.superBrieFactoryHUD-factoryRoom.quality_assurance_room,.superBrieFactoryHUD-factoryRoom.mixing_room:before,.superBrieFactoryHUD-factoryRoom.break_room:before,.superBrieFactoryHUD-factoryRoom.pumping_room:before,.superBrieFactoryHUD-factoryRoom.quality_assurance_room:before{background-repeat:no-repeat;background-size:100%}.superBrieFactoryHUD-factoryRoom.mixing_room{background-image:url(https://www.mousehuntgame.com/images/ui/events/birthday_factory/active_mixing_room.jpg)}.superBrieFactoryHUD-factoryRoom.break_room{background-image:url(https://www.mousehuntgame.com/images/ui/events/birthday_factory/active_break_room.jpg);background-size:contain}.superBrieFactoryHUD-factoryRoom.pumping_room{background-image:url(https://www.mousehuntgame.com/images/ui/events/birthday_factory/active_pump_room.jpg)}.superBrieFactoryHUD-factoryRoom.quality_assurance_room{background-image:url(https://www.mousehuntgame.com/images/ui/events/birthday_factory/active_qa_room.jpg)}.superBrieFactoryHUD-factoryRoom.mixing_room:before,.superBrieFactoryHUD-factoryRoom.break_room:before,.superBrieFactoryHUD-factoryRoom.pumping_room:before,.superBrieFactoryHUD-factoryRoom.quality_assurance_room:before{background-image:none}.superBrieFactoryHUD-factoryRoom:before{border-color:#fe9ff1;border-width:1px;border-radius:1px;outline:1px solid #dc4a9e;box-shadow:inset 0 0 2px 1px #87378f}.superBrieFactoryHUD-factoryRoom:after{top:44px;left:3px;width:149px;background-color:#15ff46;background-image:none;filter:invert(1);mix-blend-mode:color;opacity:.3}.superBrieFactoryHUD-factoryRoom:nth-child(2) .superBrieFactoryHUD-factoryRoom-level,.superBrieFactoryHUD-factoryRoom:nth-child(4) .superBrieFactoryHUD-factoryRoom-level{left:43px}.superBrieFactoryHUD-room-name{margin-top:5px;font-size:12px}.superBrieFactoryHUD-room-effectPrefix{margin-bottom:4px;font-size:10px}.superBrieFactoryHUD-room-costLevel.level_max{margin-top:5px}.level_5 .superBrieFactoryHUD-room-cost-levelNumber{display:none}.level_5 .superBrieFactoryHUD-room-cost-effect{margin-left:-6px}.superBrieFactoryHUD-room-costLevel{margin-top:5px}.superBrieFactoryHUD-factoryRoom-level{left:75.5px}.superBrieFactoryHUD-showControlPanelButton:after{background-color:#4cc2a6;border-radius:4px}.superBrieFactoryHUD-craftingItem.active .quantity:before{position:absolute;inset:8px 0 0;display:block;content:""}.superBrieFactoryHUD-craftingItem .quantity{position:absolute;inset:4px 5px 2px 15px;display:flex;align-items:center;justify-content:flex-end;padding-right:3px;margin-right:-10px;background-color:#f6f3eb;border:1px solid #aeb1b0;border-radius:2px}.superBrieFactoryHUD-craftingItem.active .quantity{color:#fff;text-shadow:none;background-color:#338577;border-color:#2dc49f}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_break_room_stat_item]:after,.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_mixing_room_stat_item]:after,.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_pumping_room_stat_item]:after,.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_quality_assurance_room_stat_item]:after{position:absolute;top:-4px;left:-16px;width:20px;height:20px;content:"";background-size:contain}.superBrieFactoryHUD-craftingItem.active .quantity[data-item-type=birthday_factory_break_room_stat_item]:after,.superBrieFactoryHUD-craftingItem.active .quantity[data-item-type=birthday_factory_mixing_room_stat_item]:after,.superBrieFactoryHUD-craftingItem.active .quantity[data-item-type=birthday_factory_pumping_room_stat_item]:after,.superBrieFactoryHUD-craftingItem.active .quantity[data-item-type=birthday_factory_quality_assurance_room_stat_item]:after{transform:scale(1.3)}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_break_room_stat_item]:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/4a52c6d8607991a93d3167ac401802ec.png)}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_mixing_room_stat_item]:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/2396577aacb317979238844ae30b62c1.png)}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_pumping_room_stat_item]:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/c3c5cb340c3949ba5280c63b2f552a19.png)}.superBrieFactoryHUD-craftingItem .quantity[data-item-type=birthday_factory_quality_assurance_room_stat_item]:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/97bb19e8f5ae6cc29a7a0f312a1a3b14.png)}.superBrieFactoryHUD-item-boundingBox{z-index:1}.superBrieFactoryHUD-item-boundingBox[data-item-type=coggy_colby_cheese]:before,.superBrieFactoryHUD-item-boundingBox[data-item-type=speed_coggy_colby_cheese]:before,.superBrieFactoryHUD-item-boundingBox[data-item-type=birthday_factory_trinket]:before{position:absolute;inset:-16px 0 0 -1px;content:"";background-repeat:no-repeat;background-size:45px;transition:transform .3s;transform:rotate(351deg)}.superBrieFactoryHUD-item-boundingBox[data-item-type=coggy_colby_cheese]:before{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/39a63a48084383a7eb07d64c74357544.png)}.superBrieFactoryHUD-item-boundingBox[data-item-type=speed_coggy_colby_cheese]:before{top:-15px;background-image:url(https://www.mousehuntgame.com/images/items/bait/large/9326f63ea3644631c5fe8360ea4ffdf5.png)}.superBrieFactoryHUD-item-boundingBox[data-item-type=birthday_factory_trinket]:before{top:-9px;left:5px;background-image:url(https://www.mousehuntgame.com/images/items/trinkets/large/907ce5291e023dedae8ed33c98546743.png);background-size:36px;transform:rotate(0)}.superBrieFactoryHUD-item-boundingBox:hover:before{transform:scale(1.3)}.superBrieFactoryHUD-item-quantity.quantity{position:relative;z-index:2}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot{animation:mh-improved-hue-rotate-and-scale 1s 1}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(1){animation-delay:0s}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(2){animation-delay:.2s}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(3){animation-delay:.4s}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(4){animation-delay:.5s}.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot:nth-child(5){animation-delay:.6s}@media (prefers-reduced-motion: reduce){.superBrieFactoryHUD-factoryRoom:hover .superBrieFactoryHUD-factoryRoom-level-dot{animation:none}.superBrieFactoryHUD-item-boundingBox:hover:before{transform:none}}.superBrieFactoryVendingMachinePopup .superBrieFactoryVendingMachineView-numTokens{top:202px;right:57px;background:transparent;border:none;box-shadow:none}.superBrieFactoryHUD .superBrieFactoryHUD-dateCountdownMiniWrapper{top:-10px}.hudLocationContent.super_brie_factory{filter:drop-shadow(0 1px 2px #000)}.superBrieFactoryVendingMachineView-snackPack-cost{font-size:14px;line-height:15px;text-shadow:0 2px #343440}.superBrieFactoryVendingMachineView-snackPack:hover .superBrieFactoryVendingMachineView-snackPack-cost{text-shadow:0 2px #f7d877}.superBrieFactoryVendingMachineView{background-image:url(https://i.mouse.rip/bday/vending-machine-2.png)}.vending-machine-can{position:absolute;right:1px;bottom:40px;width:40px;height:53px;content:"";background-image:url(https://i.mouse.rip/bday/vending-machine-can.png);background-repeat:no-repeat;background-size:contain}.vending-machine-hat{position:absolute;top:23px;right:41px;z-index:1;width:38px;height:21px;content:"";background-image:url(https://i.mouse.rip/bday/vending-machine-hat-2.png);background-repeat:no-repeat;background-size:contain}.superBrieFactoryHUD-dateCountdownMiniWrapper.mousehuntTooltipParent .mousehuntTooltip{top:40px}.superBrieFactoryClaimReward-item .itemImage{border:none}
`;
  }
});

// src/modules/location-huds/locations/event-locations/birthday/index.js
var changeColors, birthdayGlobal, birthdayLocation, init_birthday2 = __esm({
  "src/modules/location-huds/locations/event-locations/birthday/index.js"() {
    init_utils2();
    init_shared();
    init_styles102();
    changeColors = () => {
      let popup = document.querySelector(".superBrieFactoryVendingMachinePopup");
      if (!popup)
        return;
      let can = makeElement("div", "vending-machine-can"), updateColor = () => {
        let hue = Math.floor(Math.random() * 360);
        can.style.filter = `hue-rotate(${hue}deg)`;
      };
      can.addEventListener("click", updateColor), updateColor(), popup.append(can);
      let hat = makeElement("div", "vending-machine-hat"), initialMouseX = 0, initialHatX = 0, isDragging = !1;
      hat.addEventListener("mousedown", (event) => {
        isDragging = !0, initialMouseX = event.clientX, initialHatX = Number.parseInt(window.getComputedStyle(hat).left, 10);
      }), document.addEventListener("mousemove", (event) => {
        if (isDragging) {
          let deltaX = event.clientX - initialMouseX, newPosition = initialHatX + deltaX;
          newPosition >= 25 && newPosition <= 415 && (hat.style.left = `${newPosition}px`);
        }
      }), document.addEventListener("mouseup", () => {
        isDragging = !1;
      }), popup.append(hat);
    }, birthdayGlobal = () => {
    }, birthdayLocation = () => __async(void 0, null, function* () {
      addHudStyles(styles_default101), setMultipleTimeout(() => {
        updateDateTooltip(".superBrieFactoryHUD-dateCountdownMiniWrapper.mousehuntTooltipParent .mousehuntTooltip"), updateDateDates(".superBrieFactoryHUD-dateCountdownMiniContainer .dateCountdownMini__remainingText", ".superBrieFactoryHUD-dateCountdownMiniWrapper.mousehuntTooltipParent .mousehuntTooltip .dateCountdown__datesContainer .dateCountdown__remainingText");
      }, [100, 500, 1e3]), onDialogShow("superBrieFactoryVendingMachinePopup", () => {
        setTimeout(changeColors, 500);
      });
    });
  }
});

// src/modules/location-huds/locations/event-locations/great-winter-hunt/styles.css
var styles_default102, init_styles103 = __esm({
  "src/modules/location-huds/locations/event-locations/great-winter-hunt/styles.css"() {
    styles_default102 = `.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}@media (prefers-reduced-motion: reduce){.greatWinterHuntRewardTrackView__golem,.greatWinterHuntRewardTrackView__golem:hover,.greatWinterHuntRewardTrackView__golem:focus,.greatWinterHuntRewardTrackView__golem:active{animation:none}}.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)}
`;
  }
});

// src/modules/location-huds/locations/event-locations/great-winter-hunt/global.css
var global_default, init_global2 = __esm({
  "src/modules/location-huds/locations/event-locations/great-winter-hunt/global.css"() {
    global_default = `.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}
`;
  }
});

// src/modules/location-huds/locations/event-locations/great-winter-hunt/index.js
var updateGolemFooter, getFraction, updateGolemPartsQuantity, updateGolemTravelCount, updateGolemPopup, golemDance, getQuest, expandAnimatedSnowCount, showPossibleSnowballShowdownDustCount, getGolemCounts, adventCalendarPopup, maybeHideAdventCalendarInMenu, greatWinterHuntGlobal, greatWinterHuntLocation, init_great_winter_hunt = __esm({
  "src/modules/location-huds/locations/event-locations/great-winter-hunt/index.js"() {
    init_utils2();
    init_utils2();
    init_styles103();
    init_global2();
    updateGolemFooter = () => {
      let footer = document.querySelector(".greatWinterHuntDialogView__inventoryFooter");
      if (!footer)
        return;
      let headsEl = footer.querySelector('.greatWinterHuntDialogView__footerItemQuantity[data-item-type="golem_part_head_stat_item"]'), torsoEl = footer.querySelector('.greatWinterHuntDialogView__footerItemQuantity[data-item-type="golem_part_torso_stat_item"]'), limbsEl = footer.querySelector('.greatWinterHuntDialogView__footerItemQuantity[data-item-type="golem_part_limb_stat_item"]');
      if (!headsEl && !torsoEl && !limbsEl)
        return;
      let heads = headsEl ? Number.parseInt(headsEl.textContent, 10) : 0, torso = torsoEl ? Number.parseInt(torsoEl.textContent, 10) : 0, limbs = limbsEl ? Number.parseInt(limbsEl.textContent, 10) : 0, limbSet = Math.floor(limbs / 4), possibleGolems = Math.min(heads, torso, limbSet), existing = footer.querySelector(".greatWinterHuntDialogView__footerItem.possibleGolems");
      existing && existing.remove();
      let possibleWrapper = makeElement("div", ["greatWinterHuntDialogView__footerItem", "mousehuntTooltipParent", "possibleGolems"]), 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);
      let 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 = () => {
      let limbs = document.querySelector('.greatWinterHuntRecycleDialogView__itemQuantity.quantity[data-item-type="golem_part_limb_stat_item"]');
      if (!limbs)
        return;
      let original = limbs.getAttribute("original-quantity");
      if (original) {
        let footerLimbs = document.querySelector('.greatWinterHuntDialogView__footerItemQuantity.quantity[data-item-type="golem_part_limb_stat_item"]');
        limbs.textContent = footerLimbs ? footerLimbs.textContent : original;
      }
      let limbCount = Number.parseInt(limbs.textContent, 10);
      limbs.setAttribute("original-quantity", limbCount);
      let limbSet = Math.floor(limbCount / 4), limbSetFraction = getFraction(limbCount % 4), newLimbsEl = makeElement("span", ["golemLimbsTotal"], limbCount), newLimbsSetEl = makeElement("span", ["golemLimbsPossible"], `(${limbSet}${limbSetFraction})`);
      limbs.textContent = "", limbs.append(newLimbsEl, newLimbsSetEl);
    }, updateGolemTravelCount = () => __async(void 0, null, function* () {
      let title = document.querySelector(".greatWinterHuntGolemManagerTabView__destinationHeader");
      if (!title)
        return;
      let name = title.querySelector(".greatWinterHuntGolemManagerTabView__destinationName");
      if (!name)
        return;
      let currentEnvironment = (yield getData("environments")).find((env) => env.name === name.textContent);
      if (!currentEnvironment)
        return;
      let golemCounts = getGolemCounts(), existing = title.querySelector(".greatWinterHuntGolemManagerTabView__destinationCount");
      if (existing) {
        existing.textContent = golemCounts[currentEnvironment.id] || 0;
        return;
      }
      let countEl = makeElement("span", ["greatWinterHuntGolemManagerTabView__destinationCount"], `(${golemCounts[currentEnvironment.id] || 0})`);
      name.append(countEl);
    }), updateGolemPopup = () => {
      setTimeout(() => {
        let golems = document.querySelectorAll(".greatWinterHuntGolemManagerDialogView__golem");
        golems && golems.forEach((golem) => {
          golem.addEventListener("click", () => {
            eventRegistry.doEvent("golem-switch-in-dialog");
          });
        }), updateGolemTravelCount(), updateGolemFooter(), updateGolemPartsQuantity();
      }, 250);
    }, golemDance = () => {
      let trigger = document.querySelector(".greatWinterHuntRewardTrackView__progress");
      trigger && trigger.addEventListener("click", () => {
        let golems = document.querySelectorAll(".headsUpDisplayWinterHuntRegionView__golem .winterHuntGolemView");
        golems && (count = 0, golems.forEach((golem) => {
          setTimeout(() => {
            golem.classList.add("winterHuntGolemView--idleAnimation");
          }, 100 * count), count++;
        }));
      });
    }, getQuest = () => getCurrentLocation() === "winter_hunt_grove" ? user.quests.QuestCinnamonTreeGrove : getCurrentLocation() === "winter_hunt_workshop" ? user.quests.QuestGolemWorkshop : getCurrentLocation() === "winter_hunt_fortress" ? user.quests.QuestIceFortress : {}, expandAnimatedSnowCount = () => {
      var _a, _b;
      let limbEl = document.querySelector('.headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity[data-item-type="animate_snow_stat_item"]');
      limbEl && (limbEl.textContent = ((_b = (_a = getQuest()) == null ? void 0 : _a.items) == null ? void 0 : _b.animate_snow_stat_item.quantity_formatted) || 0);
    }, showPossibleSnowballShowdownDustCount = () => {
      let showdownItems = document.querySelector(".campHudSnowballShowdownView__itemsContainer");
      if (!showdownItems)
        return;
      let snowballEl = showdownItems.querySelector(".campHudSnowballShowdownView__snowball"), snowballQtyEl = snowballEl.querySelector(".campHudSnowballShowdownView__quantity"), snowballQty = snowballQtyEl ? Number.parseInt(snowballQtyEl.textContent.replaceAll(",", ""), 10) : 0, dustEl = showdownItems.querySelector(".campHudSnowballShowdownView__dust"), currentDustQtyEl = dustEl.querySelector(".campHudSnowballShowdownView__quantity"), currentDustQty = currentDustQtyEl ? Number.parseInt(currentDustQtyEl.textContent.replaceAll(",", ""), 10) : 0, possibleDustQty = Math.floor(snowballQty / 175), snowballText = snowballQty - possibleDustQty * 175, dustText = currentDustQty + possibleDustQty, possibleSnowballExists = showdownItems.querySelector(".campHudSnowballShowdownView__quantity.possibleSnowball");
      if (possibleSnowballExists)
        possibleSnowballExists.textContent = snowballText;
      else {
        let possibleSnowballWrapper = makeElement("div", "campHudSnowballShowdownView__quantityContainer possibleAmount");
        makeElement("div", ["campHudSnowballShowdownView__quantity", "possibleSnowball"], snowballText, possibleSnowballWrapper), snowballEl.append(possibleSnowballWrapper);
      }
      let possibleDustExists = showdownItems.querySelector(".campHudSnowballShowdownView__quantity.possibleDust");
      if (possibleDustExists)
        possibleDustExists.textContent = dustText;
      else {
        let dustWrapper = makeElement("div", "campHudSnowballShowdownView__quantityContainer possibleAmount");
        makeElement("div", ["campHudSnowballShowdownView__quantity", "possibleDust"], dustText, dustWrapper), dustEl.append(dustWrapper);
      }
    }, getGolemCounts = () => {
      var _a;
      let golemCounts = {}, destinations = ((_a = getQuest()) == null ? void 0 : _a.destinations) || {};
      for (let region in destinations)
        destinations[region].environments.forEach((env) => {
          golemCounts[env.type] = env.num_golem_visits;
        });
      return golemCounts;
    }, adventCalendarPopup = () => {
      let suffix = document.querySelector("#overlayPopup .suffix");
      if (!suffix || document.querySelector(".toggle-advent-calendar-spoilers"))
        return;
      let toggleBtn = makeElement("button", ["mousehuntActionButton", "tiny", "toggle-advent-calendar-spoilers"]);
      makeElement("span", "", "View unblurred calendar", toggleBtn), toggleBtn.setAttribute("data-enabled", "false"), toggleBtn.addEventListener("click", () => {
        let popup = document.querySelector("#overlayPopup");
        if (!popup)
          return;
        popup.classList.toggle("advent-calendar-spoilers"), toggleBtn.getAttribute("data-enabled") === "true" ? (toggleBtn.setAttribute("data-enabled", "false"), toggleBtn.querySelector("span").innerText = "View unblurred calendar") : (toggleBtn.setAttribute("data-enabled", "true"), toggleBtn.querySelector("span").innerText = "Hide unblurred calendar");
      }), suffix.append(toggleBtn);
    }, maybeHideAdventCalendarInMenu = () => (/* @__PURE__ */ new Date()).getMonth() !== 11 ? ".mousehuntHeaderView-gameTabs .menuItem.adventCalendar { display: none; }" : "", greatWinterHuntGlobal = () => {
      addStyles([global_default, maybeHideAdventCalendarInMenu], "location-hud-events-great-winter-hunt"), onDialogShow("adventCalendarPopup", adventCalendarPopup);
    }, greatWinterHuntLocation = () => {
      addHudStyles(styles_default102), onDialogShow("greatWinterHuntDialog", updateGolemPopup), golemDance(), expandAnimatedSnowCount(), showPossibleSnowballShowdownDustCount(), onRequest("purchases/itempurchase.php", () => {
        updateGolemPartsQuantity(), setTimeout(updateGolemFooter, 250);
      }), onRequest("*", () => {
        expandAnimatedSnowCount(), showPossibleSnowballShowdownDustCount();
      }), onEvent("golem-switch-in-dialog", () => {
        updateGolemTravelCount();
      }), setTimeout(expandAnimatedSnowCount, 1e3);
    };
  }
});

// src/modules/location-huds/locations/event-locations/halloween/styles.css
var styles_default103, init_styles104 = __esm({
  "src/modules/location-huds/locations/event-locations/halloween/styles.css"() {
    styles_default103 = `.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}
`;
  }
});

// src/modules/location-huds/locations/event-locations/halloween/index.js
var unDisableCheese, halloweenGlobal, halloweenLocation, init_halloween2 = __esm({
  "src/modules/location-huds/locations/event-locations/halloween/index.js"() {
    init_utils2();
    init_styles104();
    unDisableCheese = () => {
      document.querySelectorAll(".halloweenBoilingCauldronHUD-bait").forEach((armButton) => {
        armButton.classList.remove("disabled");
        let link = armButton.querySelector("a.disabled");
        link && link.classList.remove("disabled");
        let tooltipLink = armButton.querySelector(".halloweenBoilingCauldronHUD-bait-tooltipContent a.disabled");
        tooltipLink && tooltipLink.classList.remove("disabled");
      });
    }, halloweenGlobal = () => __async(void 0, null, function* () {
    }), halloweenLocation = () => __async(void 0, null, function* () {
      addHudStyles(styles_default103), unDisableCheese(), onRequest("*", unDisableCheese);
    });
  }
});

// src/modules/location-huds/locations/event-locations/lunar-new-year/styles.css
var styles_default104, init_styles105 = __esm({
  "src/modules/location-huds/locations/event-locations/lunar-new-year/styles.css"() {
    styles_default104 = `.lunarNewYearCampPopup-content-endDate{font-size:14px;line-height:20px}.lunarNewYearCampPopup-environment .mousehuntTooltip{top:-44%}.lunarNewYearCampHUD-window-row-reward:after{top:1px;background-color:#9b2034;border-color:#ef617e}.lunarNewYearCampHUD-window-row:nth-child(2n) .lunarNewYearCampHUD-window-row-reward:after{right:35px}.lunarNewYearCampHUD-window-row:nth-child(odd) .lunarNewYearCampHUD-window-row-reward:after{top:0;left:35px}.lunarNewYearCampHUD-window-row .lunarNewYearCampHUD-window-row-reward:after{box-shadow:0 -1px 1px #f3577c,0 1px 1px #f3577c}.lunarNewYearCampHUD-window-row-reward{width:28px;height:18px;border-radius:6px;box-shadow:0 -1px 1px #f3577c,0 1px 1px #f3577c}.lunarNewYearCampHUD-window-row.lunar_new_year_2018_cheese.reward .lunarNewYearCampHUD-window-row-reward:after,.lunarNewYearCampHUD-window-row.lunar_new_year_2018_cheese.claimed .lunarNewYearCampHUD-window-row-reward:after{width:180px}.lunarNewYearCampHUD-container .mousehuntItem .mousehuntItem-quantity.quantity{right:0;bottom:0;left:0;padding-top:2px;font-size:12px;border-top-left-radius:0;border-top-right-radius:0}.lunarNewYearCampHUD-container .mousehuntItem:hover .mousehuntItem-quantity.quantity,.lunarNewYearCampHUD-container .mousehuntItem:focus .mousehuntItem-quantity.quantity,.lunarNewYearCampHUD-container .mousehuntItem.active .mousehuntItem-quantity.quantity{border-top:1px solid #d6a766;box-shadow:inset 0 0 5px 5px #ffe344}.lunarNewYearCampHUD-container .mousehuntItem:hover .mousehuntItem-image:after,.lunarNewYearCampHUD-container .mousehuntItem:focus .mousehuntItem-image:after{border-color:#ffe344}.lunarNewYearCampHUD-stat-value{font-size:13px;text-shadow:0 0 10px #fee7a6;box-shadow:inset 0 0 3px 1px #b81d3e}.lunarNewYearCampHUD-stat-label{text-align:center}.lunarNewYearCampHUD-statsContainer .lunarNewYearCampHUD-stat:nth-child(3) .lunarNewYearCampHUD-stat-value{width:32px}.lunarNewYearCampHUD-window-background .lunarNewYearCampHUD-window-lantern:after{transition:.7s}.lunarNewYearCampHUD-window-background:hover .lunarNewYearCampHUD-window-lantern:after{filter:brightness(1.5) drop-shadow(1px 0 4px #000);transform:scale(1.5)}.lunarNewYearCampPopup .lunarNewYear2018-claimRow-image{text-align:left}.lunarNewYearCampHUD-window-row-height{font-size:12px;font-weight:900;text-shadow:1px 1px 1px #000}.lunarNewYearCampPopup-subtitle{margin-bottom:5px}.lunarNewYearCampPopupContainer .lunarNewYearCampHUD-window.lunarNewYearCampHUD-viewState.hasLantern{top:21px;bottom:22px;box-shadow:inset 1px 0 4px 2px #000}.lunarNewYearCampHUD-window-background{box-shadow:inset 1px 0 10px #05050a}.lunarNewYearCampPopupContainer .lunarNewYearCampHUD-window-background{border:2px solid #decfb4}.lunarNewYearCampPopup-lanternMap-button.up{border-bottom-width:1px}.lunarNewYearCampPopup-lanternMap-button.down{border-top-width:1px}.lunarNewYearCampPopup-environment:hover .lunarNewYearCampPopup-environment-image{box-shadow:0 -1px 7px -4px #000}.lunarNewYearCampPopup-environment:hover .lunarNewYearCampPopup-environment-name{box-shadow:0 4px 9px -2px #000}.lunarNewYearCampPopup-environment:hover{border-radius:4px;box-shadow:0 1px 5px #2e2e2e;transform:scale(1.2)}.lunarNewYearCampPopup-environment{width:100%;padding:0;border-radius:6px;box-shadow:0 0 2px #000;transition:.2s ease-in;transform-origin:bottom}.lunarNewYearCampPopup-stockpile-environmentContainer{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;align-items:start}.lunarNewYearCampPopup-environment:hover .lunarNewYearCampPopup-environment-name,.lunarNewYearCampPopup-environment.selected .lunarNewYearCampPopup-environment-name{color:#fff;background-color:#b4383a}.lunarNewYearCampPopup-environment.disabled .lunarNewYearCampPopup-environment-name,.lunarNewYearCampPopup-environment.disabled .lunarNewYearCampPopup-environment-image{opacity:.4}.lunarNewYearCampPopup-content-block-image{width:auto;height:60px;background-repeat:no-repeat;box-shadow:none}.lunarNewYearCampPopup-itemContainer{display:flex;gap:5px;align-content:center}.lunarNewYearCampPopup-content-block{width:100%}.launch-the-fireworks{display:block}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(1):before{animation-delay:.1s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(1):after{animation-delay:.7s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(2):before{animation-delay:.9s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(2):after{animation-delay:1.1s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(3):before{animation-delay:1.4s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(3):after{animation-delay:1.8s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(4):before{animation-delay:2s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(4):after{animation-delay:2.5s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(5):before{animation-delay:2.8s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(5):after{animation-delay:3.3s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(6):before{animation-delay:3.7s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(6):after{animation-delay:4.1s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(7):before{animation-delay:4.5s}.launch-the-fireworks .lunarNewYearCampHUD-window-fireworks:nth-child(7):after{animation-delay:5.9s}.launch-the-fireworks-please{position:absolute;bottom:2px;left:-3px;width:20px;height:20px;background-image:url(https://i.mouse.rip/upscaled/festive_firework_stat_item.png);background-repeat:no-repeat;background-size:contain;opacity:.4;transition:.3s;transform:scaleX(-1)}.launch-the-fireworks-please:hover{cursor:pointer;opacity:.9;transform:scaleX(-1.2) scaleY(1.2)}
`;
  }
});

// src/modules/location-huds/locations/event-locations/lunar-new-year/index.js
var startY, initialTranslateY, dragMapPopup, dragMapCamp, dragMap, triggerFireworks, lunarNewYearGlobal, init_lunar_new_year = __esm({
  "src/modules/location-huds/locations/event-locations/lunar-new-year/index.js"() {
    init_utils2();
    init_styles105();
    dragMapPopup = () => __async(void 0, null, function* () {
      let map = document.querySelector(".lunarNewYearCampPopupContainer .lunarNewYearCampHUD-window-background");
      map && dragMap({ map, maxHeight: 2300 });
    }), dragMapCamp = () => __async(void 0, null, function* () {
      let map = document.querySelector(".lunarNewYearCampHUD-window .lunarNewYearCampHUD-window-background");
      map && dragMap({ map, maxHeight: 1881 });
    }), dragMap = (args) => __async(void 0, null, function* () {
      let { map, maxHeight } = args;
      if (!map)
        return;
      let onDrag = (event) => {
        let deltaY = event.clientY - startY, newTranslateY = initialTranslateY + deltaY;
        newTranslateY < 0 ? newTranslateY = 0 : newTranslateY > maxHeight && (newTranslateY = maxHeight), map.style.transform = `translateY(${newTranslateY}px)`;
      };
      map.addEventListener("mousedown", (event) => {
        startY = event.clientY;
        let style = window.getComputedStyle(map);
        initialTranslateY = new WebKitCSSMatrix(style.transform).m42, map.style.transition = "none", map.addEventListener("mousemove", onDrag);
      }), map.addEventListener("mouseup", () => {
        map.removeEventListener("mousemove", onDrag);
      }), map.addEventListener("wheel", (event) => {
        event.preventDefault(), map.style.transition = "none";
        let style = window.getComputedStyle(map), newTranslateY = new WebKitCSSMatrix(style.transform).m42 - event.deltaY;
        newTranslateY < 0 ? newTranslateY = 0 : newTranslateY > maxHeight && (newTranslateY = maxHeight), map.style.transform = `translateY(${newTranslateY}px)`;
      }), map.addEventListener("mouseleave", () => {
        map.style.transition = "transform 1s ease-in-out";
      });
    }), triggerFireworks = () => {
      if (document.querySelector(".launch-the-fireworks-please"))
        return;
      let fireworks = document.querySelector(".lunarNewYearCampHUD-container .lunarNewYearCampHUD-window-fireworksContainer");
      if (!fireworks)
        return;
      let statsContainer = document.querySelector(".lunarNewYearCampHUD-container .lunarNewYearCampHUD-statsContainer");
      if (!statsContainer)
        return;
      let launchButton = makeElement("div", "launch-the-fireworks-please", "");
      statsContainer.append(launchButton);
      let isAnimating = !1;
      launchButton.addEventListener("click", () => {
        launchButton.classList.add("launched"), fireworks.classList.add("launch-the-fireworks"), !isAnimating && (isAnimating = !0, setTimeout(() => {
          launchButton.classList.remove("launched"), fireworks.classList.remove("launch-the-fireworks"), isAnimating = !1;
        }, 5 * 1e3));
      });
    }, lunarNewYearGlobal = () => __async(void 0, null, function* () {
      addStyles(styles_default104, "location-hud-events-lunar-new-year"), onRequest("events/lunar_new_year.php", dragMapPopup), getCurrentPage() === "camp" && (dragMapCamp(), triggerFireworks()), onEvent("camp_quest_hud_view_initialize", () => {
        dragMapCamp(), triggerFireworks();
      });
    });
  }
});

// src/modules/location-huds/locations/event-locations/spring-egg-hunt/styles.css
var styles_default105, init_styles106 = __esm({
  "src/modules/location-huds/locations/event-locations/spring-egg-hunt/styles.css"() {
    styles_default105 = `.springEggHuntCampHUD-chocolate-quantity{font-size:14px}.springHuntHUD-popup-region-environment.active:before{left:-9px;outline:1px solid #364661;box-shadow:0 0 125px #bbffb3 inset,0 1px 6px -2px #000}.springHuntHUD-popup-egg-quantity{right:0;bottom:0;padding:5px;font-size:14px}.springHuntHUD-popup-region-environment-header{padding-bottom:5px;margin-bottom:10px}.springHuntHUD-popup-region-environment-header .mousehuntActionButton{bottom:5px}.springHuntHUD-popup-region-environment-margin{margin-bottom:15px}.springHuntHUD-totalEggStats{top:-7px;display:flex;flex-direction:column;gap:4px;align-items:flex-end;font-size:12px}.springHuntHUD-popup-tabHeader span{top:0;padding-top:8px}.springHuntHUD-popup-tabHeader.active,.springHuntHUD-popup-tabHeader:hover{padding-top:5px}.springHuntHUD-shop-cost{margin-top:-2px;font-size:12px;border-color:#999}.springHuntHUD-shelf .springHuntHUD-shelf-itemsContainer{margin-bottom:5px}.springHuntHUD-shelf-unlockContainer:before,.springHuntHUD-shelf.locked:nth-of-type(6) .springHuntHUD-shelf-unlockContainer:before,.springHuntHUD-shelf.locked:nth-of-type(3) .springHuntHUD-shelf-unlockContainer:before{height:155px}.springHuntHUD-shelf.locked:nth-of-type(4) .springHuntHUD-shelf-unlockContainer:before{height:282px}.springHuntHUD-shelf.locked:nth-of-type(5) .springHuntHUD-shelf-unlockContainer:before{height:292px}.springHuntHUD-unlockShelfButton,.springHuntHUD-shelf-unlockContainer span{display:flex;align-items:center}.springHuntHUD-unlockShelfButton .springHuntHUD-shop-cost{margin:-1px -6px -1px 10px}.springHuntHUD-shelf-unlock-reward-image{filter:drop-shadow(0 1px 1px #c7f4ff);transition:.3s}.springHuntHUD-shelf-unlock-reward-image:hover{transform:scale(1.35)}.springHuntHUD-interfaceEgg:after{border:none;transform-origin:center;animation:2s wallDamageWiggle infinite}.eggSweeper-inventoryReminder-quantity,.eggSweeper-play-upgradeQuantity{font-size:12px}.eggSweeper-dialog-title{margin-bottom:10px}.eggSweeper-dialog-state.rewards{margin-top:-10px}.springEggHuntCampHUD-fuelQuantity{top:15px;left:27px;font-size:13px}.springEggHuntCampHUD-buyFuelButton{top:14px;border:1px solid #5f221e;border-radius:7px;mix-blend-mode:luminosity}.eggSweeper-eggConvertible .itemImage{background-color:transparent}.highlight .springHuntHUD-popup-egg.found{opacity:.2}.springHuntHUD-popup-egg.found:after{top:60px;left:0}.springHuntHUD-popup-moreInfo-content-paragraph-container img{transition:.2s ease-in}.springHuntHUD-popup-moreInfo-content-paragraph-container img:hover{transform:scale(1.2) rotate(-2deg)}.springHuntHUD-shelf-item.mousehuntTooltipParent:hover .mousehuntTooltip{display:none}.springHuntHUD-shelf-item-name{margin:2px -30px;line-height:1.4}.springHuntHUD-shop-cost:hover{filter:brightness(1.3)}.mousehuntTooltipParent:hover .springEggHuntCampHUD-fuelButtonBackground:after{position:absolute;top:9px;right:24px;width:14px;height:11px;content:"";background:linear-gradient(90deg,#5b201c,#4e1915);border-radius:0 0 40px 36px;box-shadow:0 -.7px #652c1c,0 -1px #eda934,0 -3px #f5a02d}.springHuntHUD-setMaxQuantityButton{font-size:14px}.springHuntHUD-popup-dialogContainer{top:50vh}.springHuntHUD-popup-dialogFrame-content{max-height:60vh;overflow-y:auto}.springHuntHUD-shelf-item .itemImage{border-width:1px;box-shadow:inset 0 0 7px -1px #db882f}
`;
  }
});

// src/modules/location-huds/locations/event-locations/spring-egg-hunt/index.js
var addUnfoundEggHighlight, addUnfoundEggHighlightWithTimeout, rightclickToFlag, springEggHuntGlobal, init_spring_egg_hunt = __esm({
  "src/modules/location-huds/locations/event-locations/spring-egg-hunt/index.js"() {
    init_utils2();
    init_shared();
    init_styles106();
    addUnfoundEggHighlight = () => {
      let tabContent = document.querySelector(".springHuntHUD-popup-tabContentContainer");
      if (!tabContent)
        return;
      let stats = tabContent.querySelector(".springHuntHUD-totalEggStats");
      if (!stats || stats.querySelector(".springHuntHUD-unfoundEggHighlight"))
        return;
      let highlightEl = makeElement("a", "springHuntHUD-unfoundEggHighlight", "Highlight missing");
      highlightEl.addEventListener("click", () => {
        tabContent.classList.contains("highlight") ? (tabContent.classList.remove("highlight"), highlightEl.innerText = "Highlight missing") : (tabContent.classList.add("highlight"), highlightEl.innerText = "Unhighlight missing");
      }), stats.append(highlightEl);
    }, addUnfoundEggHighlightWithTimeout = () => {
      setMultipleTimeout(() => {
        addUnfoundEggHighlight();
      }, [10, 500, 1e3]);
    }, rightclickToFlag = () => {
      let board = document.querySelector(".eggSweeper");
      if (!board || board.classList.contains("flags"))
        return;
      let spaces = board.querySelectorAll(".eggSweeper-board-row-cell");
      spaces && spaces.forEach((space) => {
        space.addEventListener("contextmenu", (e) => __async(void 0, null, function* () {
          let cell = space.querySelector("a");
          cell && (e.preventDefault(), hg.views.EggstremeEggscavationView.setFlagMode(), hg.views.EggstremeEggscavationView.pickTile(cell), hg.views.EggstremeEggscavationView.setShovelMode());
        }));
      });
    }, springEggHuntGlobal = () => __async(void 0, null, function* () {
      addStyles(styles_default105, "location-hud-events-spring-egg-hunt"), onDialogShow("springHuntPopup", () => {
        addUnfoundEggHighlightWithTimeout(), onEvent("ajax_response", addUnfoundEggHighlightWithTimeout, !0);
      }), onDialogShow("eggSweeperPopup", () => {
        setTimeout(rightclickToFlag, 1e3);
      }), onRequest("events/eggstreme_eggscavation.php", (request, data) => {
        data.action === "show_field" && setTimeout(rightclickToFlag, 1e3);
      }), setMultipleTimeout(() => {
        updateDateDates(".springEggHuntCampHUD-dateCountdownMiniContainer .dateCountdownMini__remainingText");
      }, [100, 500, 1e3]);
    });
  }
});

// src/modules/location-huds/locations/event-locations/index.js
var event_locations_default, init_event_locations = __esm({
  "src/modules/location-huds/locations/event-locations/index.js"() {
    init_birthday2();
    init_great_winter_hunt();
    init_halloween2();
    init_lunar_new_year();
    init_spring_egg_hunt();
    event_locations_default = (location2) => __async(void 0, null, function* () {
      switch (location2) {
        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;
      }
      let events = {
        0: [greatWinterHuntGlobal],
        // January.
        1: [birthdayGlobal, lunarNewYearGlobal],
        // 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.
      }, month = (/* @__PURE__ */ new Date()).getMonth();
      events[month].forEach((event) => {
        event();
      });
    });
  }
});

// src/modules/location-huds/index.js
var regionMapping, normalizeCurrentLocation, main19, init58, location_huds_default, init_location_huds = __esm({
  "src/modules/location-huds/index.js"() {
    init_utils2();
    init_toggle_icon();
    init_settings28();
    init_styles64();
    init_acolyte_realm();
    init_ancient_city2();
    init_balacks_cove();
    init_bazaar();
    init_bountiful_beanstalk3();
    init_calm_clearing();
    init_cape_clawed();
    init_catacombs();
    init_claw_shot_city();
    init_derr_dunes();
    init_desert_city();
    init_desert_warpath2();
    init_dojo();
    init_dracano();
    init_elub_shore();
    init_floating_islands3();
    init_forbidden_grove();
    init_foreword_farm2();
    init_fort_rox2();
    init_fungal_cavern();
    init_great_gnarled_tree();
    init_harbour2();
    init_iceberg3();
    init_jungle_of_dread();
    init_kings_arms();
    init_kings_gauntlet();
    init_laboratory();
    init_labyrinth4();
    init_lagoon();
    init_meditation_room();
    init_mountain();
    init_mousoleum3();
    init_moussu_picchu2();
    init_nerg_plains();
    init_pinnacle_chamber();
    init_pollution_outbreak2();
    init_prologue_pond();
    init_rift_bristle_woods2();
    init_rift_burroughs2();
    init_rift_furoma2();
    init_rift_gnawnia();
    init_rift_valour2();
    init_rift_whisker_woods();
    init_school_of_sorcery();
    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 = (location2) => {
      let region = regionMapping.find((regionMap) => regionMap.locations.includes(location2));
      return region ? region.region : location2;
    }, main19 = () => {
      removeHudStyles();
      let currentLocation = getCurrentLocation(), location2 = normalizeCurrentLocation(currentLocation);
      if (debuglog("location-huds", `Location: ${location2}`), getSetting("location-huds-enabled.event-locations", !0) && event_locations_default(currentLocation), !getSetting(`location-huds-enabled.${location2}`, !0))
        return;
      let locationHandlers = {
        acolyte_realm: acolyte_realm_default,
        ancient_city: ancient_city_default2,
        balacks_cove: balacks_cove_default,
        bazaar: bazaar_default,
        bountiful_beanstalk: bountiful_beanstalk_default3,
        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_default3,
        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,
        harbour: harbour_default2,
        iceberg: iceberg_default3,
        jungle_of_dread: jungle_of_dread_default,
        kings_arms: kings_arms_default,
        kings_gauntlet: kings_gauntlet_default,
        laboratory: laboratory_default,
        labyrinth: labyrinth_default4,
        lagoon: lagoon_default,
        meditation_room: meditation_room_default,
        mountain: mountain_default,
        mousoleum: mousoleum_default3,
        moussu_picchu: moussu_picchu_default2,
        nerg_plains: nerg_plains_default,
        pinnacle_chamber: pinnacle_chamber_default,
        pollution_outbreak: pollution_outbreak_default2,
        prologue_pond: prologue_pond_default,
        rift_bristle_woods: rift_bristle_woods_default2,
        rift_burroughs: rift_burroughs_default2,
        rift_furoma: rift_furoma_default2,
        rift_gnawnia: rift_gnawnia_default,
        rift_valour: rift_valour_default2,
        rift_whisker_woods: rift_whisker_woods_default,
        school_of_sorcery: school_of_sorcery_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
      };
      locationHandlers[location2] && locationHandlers[location2]();
    }, init58 = () => __async(void 0, null, function* () {
      addStyles(styles_default63, "location-huds"), getSetting("experiments.location-hud-toggle") && toggle_icon_default(), onNavigation(main19), onEvent("travel_complete", () => {
        setTimeout(main19, 1e3);
      }), onRequest("environment/labyrinth.php", (data, request) => {
        request.action === "make_intersection_choice" && setTimeout(main19, 1e3);
      }), onRequest("environment/ancient_city.php", (data, request) => {
        request.action === "retreat" && setTimeout(main19, 1e3);
      });
    }), location_huds_default = {
      id: "location-huds",
      type: "location-hud",
      alwaysLoad: !0,
      load: init58,
      settings: settings_default27
    };
  }
});

// src/modules/metric/index.js
var imperialToMetric, convertInDialog, replaceInJournal, replaceOnMousePage, convertOnPage, init59, metric_default, init_metric = __esm({
  "src/modules/metric/index.js"() {
    init_utils2();
    imperialToMetric = (text) => {
      let lb = text.match(/(\d+? )lb./i), oz = text.match(/(\d+? )oz./i);
      if (!(lb || oz))
        return text;
      let lbValue = lb ? lb[1] : 0, ozValue = oz ? oz[1] : 0, totalWeight = Number.parseInt(lbValue) + Number.parseInt(ozValue) / 16, totalWeightMetric = (Math.round(totalWeight * 0.45359237 * 100) / 100).toString();
      return text.replace(/(\d+? lb.\s)?(\d+? oz.)/i, totalWeightMetric + " kg. ");
    }, convertInDialog = () => {
      let mouseViewWeights = document.querySelectorAll(".mouseView-statsContainer .mouseView-statsContainer-block-padding table tbody tr");
      mouseViewWeights.length && mouseViewWeights.forEach((row) => {
        let firstCell = row.querySelector("td"), secondCell = firstCell.nextSibling;
        if (firstCell.innerText === "Avg. Weight:" || firstCell.innerText === "Heaviest:") {
          let converted = imperialToMetric(secondCell.innerText);
          converted && (secondCell.innerText = converted);
        }
      });
    }, replaceInJournal = () => {
      let entries = document.querySelectorAll(".journal .entry .journalbody .journaltext");
      entries.length && entries.forEach((entry) => {
        let converted = imperialToMetric(entry.innerHTML);
        converted && (entry.innerHTML = converted);
      });
    }, replaceOnMousePage = () => {
      let mouseWeightsStats = document.querySelectorAll(".mouseListView-categoryContent-subgroupContainer .mouseListView-categoryContent-subgroup-mouse-stats");
      mouseWeightsStats.length && mouseWeightsStats.forEach((stat) => {
        if (stat.classList.contains("average_weight") || stat.classList.contains("heaviest_catch")) {
          let converted = imperialToMetric(stat.innerText);
          converted && (stat.innerText = converted);
        }
      });
    }, convertOnPage = () => {
      replaceOnMousePage(), replaceInJournal();
    }, init59 = () => __async(void 0, null, function* () {
      onDialogShow("all", convertInDialog), onRequest("*", convertOnPage), convertOnPage();
    }), metric_default = {
      id: "metric",
      name: "Metric Units",
      type: "feature",
      default: !1,
      description: "Use metric units instead of imperial units.",
      load: init59
    };
  }
});

// src/modules/native-dark-mode/styles/_root.css
var root_default, init_root = __esm({
  "src/modules/native-dark-mode/styles/_root.css"() {
    root_default = `:root{--d: #262b33;--d-transparent-10: rgb(255 255 255 / 10%);--d-transparent-20: rgb(255 255 255 / 20%);--d-transparent-30: rgb(38 43 51 / 30%);--d-transparent-50: rgb(38 43 51 / 50%);--d-transparent-70: rgb(38 43 51 / 70%);--d-transparent-90: rgb(38 43 51 / 90%);--d-black: #222;--d-alt: #383e49;--d-bg: #434651;--d-bg-alt: #383838;--d-border: #111;--d-action: #5e646f;--d-text: #c8ced8;--d-text-dark: #555;--d-text-muted: #a7adb9;--d-link: #bf93ff;--d-orange: #fcb671;--d-orange-dark: #eb7805;--d-yellow: #f7e7a2;--d-yellow-dark: #4e4a3c;--d-blue: #0e7fbf;--d-blue-dark: #0a5a7f;--d-blue-extra-dark: #08435e;--d-green: #40ba12;--d-green-dark: #1d5b15;--d-purple: #923293;--d-purple-alt: #6f2057;--d-purple-dark: #6b1e6b;--d-red: #c63636;--d-red-dark: #a02c2c;--d-red-darker: #732639}
`;
  }
});

// src/modules/native-dark-mode/styles/adventure.css
var adventure_default2, init_adventure2 = __esm({
  "src/modules/native-dark-mode/styles/adventure.css"() {
    adventure_default2 = `.mh-dark .adventureBookPopup-adventure-details-block-goalGroup.visible{background-color:var(--d-alt);box-shadow:-1px -1px 1px var(--d-border) inset}.mh-dark .adventureBookPopup-adventure-details-powerTypeContainer{margin-right:revert-layer;margin-left:0;background-color:var(--d-alt);border-color:var(--d)}.mh-dark .adventureBookPopup-adventure-footer{color:var(--d-text);background-color:var(--d-alt)}.mh-dark .adventureBookPopup-adventure-details-description-reason{color:var(--d-text-dark);background-color:var(--d-orange)}.mh-dark a.adventureBookPopup-title.complete{color:var(--d-text-dark)}.mh-dark .adventureBookPopup-adventure-details-block-step.multi_choice{background-color:var(--d)}.mh-dark .adventureBookBanner-goalImage{outline:none}.mh-dark .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-adventureName{color:var(--d-text)}.mh-dark .adventureBookPopup-titleDirectory,.mh-dark a.adventureBookPopup-title.active{border-color:var(--d-border)}.mh-dark .adventureBookPopup-title-margin{color:var(--d-text-dark)}.mh-dark .adventureBookPopup-adventure-header-title,.mh-dark .adventureBookPopup-adventure-header-duration{color:var(--d-text-dark);text-shadow:none}.mh-dark a.adventureBookPopup-title.active .adventureBookPopup-title-margin{color:var(--d-text-muted)}
`;
  }
});

// src/modules/native-dark-mode/styles/camp-tabs.css
var camp_tabs_default, init_camp_tabs = __esm({
  "src/modules/native-dark-mode/styles/camp-tabs.css"() {
    camp_tabs_default = `.mh-dark .campPage-tabs-tabHeader span,.mh-dark .campPage-tabs-tabHeader:hover span,.mh-dark .campPage-tabs-tabHeader:focus span,.mh-dark .campPage-tabs-tabHeader.active span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:focus span{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:1px 1px 1px var(--d-bg)}.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader.active span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border);box-shadow:1px 1px 1px var(--d-bg)}.mh-dark .campPage-tabs-tabHeader.active span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span{border-color:var(--d-border)}.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span{box-shadow:none}.mh-dark .campPage-tabs-tabContentContainer{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border);box-shadow:1px 1px 1px var(--d-border)}.mh-dark .campPage-tabs-tabContent.active[data-tab=daily],.mh-dark .campPage-tabs-tabContent-larryTip-container,.mh-dark .campPage-quests-container{background-color:var(--d);border-color:var(--d-border);box-shadow:none}.mh-dark .campPage-tabs-tabContent-larryTip-environment,.mh-dark .campPage-quests-title{color:var(--d-text)}.mh-dark .campPage-tabs-tabHeader span{border-bottom-color:var(--d-border)!important}.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span,.mh-dark .campPage-tabs-tabRow a.campPage-tabs-tabHeader:focus span{border-color:var(--d-border)!important}.mh-dark .campPage-daily-draw-prize-description,.mh-dark .campPage-daily-draw-button,.mh-dark .campPage-quests-objective{color:var(--d-text-dark)}.mh-dark .campPage-quests-footer-smash{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .adventureBookBanner-container{background-color:var(--d);border-color:var(--d-border);box-shadow:-1px 1px 3px var(--d-bg) inset}.mh-dark .adventureBookBanner-complete .adventureBookBanner-completed,.mh-dark .adventureBookBanner-adventureName{color:var(--d-text)}.mh-dark .adventureBookBanner-goalContainer{color:var(--d-text-muted)}.mh-dark .adventureBookBanner-container:hover .adventureBookBanner-moreInfo,.mh-dark .adventureBookBanner-moreInfo{color:var(--d-link)}.mh-dark span.mh-ui-tem-crown-text{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark .campPage-trap-trapEffectiveness-mouse-image{box-shadow:1px 1px 1px var(--d-bg)}.mh-dark .trapSelectorView__blueprint{border-color:var(--d-blue-dark)}.mh-dark img.mh-ui-tem-crown-icon,.mh-dark .campPage-trap-trapEffectiveness-mouse-powerType{background-color:var(--d);border-color:var(--d-border)}.mh-dark .campPage-tabs-tabContent-larryTip-container p:last-of-type a{color:var(--d-link)}
`;
  }
});

// src/modules/native-dark-mode/styles/camp-trap.css
var camp_trap_default, init_camp_trap = __esm({
  "src/modules/native-dark-mode/styles/camp-trap.css"() {
    camp_trap_default = `.mh-dark .campPage-trap{background:var(--d-bg);border-color:var(--d-border);box-shadow:-1px -1px 1px var(--d-border) inset}.mh-dark a.campPage-trap-friendContainer-toggleFriendsButton{color:var(--d-link)}.mh-dark .campPage-trap-friendContainer-toggleFriendsButton-arrow{border-color:var(--d-link) transparent transparent transparent}.mh-dark .campPage-trap-friendContainer .label{color:var(--d-text)}.mh-dark .campPage-trap-friendContainer span{color:var(--d-text-muted)}.mh-dark .campPage-trap-friendList.full,.mh-dark .campPage-trap-itemStats,.mh-dark .campPage-trap-trapEffectiveness,.mh-dark .campPage-trap-armedItem,.mh-dark .campPage-trap-armedItem.bait.active,.mh-dark .campPage-trap-armedItem.bait,.mh-dark .campPage-trap-armedItem.skin,.mh-dark .campPage-trap-armedItem.mh-favorite-setups-button,.mh-dark .campPage-trap-itemBrowser-armed,.mh-dark .campPage-trap-trapEffectivenessContainer,.mh-dark .campPage-trap-itemBrowser-itemContainer{color:var(--d-text);background:var(--d);border-color:var(--d-border);box-shadow:-1px 1px 3px var(--d-bg) inset}.mh-dark .campPage-trap-armedItem-skin-description{color:var(--d-text)}.mh-dark .campPage-trap-baitName,.mh-dark .campPage-trap-baitQuantity{color:var(--d-text);text-shadow:none}.mh-dark span.campPage-trap-baitQuantity,.mh-dark .trapSelectorView__armedItemQuantity span,.mh-dark .campPage-trap-armedItem .quantity span{right:-5px;bottom:4px;color:var(--d-text);background-color:var(--d);border-color:var(--d-action);box-shadow:-1px -1px 1px var(--d-bg) inset}.mh-dark .trapSelectorView__weaponSkinGroup.trapSelectorView__armedItemBorder{background-color:transparent}.mh-dark .campPage-trap-trapStat .value{color:var(--d-text);background:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap .trapImageView{border-bottom-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-armed-label{color:var(--d-text)}.mh-dark .campPage-trap-armedItem.active{background-color:var(--d-alt)}.mh-dark .campPage-trap-armedItem.inactive{background-color:var(--d)}.mh-dark .campPage-trap-itemBrowser-favorites{background-color:var(--d-bg)}.mh-dark .campPage-trap-trapEffectiveness span{color:var(--d-text-muted)}.mh-dark .campPage-trap-itemBrowser-armed-item,.mh-dark .campPage-trap-itemBrowser-armed .loading,.mh-dark .campPage-trap-itemBrowser-empty-container{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-filter input[data-filter=search]{border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-filter input[data-filter=search]::placeholder{color:var(--text-dark)}.mh-dark .campPage-trap-blueprint-closeButton{color:var(--d-text);background:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-favorite-item-image-frame{border-color:var(--d-border);box-shadow:2px 2px 3px var(--d-border) inset}.mh-dark .empty .campPage-trap-itemBrowser-favorite-item-image{background:var(--d-bg)}.mh-dark .campPage-trap-itemBrowser-favorite-item.loading .campPage-trap-itemBrowser-favorite-item-image:after{background-color:var(--d-bg)}.mh-dark .mh-improved-favorite-setups-blueprint-container{color:var(--d-text);background:var(--d-bg);border-color:var(--d-border);box-shadow:2px 2px 3px var(--d-border) inset}.mh-dark .mh-improved-favorite-setups-blueprint-container .header{color:var(--d-text)}.mh-dark .mh-improved-favorite-setups-blueprint-container .row{background-color:var(--d);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-item-powerType:after{color:var(--d-text-muted)}.mh-dark .campPage-trap-itemBrowser-tagGroup-name{color:var(--d-text-muted);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-quickLinks{background-color:var(--d-bg)}.mh-dark .campPage-trap-itemBrowser-quickLinks-header{color:var(--d-text-muted)}.mh-dark .campPage-trap-itemBrowser-item-statContainer{background-color:transparent;box-shadow:none}.mh-dark .campPage-trap-itemBrowser-item-stat .value span{color:var(--d-text-muted)}.mh-dark .campPage-trap-armedItem:hover,.mh-dark .campPage-trap-armedItem:focus,.mh-dark .campPage-trap-armedItem.inactive:hover,.mh-dark .campPage-trap-armedItem.inactive:focus,.mh-dark .campPage-trap-armedItem.active:hover,.mh-dark .campPage-trap-armedItem.active:focus,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer:hover,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer:focus,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .mh-improved-favorite-setups-button:hover,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .mh-improved-favorite-setups-button:focus{background-color:var(--d-alt)}.mh-dark .campPage-trap-itemBrowser-item{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-itemBrowser-items{scrollbar-color:var(--d-text-muted) var(--d-alt)}.mh-dark .campPage-trap-itemBrowser-favorite-item-image-quantity{right:1px;bottom:0;box-sizing:content-box;color:var(--d-text);background:var(--d-bg);border-color:var(--d-border);border-right:none;border-bottom:none;border-bottom-right-radius:2px}.mh-dark .campPage-trap-itemBrowser-item-powerType:before{background-color:transparent;border-color:transparent}.mh-dark .row.editing .campPage-trap-itemBrowser-favorite-item:after{background-color:var(--d-bg)}.mh-dark .mousehuntActionButton{box-shadow:1px 1px 1px var(--d-yellow)}.mh-dark a.mousehuntActionButton.danger{box-shadow:1px 1px 1px var(--d-red)}.mh-dark a.random-title:after{filter:invert(1)}.mh-dark .row.editing .campPage-trap-itemBrowser-favorite-item:hover:after{background-color:var(--d-alt)}.mh-dark .campPage-trap-trapStat .math{background-color:var(--d-alt);border-color:var(--d-border);box-shadow:-1px -1px 1px var(--d) inset}.mh-dark a.campPage-trap-itemBrowser-item-armButton,.mh-dark .armed a.campPage-trap-itemBrowser-item-armButton{color:var(--d-text-dark);text-shadow:none}.mh-dark .armed a.campPage-trap-itemBrowser-item-armButton{background-color:var(--d-orange);box-shadow:0 -2px 1px var(--d-orange) inset,0 -13px 1px var(--d-orange-dark) inset,0 0 1px #333}.mh-dark .campPage-trap-itemBrowser-item-image:after{border-color:transparent;box-shadow:none}.mh-dark .campPage-trap-trapEffectivenessContainer .loading,.mh-dark .campPage-trap-itemBrowser-items .loading{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-trapEffectiveness-header b{color:var(--d-text)}.mh-dark .campPage-trap-trapEffectiveness-difficultyGroup{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .campPage-trap-trapEffectiveness-mouse:hover{background-color:var(--d-alt);border-color:var(--d-border);outline-color:var(--d-border)}.mh-dark .trapSelectorView__trapStatSummary,.mh-dark .trapSelectorView__outerBlock,.mh-dark button.trapSelectorView__armedItem,.mh-dark .campPage-trap-friendList.full,.mh-dark .campPage-trap-itemStats,.mh-dark .campPage-trap-trapEffectiveness,.mh-dark .mh-improved-favorite-setups-button,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-trapEffectiveness,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-statsContainer,.mh-dark .trapSelectorView__armedItemBorder,.mh-dark .pageFrameView #mousehuntContainer.PageCamp .campPage-trap-armedItem.bait,.mh-dark #mh-improved-cre{color:var(--d-text);background-color:var(--d);border-color:var(--d-border);box-shadow:-1px 1px 3px var(--d-bg) inset}.mh-dark .campPage-trap-baitName{box-shadow:none}.mh-dark .trapSelectorView__armedItemQuantity span{text-shadow:none}.mh-dark span.campPage-trap-baitQuantity{right:0;bottom:0}.mh-dark .trapSelectorView__trapStatSummaryContainer{background:transparent;border:none}.mh-dark .campPage-trap-itemBrowser-item-favorite,.mh-dark .campPage-trap-itemBrowser-item.largeQuantity .campPage-trap-itemBrowser-item-quantity .quantity{background-color:var(--d-bg)}.mh-dark .trapSelectorView__armedItem--empty .trapSelectorView__armedItemImage{color:var(--d-text-muted)}.mh-dark #mh-improved-cre thead{box-shadow:0 -1px var(--d-transparent-10) inset}.mh-dark .mh-improved-cre-data-bad{color:var(--d-red)}.mh-dark .mh-improved-cre-data-good{color:var(--d-green)}.mh-dark .mh-improved-cre-name a{color:inherit}.mh-dark .campPage-trap-trapEffectiveness-mouse-name{color:var(--d-text)}.mh-dark .campPage-trap-itemBrowser-favorites .campPage-trap-itemBrowser-favorite-item-quantity span.campPage-trap-baitQuantity,.mh-dark .campPage-trap-itemBrowser-item-leftBar span.campPage-trap-baitQuantity{background-color:var(--d-transparent-90);border-color:var(--d-border)}
`;
  }
});

// src/modules/native-dark-mode/styles/favorite-setups.css
var favorite_setups_default3, init_favorite_setups3 = __esm({
  "src/modules/native-dark-mode/styles/favorite-setups.css"() {
    favorite_setups_default3 = `.mh-improved-favorite-setups-blueprint-container .row.location-favorite{color:var(--d-text-dark);background-color:var(--d-yellow)}.mh-dark .row.location-favorite .campPage-trap-itemBrowser-item-powerType:after{color:var(--d-text-dark)}
`;
  }
});

// src/modules/native-dark-mode/styles/friends.css
var friends_default3, init_friends3 = __esm({
  "src/modules/native-dark-mode/styles/friends.css"() {
    friends_default3 = `.mh-dark .friendsPage-subduedLink{color:var(--d-text-dark)}.mh-dark .friendsPage-subduedLink:hover{color:var(--d-text-muted)}.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message,.mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message-body,.mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message-body{color:var(--d-text)}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-statsContainer{color:var(--d-text-dark)}.mh-dark .hunterInfoView-wrapper .campPage-trap-trapStat{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-trapBlock-footer,.mh-dark .hunterInfoView-wrapper .hunterInfoView-trapBlock-footer-stats{background-color:var(--d)}.mh-dark .hunterProfileItemsView-content-padding{color:var(--d-text);background-color:transparent}.mh-dark .hunterProfileItemsView-categoryContent-name{color:var(--d-text)}.mh-dark .hunterProfileItemsView-category-margin{color:var(--d-text-dark)}.mh-dark .hunterProfileItemsView-category,.mh-dark .hunterProfileItemsView-category.active .hunterProfileItemsView-category-margin{color:var(--d-text)}.mh-dark .hunterProfileItemsView-categoryContent-item-padding{background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .friendsPage-list-header{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .friendsPage-list-header label{color:var(--d-text)}.mh-dark .friendsPage-community-channel{background-color:var(--d-bg);border:1px solid var(--d-border)}.mh-dark .friendsPage-community-channel h2{color:var(--d-text)}.mh-dark .friendsPage-community-channel.friends-page-id-search{background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .hunterProfileItemsView-content:before{background-color:var(--d-alt)}.mh-dark .campPage-trap-friendContainer-environment a{color:var(--d-link)}.mh-dark .friendsPage-friendRow{color:var(--d-text);background:var(--d-bg);border-color:var(--d-border)}.mh-dark .friendsPage-friendRow-statsContainer{color:var(--d-text);background:var(--d-bg-alt);box-shadow:0 10px 30px var(--d-bg-alt)}.mh-dark .friendsPage-friendRow-stat span,.mh-dark .friendsPage-friendRow-stat a{color:var(--d-text)}
`;
  }
});

// src/modules/native-dark-mode/styles/general.css
var general_default6, init_general6 = __esm({
  "src/modules/native-dark-mode/styles/general.css"() {
    general_default6 = `body.mh-dark{color:var(--d-text);background-color:var(--d);scrollbar-color:var(--d-text-muted) var(--d-alt)}.mh-dark .quickSendWrapper{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .puzzleView{filter:brightness(.7)}.mh-dark .mousehuntActionButton.lightBlue{box-shadow:1px 1px 1px var(--d-blue-dark)}.mh-dark .mousehunt-improved-lgs-reminder-new{color:var(--d-text-dark)}.mh-dark .journal .entry .journaltext input.quickSendInput,.mh-dark .mousehuntPage-content input.quickSendInput,.mh-dark .quickSendInput,.mh-dark input.treasureMapView-block-search-text,.mh-dark .mh-improved-favorite-setups-component-picker-popup-search input{color:var(--d-text);background-color:var(--d-bg);border:1px solid var(--d-border)}.mh-dark .mousehuntPage-content select,.mh-dark .mousehuntPage-content textarea,.mh-dark .mousehuntPage-content input,.mh-dark #mousehunt-improved-settings-advanced-override-flags input,.mh-dark #mousehunt-improved-settings-advanced-override-styles textarea{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .huntersHornView__hornImage{filter:drop-shadow(1px 1px 0 rgb(175 175 175 / 50%)) drop-shadow(-1px 1px 0 rgb(175 175 175 / 50%)) drop-shadow(1px -1px 0 rgb(175 175 175 / 50%)) drop-shadow(-1px -1px 0 rgb(175 175 175 / 50%)) drop-shadow(1px 4px 3px #6b6b6b)}.mh-dark .treasureMapRootView .messageBoardView .pagerView-section.previous .pagerView-link,.mh-dark .teamPage-messageBoard-corkboard .pagerView-section.previous .pagerView-link,.mh-dark .hunterInfoView-corkBoardBlock .pagerView-section.previous .pagerView-link{color:var(--d-text-muted)}.mh-dark #OnboardArrow.onboardPopup.top{z-index:100;color:#000}.mh-dark .travelPage-map-message{top:375px;color:#000}.mh-dark #mhhh_flash_message_div,.mh-dark .notificationMessageList .message .clear-block{color:var(--d-text-dark)}.mh-dark code{background-color:var(--d-alt)}.mh-dark #overlayPopup.mh-improved-update-summary .jsDialogContainer .content{color:#000;background-color:transparent}.mh-dark #overlayPopup.mh-improved-update-summary .jsDialog.bottom{background-color:transparent}.mh-dark #overlayPopup.mh-improved-update-summary .jsDialogContainer .content h2{color:#000}.mh-dark #overlayPopup.loading.mh-improved-loading .jsDialogContainer .suffix{background-image:url(https://www.mousehuntgame.com/images/ui/loaders/round_bar_green.gif);background-position:98% 10px;background-size:110px}.mh-dark #mousehuntContainer.PageNewsPost{background:transparent}.mh-dark .flexibleDialogWarmBrown.shopDescription b{color:#fc6;text-shadow:none}.mh-dark .drawPage-ballot .entries,.mh-dark .recentWinners,.mh-dark .socialBallots,.mh-dark .drawPage-ballot,.mh-dark .ballotEntry{color:#000;background-color:#fff}.mh-dark .hunterTitle .titles h1{color:var(--d-text)}.mh-dark .hunterTitle .titles .userLevel{color:var(--d-text-dark)}.mh-dark .harbourHUD-area-title{color:#000}.mh-dark #chro-minluck-table{color:var(--d-text)}.mh-dark #minluck-list{color:var(--d-text-muted);background-color:var(--d)}.mh-dark .chro-minluck-overall-cr.bad-minluck{color:var(--d-red)}.mh-dark .chro-minluck-overall-cr.good-minluck{color:var(--d-green)}
`;
  }
});

// src/modules/native-dark-mode/styles/gifts.css
var gifts_default2, init_gifts2 = __esm({
  "src/modules/native-dark-mode/styles/gifts.css"() {
    gifts_default2 = `.mh-dark .giftSelectorView-content-rightBar{background-color:var(--d-bg)}.mh-dark .giftSelectorView-claimableGift.accordion_disabled,.mh-dark .giftSelectorView-claimableGift.expanded{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .giftSelectorView-claimableGift-titleContainer{color:var(--d-text)}.mh-dark a.giftSelectorView-friendRow-action.ignore{color:var(--d-text);background-color:var(--d);outline-color:var(--d-border)}.mh-dark a.giftSelectorView-friendRow-action.ignore:hover{background-color:var(--d-bg);outline-color:var(--d)}.mh-dark .giftSelectorView-friendRow:hover{outline-color:var(--d)}.mh-dark .giftSelectorView-claimableGift:after{box-shadow:0 -1px 1px #434651 inset,0 -20px 50px #434651 inset}.mh-dark .giftSelectorView-tabHeader:hover span,.mh-dark .giftSelectorView-tabHeader.active span{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .giftSelectorView-tabHeader span{color:var(--d-text-muted);background-color:var(--d-bg-alt)}.mh-dark .giftSelectorView-gift .giftSelectorView-gift-padding{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{color:var(--d-text);background-color:var(--d-blue)}.mh-dark .giftSelectorView-friend-padding,.mh-dark .giftSelectorView-confirmPopup-block-actionItem .giftSelectorView-friend:hover .giftSelectorView-friend-padding{color:var(--d-link);background-color:var(--d-alt)}.mh-dark .giftSelectorView-friend:hover .giftSelectorView-friend-padding{background-color:var(--d);box-shadow:none}.mh-dark .giftSelectorView-friend.selected:hover .giftSelectorView-friend-padding,.mh-dark .giftSelectorView-actionContainer,.mh-dark .giftSelectorView-headerContainer{background-color:var(--d-blue-dark)}.mh-dark input.giftSelectorView-friend-search-input{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .giftSelectorView-friend-search-clear{color:var(--d-text-muted)}.mh-dark .giftSelectorView-friend.favorite .giftSelectorView-friend-padding{box-shadow:none}.mh-dark .giftSelectorView-tabContent,.mh-dark .mh-gift-buttons-clone-wrapper .giftSelectorView-content-leftBar-highlightBlock{background-color:var(--d)}.mh-dark .giftSelectorView-content-leftBar-highlightBlock{background-color:var(--d-bg)}.mh-dark .giftSelectorView-content-leftBar>.giftSelectorView-content-leftBar-highlightBlock:before{box-shadow:none}.mh-dark .mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day:hover .giftSelectorView-gift-padding,.mh-dark .giftSelectorView-gift.active .giftSelectorView-gift-padding,.mh-dark .giftSelectorView-gift:hover .giftSelectorView-gift-padding{color:var(--d-text);background-color:var(--d-blue-dark)}.mh-dark .giftSelectorView-confirmPopup-content{background-color:var(--d-bg)}.mh-dark .giftSelectorView-confirmPopup-content a{color:var(--d-link)}.mh-dark .giftSelectorView-confirmPopup-padding{box-shadow:0 0 10px var(--d-black)}.mh-dark .giftSelectorView-friend.complete .giftSelectorView-friend-padding{color:var(--d-text);background-color:var(--d-green-dark)}.mh-dark .giftSelectorView-inbox-footer{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #giftSelectorView-inbox{border-color:var(--d-border)}.mh-dark a.giftSelectorView-inboxHeader-closeButton{color:var(--d-text-muted);background-color:var(--d-action);border-color:var(--d-border)}.mh-dark .giftSelectorView-inboxHeader{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .giftSelectorView-inboxGiftOfTheDay{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .giftSelectorView-inboxGiftOfTheDay-label{color:var(--d-text-muted)}.mh-dark .giftSelectorView-inbox-giftContainer{background-color:var(--d-alt)}.mh-dark .giftSelectorView-inbox-gift-details{color:var(--d-text)}.mh-dark .giftSelectorView-inbox-gift-details a{color:var(--d-link)}.mh-dark .giftSelectorView-inbox-gift-sent{color:var(--d-text-muted)}.mh-dark .giftSelectorView-inbox-giftRow:nth-child(2n){background-color:var(--d-bg)}.mh-dark .giftSelectorView-inbox-giftRow{border-color:var(--d-border)}
`;
  }
});

// src/modules/native-dark-mode/styles/header-dropdown.css
var header_dropdown_default, init_header_dropdown = __esm({
  "src/modules/native-dark-mode/styles/header-dropdown.css"() {
    header_dropdown_default = `.mh-dark .mousehuntHeaderView .dropdownContent{color:var(--d-color);background-color:var(--d);border-color:var(--d-border)}.mh-dark .mousehuntHeaderView .menuItem.sidebar .dropdownContent .pageSidebarView-user a:nth-child(2){color:var(--d-link)}.mh-dark .mousehuntHeaderView .menuItem.sidebar .dropdownContent a.pageSidebarView-user-logout{color:var(--d-link)}.mh-dark .mousehuntHeaderView .dropdownContent a{color:var(--d-text);border-color:var(--d-border)}.mh-dark .regionName{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .regionWrapper{border-color:var(--d-border)}.mh-dark .locationWrapper{background-color:var(--d)}.mh-dark .locationWrapper:nth-child(2n){background-color:var(--d-alt)}.mh-dark .dashboardWrapper{border-color:var(--d-border);box-shadow:none}.mh-dark .scoreboardRelativeRankingTableView-table{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a{color:var(--d-link)}.mh-dark .scoreboardRelativeRankingTableView-table tr.highlight{color:var(--d-text-dark);background-color:var(--d-yellow)}
`;
  }
});

// src/modules/native-dark-mode/styles/header.css
var header_default, init_header = __esm({
  "src/modules/native-dark-mode/styles/header.css"() {
    header_default = `.mh-dark .mousehuntHud-gameInfo{background-color:var(--d);border-right:none}.mh-dark .mousehuntHud-menu ul li a{height:25px;color:var(--d-border);text-shadow:none}.mh-dark .mousehuntHud-shield.title,.mh-dark .mousehuntHud-shield.golden.title,.mh-dark .mousehunt-improved-lgs-reminder-new{filter:brightness(.8)}.mh-dark .mousehuntHud-menu.default,.mh-dark .huntersHornView .huntersHornView__timer{filter:brightness(.9)}.mh-dark .mousehuntHud-menu.default{z-index:90}.mh-dark .mousehuntHud-marbleDrawer{background-blend-mode:exclusion}.mh-dark .huntersHornView__backdrop{filter:brightness(.8);opacity:1}.mh-dark a.mousehuntHud-shield.golden.default{filter:drop-shadow(0 0 5px rgb(92 77 30 / 50%)) brightness(.9)}.mh-dark .mousehuntHud-menu ul li:hover a,.mh-dark .mousehuntHud-menu ul li.active a{color:var(--d-text-dark);text-shadow:none}.mh-dark .mousehuntHeaderView .menuItem.dropdown:hover .arrow{border-top-color:transparent;border-bottom-color:#ededed}.mh-dark .mousehuntHeaderView .menuItem.dropdown.expanded .arrow,.mh-dark .mousehuntHeaderView .menuItem.dropdown.expanded:hover .arrow{border-top-color:#999;border-bottom-color:transparent}.mh-dark .mousehuntHud-environmentName{color:#000;text-shadow:none;filter:drop-shadow(0 1px 1px #aea384) drop-shadow(0 2px 1px #aea384)}.mh-dark .huntersHornView__messageContainer{color:var(--d-text-dark)}.mh-dark .mousehuntHeaderView-gameTabs,.mh-dark .mousehuntHeaderView .menuItem{background:url(https://i.mouse.rip/dark/menuItem.png?d) 0 0 repeat-x}.mh-dark .mousehuntHeaderView-gameTabs{border-color:var(--d-border)}.mh-dark .mousehuntHeaderView .menuItem{color:var(--d-text);border-color:var(--d-border)}.mh-dark .mousehunt-improved-favorite-setups-icon:before,.mh-dark .mousehunt-improved-journal-privacy-icon:before{filter:invert(1)}.mh-dark .mousehuntHud-gameInfo a{color:var(--d-link)}.mh-dark .mousehuntHeaderView .menuItem.new{color:var(--d-black);filter:brightness(1.2)}
`;
  }
});

// src/modules/native-dark-mode/styles/hover-items.css
var hover_items_default, init_hover_items = __esm({
  "src/modules/native-dark-mode/styles/hover-items.css"() {
    hover_items_default = `.mh-dark #friend-data-wrapper,.mh-dark #friend-data-wrapper .friendsPage-friendRow,.mh-dark #friend-data-wrapper .friendsPage-friendRow-statsContainer,.mh-dark #mouse-data-wrapper,.mh-dark #item-data-wrapper{color:var(--d-text);background:var(--d);border:var(--d-black);box-shadow:0 1px 5px -1px var(--d-action)}.mh-dark #friend-data-wrapper .friendsPage-friendRow-stat span,.mh-dark #friend-data-wrapper .friendsPage-friendRow-stat a{color:var(--d-text)}.mh-dark #friend-data-wrapper .friendsPage-friendRow-statsContainer{background:var(--d);box-shadow:0 10px 30px var(--d-alt) inset}.mh-dark #friend-data-wrapper a.userInteractionButtonsView-button{border-radius:25%;box-shadow:0 0 2px 1px var(--d-black) inset}.mh-dark #friend-data-wrapper .userInteractionButtonsView-button:hover:before,.mh-dark #friend-data-wrapper .userInteractionButtonsView-button.busy:before{border-radius:25%}
`;
  }
});

// src/modules/native-dark-mode/styles/inbox.css
var inbox_default2, init_inbox2 = __esm({
  "src/modules/native-dark-mode/styles/inbox.css"() {
    inbox_default2 = `.mh-dark #messengerUINotification{background-color:var(--d-bg)!important;border-color:var(--d-border)}.mh-dark #messengerUINotification .tabs a.active{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #messengerUINotification .notificationHeader{background-color:var(--d-bg)}.mh-dark #messengerUINotification .tabs a,.mh-dark #messengerUINotification .tabs a:hover,.mh-dark #messengerUINotification .tabs a:visited{color:var(--d-text-muted);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #messengerUINotification .tabs a:hover,.mh-dark #messengerUINotification .tabs a.active{background-color:var(--d-alt)}.mh-dark #messengerUINotification .tabs a.active .arrow{border-left-color:var(--d-alt)}.mh-dark .notificationMessageList .message:nth-child(2n){background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .notificationMessageList .message:nth-child(odd){background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .notificationMessageList .message .clear-block{color:var(--d-text)}.mh-dark .notificationMessageList .message a{color:var(--d-link)}.mh-dark .notificationMessageList .message .date{color:var(--d-text-muted)}.mh-dark #messengerUINotification .tabs a.active .arrowShadow{border-left-color:var(--d-border)}.mh-dark .notificationMessageList .tab[data-tab=news] .message{background-color:var(--d-yellow)}.mh-dark .notificationMessageList .tab[data-tab=news] .message .clear-block,.mh-dark .notificationMessageList .tab[data-tab=news] .message .date{color:var(--d-text-dark)}.mh-dark #messengerUINotification .messengerUINotificationClose{color:var(--d-text-muted);background-color:var(--d-action);border-color:var(--d-border)}
`;
  }
});

// src/modules/native-dark-mode/styles/inventory.css
var inventory_default, init_inventory = __esm({
  "src/modules/native-dark-mode/styles/inventory.css"() {
    inventory_default = `.mh-dark .inventoryPage-item.small .inventoryPage-item-margin{background-color:var(--d-bg);border:1px solid var(--d-border)}.mh-dark .itemImage .quantity{color:var(--d-text-dark)}.mh-dark .inventoryPage-tagContent-tagTitle{color:var(--d-text)}.mh-dark a.inventoryPage-tagDirectory-tag{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .inventoryPage-item-name abbr{color:var(--d-text)}.mh-dark .inventoryPage-tagDirectory{border-color:var(--d-border)}.mh-dark .inventoryPage-tagDirectory-tag.active,.mh-dark .inventoryPage-tagDirectory-tag:hover{color:var(--d-text-muted);background-color:var(--d-blue-extra-dark)}.mh-dark .inventoryPage-item.small .tooltip{color:var(--d-text-dark)}.mh-dark .inventoryPage-item.small .inventoryPage-item-button{color:#000;background-color:#fc6;border-color:#ddd}.mh-dark .inventoryPage-item.small.armed .inventoryPage-item-margin{border-color:var(--d-green);box-shadow:inset 0 0 4px var(--d-green)}.mh-dark .mhui-inventory-lock-and-hide-item-controls{background-color:var(--d-transparent-20)}.mh-dark a.mousehuntHud-page-subTabContent-prefix-filter-option,.mh-dark .mousehuntHud-page-subTabHeader span{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .mousehuntHud-page-subTabContent-prefix-filter-option.active,.mh-dark .mousehuntHud-page-subTabContent-prefix-filter-option:hover,.mh-dark .mousehuntHud-page-subTabHeader.active span,.mh-dark .mousehuntHud-page-subTabHeader:hover span,.mh-dark .mousehuntHud-page-subTabHeader:focus span{color:#fff;background-color:#8595b0}.mh-dark .mousehuntHud-page-subTabContent-prefix-filter-options{border-color:var(--d-border)}.mh-dark .mousehuntHud-page-subTabHeader-container .mousehuntHud-page-subTabHeader:last-child span{border-right-color:var(--d-border)}.mh-dark .inventoryPage-item-margin{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .item_set{color:var(--d-text-dark);background-color:var(--d-yellow)}.mh-dark .itemViewStatBlock-stat-value{background-color:transparent}.mh-dark .itemViewStatBlock{border-color:var(--d-border)}.mh-dark .itemViewStatBlock-stat-label{background-color:var(--d-action)}.mh-dark .inventoryPage-item-content-description-text{color:var(--d-text-muted)}.mh-dark .mousehuntHud-page-tabContent-loading{background:url(https://www.mousehuntgame.com/images/ui/loaders/mouse_loading_large.gif?asset_cache_version=3) 50% 50% no-repeat}.mh-dark .inventoryPage-item-recipeOptions li{color:var(--d-text);background-color:var(--d-yellow-dark);border-color:var(--d-border)}.mh-dark .inventoryPage-item-recipeOptions li:hover{color:var(--d-text-dark);background-color:var(--d-yellow)}.mh-dark .mousehuntPage-content input.inventoryPage-item-button[type=submit],.mh-dark .mousehuntPage-content input.inventoryPage-item-button[type=button]{color:#000;background-color:#fc6}.mh-dark .mousehuntPage-content input.inventoryPage-item-button[type=submit]:hover,.mh-dark .mousehuntPage-content input.inventoryPage-item-button[type=button]:hover{color:#000;background-color:#fc9}.mh-dark .mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent-margin{background-color:var(--d)}.mh-dark .mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .inventoryPage-item-margin{background-color:var(--d-bg-alt)}.mh-dark .mousehuntHud-page-subTabContent-prefix-title{color:var(--d-text);text-shadow:none}.mh-dark .inventoryPage-craftingTable-slotContainer{background-color:var(--d-bg)}.mh-dark .mousehuntHud-page-subTabContent.crafting_table .inventoryPage-craftingTable{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .inventoryPage-craftingTable-slot{background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .inventoryPage-craftingTable-slot-item.empty .itemImage{box-shadow:0 0 0 1px var(--d-action) inset}.mh-dark .mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .tooltip .inventoryPage-item-margin{background-color:transparent}.mh-dark .inventoryPage-item-content-description-consumedItem.error{color:var(--d-red-dark)}.mh-dark .tiny-item:nth-child(2n){background-color:var(--d-alt)}.mh-dark .tiny-item:hover,.mh-dark .tiny-item:nth-child(2n):hover{background-color:var(--d-bg-alt)}.mh-dark .inventoryPage-craftingTable-slot-item .itemImage{box-shadow:none}.mh-dark .inventoryPage-craftingTable-slot-item-controls{border-color:var(--d-border)}.mh-dark .inventoryPage-craftingTable-slot-item-controls a{color:var(--d-text);background-color:var(--d-alt)}.mh-dark .inventoryPage-craftingTable-slot-item-controls input[type=text]:hover{border-color:var(--d-border)}.mh-dark .inventoryPage-craftingTable-slot-item-controls a:hover{color:var(--d-text-muted);background-color:var(--d)}.mh-dark .inventoryPage-craftingTable-slot-item[data-owned="1"] .inventoryPage-craftingTable-slot-item-controls-increment{color:var(--d-text-muted);background-color:var(--d-border)}.mh-dark .inventoryPage-item.trinket .itemViewStatBlock-stat,.mh-dark .itemViewStatBlock-stat{border-color:var(--d-border)}
`;
  }
});

// src/modules/native-dark-mode/styles/item-view.css
var item_view_default, init_item_view = __esm({
  "src/modules/native-dark-mode/styles/item-view.css"() {
    item_view_default = `.mh-dark .itemViewContainer{margin-right:-1px;margin-left:-1px;background-color:var(--d-bg);border-bottom-color:var(--d-bg)}.mh-dark .itemView-padding{background-color:var(--d);border-color:var(--d-border)}.mh-dark .itemView-character-name{color:var(--d-text);text-shadow:-1px -1px 5px var(--d-text-muted)}.mh-dark .itemView-header{border-color:var(--d-transparent-10);border-width:1px}.mh-dark .itemViewContainer .itemViewStatBlock-stat{border-color:var(--d-border)}.mh-dark .mh-dark .itemViewStatBlock-stat-value{background-color:transparent}.mh-dark .itemViewContainer a{color:var(--d-link)}
`;
  }
});

// src/modules/native-dark-mode/styles/journal-main.css
var journal_main_default, init_journal_main = __esm({
  "src/modules/native-dark-mode/styles/journal-main.css"() {
    journal_main_default = `.mh-dark .journalContainer .top a{color:var(--d-text-dark)}.mh-dark .journal a{color:var(--d-link)}.mh-dark .journal .content .entry{color:var(--d-text)!important;background-color:var(--d);background-blend-mode:soft-light;border-color:var(--d-border)}.mh-dark .journal .content .entry a{color:var(--d-link)}.mh-dark .journal .content .entry .journalbody .journaldate{color:var(--d-text);border-bottom:1px solid rgb(255 255 255 / 30%)}.mh-dark .pagerView-container{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .journal .content .entry:last-child{border-bottom-color:#5b5b5b}.mh-dark .campPage-quests-objective-container.complete .campPage-quests-objective{color:var(--d-text)}.mh-dark .campPage-quests-objective-container.complete{background-color:var(--d-green-dark);border-color:transparent}.mh-dark .pagerView-section.previous.active .pagerView-link,.mh-dark .pagerView-section.next.active .pagerView-link{color:var(--d-text-muted)}.mh-dark .journal-history-page-selector{background-color:var(--d-bg);border-color:var(--d-border);border-top:none}.mh-dark .journal-history-page-selector label{color:var(--d-text-muted)}.mh-dark .journal-history-page-selector button{color:var(--d-text-muted);background-color:var(--d-bg)}
`;
  }
});

// src/modules/native-dark-mode/styles/journal-misc-entries.css
var journal_misc_entries_default, init_journal_misc_entries = __esm({
  "src/modules/native-dark-mode/styles/journal-misc-entries.css"() {
    journal_misc_entries_default = `.mh-dark .entry.short.misc.custom.unstable_charm_trigger{background-color:var(--d-blue-dark)}.mh-dark .journal .content .entry.catchsuccessloot{background-color:var(--d-alt)}.mh-dark .journal .content .entry.catchfailure{background-color:var(--d-red-dark)}.mh-dark .journal .content .entry.catchsuccessprize{background-color:var(--d-green-dark)}.mh-dark .journal .content .entry.short.misc.custom.chesla_trap_trigger{background-color:var(--d-purple)}.mh-dark .entry.short.relicHunter_complete,.mh-dark .entry.short.supplytransferitem{background-blend-mode:normal}.mh-dark .journal .content .supplytransfergold,.mh-dark .journal .content .marketplacesale,.mh-dark .entry.short.supplytransfergold{background-color:var(--d-purple-dark);background-image:url(https://i.mouse.rip/gold-journal.png);background-blend-mode:normal}.mh-dark .journal .content .entry.marketplace.marketplace_create_listing,.mh-dark .journal .content .entry.marketplace.marketplace_complete_listing,.mh-dark .journal .content .entry.marketplace.marketplace_claim_listing,.mh-dark .journal .content .entry.marketplace.marketplace_cancel_listing{background-color:var(--d-purple-dark);background-blend-mode:normal}.mh-dark .entry.short.travel{background-color:var(--d-yellow-dark);background-image:url(https://i.mouse.rip/travel-journal.png);background-blend-mode:normal}.mh-dark .journal .content .attractionfailurestale{background-image:url(https://i.mouse.rip/stale.png);background-blend-mode:normal}.mh-dark .journal .content .captchasolved{background-color:var(--d-blue-dark);background-image:url(https://i.mouse.rip/journal_puzzle_reward.png);background-blend-mode:normal}.mh-dark .journal .content .attractionfailure,.mh-dark .journal .content .outofsuperbrie,.mh-dark .journal .content .catchfailure{background-color:var(--d-red-darker);background-image:url(https://i.mouse.rip/steal.png);background-blend-mode:normal}.mh-dark .journal .content .catchfailuredamage{background-color:var(--d-red-darker);background-image:url(https://i.mouse.rip/pillage.png);background-blend-mode:normal}.mh-dark .journal .content .entry.custom.refine_pollutinum{background-color:var(--d-green-dark);background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/af9ffb2d0655dbf62a5e4a086515bb23.png);background-blend-mode:normal}.mh-dark .journal .content .entry.relicHunter_slayer_aura_relic_bonus{background-color:var(--d);background-blend-mode:difference}.mh-dark .journal .entry.socialGift.socialGift-send .journalbody .journaltext{box-shadow:inset 0 -20px 15px -16px #151515}.mh-dark .journal .content .entry.harbour{background-color:var(--d-yellow-dark)}.mh-dark .journal .content .entry.labyrinthSmall.labyrinth-clue{background-color:var(--d-yellow-dark);background-blend-mode:luminosity}.mh-dark .journal .content .entry.super_rift_vacuum_trigger,.mh-dark .journal .content .entry.rift-bristlewoods-lootBooster,.mh-dark .journal .content .entry.short.relicHunter_catch{background-color:var(--d-purple-alt);background-blend-mode:normal}
`;
  }
});

// src/modules/native-dark-mode/styles/kings-calibrator.css
var kings_calibrator_default, init_kings_calibrator = __esm({
  "src/modules/native-dark-mode/styles/kings-calibrator.css"() {
    kings_calibrator_default = `.mh-dark .shopsPage-kingsCalibratorPromo{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border);box-shadow:inset -1px -1px 2px var(--d-border)}.mh-dark .campPage-daily-container .shopsPage-kingsCalibratorPromo-button{background-color:var(--d-blue)}.mh-dark .kingsGiveawayCalibratorPopup-upgradeContainer{background-color:var(--d);box-shadow:none}.mh-dark .kingsGiveawayCalibratorPopup-tabHeader span{color:var(--d-text);background-color:var(--d)}.mh-dark .kingsGiveawayCalibratorPopup-tabHeader:hover span,.mh-dark .kingsGiveawayCalibratorPopup-tabHeader.active span{background-color:var(--d-bg)}.mh-dark .kingsGiveawayCalibratorPopup-upgrade.active{color:var(--d-text-dark);background-color:var(--d-green)}.mh-dark .kingsGiveawayCalibratorPopup-upgrade-description{color:var(--d-text);background-color:var(--d-alt)}.mh-dark .kingsGiveawayCalibratorPopup-upgrade{border-color:var(--d-border)}.mh-dark .kingsGiveawayCalibratorPopup-numCredits{color:var(--d-text);text-shadow:none;background-color:var(--d)}.mh-dark .kingsGiveawayCalibratorPopup-upgrade-name{color:var(--d-text-dark)}.mh-dark .locked .kingsGiveawayCalibratorPopup-upgrade-name{color:var(--d-text-muted)}
`;
  }
});

// src/modules/native-dark-mode/styles/maps.css
var maps_default3, init_maps4 = __esm({
  "src/modules/native-dark-mode/styles/maps.css"() {
    maps_default3 = `.mh-dark .mh-ui-quick-invite-wrapper,.mh-dark .treasureMapView-leftBlock .treasureMapView-block{background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapRootView-subTabContainer{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .treasureMapRootView-subTab.active,.mh-dark .treasureMapRootView-subTabContainer:hover .treasureMapRootView-subTab:hover{color:var(--d-text-muted);background-color:var(--d-bg-alt);border-color:var(--d-border);border-radius:0}.mh-dark .treasureMapRootView-subTab,.mh-dark .treasureMapRootView-subTabContainer:hover .treasureMapRootView-subTab.active{color:var(--d-text);border-color:var(--d-border)}.mh-dark .treasureMapRootView .messageBoardView div.messageBoardView-message-container,.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message-container{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .treasureMapRootView .messageBoardView .messageBoardView-message,.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message,.mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message{background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .treasureMapRootView .messageBoardView div.messageBoardView-message.new{border-color:var(--d-border)!important}.mh-dark textarea.messageBoardView-message-textarea{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .treasureMapView-environment.complete .treasureMapView-environment-title{color:var(--d-text-dark)}.mh-dark .treasureMapView-mapWarning.treasureMapRootView-padding{color:var(--d-text);background-color:var(--d-red-dark)}.mh-dark .mh-ui-environments-block .treasureMapView-block-content{background-color:transparent}.mh-dark .treasureMapView-allyTable .treasureMapView-allyRow:nth-child(2n){background-color:var(--d-bg)}.mh-dark .treasureMapView-block{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .treasureMapRootView-tab-name{color:var(--d-text)}.mh-dark .treasureMapView-scoreboard{background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapView-block-row.active{background-color:var(--d-yellow-dark)}.mh-dark .treasureMapInventoryView .treasureMapView-blockWrapper .treasureMapView-leftBlock .treasureMapView-block-content{margin-left:0;background-color:var(--d-alt);border:1px solid var(--d-border)}.mh-dark .treasureMapPopup-seasonContainer.mousehuntTooltipParent,.mh-dark .treasureMapInventoryView-relicHunter{background-color:var(--d);border-color:var(--d-border)}.mh-dark .mh-ui-goals-sidebar-toggle{filter:invert(1)}.mh-dark .treasureMapView-highlight-content{background-color:var(--d)}.mh-dark .treasureMapView-highlight-name.mh-ui-mouse-links-map-name{color:var(--d-blue)}.mh-dark .mh-ui-mouse-links-map-ars .mhct-data{color:var(--d-text-muted);background-color:var(--d)}.mh-dark .mhct-row{color:var(--d-text-muted)}.mh-dark .mh-ui-mouse-links-map-ars .mhct-row:nth-child(odd){color:var(--d-text-muted);background-color:var(--d-alt)}.mh-dark .treasureMapView-highlight{outline:1px solid var(--d-border)}.mh-dark .mh-ui-mouse-links-map-ars .mhct-title{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .treasureMapPopup-shop .treasureMapInventoryView-scrollCase-content,.mh-dark .treasureMapPopup-shop .treasureMapView-block-content-heading,.mh-dark .treasureMapView-environment.wrong .treasureMapView-environment-title{color:var(--d-text-dark)}.mh-dark .treasureMapView-consolationPrize-message{color:var(--d-text)}.mh-dark .treasureMapRootView-subTab-spacer{width:0}.mh-dark .treasureMapView-consolationPrize{color:var(--d-text);background-color:var(--d-bg-alt)}.mh-dark .treasureMapView-environment{background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapView-goals-group-goal-name span{color:var(--d-text)}.mh-dark .treasureMapView-goals-group-goal.complete .treasureMapView-goals-group-goal-name span{color:var(--d-text-muted)}.mh-dark .treasureMapView-goals-groups .treasureMapView-block-content-heading a{color:var(--d-link)}.mh-dark .treasureMapRootView .messageBoardView .messageBoardView-message-body,.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message-body,.mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message-body{color:var(--d-text)}.mh-dark .treasureMapRootView .messageBoardView a.messageBoardView-message-name,.mh-dark .teamPage-messageBoard-corkboard a.messageBoardView-message-name,.mh-dark .hunterInfoView-corkBoardBlock a.messageBoardView-message-name,.mh-dark .treasureMapView-allyTable a{color:var(--d-link)}.mh-dark .treasureMapView-componentContainer,.mh-dark .treasureMapView-block-content-heading{border-color:var(--d-border)}.mh-dark .mh-ui-quick-invite-wrapper,.mh-dark .treasureMapView-leftBlock .treasureMapView-block{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .treasureMapView-environment.complete .treasureMapView-environment-title,.mh-dark .treasureMapView-environment.complete .treasureMapView-environment-title a{color:var(--d-text);background-color:var(--d-green-dark)}.mh-dark .treasureMapView-environment.inactive a.treasureMapView-environment-title-link{color:var(--d-link)}.mh-dark .treasureMapView-mapLeaveContainer{margin-top:5px}.mh-dark .treasureMapInventoryView-itemList .treasureMapInventoryView-scrollCase{color:var(--d-text);background-color:var(--d)}.mh-dark .treasureMapView-block.noBorder{background-color:transparent}.mh-dark .treasureMapView-scoreboard-table a,.mh-dark a.treasureMapInvitesView-mapImageContainer{color:var(--d-link)}.mh-dark .treasureMapInvitesView-numRemaining{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark .treasureMapView-scoreboard-table .treasureMapView-block-row:hover{background-color:var(--d-bg)}.mh-dark .treasureMapInvitesView-mapImageContainer:hover:before{background-color:transparent;box-shadow:none}.mh-dark .treasureMapRootView-tab.active,.mh-dark .treasureMapRootView-tab:hover{background-color:var(--d-bg)}.mh-dark .treasureMapRootView-tab{color:var(--d-text);background-color:var(--d-alt)}.mh-dark .treasureMapInventoryView-scrollCase-aura{background-color:var(--d-purple-dark);border-color:var(--d-purple)}.mh-dark .treasureMapPopup-season-reward-name{color:var(--d-text-muted)}.mh-dark .treasureMapPopup-shop .treasureMapView-block-content-heading{border-color:transparent}.mh-dark .treasureMapView-reward-chestName{color:var(--d-text-dark)}.mh-dark .treasureMapDialogView{background-color:var(--d)}.mh-dark .treasureMapDialogView a{color:var(--d-link)}.mh-dark .treasureMapPopup-mapInvite .treasureMapInventoryView-scrollCase{background-color:transparent}.mh-dark .treasureMapListingsTableView th{background-color:var(--d-bg-alt)}.mh-dark .treasureMapListingsTableView tbody tr:nth-child(2n){background-color:var(--d-bg)}.mh-dark .treasureMapListingsTableView-mapPreviewButton,.mh-dark .treasureMapListingsTableView tbody tr{color:var(--d-text)}.mh-dark .mh-improved-map-listing-last-active{color:var(--d-text-muted)}.mh-dark .treasureMapRootView-header-navigation-item{border-color:var(--d-purple-dark)}.mh-dark .treasureMapRootView-tabContainer.hasTabs{background-color:var(--d-purple)}.mh-dark .treasureMapRootView-footer{border-top:1px solid var(--d-border)}.mh-dark .treasureMapView-environment.active .treasureMapView-environment-title{background-color:var(--d-bg)}.mh-dark .treasureMapView-goals-group-goal:hover:before{background-color:var(--d-bg-alt);outline-color:var(--d-border)}.mh-dark a.treasureMapDialogView-close{color:var(--d)}.mh-dark .treasureMapListingsTableView tr.selected,.mh-dark .treasureMapListingsTableView tr.selected:nth-child(2n){background-color:var(--d-bg)}
`;
  }
});

// src/modules/native-dark-mode/styles/marketplace.css
var marketplace_default, init_marketplace = __esm({
  "src/modules/native-dark-mode/styles/marketplace.css"() {
    marketplace_default = `.mh-dark .mh-dark .marketplaceView-browse-sidebar-link.active{color:var(--d-text)}.mh-dark .marketplaceHome,.mh-dark .marketplaceView .marketplaceContentContainer{background-color:var(--d-bg)}.mh-dark .marketplaceView h1,.mh-dark .marketplaceView-goldValue,.mh-dark .marketplaceHome-blockItem-name span{color:var(--d-text)}.mh-dark a.marketplaceView-moreLink,.mh-dark .marketplaceHome-block-viewAll{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark a.marketplaceView-moreLink:hover,.mh-dark a.marketplaceHome-block-viewAll:hover{background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-table tr{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .marketplaceView-table tr:nth-child(odd){color:var(--d-text);background-color:var(--d-alt)}.mh-dark .marketplaceView-table tr.empty{background-color:var(--d-alt)!important}.mh-dark .marketplaceView-itemImage.favourite{box-shadow:none}.marketplaceHome-blockMenu.active,.mh-dark .marketplaceHome-blockMenu:hover{color:var(--d-link);border-color:var(--d-purple)}.mh-dark .marketplaceView-header-tabHeader{background-color:var(--d-border)}.mh-dark .marketplaceView-header-tabHeader:hover,.mh-dark .marketplaceView-header-tabHeader.active{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .marketplaceView-table,.mh-dark a.marketplaceView-header-tabHeader,.mh-dark .mh-dark .marketplaceView-browse-sidebar-link{color:var(--d-text-muted)}.mh-dark .marketplaceView-item-footer{background-color:var(--d)}.mh-dark .marketplaceView-item-footer .marketplaceView-table{border-radius:7px}.mh-dark .marketplaceView-table tr:hover{background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-listing-progressBar-padding{background-color:var(--d)}.mh-dark .marketplaceView-table-name a,.mh-dark .marketplaceView-table-name a:hover{color:var(--d-text)}.mh-dark .marketplaceView-browse-sidebar-link{color:var(--d-text);background-color:var(--d-alt);border:1px solid var(--d-border)}.mh-dark .marketplaceView-browse-sidebar-link.active,.mh-dark .marketplaceView-browse-sidebar-link:hover{color:var(--d-text);background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-browse-filter label{color:var(--d-text)}.mh-dark .marketplaceView-browse-sidebar:after{background-color:var(--d)}.mh-dark .marketplaceView-item-leftBlock .marketplaceHome-block-viewAll,.mh-dark a.marketplaceHome-block-viewAll{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark a.marketplaceHome-block-viewAll:hover{background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-breadcrumb{color:var(--d-text);background-color:var(--d);border-color:var(--d-border);border-width:1px}.mh-dark a.marketplaceView-breadcrumb:hover{background-color:var(--d-blue-dark)}.mh-dark .marketplaceView-listingBody{background-color:var(--d-bg)}.mh-dark .marketplaceView-item-quickListings a.marketplaceView-goldValue{color:var(--d-text)}.mh-dark .marketplaceView-item-quickListings th{color:var(--d-text-muted)}.mh-dark .marketplaceView-listingFooter{background-color:var(--d-purple-dark)}.mh-dark .marketplaceView-item-descriptionContainer{border-top:none}.mh-dark #chartArea{margin-top:10px;margin-bottom:10px;background-color:#fff}.mh-dark #markethuntInfobox,.mh-dark #markethuntInfobox .marketplaceView-goldValue{color:#000}.mh-dark .marketplaceView-trendContainer,.mh-dark .marketplaceView-floatingTooltip{color:var(--d-text-muted);background-color:var(--d);border-color:var(--d-border)}.mh-dark .marketplaceView-floatingTooltip:after{border-top-color:var(--d-border)}.mh-dark .marketplaceView-item-graphTable .marketplaceView-trendContainer{color:var(--d-text-muted);background-color:transparent;border:none}.mh-dark .marketplaceHome-blockMenu{border-color:var(--d-transparent-10)}.mh-dark .marketplaceView-item.view .mousehuntCharacterGuideBox,.mh-dark .marketplaceListing .mousehuntCharacterGuideBox{filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px var(--d-yellow-dark))}.mh-dark .marketplaceView-item-input-suggested a{color:var(--d-link)}.mh-dark .marketplaceView-item-cancelButton{background-color:var(--d);border-color:var(--d-border)}.mh-dark .marketplaceView-dialog{background-color:var(--d-bg)}.mh-dark .marketplaceView-item-image{border:none}.mh-dark .marketplaceView-dialog-footer,.mh-dark .marketplaceView-dialog-header{background-color:var(--d-purple)}
`;
  }
});

// src/modules/native-dark-mode/styles/mice.css
var mice_default, init_mice = __esm({
  "src/modules/native-dark-mode/styles/mice.css"() {
    mice_default = `.mh-dark .mouseListView-categoryContent-name{color:var(--d-text)}.mh-dark .mouseListView-category-margin{padding-bottom:5px;color:var(--d-text-muted);background:var(--d-bg);border:1px solid var(--d-border);border-right:none;border-radius:10px 0 0 10px}.mh-dark .mouseListView-categoryContent-subgroupContainer,.mh-dark .mouseListView-categoryContent-subgroup-name,.mh-dark .mouseListView-categoryContent-weaknessesContainer{background-color:var(--d-alt);border:1px solid var(--d-border)}.mh-dark .mouseListView-categoryContent-subgroupContainer{border-radius:10px}.mh-dark .mouseListView-categoryContent-subgroup-name{margin:0;background-color:#3a3a3a;border:none;border-bottom:1px solid var(--d-border)}.mh-dark .mouseListView-categoryContent:before{left:0;background-color:var(--d-border)}.mh-dark .mouseListView-categoryContainer.active{color:var(--d-text-dark)}.mh-dark .mouseListView-categoryContainer.active .mouseListView-category-progress,.mh-dark .mouseListView-categoryContainer.active .mouseListView-category-name,.mh-dark .mouseListView-categoryContent-subgroup-mouse-margin{color:var(--d-text)}.mh-dark .adversariesPage-list-header{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .adversariesPage-list-header label{color:var(--d-text)}.mh-dark .mouseListView-categoryContent-subgroup-mouse.stats:nth-child(odd){background-color:var(--d-bg)}.mh-dark .mouseListView-categoryContent-filter-option{margin-left:1px;color:var(--d-link);background-color:var(--d);border:1px solid var(--d-border)}.mh-dark .mouseListView-categoryContent-subgroup-mouse.stats.header{background-color:var(--d)!important}.mh-dark .mouseListView-categoryContent-subgroup-miceContainer{border:none}.mh-dark .mouseListView-category,.mh-dark .mouseListView-category:hover{background:none}.mh-dark .mouseListView-category:hover .mouseListView-category-margin,.mh-dark .mouseListView-categoryContainer.active .mouseListView-category .mouseListView-category-margin{color:var(--d-text-muted);background-color:var(--d-blue-extra-dark)}.mh-dark .mouseListView-category{padding-bottom:5px}.mh-dark .mouseListView-category.complete .mouseListView-category-status,.mh-dark .mouseListView-subcategory.complete:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/camp/re_engagement/popup/check.png);background-size:contain}.mh-dark .mouseListView-categoryContent-category{background-color:transparent}.mh-dark .mouseListView-subcategory{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .mouseListView-categoryContainer.active .mouseListView-category{padding-bottom:3px;background:none}.mh-dark .mouseListView-categoryContainer.active .mouseListView-subcategory:hover{color:var(--d-text-muted);background-color:var(--d-blue-extra-dark)}.mh-dark #overlayPopup.mouseViewPopup .jsDialogContainer .content{background-color:#3a3a3a}.mh-dark .mouseCrownsView-group{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:0 0 1px 1px var(--d-border)}.mh-dark .mouseCrownsView-group-mouse.highlight.favourite{border-color:var(--d-border)}.mh-dark .mouseCrownsView-group.favourite .mouseCrownsView-group-header{background-color:var(--d-transparent-10)!important;box-shadow:0 0 1px 1px var(--d-border)}.mh-dark .mouseCrownsView-group-header-name{color:var(--d-text)}.mh-dark .mouseCrownsView-group-header b{color:var(--d-text-dark)}.mh-dark .mouseCrownsView-group.favourite .mouseCrownsView-group-header b{color:var(--d-text)}.mh-dark .mouseCrownsView-group.diamond .mouseCrownsView-group-header{box-shadow:inset 0 0 1px 1px #b6d9fc}.mh-dark .mouseCrownsView-group.diamond{background-color:var(--d-blue-extra-dark);box-shadow:0 0 1px 1px var(--d-blue-dark)}.mh-dark .mouseCrownsView-group.gold{background-color:var(--d-yellow);box-shadow:0 0 1px 1px var(--d-yellow-dark)}.mh-dark .mouseCrownsView-group.silver{background-color:var(--d-blue-dark);box-shadow:0 0 1px 1px var(--d-blue)}.mh-dark .mouseCrownsView-group.platinum{background-color:var(--d-purple-dark);box-shadow:0 0 1px 1px var(--d-purple)}.mh-dark .mouseCrownsView-group.bronze{background-color:var(--d-orange);box-shadow:0 0 1px 1px var(--d-orange-dark)}
`;
  }
});

// src/modules/native-dark-mode/styles/mouse-view.css
var mouse_view_default, init_mouse_view = __esm({
  "src/modules/native-dark-mode/styles/mouse-view.css"() {
    mouse_view_default = `.mh-dark .mouseView-title{color:var(--d-text)}.mh-dark .minluck-title,.mh-dark .mouseview-has-mhct .ar-header{border-bottom-color:var(--d-bg)}.mh-dark .mouseview-has-mhct .mouse-ar-wrapper{background-color:var(--d)}.mh-dark .mouseview-has-mhct .mouse-ar-wrapper:nth-child(odd){background-color:var(--d-alt)}.mh-dark li.minluck-item{background-color:var(--d-alt);border-color:var(--d-bg-alt)}.mh-dark .mouseView-categoryContent-subgroup-mouse-weaknesses-label{border-color:var(--d-bg-alt)}.mh-dark .mouseView-statsContainer-block{background-color:var(--d-yellow-dark)}.mh-dark .minluck-title,.mh-dark .mouseview-has-mhct .ar-header,.mh-dark .mouseView-titleContainer{border-bottom-color:var(--d-bg-alt)}.mh-dark .mouseview-has-mhct .ar-link{color:var(--d-link)}
`;
  }
});

// src/modules/native-dark-mode/styles/news.css
var news_default, init_news = __esm({
  "src/modules/native-dark-mode/styles/news.css"() {
    news_default = `.mh-dark .mousehuntHeaderView-newsTicker{border-color:var(--d-border)}.mh-dark .mousehuntHeaderView-newsTicker a{color:var(--d-link)}.mh-dark .mousehuntHeaderView-newsTicker .label{color:var(--d-text)}.mh-dark #mousehuntContainer.PageNewsPost,.mh-dark #mousehuntContainer.PageNews,.mh-dark #mousehuntContainer .PageNews{background:transparent}.mh-dark .newsArchivesListView-post{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .newsArchivesListView-post a{color:var(--d-link)}.mh-dark .newsArchivesListView.loading .newsArchivesListView-page:before{background:none}
`;
  }
});

// src/modules/native-dark-mode/styles/overlays.css
var overlays_default3, init_overlays3 = __esm({
  "src/modules/native-dark-mode/styles/overlays.css"() {
    overlays_default3 = `.mh-dark #overlayPopup .jsDialogContainer .content{color:var(--d-text);background-color:var(--d-bg)}.mh-dark #overlayPopup .jsDialogContainer{background-color:var(--d-bg)}.mh-dark #overlayPopup .jsDialogContainer .suffix{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark #overlayBg{background:var(--d-transparent-70)}.mh-dark #overlayPopup .jsDialog.bottom{background-color:var(--d-alt);border-radius:0 0 15px 15px}.mh-dark .mh-improved-travel-window.greatWinterHuntGolemDestinationView{background-color:var(--d-bg)}.mh-dark .mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentName{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment{background-color:var(--d-bg-alt);border-color:var(--d-border);border-radius:0;box-shadow:none}.mh-dark .mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:hover .greatWinterHuntGolemDestinationView__environmentName,.mh-dark .mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:focus .greatWinterHuntGolemDestinationView__environmentName{background-color:var(--d-action)}.mh-dark #overlayPopup .button,.mh-dark .notificationMessageList .message .actions input[type=button],.mh-dark .notificationMessageList .message .actions input[value="View Profile"],.mh-dark .notificationMessageList .message .actions input[value="View Profile"].ignoreRequest.ignoreRequest{box-shadow:0 -5px 8px -2px #ffae00 inset}.mh-dark #overlayPopup h2,.mh-dark #overlayPopup h3{color:var(--d-text)}.mh-dark #overlayPopup.tornPage .tornPageText p{color:var(--d-text-muted)}.mh-dark #overlayPopup .jsDialogContainer .prefix{background-color:var(--d-bg)}.mh-dark .inventoryPage-confirmPopup-itemContainer{background-color:var(--d-bg-alt)}.mh-dark .inventoryPage-confirmPopup-itemTable{background-color:var(--d-bg)}.mh-dark .inventoryPage-confirmPopup-itemContainer.received{background-color:var(--d-bg-alt)}.mh-dark .inventoryPage-confirmPopup-suffix-quantityContainer input{color:var(--d-text);background-color:var(--d);border-color:var(--d-border);border-width:1px}.mh-dark #overlayPopup.floatingIslandsDialog .jsDialogContainer .content{color:var(--d-text-dark);background-color:transparent}.mh-dark .itemView-loading{background:none;box-shadow:none}.mh-dark .mh-ui-assignment-meta-wrapper{color:var(--d-text)}.mh-dark .mh-ui-assignment-wiki-button{color:var(--d-link)}.mh-dark .mh-ui-assignment-details-summary{color:var(--d-text)}.mh-dark .mh-ui-assignment-details-task-title,.mh-dark .mh-ui-assignment-details-title{color:var(--d-text-muted)}.mh-dark #overlayPopup .img .name{color:var(--d-text)}.mh-dark .mousehuntCharacterGuideBox-content{background-color:var(--d-yellow-dark)}.mh-dark #overlayPopup.loading .jsDialogContainer .suffix{background-blend-mode:darken}.mh-dark .convertibleOpenView-header{background-color:var(--d)}.mh-dark .convertibleOpenView-header a{color:var(--d-link)}
`;
  }
});

// src/modules/native-dark-mode/styles/page.css
var page_default, init_page2 = __esm({
  "src/modules/native-dark-mode/styles/page.css"() {
    page_default = `.mh-dark .pageFrameView-content,.mh-dark .mousehuntHeaderView,.mh-dark #mousehuntContainer,.mh-dark .pageSidebarView,.mh-dark .bg-color{background-color:var(--d)}.mh-dark #mousehuntContainer.PageCamp{background:var(--d);box-shadow:none}
`;
  }
});

// src/modules/native-dark-mode/styles/premium.css
var premium_default, init_premium = __esm({
  "src/modules/native-dark-mode/styles/premium.css"() {
    premium_default = `.mh-dark a.MHCheckoutRootView-viewTOSButton{color:var(--d-link)}.mh-dark #overlayPopup.MHCheckout .jsDialogContainer .content{color:#000}
`;
  }
});

// src/modules/native-dark-mode/styles/profile.css
var profile_default2, init_profile2 = __esm({
  "src/modules/native-dark-mode/styles/profile.css"() {
    profile_default2 = `.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock,.mh-dark .hunterInfoView-wrapper .friendsProfileView-container,.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock,.mh-dark .hunterInfoView-wrapper div.messageBoardView-message-container,.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContentContainer{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .hunterInfoView-wrapper .friendsProfileView-container a{color:var(--d-link)}.mh-dark .teamPage-messageBoard-corkboard .messageBoardView-message.new,.mh-dark .hunterInfoView-corkBoardBlock div.messageBoardView-message.new{background-color:transparent;border-color:transparent!important}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock .hunterInfoView-favoritesBlock-body,.mh-dark .hunterInfoView-achievementsBlock .mousehuntTabContentContainer-padding{background-color:var(--d-bg)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock .hunterInfoView-favoritesBlock-body,.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-noMice,.mh-dark .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound,.mh-dark .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-label,.mh-dark .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-ranking{color:var(--d-text)}.mh-dark .mh-dark .hunterInfoView-corkBoardBlock .messageBoardView-message{background-color:var(--d)}.mh-dark input.messageBoardView-message-submit,.mh-dark input.messageBoardView-message-submit[type=submit],.mh-dark .hunterInfoView-wrapper .friendsProfileView-container a.friendsProfileView-randomFriend{color:var(--d-text);text-shadow:none;background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-header{color:var(--d-text);background:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .messageBoardView-title{background-color:var(--d-bg-alt)}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow{background:var(--d-bg);outline:1px solid var(--d-border)}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail,.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-stat.online .friendsPage-friendRow-stat-value{color:var(--d-text)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container:before,.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container,.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-huntingSince,.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container,.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats{color:var(--d-text);background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container .teamEmblemView{border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats .hunterInfoView-idCardBlock-stats-item-desc{color:var(--d-text-muted)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-hunterId{color:var(--d-link);background-color:var(--d)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-hunterId:hover{font-weight:400;color:var(--d-purple)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-floatingTooltip{color:var(--d-text-dark)}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-statsContainer{background-color:var(--d-alt);box-shadow:none}.mh-dark .hunterInfoView-wrapper .friendsPage-friendRow-statsContainer .friendsPage-friendRow-stat-value{color:var(--d-text)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-container{border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .itemImage.disabled{box-shadow:none}.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader span{color:var(--d-text);text-shadow:none;box-shadow:none}.mh-dark .hunterInfoView-wrapper .messageBoardView-title,.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader{color:var(--d-text);background:var(--d-bg-alt);border-color:var(--d-border);box-shadow:none}.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader{background:var(--d-alt)}.mh-dark .mh-dark .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader.active{background:var(--d-bg-alt)}.mh-dark .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:hover,.mh-dark .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:focus{background:var(--d-bg-alt)}.mh-dark a.hunterProfileItemsView-filter{color:var(--d-link)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader.active{background:var(--d-bg-alt)}.mh-dark .hunterInfoView-wrapper .messageBoardView .pagerView-container{background-color:var(--d);border-color:var(--d-border)}.mh-dark .hunterInfoView-wrapper .messageBoardView .pagerView-link{border:none}.mh-dark .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamName span{color:var(--d-link)}.mh-dark .mh-improved-fancy-profile .mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-statsContainer .friendsPage-friendRow-stat-value,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container:before,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-huntingSince,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail,.mh-dark .mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-stat .friendsPage-friendRow-stat-value,.mh-dark .mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message-body{color:var(--d-text-dark)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseLabel{color:var(--d-text-muted)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-tabDot{background-color:var(--d-alt);border-color:var(--d-bg)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-tabDot.active{background-color:var(--d-orange-dark);border-color:var(--d-orange)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-container-arrow-icon.right{border-left-color:var(--d-text-muted)}.mh-dark .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-container-arrow-icon.left{border-right-color:var(--d-text-muted)}.mh-dark a.hunterInfoView-playerActionsBlock-item-text{color:var(--d-link)}
`;
  }
});

// src/modules/native-dark-mode/styles/progress-log.css
var progress_log_default2, init_progress_log2 = __esm({
  "src/modules/native-dark-mode/styles/progress-log.css"() {
    progress_log_default2 = `.mh-dark #overlayPopup.hunting_summary .miceContainer,.mh-dark #overlayPopup.hunting_summary .environmentContainer,.mh-dark #overlayPopup.hunting_summary .baitContainer,.mh-dark #overlayPopup.hunting_summary .lootContainer{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark #overlayPopup.hunting_summary .label{color:var(--d-text);background-color:var(--d);border-color:var(--d-border)}.mh-dark #overlayPopup.hunting_summary .miceContainer a,.mh-dark #overlayPopup.hunting_summary .baitContainer a,.mh-dark #overlayPopup.hunting_summary .lootContainer a{color:var(--d-text)}
`;
  }
});

// src/modules/native-dark-mode/styles/quests.css
var quests_default, init_quests = __esm({
  "src/modules/native-dark-mode/styles/quests.css"() {
    quests_default = `.mh-dark .mh-ui-assignment-meta,.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content b{color:var(--d-text)}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .jsDialogContainer .suffix,.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .smashQuest a,.mh-dark .mh-ui-assignment-meta a{color:var(--d-link)}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content{background-color:var(--d-alt)}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup .jsDialogContainer .content{padding:10px}.mh-dark #overlayPopup.zugzwangsLibraryQuestShopPopup #jsDialogAjaxPrefix{margin-bottom:0;border-color:transparent}
`;
  }
});

// src/modules/native-dark-mode/styles/scoreboards.css
var scoreboards_default2, init_scoreboards2 = __esm({
  "src/modules/native-dark-mode/styles/scoreboards.css"() {
    scoreboards_default2 = `.mh-dark .scoreboardTableView-content{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .scoreboardTableView-table th{color:var(--d-text);border-color:var(--d-border);border-width:1px}.mh-dark .scoreboardTableView-filters label{color:var(--d-text-muted)}.mh-dark tr.scoreboardTableView-row.viewer,.mh-dark tr.scoreboardTableView-row.highlight{color:var(--d-text-dark)}.mh-dark .scoreboardTableView-table a{color:var(--d-link)}.mh-dark .scoreboardTableView-table .highlight a{color:var(--d-text-dark)}.mh-dark .scoreboardTableView-header{background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .scoreboardTableView-header-title{color:var(--d-text);text-shadow:none}.mh-dark .scoreboardTableView-content .pagerView-container{border:none;border-top:1px solid var(--d-border)}.mh-dark .scoreboardTableView-content .pagerView-section.previous.active .pagerView-link,.mh-dark .scoreboardTableView-content .pagerView-section.next.active .pagerView-link{color:var(--d-text-muted)}.mh-dark .scoreboardTableView-separator hr{background-color:var(--d-border);border:none}.mh-dark .tournamentPage-tournamentHeader{color:var(--d-text);text-shadow:none;background-color:var(--d-bg);border-color:var(--d-border);box-shadow:none}.mh-dark .scoreboardTableView-tournament{background-color:var(--d-yellow)}
`;
  }
});

// src/modules/native-dark-mode/styles/send-supplies.css
var send_supplies_default, init_send_supplies = __esm({
  "src/modules/native-dark-mode/styles/send-supplies.css"() {
    send_supplies_default = `.mh-dark #supplytransfer .categoryMenu a{color:var(--d-link);background-color:var(--d)}.mh-dark #supplytransfer .drawer{background-color:var(--d)}.mh-dark #supplytransfer .drawer .tabContent h2,.mh-dark span.mhui-supply-sort-label,.mh-dark .mhui-supply-search-form label{color:var(--d-text)}.mh-dark #supplytransfer .listContainer a.element.item{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #supplytransfer .listContainer a.element.item.pinned,.mh-dark #supplytransfer .categoryMenu a:hover{color:var(--d-text-dark)}.mh-dark #supplytransfer .listContainer a.element:hover,.mh-dark #supplytransfer .listContainer a.element.recipient:hover,.mh-dark #supplytransfer .listContainer a.element.item.pinned:hover,.mh-dark #supplytransfer .tabs .tab .image:hover,.mh-dark #supplytransfer .tabs .tab .image.empty:hover{color:var(--d-text-dark);background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark #supplytransfer .tabs .tab .image:hover,.mh-dark #supplytransfer .tabs .tab .image.empty:hover{color:var(--d-link)}.mh-dark #supplytransfer .listContainer a.element.item:hover{background-color:var(--d-blue-dark)}.mh-dark #supplytransfer .listContainer a.element.recipient{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #supplytransfer .drawer .tabContent .summary .box{background-color:var(--d-bg)}.mh-dark #supplytransfer .tabContent.recipient .listContainer span.content{color:var(--d-link)}.mh-dark #supplytransfer .listContainer a.element .details{color:var(--d-text)}.mh-dark #supplytransfer .drawer .tabContent a{color:var(--d-link)}.mh-dark #supplytransfer .drawer .tabContent.confirm #supplytransfer-confirm-send:hover{color:var(--d-text);background-color:var(--d-blue-dark)}.mh-dark #supplytransfer .tabs{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark #supplytransfer .friendList.listContainer{border-top:none}.mh-dark #supplytransfer .listContainer.friendList label{color:var(--d-text-muted)}
`;
  }
});

// src/modules/native-dark-mode/styles/settings.css
var settings_default28, init_settings29 = __esm({
  "src/modules/native-dark-mode/styles/settings.css"() {
    settings_default28 = `.mh-dark .PagePreferences__title,.mh-dark .mousehunt-improved-settings .PagePreferences__title,.mh-dark .PagePreferences__section,.mh-dark .mousehunt-improved-settings .PagePreferences__section,.mh-dark #mousehunt-improved-settings-location-hud .PagePreferences__title{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .PagePreferences__separator,.mh-dark #mousehunt-improved-settings-design-custom-background,.mh-dark #mousehunt-improved-settings-design-custom-hud,.mh-dark #mousehunt-improved-settings-design-custom-horn,.mh-dark #mousehunt-improved-settings-design-custom-shield,.mh-dark #mousehunt-improved-settings-feature-ultimate-checkmark-categories,.mh-dark #mousehunt-improved-settings-feature-ultimate-checkmark-show,.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList,.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting{border-color:var(--d-border)}.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting:nth-child(odd){background-color:var(--d-alt)}.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting{border-color:var(--d-alt)}.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-better:before,.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-feature:before,.mh-dark .mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-beta:before,.mh-dark #mousehunt-improved-settings-design-custom-background:before,.mh-dark #mousehunt-improved-settings-design-custom-horn:before,.mh-dark #mousehunt-improved-settings-design-custom-hud:before,.mh-dark #mousehunt-improved-settings-design-custom-shield:before,.mh-dark #mousehunt-improved-settings-feature-ultimate-checkmark-show:before{filter:invert(1)}.mh-dark h3.PagePreferences__titleText,.mh-dark .PagePreferences .mousehuntHud-page-tabContent.game_settings .PagePreferences__settingNameText,.mh-dark .PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__settingNameText{color:var(--d-text)}.mh-dark .PagePreferences__settingDescription{color:var(--d-text-muted)}.mh-dark #mousehunt-improved-settings-location-hud .PagePreferences__settingsList:nth-child(2n){background-color:var(--d)}.mh-dark #mousehunt-improved-settings-mousehunt-improved-settings-overrides-override-styles textarea,.mh-dark #mousehunt-improved-settings-mousehunt-improved-settings-overrides-override-flags input{color:var(--d-text);background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .mousehuntSettingSlider{border-color:var(--d-border);box-shadow:0 0 7px var(--d-border) inset}.mh-dark .accountVerificationRewardsView__step.claimed{color:var(--d-text-dark);background-color:var(--d-green)}.mh-dark .accountVerificationRewardsView__step.can_claim{color:var(--d-text-dark);background-color:var(--d-yellow)}.mh-dark .mousehuntHud-page-tabContent.game_settings a,.mh-dark .mousehunt-improved-settings-export-details a{color:var(--d-link)}.mh-dark .mousehunt-improved-advanced-buttons{border-color:var(--d-border)}.mh-dark .mousehuntHud-page-tabContent.game_settings a.reset-link{color:var(--d-red)}.mh-dark .mh-utils-settings-refresh-message{color:var(--d-text-dark)}
`;
  }
});

// src/modules/native-dark-mode/styles/shops.css
var shops_default2, init_shops2 = __esm({
  "src/modules/native-dark-mode/styles/shops.css"() {
    shops_default2 = `.mh-dark .inventoryPage-item-content-description-consumedItem.error{color:var(--d-red-dark)}.mh-dark .inventoryPage-item-content-description-consumedItem-image{margin-left:0}.mh-dark .itemPurchaseView-container.donation .itemPurchaseView-action-container,.mh-dark .itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-container,.mh-dark .itemPurchaseView-container:hover .itemPurchaseView-margin,.mh-dark .itemPurchaseView-container:hover .itemPurchaseView-image-container,.mh-dark .itemPurchaseView-container:hover .itemPurchaseView-content-container,.mh-dark .itemPurchaseView-container .itemPurchaseView-margin,.mh-dark .itemPurchaseView-image-container,.mh-dark .itemPurchaseView-content-container{background-color:var(--d-bg)}.mh-dark .itemPurchaseView-container{border-color:var(--d-border)}.mh-dark .itemPurchaseView-content-description{color:var(--d-text-muted)}.mh-dark .itemPurchaseView-action-container{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .itemPurchaseView-action-goldGost,.mh-dark .itemPurchaseView-action-purchaseHelper-owned{color:var(--d-text-muted);background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .itemPurchaseView-action-itemCost-table-cell.cost{color:var(--d-green);text-shadow:none}.mh-dark .itemPurchaseView-action-itemCost-table-row.error .itemPurchaseView-action-itemCost-table-cell.cost,.mh-dark .itemPurchaseView-action-itemCost-table .itemPurchaseView-action-itemCost-table-row.error a{color:var(--d-red-darker)}.mh-dark .itemPurchaseView-action-itemCost-table-cell.owned{color:var(--d-text)}.mh-dark .error .itemPurchaseView-action-itemCost-table-cell.owned{color:var(--d-red-dark)}.mh-dark.shopCustomization .PageShops .itemPurchaseView-container .itemViewStatBlock-stat.title,.mh-dark .itemPurchaseView-container .itemViewStatBlock-stat.powerType,.mh-dark.shopCustomization .PageShops .itemViewStatBlock.horizontal .itemViewStatBlock-stat{background-color:var(--d-bg-alt);border-color:var(--d-border)}.mh-dark .itemViewStatBlock-stat.success,.mh-dark .itemViewStatBlock-stat.success .itemViewStatBlock-stat-value a{color:var(--d-green)}.mh-dark .itemPurchaseView-action-itemCost-table{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .itemPurchaseView-container.donation .itemPurchaseView-action-itemCost-table{background-color:var(--d-yellow)}.mh-dark .itemPurchaseView-action-itemCost-table a{color:var(--d-text)}.mh-dark .shopsPage-otherEnvironment{background-color:var(--d-bg);border-color:var(--d-border)}.mh-dark .itemPurchaseView-action-marketplace a,.mh-dark .itemPurchaseView-content-description a,.mh-dark a.itemPurchaseView-content-skin-link{color:var(--d-link)}.mh-dark .shopCustomization .PageShops .itemViewStatBlock-stat{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .shopsPage-compareEquipment{background-color:var(--d-blue-dark)}.mh-dark .itemPurchaseView-action-confirm-button-row a{color:var(--d-link)}.mh-dark .itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-complete-title,.mh-dark .itemPurchaseView-container .itemPurchaseView-action-complete-title,.mh-dark .itemPurchaseView-action-complete-title,.mh-dark .itemPurchaseView-action-armed-title,.mh-dark span.itemPurchaseView-action-confirm-refund.noRefund:after{color:var(--d-text)}
`;
  }
});

// src/modules/native-dark-mode/styles/sidebar.css
var sidebar_default5, init_sidebar5 = __esm({
  "src/modules/native-dark-mode/styles/sidebar.css"() {
    sidebar_default5 = `.mh-dark .mh-improved-map-sidebar-goal-image,.mh-dark .mh-improved-mice-sidebar-mouse-image{box-shadow:inset 0 0 0 1px var(--d-border)}.mh-dark .mh-improved-map-sidebar-goal:hover,.mh-dark .mh-improved-mice-sidebar-mouse:hover{background-color:var(--d-bg)}.mh-dark .mh-improved-mice-sidebar,.mh-dark .mh-improved-map-sidebar{border-color:var(--d-border)}.mh-dark .mh-improved-mice-sidebar-title,.mh-dark .mh-improved-map-sidebar-title{color:var(--d-text);background-color:var(--d-bg)}.mh-dark .scoreboardRelativeRankingTableView-table{background-color:var(--d-bg);border:1px solid var(--d-border)}.mh-dark .scoreboardRelativeRankingTableView tr{color:var(--d-text)}.mh-dark .scoreboardRelativeRankingTableView th{color:var(--d-text-dark)}
`;
  }
});

// src/modules/native-dark-mode/styles/tabs.css
var tabs_default3, init_tabs3 = __esm({
  "src/modules/native-dark-mode/styles/tabs.css"() {
    tabs_default3 = `.mh-dark .mousehuntHud-page-tabHeader span,.mh-dark .mousehuntHud-page-tabHeader.active span,.mh-dark .mousehuntHud-page-tabHeader:hover span,.mh-dark .mousehuntHud-page-tabHeader:focus span{color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border);border-bottom-color:var(--d-alt);box-shadow:1px 1px 1px var(--d-border)}.mh-dark .mousehuntHud-page-tabHeader.active span,.mh-dark .mousehuntHud-page-tabHeader:hover span{background-color:var(--d);border-bottom-color:var(--d);box-shadow:1px 1px 1px var(--d)}
`;
  }
});

// src/modules/native-dark-mode/styles/team.css
var team_default2, init_team2 = __esm({
  "src/modules/native-dark-mode/styles/team.css"() {
    team_default2 = `.mh-dark .teamPage-messageBoard-corkboard div.messageBoardView-message-container{box-shadow:none}
`;
  }
});

// src/modules/native-dark-mode/styles/travel.css
var travel_default, init_travel = __esm({
  "src/modules/native-dark-mode/styles/travel.css"() {
    travel_default = `.mh-dark .travelPage-regionMenu-environments,.mh-dark #mh-simple-travel-page .travelPage-regionMenu-item,.mh-dark #mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environments{background-color:var(--d)}.mh-dark .travelPage-regionMenu-environmentLink.relic-hunter-is-here,.mh-dark .mousehuntHud-page-tabContent.simple-travel .travelPage-regionMenu-environmentLink.relic-hunter-is-here{color:var(--d-text);background-color:var(--d-green-dark);outline-color:var(--d-alt)}.mh-dark #mh-simple-travel-page .travelPage-regionMenu-environmentLink:hover,.mh-dark #mh-simple-travel-page .travelPage-regionMenu-environmentLink:focus,.mh-dark #mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight,.mh-dark #mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environmentLink.active.highlight{color:var(--d-text);background-color:var(--d-blue)}.mh-dark .travelPage-regionMenu-stats{color:var(--d-text);background-color:var(--d-alt)}.mh-dark #mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight{margin-right:-1px;border-right:none}.mh-dark .travelPage-regionMenu-item.active .travelPage-regionMenu-regionLink{background-color:var(--d-blue-dark);box-shadow:2px 2px 2px var(--d-blue-dark) inset}.mh-dark #mh-simple-travel-page .travelPage-regionMenu-item{border-color:var(--d-blue-dark)}.mh-dark a.travelPage-regionMenu-environmentLink,.mh-dark a.travelPage-regionMenu-regionLink,.mh-dark .travelPage-map-pieces-detail-title{background-color:var(--d);border-color:var(--d-border)}.mh-dark .travelPage-map-pieces-row{background-color:var(--d-alt);border-color:var(--d-border)}.mh-dark .travelPage-map-pieces-detail-environment-title{border:none}.mh-dark .travelPage-map-environment-detailContainer{background:var(--d);border-color:var(--d-border);border-bottom:none;box-shadow:none}.mh-dark .travelPage-regionMenu-environmentLink{color:var(--d-link)}.mh-dark .travelPage-map-pieces-detail-environment-name{color:var(--d-text)}.mh-dark .travelPage-map-pieces-row a{color:var(--d-link)}.mh-dark input.mh-improved-travel-window-search-input[type=text]{padding:10px;color:var(--d-text);background-color:var(--d-alt);border-color:var(--d-border)}
`;
  }
});

// src/modules/native-dark-mode/index.js
var imported7, styles7, init60, native_dark_mode_default, init_native_dark_mode = __esm({
  "src/modules/native-dark-mode/index.js"() {
    init_utils2();
    init_root();
    init_adventure2();
    init_camp_tabs();
    init_camp_trap();
    init_favorite_setups3();
    init_friends3();
    init_general6();
    init_gifts2();
    init_header_dropdown();
    init_header();
    init_hover_items();
    init_inbox2();
    init_inventory();
    init_item_view();
    init_journal_main();
    init_journal_misc_entries();
    init_kings_calibrator();
    init_maps4();
    init_marketplace();
    init_mice();
    init_mouse_view();
    init_news();
    init_overlays3();
    init_page2();
    init_premium();
    init_profile2();
    init_progress_log2();
    init_quests();
    init_scoreboards2();
    init_send_supplies();
    init_settings29();
    init_shops2();
    init_sidebar5();
    init_tabs3();
    init_team2();
    init_travel();
    imported7 = [root_default, adventure_default2, camp_tabs_default, camp_trap_default, favorite_setups_default3, friends_default3, general_default6, gifts_default2, header_dropdown_default, header_default, hover_items_default, inbox_default2, inventory_default, item_view_default, journal_main_default, journal_misc_entries_default, kings_calibrator_default, maps_default3, marketplace_default, mice_default, mouse_view_default, news_default, overlays_default3, page_default, premium_default, profile_default2, progress_log_default2, quests_default, scoreboards_default2, send_supplies_default, settings_default28, shops_default2, sidebar_default5, tabs_default3, team_default2, travel_default], styles7 = imported7, init60 = () => __async(void 0, null, function* () {
      addStyles(styles7, "native-dark-mode"), addExternalStyles("https://static.mouse.rip/dark-mode-mice-images.css"), addBodyClass("mh-dark");
    }), native_dark_mode_default = {
      id: "native-dark-mode",
      name: "Native Dark Mode",
      description: "Please disable the Dark Mode extension/MHCT setting to prevent conflicts.",
      type: "beta",
      default: !1,
      load: init60
    };
  }
});

// src/modules/paste-hunter-id/index.js
var maybeRedirectToHunterProfile, listenForIDPaste, init61, paste_hunter_id_default, init_paste_hunter_id = __esm({
  "src/modules/paste-hunter-id/index.js"() {
    maybeRedirectToHunterProfile = (text) => {
      var _a, _b;
      if (text.length > 30)
        return;
      if (text.match(/https:\/\/www.mousehuntgame.com/)) {
        window.location.href = text;
        return;
      }
      let id = text.match(/\d+/);
      id && (_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.setPage && hg.utils.PageUtil.setPage("HunterProfile", {
        id: id[0]
      }, (data) => {
        var _a2, _b2;
        let snuid = data.tabs.profile.subtabs[0].snuid;
        snuid && ((_b2 = (_a2 = hg == null ? void 0 : hg.utils) == null ? void 0 : _a2.PageUtil) != null && _b2.showHunterProfile) && hg.utils.PageUtil.showHunterProfile(snuid);
      });
    }, listenForIDPaste = () => {
      window.addEventListener("paste", (e) => {
        /* eslint-disable @wordpress/no-global-active-element */
        document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement || document.activeElement instanceof HTMLSelectElement || maybeRedirectToHunterProfile(e.clipboardData.getData("text"));
      });
    }, init61 = () => __async(void 0, null, function* () {
      listenForIDPaste();
    }), paste_hunter_id_default = {
      id: "paste-hunter-id",
      name: "Paste Hunter ID",
      type: "feature",
      default: !0,
      description: "Copy a Hunter ID to your clipboard and then press Ctrl/Cmd+v anywhere to go directly to that hunter's profile.",
      load: init61
    };
  }
});

// src/modules/prestige-base-stats/index.js
var updateStats2, setPrestigeStats, isModifying, modifyPB, isSaving, savePbStats, run2, init62, prestige_base_stats_default, init_prestige_base_stats = __esm({
  "src/modules/prestige-base-stats/index.js"() {
    init_utils2();
    updateStats2 = (selector, pbStats) => {
      let stats = selector.querySelector(".campPage-trap-itemBrowser-item-statContainer");
      if (!stats)
        return;
      let currentSetup = getUserSetupDetails(), power = stats.querySelector(".campPage-trap-itemBrowser-item-stat.power");
      if (power) {
        let powerValue = power.querySelector(".value span");
        powerValue && (powerValue.innerText = pbStats.power, power.classList.remove("better", "worse"), currentSetup.base.power < pbStats.power ? power.classList.add("better") : currentSetup.base.power > pbStats.power && power.classList.add("worse"));
      }
      let luck = stats.querySelector(".campPage-trap-itemBrowser-item-stat.luck");
      if (luck) {
        let luckValue = luck.querySelector(".value span");
        luckValue && (luckValue.innerText = pbStats.luck, luck.classList.remove("better", "worse"), currentSetup.base.luck < pbStats.luck ? luck.classList.add("better") : currentSetup.base.luck > pbStats.luck && luck.classList.add("worse"));
      }
    }, setPrestigeStats = () => __async(void 0, null, function* () {
      let prestige = document.querySelector(".campPage-trap-itemBrowser-item.base.valour_rift_prestige_base");
      if (!prestige)
        return;
      let pbStats = yield cacheGet("pb-stats", !1);
      if (!pbStats)
        return;
      updateStats2(prestige, pbStats);
      let armed = document.querySelector(".campPage-trap-itemBrowser-armed-item.base");
      if (!armed)
        return;
      let name = armed.querySelector(".campPage-trap-itemBrowser-item-name");
      name && name.innerText.includes("Prestige Base") && updateStats2(armed, pbStats);
    }), isModifying = !1, modifyPB = (opts) => __async(void 0, null, function* () {
      if (isModifying)
        return;
      isModifying = !0;
      let activeBp = document.querySelector(".trapSelectorView__blueprint--active .trapSelectorView__browserStateParent");
      if (!activeBp) {
        isModifying = !1;
        return;
      }
      let bpType = activeBp.getAttribute("data-blueprint-type");
      if (!bpType || bpType !== "base") {
        isModifying = !1;
        return;
      }
      let { retryPrestige } = opts || {}, savedStats = yield cacheGet("pb-stats", !1);
      if (debuglog("prestige-base-stats", "Saved Prestige Base stats:", savedStats), !savedStats) {
        isModifying = !1;
        return;
      }
      let prestige = document.querySelector(".campPage-trap-itemBrowser-item.base.valour_rift_prestige_base");
      if (!prestige) {
        retryPrestige || setTimeout(() => {
          modifyPB({ retryPrestige: !0 });
        }, 500), isModifying = !1;
        return;
      }
      if (prestige.getAttribute("data-pinned")) {
        isModifying = !1;
        return;
      }
      let recommended = document.querySelector('.trapSelectorView__browserStateParent--items[data-blueprint-type="base"] .recommended');
      if (!recommended) {
        isModifying = !1;
        return;
      }
      let header = recommended.querySelector(".campPage-trap-itemBrowser-tagGroup-name");
      header && header.after(prestige), prestige.setAttribute("data-pinned", !0), setPrestigeStats(), isModifying = !1;
    }), isSaving = !1, savePbStats = () => {
      if (isSaving)
        return;
      if (isSaving = !0, getUserSetupDetails().base.id !== 2904) {
        isSaving = !1;
        return;
      }
      debuglog("prestige-base-stats", "Saving Prestige Base stats\u2026");
      let trapMath = document.querySelectorAll(".campPage-trap-trapStat-mathRow");
      if (!trapMath.length) {
        isSaving = !1;
        return;
      }
      let stats = {};
      if (trapMath.forEach((row) => {
        let stat = row.querySelector(".campPage-trap-trapStat-mathRow-name");
        if (!stat) {
          isSaving = !1;
          return;
        }
        if (!stat.innerText.includes("Prestige Base")) {
          isSaving = !1;
          return;
        }
        let value = row.querySelector(".campPage-trap-trapStat-mathRow-value");
        if (!value) {
          isSaving = !1;
          return;
        }
        let parsedValue = Number.parseInt(value.innerText.replaceAll(",", ""), 10), typeClass = row.parentElement.parentElement.className.replace("campPage-trap-trapStat", "").trim();
        typeClass === "power" ? parsedValue = parsedValue + 490 : typeClass === "luck" && (parsedValue = parsedValue + 5), stats[typeClass] = parsedValue;
      }), !stats.power || !stats.luck) {
        isSaving = !1;
        return;
      }
      debuglog("prestige-base-stats", "Prestige Base stats:", stats), cacheSet("pb-stats", stats), isSaving = !1;
    }, run2 = () => __async(void 0, null, function* () {
      modifyPB(), savePbStats();
    }), init62 = () => __async(void 0, null, function* () {
      onEvent("camp_page_toggle_blueprint", run2), onRequest("users/changetrap.php", run2);
    }), prestige_base_stats_default = {
      id: "prestige-base-stats",
      name: "Prestige Base Stats",
      type: "feature",
      default: !0,
      description: "Shows the correct stats for the Prestige Base in the base selector.",
      load: init62
    };
  }
});

// src/modules/printing-press-paper-counter/index.js
var init63, printing_press_paper_counter_default, init_printing_press_paper_counter = __esm({
  "src/modules/printing-press-paper-counter/index.js"() {
    init_utils2();
    init63 = () => __async(void 0, null, function* () {
      addTrapQuantity({
        baseIds: [3628, 3683],
        baseSlugs: ["naughty_list_printing_press_base", "folklore_printing_press_base"],
        itemId: "printing_press_charge_stat_item"
      });
    }), printing_press_paper_counter_default = {
      id: "printing-press-paper-counter",
      name: "Printing Press Paper Counter",
      type: "feature",
      default: !0,
      description: "Shows the number of Prolific Printing Papers you have for the Printing Press bases.",
      load: init63
    };
  }
});

// src/modules/quick-filters-and-sort/styles.css
var styles_default106, init_styles107 = __esm({
  "src/modules/quick-filters-and-sort/styles.css"() {
    styles_default106 = `.campPage-trap-itemBrowser-filter input[data-filter=search]{width:315px;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 .pageFrameView .campPage-trap-itemBrowser-favorites,.mh-dark-mode .campPage-trap-itemBrowser-quickLinks{background-color:#424242}.campPage-trap-itemBrowser-quickLinks-power{padding:10px 15px}.campPage-trap-itemBrowser-quickLinks-header{position:absolute;left:0;padding:5px;margin-top:10px;color:#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:40px;height:40px;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:31px;height:30px}.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{background-color:#f2f2f2}.trapSelectorView__browserStateParent--items[data-blueprint-type=skin] .campPage-trap-itemBrowser-quickLinks{display:none}.campPage-trap-itemBrowser-favorite-item.quicklinks-filter.quicklinks-filter-sortBy-name a{background-position:5px 4px}
`;
  }
});

// src/modules/quick-filters-and-sort/index.js
var addItemToQuickLinks, addQuickLinksToTrap, init64, quick_filters_and_sort_default, init_quick_filters_and_sort = __esm({
  "src/modules/quick-filters-and-sort/index.js"() {
    init_utils2();
    init_styles107();
    addItemToQuickLinks = (link, appendTo, filter) => {
      let existing = document.querySelector(`.campPage-trap-itemBrowser-favorite-item.quicklinks-filter.quicklinks-filter-${filter}-${link.id}`);
      existing && existing.remove();
      let item = document.createElement("div");
      item.classList.add("campPage-trap-itemBrowser-favorite-item", "quicklinks-filter", `quicklinks-filter-${filter}-${link.id}`);
      let 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})`;
      let frame = document.createElement("div");
      frame.classList.add("campPage-trap-itemBrowser-favorite-item-image-frame"), itemAnchor.append(frame);
      let hiddenInput = document.createElement("input");
      hiddenInput.setAttribute("type", "hidden"), hiddenInput.setAttribute("data-filter", filter), hiddenInput.setAttribute("value", link.id), item.append(itemAnchor), item.append(hiddenInput);
      let filterInput = document.querySelector(".campPage-trap-itemBrowser-filter.powerType select"), sortInput = document.querySelector(".campPage-trap-itemBrowser-filter.sortBy select");
      item.addEventListener("click", (e) => {
        e.preventDefault();
        let input = filter === "sortBy" ? sortInput : filterInput, reset = !1;
        item.getAttribute("data-selected") === "true" ? (reset = !0, item.setAttribute("data-selected", !1)) : (document.querySelectorAll('.quicklinks-filter[data-selected="true"]').forEach((i) => {
          i.setAttribute("data-selected", !1);
        }), item.setAttribute("data-selected", !0));
        let option;
        reset ? filter === "sortBy" ? option = input.querySelector('option[value="default"]') : filter === "powerType" && (option = input.querySelector('option[value="no_tag_selected"]')) : option = input.querySelector(`option[value="${link.id}"]`), option && (option.selected = !0, input.dispatchEvent(new Event("change")));
      }), appendTo.append(item);
    }, addQuickLinksToTrap = () => __async(void 0, null, function* () {
      let itemBrowser = document.querySelector(".trapSelectorView__itemBrowserContainer");
      if (!itemBrowser)
        return;
      let type = itemBrowser.classList.value.replaceAll("trapSelectorView__itemBrowserContainer", "").replaceAll("trapSelectorView__outerBlock", "").replaceAll("campPage-trap-itemBrowser", "").replaceAll(" ", "").trim();
      if (!type || type === "bai")
        return;
      itemBrowser.parentNode.parentNode.setAttribute("data-blueprint-type", type);
      let favorites = document.querySelector(".campPage-trap-itemBrowser-favorites");
      if (!favorites)
        return;
      let existing = document.querySelector(".campPage-trap-itemBrowser-quickLinks");
      existing && existing.remove();
      let existingPower = document.querySelector(".campPage-trap-itemBrowser-quickLinks-power");
      existingPower && existingPower.remove();
      let quickLinks = document.createElement("div");
      quickLinks.classList.add("campPage-trap-itemBrowser-quickLinks"), makeElement("div", "campPage-trap-itemBrowser-quickLinks-header", "Sort", quickLinks);
      let links = [
        {
          id: "power",
          name: "Power",
          image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_power.png"
        },
        {
          id: "power_bonus",
          name: "Power Bonus",
          image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_power_bonus.png"
        },
        {
          id: "luck",
          name: "Luck",
          image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_luck.png"
        },
        {
          id: "attraction_bonus",
          name: "Attraction Bonus",
          image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_attraction_bonus.png"
        },
        {
          id: "name",
          name: "Name",
          image: "https://i.mouse.rip/sort-a-z-icon.png"
        }
      ];
      type === "trinket" && links.push({ id: "quantity", name: "Quantity", image: "https://i.mouse.rip/sort-qty-icon.png" });
      let sortByInput = document.querySelector(".campPage-trap-itemBrowser-filter.sortBy select");
      if (links.forEach((link) => {
        addItemToQuickLinks(link, quickLinks, "sortBy", sortByInput);
      }), favorites.parentNode.insertBefore(quickLinks, favorites.nextSibling), type === "weapon") {
        let 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);
        let powerLinks = [
          {
            id: "arcane",
            name: "Arcane",
            image: "https://www.mousehuntgame.com/images/powertypes/arcane.png"
          },
          {
            id: "draconic",
            name: "Draconic",
            image: "https://www.mousehuntgame.com/images/powertypes/draconic.png"
          },
          {
            id: "forgotten",
            name: "Forgotten",
            image: "https://www.mousehuntgame.com/images/powertypes/forgotten.png"
          },
          {
            id: "hydro",
            name: "Hydro",
            image: "https://www.mousehuntgame.com/images/powertypes/hydro.png"
          },
          {
            id: "law",
            name: "Law",
            image: "https://www.mousehuntgame.com/images/powertypes/law.png"
          },
          {
            id: "physical",
            name: "Physical",
            image: "https://www.mousehuntgame.com/images/powertypes/physical.png"
          },
          {
            id: "rift",
            name: "Rift",
            image: "https://www.mousehuntgame.com/images/powertypes/rift.png"
          },
          {
            id: "shadow",
            name: "Shadow",
            image: "https://www.mousehuntgame.com/images/powertypes/shadow.png"
          },
          {
            id: "tactical",
            name: "Tactical",
            image: "https://www.mousehuntgame.com/images/powertypes/tactical.png"
          }
        ], powerInput = document.querySelector(".campPage-trap-itemBrowser-filter.powerType select");
        powerLinks.forEach((link) => {
          addItemToQuickLinks(link, powerQuickLinks, "powerType", powerInput);
        }), quickLinks.parentNode.insertBefore(powerQuickLinks, quickLinks.nextSibling);
      } else {
        let powerQuickLinks = document.querySelector(".campPage-trap-itemBrowser-quickLinks-power");
        powerQuickLinks && powerQuickLinks.remove();
      }
    }), init64 = () => __async(void 0, null, function* () {
      addStyles(styles_default106, "quick-filters-and-sort"), onRequest("users/gettrapcomponents.php", addQuickLinksToTrap), onEvent("camp_page_toggle_blueprint", addQuickLinksToTrap);
    }), quick_filters_and_sort_default = {
      id: "quick-filters-and-sort",
      name: "Quick Filters and Sort",
      type: "feature",
      default: !0,
      description: "Add quick filters and sorting to the trap, base, charm, and cheese selectors.",
      load: init64
    };
  }
});

// src/modules/quick-send-supplies/settings/index.js
var settings_default29, init_settings30 = __esm({
  "src/modules/quick-send-supplies/settings/index.js"() {
    init_utils2();
    settings_default29 = () => __async(void 0, null, function* () {
      let tradableItems = yield getTradableItems("type");
      return tradableItems.unshift({ name: "None", value: "none" }, { seperator: !0 }), [{
        id: "quick-send-supplies.items",
        title: "Items shown in popup",
        default: [
          {
            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"
          }
        ],
        settings: {
          type: "multi-select",
          number: 4,
          options: tradableItems
        }
      }];
    });
  }
});

// src/modules/quick-send-supplies/styles.css
var styles_default107, init_styles108 = __esm({
  "src/modules/quick-send-supplies/styles.css"() {
    styles_default107 = `.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%)}.treasureMapView-hunter-wrapper .quickSendWrapper{top:60px!important}.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}
`;
  }
});

// src/modules/quick-send-supplies/index.js
var makeItem, makeSendSuppliesButton, main20, addToMapUsers, init65, quick_send_supplies_default, init_quick_send_supplies = __esm({
  "src/modules/quick-send-supplies/index.js"() {
    init_utils2();
    init_settings30();
    init_styles108();
    makeItem = (name, type, image, appendTo) => {
      let item = makeElement("div", "quickSendItem");
      item.title = name;
      let itemImage = document.createElement("img");
      itemImage.setAttribute("src", image), itemImage.setAttribute("alt", name);
      let 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 = !0, document.querySelectorAll(".quickSendItem").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 !1;
      btn.setAttribute("data-quick-send", "true");
      let quickSendLinkWrapper = makeElement("form", ["quickSendWrapper", "hidden"]), itemsWrapper = makeElement("div", "itemsWrapper"), 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")
      ], allTradableItems = yield getTradableItems("all");
      for (let item of itemOptions) {
        let tradableItem = allTradableItems.find((i) => i.type === item);
        tradableItem && makeItem(tradableItem.name, tradableItem.type, tradableItem.image, itemsWrapper);
      }
      quickSendLinkWrapper.append(itemsWrapper);
      let quickSendGoWrapper = makeElement("div", "quickSendGoWrapper"), quickSendInput = makeElement("input", "quickSendInput");
      quickSendInput.setAttribute("type", "number"), quickSendInput.setAttribute("placeholder", "Quantity");
      let quickSendButton = makeElement("div", ["quickSendButton", "mousehuntActionButton", "tiny"], "<span>Send</span>"), sendIt = () => __async(void 0, null, function* () {
        if (quickSendButton.classList.contains("disabled"))
          return;
        let errorMessageOpts = {
          message: "There was an error sending supplies",
          append: quickSendGoWrapper,
          classname: "mh-ui-quick-send-error"
        }, qty = quickSendInput.value;
        if (!qty) {
          errorMessageOpts.message = "Quantity is required", showErrorMessage(errorMessageOpts);
          return;
        }
        let selected = document.querySelector(".quickSendItem.selected");
        if (!selected) {
          errorMessageOpts.message = "Item is required", showErrorMessage(errorMessageOpts);
          return;
        }
        let item = selected.querySelector(".quickSendItemRadio");
        if (!item) {
          errorMessageOpts.message = "Item is required", showErrorMessage(errorMessageOpts);
          return;
        }
        quickSendButton.classList.add("disabled");
        let itemType = item.getAttribute("value"), itemName = item.getAttribute("data-name"), 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}`;
        yield fetch(url, {
          method: "POST"
        }).then((response) => {
          response.status === 200 && (quickSendInput.value = "", quickSendButton.classList.remove("disabled"), showSuccessMessage({
            message: `Sent ${qty} ${itemName}!`,
            append: quickSendGoWrapper,
            classname: "mh-ui-quick-send-success"
          }));
        }).catch(() => {
          quickSendButton.classList.remove("disabled"), showErrorMessage({
            message: "There was an error sending supplies",
            append: quickSendGoWrapper,
            classname: "mh-ui-quick-send-error"
          });
        });
      });
      return quickSendButton.addEventListener("click", sendIt), quickSendInput.addEventListener("keydown", (event) => {
        event.key === "Enter" && sendIt();
      }), quickSendInput.addEventListener("keydown", (event) => {
        event.key === "Enter" && sendIt();
      }), quickSendGoWrapper.append(quickSendInput), quickSendGoWrapper.append(quickSendButton), quickSendLinkWrapper.append(quickSendGoWrapper), quickSendLinkWrapper;
    }), main20 = () => __async(void 0, null, function* () {
      let sendSupplies = document.querySelectorAll(".userInteractionButtonsView-button.sendSupplies");
      if (sendSupplies)
        for (let btn of sendSupplies) {
          if (btn.classList.contains("disabled") || btn.getAttribute("data-quick-send"))
            return;
          let snuid = btn.parentNode.parentNode.getAttribute("data-recipient-snuid");
          if (!snuid)
            return;
          let quickSendLinkWrapper = yield makeSendSuppliesButton(btn, snuid);
          quickSendLinkWrapper && (btn.parentNode ? btn.nextSibling ? btn.parentNode.insertBefore(quickSendLinkWrapper, btn.nextSibling) : btn.parentNode.append(quickSendLinkWrapper) : btn.append(quickSendLinkWrapper));
        }
    }), addToMapUsers = (attempts = 0) => __async(void 0, null, function* () {
      let mapUsers = document.querySelectorAll(".treasureMapView-hunter-wrapper.mousehuntTooltipParent");
      if (!mapUsers || !mapUsers.length) {
        attempts < 10 && setTimeout(() => {
          addToMapUsers(attempts + 1);
        }, 500 * (attempts + 1));
        return;
      }
      mapUsers.forEach((btn) => __async(void 0, null, function* () {
        if (btn.getAttribute("data-quick-send"))
          return;
        let snuid = btn.getAttribute("data-snuid");
        if (!snuid)
          return;
        let quickSendLinkWrapper = yield makeSendSuppliesButton(btn, snuid);
        quickSendLinkWrapper && btn.append(quickSendLinkWrapper);
      }));
    }), init65 = () => __async(void 0, null, function* () {
      addStyles(styles_default107, "quick-send-supplies"), main20(), onNavigation(main20), onRequest("*", () => {
        setTimeout(main20, 500);
      }), onEvent("profile_hover", main20), onDialogShow("map", addToMapUsers), onEvent("map_show_goals_tab_click", addToMapUsers), onEvent("map_tab_click", addToMapUsers);
    }), quick_send_supplies_default = {
      id: "quick-send-supplies",
      name: "Quick Send Supplies",
      type: "feature",
      default: !0,
      description: "Hover over the Send Supplies button on someone's profile or hover-profile to easily send any quantity an item.",
      load: init65,
      settings: settings_default29
    };
  }
});

// src/modules/replace-favicon/index.js
var replace, add, init66, replace_favicon_default, init_replace_favicon = __esm({
  "src/modules/replace-favicon/index.js"() {
    init_utils2();
    replace = () => {
      let favicon = document.querySelector("#favicon");
      favicon && (favicon.href = "https://i.mouse.rip/mh-icons/favicon.ico");
    }, add = () => {
      [
        { rel: "apple-touch-icon", sizes: "180x180", href: "https://i.mouse.rip/mh-icons/apple-touch-icon.png" },
        { rel: "icon", type: "image/png", sizes: "32x32", href: "https://i.mouse.rip/mh-icons/favicon-32x32.png" },
        { rel: "icon", type: "image/png", sizes: "16x16", href: "https://i.mouse.rip/mh-icons/favicon-16x16.png" },
        { rel: "mask-icon", href: "https://i.mouse.rip/mh-icons/safari-pinned-tab.svg", color: "#cfae00" }
      ].forEach((icon) => {
        let link = document.createElement("link");
        for (let key in icon)
          link.setAttribute(key, icon[key]);
        document.head.append(link);
      });
    }, init66 = () => __async(void 0, null, function* () {
      add(), replace(), onTurn(() => {
        setMultipleTimeout(replace, [1e3, 2e3, 3e3, 4e3, 5e3]);
      });
    }), replace_favicon_default = {
      id: "replace-favicon",
      name: "Replace Favicon",
      type: "feature",
      default: !1,
      description: "Replace the favicon with a more fitting one",
      load: init66
    };
  }
});

// src/modules/required/index.js
var checkForAutoHorn, hasAddedHornCountdownEvents, addHornCountdownEvents, addEvents, isJournalProcessing, processEntries, processSingleEntries, addJournalProcessingEvents, addDialogListeners, checkForMHCT, addSupportLink, init67, required_default, init_required = __esm({
  "src/modules/required/index.js"() {
    init_utils2();
    checkForAutoHorn = () => {
      let storageKeys = /* @__PURE__ */ new Set(["NOB-huntsLeft", "HornTimeDelayMax", "AutoSolveKR", "TrapCheckTimeDelayMax", "TrapCheckTimeOffset", "TrapCheckTimeDelayMin", "AutoSolveKRDelayMin", "AutoSolveKRDelayMax", "SaveKRImage", "autoPopupKR", "AggressiveMode", "HornTimeDelayMin"]);
      if (!Object.keys(localStorage).filter((key) => storageKeys.has(key)).length)
        return;
      let time = document.querySelector("#nextHornTimeElement"), msg = document.querySelector("#nobSpecialMessage");
      if (time || msg)
        try {
          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
            })
          });
        } catch (error) {
          console.error(error);
        }
    }, hasAddedHornCountdownEvents = !1, addHornCountdownEvents = () => {
      let locations = ["balacks_cove", "floating_islands"];
      if (!getSetting("lgs-reminder", !1) && !locations.includes(getCurrentLocation()) || hasAddedHornCountdownEvents)
        return;
      let hunterHornTimer = document.querySelector(".huntersHornView__timerState");
      if (hunterHornTimer) {
        let observer = new MutationObserver(() => {
          setInterval(() => {
            doInternalEvent("horn-countdown-tick-minute", hunterHornTimer.innerText);
          }, 6e4), observer.disconnect();
        });
        observer.observe(hunterHornTimer, { childList: !0 });
      }
      hasAddedHornCountdownEvents = !0;
    }, addEvents = () => {
      addHornCountdownEvents();
    }, isJournalProcessing = !1, processEntries = () => __async(void 0, null, function* () {
      if (isJournalProcessing || !(getCurrentPage() === "journal" || getCurrentPage() === "camp" || getCurrentPage() === "hunterprofile"))
        return;
      isJournalProcessing = !0;
      let entries = document.querySelectorAll(".journal .entry");
      for (let entry of entries)
        doInternalEvent("journal-entry", entry);
      isJournalProcessing = !1;
    }), processSingleEntries = () => __async(void 0, null, function* () {
      if (isJournalProcessing)
        return;
      isJournalProcessing = !0;
      let entriesEl = document.querySelectorAll(".jsingle .entry");
      for (let entry of entriesEl)
        doInternalEvent("journal-entry", entry);
      isJournalProcessing = !1;
    }), addJournalProcessingEvents = () => __async(void 0, null, function* () {
      [
        "better-journal.styles",
        "better-journal.replacements",
        "better-journal.list",
        "better-journal.gold-and-points",
        "better-journal.journal-history"
      ].some((setting) => getSetting(setting)) && (setMultipleTimeout(processEntries, [100, 500, 1e3]), onRequest("*", (data) => {
        setMultipleTimeout(processEntries, [100, 500, 1e3, 2500]), data.journal_markup && data.journal_markup.length > 0 && processSingleEntries(data.journal_markup);
      }, !0), onEvent("journal-history-entry-added", processEntries));
    }), addDialogListeners = () => {
      let currentDialog = null;
      onEvent("js_dialog_hide", () => {
        doEvent2("dialog-hide", currentDialog), doEvent2(`dialog-hide-${currentDialog}`);
      }), onDialogShow("all", () => {
        currentDialog = getCurrentDialog().replaceAll(" ", "-").toLowerCase(), doEvent2("dialog-show", currentDialog), doEvent2(`dialog-show-${currentDialog}`);
      });
    }, checkForMHCT = () => !!document.querySelector("#mhhh_version"), addSupportLink = () => {
      let description = document.querySelector("#overlayPopup .jsDialogContainer .contactUsForm .description");
      if (!description)
        return;
      let supportWrap = makeElement("div", "support-link");
      makeElement("p", "", "Before contacting support, please make sure that the issue isn't caused by MouseHunt Improved. If it is, please report it on the GitHub page.", supportWrap);
      let supportLink = makeElement("a", "", "Visit the MouseHunt Improved GitHub page");
      supportLink.href = "https://github.com/MHCommunity/mousehunt-improved/issues", supportLink.target = "_blank", supportWrap.append(supportLink), description.before(supportWrap);
    }, init67 = () => __async(void 0, null, function* () {
      getFlag("i-am-a-cheater-and-i-know-it") || (setTimeout(checkForAutoHorn, 5e3), onTurn(checkForAutoHorn, 5e3)), addEvents(), addDialogListeners(), addJournalProcessingEvents(), checkForMHCT(), onEvent("dialog-show-support", addSupportLink), onTravel(null, { callback: addEvents });
    }), required_default = {
      id: "_required",
      type: "required",
      alwaysLoad: !0,
      load: init67
    };
  }
});

// src/modules/scoreboard-search-on-profiles/styles.css
var styles_default108, init_styles109 = __esm({
  "src/modules/scoreboard-search-on-profiles/styles.css"() {
    styles_default108 = `.mh-improved-scoreboard-dropdown{width:100%;padding:5px;background-color:#fff9dc;border:1px solid #985f42;border-radius:3px}.mh-improved-scoreboard-results{margin-top:10px}.mh-improved-scoreboard-results table{width:100%}.mh-improved-scoreboard-loading{display:flex;height:30px;background-image:url(https://www.mousehuntgame.com/images/ui/loaders/drip_spinner.gif);background-repeat:no-repeat;background-position:top;background-size:30px}
`;
  }
});

// src/modules/scoreboard-search-on-profiles/index.js
var main21, init68, scoreboard_search_on_profiles_default, init_scoreboard_search_on_profiles = __esm({
  "src/modules/scoreboard-search-on-profiles/index.js"() {
    init_utils2();
    init_styles109();
    main21 = () => __async(void 0, null, function* () {
      let achievementsBlock = document.querySelector(".hunterInfoView-achievementsBlock");
      if (!achievementsBlock || achievementsBlock.getAttribute("data-added-scoreboard"))
        return;
      let teamTab = document.querySelector('.mousehuntTabHeaderContainer .mousehuntTabHeader[data-tab="team"]');
      if (!teamTab)
        return;
      let teamTabText = teamTab.querySelector("span");
      teamTabText && (teamTabText.textContent = "Tournaments");
      let teamTabContent = achievementsBlock.querySelector('.mousehuntTabContentContainer .mousehuntTabContent[data-tab="team"]');
      if (!teamTabContent)
        return;
      let friendName = document.querySelector(".friendsPage-friendRow-titleBar-name");
      if (!friendName)
        return;
      let scoreboardTab = teamTab.cloneNode(!0);
      scoreboardTab.setAttribute("data-tab", "scoreboard");
      let scoreboardTabText = scoreboardTab.querySelector("span");
      scoreboardTabText && (scoreboardTabText.textContent = "Scoreboards"), teamTab.after(scoreboardTab);
      let scoreboardTabContent = teamTabContent.cloneNode(!0);
      scoreboardTabContent.setAttribute("data-tab", "scoreboard");
      let tabContent = makeElement("div", "hunterInfoView-teamTab-content"), scoreboardDropdown = makeElement("select", "mh-improved-scoreboard-dropdown"), scoreboards2 = yield getData("scoreboards"), startingOpt = makeElement("option", "", "Select a scoreboard");
      startingOpt.value = "placeholder", startingOpt.setAttribute("disabled", !0), startingOpt.setAttribute("selected", !0), scoreboardDropdown.append(startingOpt);
      for (let scoreboard of scoreboards2) {
        let option = makeElement("option", "", scoreboard.name);
        option.value = scoreboard.id, scoreboardDropdown.append(option);
      }
      tabContent.append(scoreboardDropdown);
      let results = makeElement("div", "mh-improved-scoreboard-results");
      tabContent.append(results), scoreboardDropdown.addEventListener("change", (e) => __async(void 0, null, function* () {
        var _a;
        if (e.target.value === "placeholder" || !friendName.getAttribute("data-text") || !e.target.value)
          return;
        results.innerHTML = '<div class="mh-improved-scoreboard-loading"></div>';
        let response = yield doRequest("managers/ajax/pages/scoreboards.php", {
          action: "get_page",
          category: "main",
          scoreboard: e.target.value,
          page: 1,
          weekly: 0,
          friends_only: 0,
          search: friendName.getAttribute("data-text")
        }), data = (_a = response == null ? void 0 : response.scoreboard_page) == null ? void 0 : _a.rows;
        if (!data || !data.length) {
          results.innerHTML = '<div class="mh-improved-scoreboard-no-results">No results found.</div>';
          return;
        }
        let score = data[0];
        results.innerHTML = `<table class="scoreboardTableView">
  <tr class="scoreboardTableView-row viewer highlight">
    <td class="scoreboardTableView-row-rank scoreboardTableView-column ">
      <div class="tournament-team-rank">
        ${score.rank}
      </div>
    </td>
    <td class="scoreboardTableView-row-name scoreboardTableView-column">
      <a href="profile.php?snuid=${user.sn_user_id}" onclick="hg.utils.PageUtil.showHunterProfile('${user.sn_user_id}'); return false;">
        <div class="scoreboardTableView-titleIcon" style="background-image: url(${user.title_icon});"></div>
        ${score.name}
      </a>
    </td>
    <td class="scoreboardTableView-row-score scoreboardTableView-column">
      ${score.points_formatted}
    </td>
  </tr></table>`;
      })), scoreboardTabContent.replaceChildren(tabContent), teamTabContent.after(scoreboardTabContent), achievementsBlock.setAttribute("data-added-scoreboard", "true");
    }), init68 = () => __async(void 0, null, function* () {
      addStyles(styles_default108, "profile-scoreboard-search"), onNavigation(main21, {
        page: "hunterprofile"
      });
    }), scoreboard_search_on_profiles_default = {
      id: "profile-scoreboard-search",
      name: "Scoreboard Search on Profiles",
      type: "feature",
      default: !0,
      description: "Easily search for a friend on the scoreboard from their profile.",
      load: init68
    };
  }
});

// src/data/settings-icons.json
var settings_icons_default, init_settings_icons = __esm({
  "src/data/settings-icons.json"() {
    settings_icons_default = {
      better: [
        { id: "better-gifts", icon: "<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>" },
        { id: "better-inventory", icon: "<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>" },
        { id: "better-item-view", icon: "<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>" },
        { id: "better-journal", icon: "<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>" },
        { id: "better-kings-reward", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -4 24 24' width='28' fill='currentColor'><path d='M2.776 5.106L3.648 11h12.736l.867-5.98-3.493 3.02-3.755-4.827-3.909 4.811-3.318-2.918zm10.038-1.537l-.078.067.141.014 1.167 1.499 1.437-1.242.14.014-.062-.082 2.413-2.086a1 1 0 0 1 1.643.9L18.115 13H1.922L.399 2.7a1 1 0 0 1 1.65-.898L4.35 3.827l-.05.06.109-.008 1.444 1.27 1.212-1.493.109-.009-.06-.052L9.245.976a1 1 0 0 1 1.565.017l2.005 2.576zM2 14h16v1a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-1z'></path></svg>" },
        { id: "better-maps", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 24 24' width='28' fill='currentColor'><path d='M2 17.613l3.419-1.14A5 5 0 0 1 6 16.317V2.387L2 3.721v13.892zm-.662 2.328A1 1 0 0 1 0 19V3a1 1 0 0 1 .706-.956L5.419.473a5 5 0 0 1 3.162 0l3.47 1.157a3 3 0 0 0 1.898 0L18.662.059A1 1 0 0 1 20 1v16a1 1 0 0 1-.706.956l-4.713 1.571a5 5 0 0 1-3.162 0l-3.47-1.157a3 3 0 0 0-1.898 0l-4.713 1.571zM18 16.28V2.387l-3.419 1.14a5 5 0 0 1-.581.156v13.93l4-1.334zm-6 1.334V3.683a5 5 0 0 1-.581-.156L8 2.387v13.93a5 5 0 0 1 .581.156L12 17.613z'></path></svg>" },
        { id: "better-marketplace", icon: "<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>" },
        { id: "better-mice", icon: "<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>" },
        { id: "better-quests", icon: "<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>" },
        { id: "better-send-supplies", icon: "<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>" },
        { id: "better-shops", icon: "<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>" },
        { id: "better-tournaments", icon: "<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>" },
        { id: "better-travel", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-5 -2 24 24' width='28' fill='currentColor'><path d='M12 7A5 5 0 1 0 2 7c0 1.726 1.66 5.031 5 9.653 3.34-4.622 5-7.927 5-9.653zM7 20C2.333 13.91 0 9.577 0 7a7 7 0 1 1 14 0c0 2.577-2.333 6.91-7 13zm0-9a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'></path></svg>" },
        { id: "better-ui", icon: "<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>" }
      ],
      design: [
        { id: "custom-background", icon: "<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>" },
        { id: "custom-horn", icon: "<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>" },
        { id: "custom-hud", icon: "<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>" },
        { id: "custom-shield", icon: "<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>" }
      ],
      feature: [
        { id: "big-timer", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 24 24' width='28' fill='currentColor'><path d='M11 10h2a1 1 0 0 1 0 2h-3a1 1 0 0 1-1-1V6a1 1 0 1 1 2 0v4zm7.63-1.562a9 9 0 1 1-17.26 0 5 5 0 1 1 7.668-6.387 9.102 9.102 0 0 1 1.924 0 5 5 0 1 1 7.668 6.387zm-.938-2.113a3 3 0 0 0-4.48-3.735 9.03 9.03 0 0 1 4.48 3.735zM6.787 2.59a3 3 0 0 0-4.48 3.735 9.03 9.03 0 0 1 4.48-3.735zM10 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14z'></path></svg>" },
        { id: "catch-rate-estimate", icon: "<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>" },
        { id: "codex-at-bottom", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-5 -4.5 24 24' width='28' fill='currentColor'><path d='M8 11.243l3.95-3.95a1 1 0 1 1 1.414 1.414l-5.657 5.657a.997.997 0 0 1-1.414 0L.636 8.707A1 1 0 1 1 2.05 7.293L6 11.243V1.657a1 1 0 1 1 2 0v9.586z'></path></svg>" },
        { id: "copy-id", icon: "<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>" },
        { id: "dark-mode", icon: "<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>" },
        { id: "data-exporters", icon: "<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>" },
        { id: "delayed-menus", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-5 -7 24 24' width='28' fill='currentColor'><path d='M1 0h5a1 1 0 1 1 0 2H1a1 1 0 1 1 0-2zm7 8h5a1 1 0 0 1 0 2H8a1 1 0 1 1 0-2zM1 4h12a1 1 0 0 1 0 2H1a1 1 0 1 1 0-2z'></path></svg>" },
        { id: "delayed-tooltips", icon: "<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>" },
        { id: "favorite-setups", icon: "<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>" },
        { id: "fixes", icon: "<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.75 6.75a4.5 4.5 0 0 1-4.884 4.484c-1.076-.091-2.264.071-2.95.904l-7.152 8.684a2.548 2.548 0 1 1-3.586-3.586l8.684-7.152c.833-.686.995-1.874.904-2.95a4.5 4.5 0 0 1 6.336-4.486l-3.276 3.276a3.004 3.004 0 0 0 2.25 2.25l3.276-3.276c.256.565.398 1.192.398 1.852Z' /><path stroke-linecap='round' stroke-linejoin='round' d='M4.867 19.125h.008v.008h-.008v-.008Z' /></svg>" },
        { id: "flrt-helper", icon: "<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>" },
        { id: "hover-profiles", icon: "<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>" },
        { id: "image-upscaling", icon: "<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>" },
        { id: "inline-wiki", icon: "<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>" },
        { id: "inventory-lock-and-hide", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-5 -2 24 24' width='28' fill='currentColor'><path d='M2 12v6h10v-6H2zm10-2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2V5a5 5 0 1 1 10 0v5zm-2 0V5a3 3 0 1 0-6 0v5h6zm-3 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4z'></path></svg>" },
        { id: "journal-changer", icon: "<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.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125' /></svg>" },
        { id: "keyboard-shortcuts", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -5 24 24' width='28' fill='currentColor'><path d='M3 0h14a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3zm0 2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3zm0 4h2v2H3V6zm0-3h2v2H3V3zm0 6h2v2H3V9zm3 0h8v2H6V9zm0-3h2v2H6V6zm0-3h2v2H6V3zm3 3h2v2H9V6zm0-3h2v2H9V3zm6 6h2v2h-2V9zm-3-3h2v2h-2V6zm0-3h2v2h-2V3zm3 0h2v5h-2V3z'></path></svg>" },
        { id: "larger-codices", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 24 24' width='28' fill='currentColor'><path d='M12.586 2H11a1 1 0 0 1 0-2h4a1 1 0 0 1 1 1v4a1 1 0 0 1-2 0V3.414L9.414 8 14 12.586V11a1 1 0 0 1 2 0v4a1 1 0 0 1-1 1h-4a1 1 0 0 1 0-2h1.586L8 9.414 3.414 14H5a1 1 0 0 1 0 2H1a1 1 0 0 1-1-1v-4a1 1 0 0 1 2 0v1.586L6.586 8 2 3.414V5a1 1 0 1 1-2 0V1a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2H3.414L8 6.586 12.586 2z'></path></svg>" },
        { id: "larger-skin-images", icon: "<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 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z' /></svg>" },
        { id: "legacy-hud", icon: "<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.75 9h16.5m-16.5 6.75h16.5' /></svg>" },
        { id: "lgs-reminder", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -2 24 24' width='28' fill='currentColor'><path d='M2 4.386V8a9.02 9.02 0 0 0 3.08 6.787L8 17.342l2.92-2.555A9.019 9.019 0 0 0 14 8V4.386l-6-2.25-6 2.25zM.649 2.756L8 0l7.351 2.757a1 1 0 0 1 .649.936V8c0 3.177-1.372 6.2-3.763 8.293L8 20l-4.237-3.707A11.019 11.019 0 0 1 0 8V3.693a1 1 0 0 1 .649-.936z'></path></svg>" },
        { id: "location-catch-stats", icon: "<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>" },
        { id: "location-dashboard", icon: "<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>" },
        { id: "metric", icon: "<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>" },
        { id: "only-open-multiple", icon: "<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>" },
        { id: "open-all-but-one", icon: "<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>" },
        { id: "paste-hunter-id", icon: "<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>" },
        { id: "prestige-base-stats", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-5 -4 24 24' width='28' fill='currentColor'><path d='M1 0a1 1 0 0 1 1 1v14a1 1 0 0 1-2 0V1a1 1 0 0 1 1-1zm12 4a1 1 0 0 1 1 1v10a1 1 0 0 1-2 0V5a1 1 0 0 1 1-1zM7 8a1 1 0 0 1 1 1v6a1 1 0 0 1-2 0V9a1 1 0 0 1 1-1z'></path></svg>" },
        { id: "printing-press-paper-counter", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -2 24 24' width='28' fill='currentColor'><path d='M10.298 2H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V4.961L10.298 2zM3 0h8l5 4v13a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3z'></path></svg>" },
        { id: "profile-scoreboard-search", icon: "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='feather feather-award'><circle cx='12' cy='8' r='7'/><path d='M8.21 13.89 7 23l5-3 5 3-1.21-9.12'/></svg>" },
        { id: "quick-filters-and-sort", icon: "<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>" },
        { id: "quick-send-supplies", icon: "<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>" },
        { id: "replace-favicon", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -4 24 24' width='28' fill='currentColor'><path d='M2,4 L2,14 L18,14 L18,4 L2,4 Z M3,3 C3.55228475,3 4,2.55228475 4,2 C4,1.44771525 3.55228475,1 3,1 C2.44771525,1 2,1.44771525 2,2 C2,2.55228475 2.44771525,3 3,3 Z M6,3 C6.55228475,3 7,2.55228475 7,2 C7,1.44771525 6.55228475,1 6,1 C5.44771525,1 5,1.44771525 5,2 C5,2.55228475 5.44771525,3 6,3 Z M2,0 L18,0 C19.1045695,0 20,0.8954305 20,2 L20,14 C20,15.1045695 19.1045695,16 18,16 L2,16 C0.8954305,16 0,15.1045695 0,14 L0,2 C0,0.8954305 0.8954305,0 2,0 Z'></path></svg>" },
        { id: "shield-goes-to-camp", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -2 24 24' width='28' fill='currentColor'><path d='M2 4.386V8a9.02 9.02 0 0 0 3.08 6.787L8 17.342l2.92-2.555A9.019 9.019 0 0 0 14 8V4.386l-6-2.25-6 2.25zM.649 2.756L8 0l7.351 2.757a1 1 0 0 1 .649.936V8c0 3.177-1.372 6.2-3.763 8.293L8 20l-4.237-3.707A11.019 11.019 0 0 1 0 8V3.693a1 1 0 0 1 .649-.936z'></path></svg>" },
        { id: "show-auras", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 24 24' width='28' fill='currentColor'><path d='M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0 2C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10z'></path></svg>" },
        { id: "ssdb-teeth-counter", icon: "<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 10.5h.375c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125H21M4.5 10.5h6.75V15H4.5v-4.5ZM3.75 18h15A2.25 2.25 0 0 0 21 15.75v-6a2.25 2.25 0 0 0-2.25-2.25h-15A2.25 2.25 0 0 0 1.5 9.75v6A2.25 2.25 0 0 0 3.75 18Z' /></svg>" },
        { id: "taller-windows", icon: "<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>" },
        { id: "tem-crowns", icon: "<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>" },
        { id: "ultimate-checkmark-show", icon: "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 11.08V12a10 10 0 1 1-5.93-9.14'></path><polyline points='22 4 12 14.01 9 11.01'></polyline></svg>" },
        { id: "wisdom-in-stat-bar", icon: "<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>" }
      ],
      beta: [
        { id: "native-dark-mode", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 24 24' width='28' fill='currentColor'><path d='M10 18c.112 0 .112-5.333 0-16a8 8 0 1 0 0 16zm0 2C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10z'></path></svg>" },
        { id: "sticky-popups", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-0.5 -1 24 24' width='28' fill='currentColor'><path d='M18.799 9.957l-1.121-1.121a1 1 0 1 1 1.414-1.415l2.828 2.829a1 1 0 0 1 0 1.414l-2.828 2.828a1 1 0 0 1-1.414-1.414l1.121-1.121h-6.485v6.485l1.121-1.121a1 1 0 0 1 1.414 1.414l-2.828 2.829a1 1 0 0 1-1.414 0l-2.829-2.829a1 1 0 0 1 1.414-1.414l1.122 1.121v-6.485H3.828l1.122 1.121a1 1 0 0 1-1.414 1.414L.707 11.664a1 1 0 0 1 0-1.414L3.536 7.42A1 1 0 0 1 4.95 8.836l-1.122 1.12h6.486V3.473L9.192 4.593a1 1 0 0 1-1.414-1.414L10.607.35a1 1 0 0 1 1.414 0l2.828 2.829a1 1 0 1 1-1.414 1.414l-1.121-1.121v6.485h6.485z'></path></svg>" },
        { id: "unique-loot-count", icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 24 24' width='28' fill='currentColor'><path d='M6 0h8a6 6 0 0 1 6 6v8a6 6 0 0 1-6 6H6a6 6 0 0 1-6-6V6a6 6 0 0 1 6-6zm0 2a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h8a4 4 0 0 0 4-4V6a4 4 0 0 0-4-4H6zm6 7h3a1 1 0 0 1 0 2h-3a1 1 0 0 1 0-2zm-2 4h5a1 1 0 0 1 0 2h-5a1 1 0 0 1 0-2zm0-8h5a1 1 0 0 1 0 2h-5a1 1 0 1 1 0-2zm-4.172 5.243L7.95 8.12a1 1 0 1 1 1.414 1.415l-2.828 2.828a1 1 0 0 1-1.415 0L3.707 10.95a1 1 0 0 1 1.414-1.414l.707.707z'></path></svg>" }
      ]
    };
  }
});

// src/modules/settings/settings/index.js
var settings_default30, init_settings31 = __esm({
  "src/modules/settings/settings/index.js"() {
    settings_default30 = () => __async(void 0, null, function* () {
      return [{
        id: "mh-improved-advanced-settings",
        title: "",
        default: !0,
        description: "",
        settings: {
          type: "blank"
        }
      }];
    });
  }
});

// src/modules/settings/styles.css
var styles_default109, init_styles110 = __esm({
  "src/modules/settings/styles.css"() {
    styles_default109 = `.mousehunt-improved-settings .PagePreferences__section{padding:10px;margin:10px 0;border:1px solid #e0cfb4}.mousehunt-improved-settings .PagePreferences__title{padding-bottom:10px;margin:0}.mousehunt-improved-settings .PagePreferences__titleText{position:relative;display:flex;gap:10px;justify-content:flex-start;font-family:system-ui,sans-serif;font-weight:200}.mousehunt-improved-settings .PagePreferences__settingNameText{color:#000;cursor:default}.mousehunt-improved-settings .PagePreferences__settingNameText:hover{text-decoration:none}.mousehunt-improved-settings .mhui-setting-toggle{position:absolute;top:10px;right:15px;width:0;height:0;border-right:6px solid transparent;border-bottom:9px solid #999;border-left:6px solid transparent;transition:transform .15s}.mousehunt-improved-settings .mhui-setting-toggle.toggled{transform:rotate(-180deg)}.mousehunt-improved-settings .toggled .PagePreferences__titleText,.mousehunt-improved-settings .toggled .PagePreferences__title{padding:0}.mousehunt-improved-settings .toggled .PagePreferences__separator,.mousehunt-improved-settings .toggled .PagePreferences__sectionWrapper,.mousehunt-improved-settings .toggled #mousehunt-improved-settings-location-hud-wrapper{height:0;overflow:hidden;visibility:hidden}#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-show,.mousehunt-improved-settings .PagePreferences__settingsList{position:relative;gap:0;padding:5px 0 5px 45px;border-color:#f2ebde;border-top:1px solid #f2ebde;border-left:none}#mousehunt-improved-settings-beta-experiments,#mousehunt-improved-settings-advanced .PagePreferences__settingsList,#mousehunt-improved-settings-design .PagePreferences__settingsList,#mousehunt-improved-settings-element-hiding .PagePreferences__settingsList{padding-left:10px}.mousehunt-improved-settings .PagePreferences__settingsList:not(.PagePreferences__subSetting):before,#mousehunt-improved-settings-feature-ultimate-checkmark-show: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:opacity .1s ease-out;will-change:transform}.mousehunt-improved-settings .PagePreferences__setting{gap:5px;align-items:center;padding-right:5px;margin:3px 0}.mousehunt-improved-settings .PagePreferences__setting .PagePreferences__settingAction{margin-bottom:0}.mousehunt-improved-settings .PagePreferences__settingDefault,#mousehunt-improved-settings-beta-experiments>.PagePreferences__setting .PagePreferences__settingAction,#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingDescription,#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList .PagePreferences__settingDefault{display:none}.mousehunt-improved-settings .PagePreferences__settingName{font-family:system-ui,sans-serif;font-weight:400}.mousehunt-improved-settings .PagePreferences__settingDescription{max-width:550px;padding:5px 0;font-family:system-ui,sans-serif;font-weight:400}#mousehunt-improved-settings-design .PagePreferences__settingDescription,#mousehunt-improved-settings-element-hiding .PagePreferences__settingDescription{display:none}.mousehunt-improved-settings .PagePreferences__subSetting .PagePreferences__settingDescription{padding-bottom:0}.mousehunt-improved-settings .PagePreferences__subSetting .PagePreferences__settingDescription.empty-description,.mousehunt-improved-settings .PagePreferences__settingDescription.empty-description{padding:0}.mousehunt-improved-settings .PagePreferences__settingsList .PagePreferences__subSetting{display:none;padding:5px 10px 5px 5px;margin-left:5px;border-top:none;border-left:1px solid #f2ebde}#mousehunt-improved-settings-location-hud .PagePreferences__title{margin-bottom:5px;border-bottom:1px solid #f2ebde}#mousehunt-improved-settings-advanced.toggled .PagePreferences__title,#mousehunt-improved-settings-location-hud.toggled .PagePreferences__title{margin-bottom:0;border:none}.mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting{display:block}.mousehunt-improved-settings .PagePreferences__settingsList .PagePreferences__subSetting:nth-child(odd){background-color:#f4f4f4}.PagePreferences__subSetting .PagePreferences__settingName{font-size:12px;line-height:1}.mousehunt-improved-settings .PagePreferences__settingsList.active .PagePreferences__subSetting .PagePreferences__setting{display:flex;padding:0;margin:0}.mousehunt-improved-settings .active.highlight .mousehuntSettingSlider:before{box-shadow:0 0 3px #0ac2c2 inset}.mousehunt-improved-settings .inputBoxContainer.multiSelect{display:flex;flex-flow:row wrap;justify-content:flex-end;max-width:400px}.mousehunt-improved-settings .inputBox.multiSelect{margin-right:4px;font-size:11px}#mousehunt-improved-settings-better-better-send-supplies-pinned-items .inputBox.multiSelect{max-width:160px}#mousehunt-improved-settings-design .inputBox.multiSelect{width:200px}.mousehunt-improved-settings .PagePreferences__subSetting .multi-toggle-row .PagePreferences__settingName{font-size:10px;line-height:1.75}.mousehunt-improved-settings .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}.mousehunt-improved-settings .PagePreferences__subSetting .mousehuntSettingSlider{display:block;width:40px;height:16px}.mousehunt-improved-settings .PagePreferences__subSetting .mousehuntSettingSlider:after{width:14px;height:14px}.mousehunt-improved-settings .PagePreferences__subSetting .mousehuntSettingSlider.active:after{left:calc(100% - 14px)}.mousehunt-improved-settings .PagePreferences__settingsList-textarea .PagePreferences__setting,.mousehunt-improved-settings .PagePreferences__settingsList-input .PagePreferences__setting{display:grid;grid-template-columns:1fr 400px}.mousehunt-improved-settings input,.mousehunt-improved-settings textarea{width:100%;font-family:monospace;font-size:12px;background-color:#eee;border:1px solid #ccc}.mousehunt-improved-settings textarea{min-height:45px}#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-show>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-advanced-override-flags>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-advanced-override-styles>div>div>.PagePreferences__settingName{font-size:15px;line-height:1}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingAction,.mousehunt-improved-settings .multi-toggle .mousehuntSettingSlider{display:block;transform:scale(.75)}#mousehunt-improved-settings-location-hud-wrapper{display:flex;flex-flow:column wrap;gap:0 5px;place-content:center start;align-content:stretch;align-items:stretch;height:375px}div#mousehunt-improved-settings-location-hud-location-huds-enabled-region-living-garden{margin-top:auto}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList{padding:0 5px 0 10px;margin-left:0;background-color:inherit;border:none}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList:nth-child(2n){background-color:#eee}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList.highlight{background-color:#7af7f8}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList .PagePreferences__setting{display:flex;gap:0;height:25px;padding:0;margin:0}#mousehunt-improved-settings-location-hud-wrapper .PagePreferences__settingsList .PagePreferences__settingName{font-size:11px}#mousehunt-improved-settings-advanced{position:relative}#mousehunt-improved-settings-advanced-mh-improved-advanced-settings{position:absolute;top:13px;right:50px;padding:0;visibility:visible;border:none}#mousehunt-improved-settings-feature-quick-send-supplies-items .inputBoxContainer .multiSelect{max-width:150px;margin-right:4px}#mousehunt-improved-settings-better-better-send-supplies-pinned-items .inputBoxContainer.multiSelect{max-width:550px}#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:10px 20px}.mousehunt-improved-settings-export-popup-tip{display:flex;grid-column:1 / 3;align-items:center}.mousehunt-improved-settings-export-popup-buttons-buttons,.mousehunt-improved-settings-export-popup-buttons{position:relative;display:flex;flex-direction:column;gap:10px;align-items:stretch;justify-content:flex-end}.mousehunt-improved-settings-export-popup-left{align-items:stretch}.mousehunt-improved-settings-export-popup-content textarea{height:90%;min-height:400px;padding:10px;font-family:ui-monospace,Menlo,Monaco,Cascadia Mono,Segoe UI Mono,Roboto Mono,Oxygen Mono,"Ubuntu Monospace",Source Code Pro,Fira Mono,Droid Sans Mono,Courier New,monospace;font-size:12px;background-color:#f6f6f6;border:1px solid #b3b3b3}.mousehunt-improved-settings-export-details{display:flex;flex-direction:column;gap:10px;margin-bottom:auto}.mousehunt-improved-settings-export-details .export-reset{color:#ff4242}.mousehunt-improved-settings-export-details hr{width:100%;height:1px;background-color:#b3b3b3;border:none}.mousehunt-improved-settings-export-details code{padding:3px}.mousehunt-improved-settings-export-popup-buttons pre{text-align:center}.mh-ui-success-message.settings-export-save-success,.mh-ui-success-message.settings-export-copy-success{position:absolute;right:-25px;bottom:50px;left:-25px;padding:4px}.mh-ui-success-message.settings-export-copy-success{top:25px;bottom:unset}.mh-ui-success-message.settings-export-save-success{bottom:100px}.mousehunt-improved-settings-export-popup-content .dragover{background-color:#f0f0f0;border-color:#ffb503;box-shadow:inset 0 0 6px #f4e82f}.mousehunt-improved-settings-export-popup .suffix{display:none}.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) 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-settings em{font-style:italic}.mousehunt-improved-advanced-buttons{display:flex;flex-direction:column;gap:10px;padding:10px 0 5px 5px;border-top:1px solid #f2ebde}a.reset-link{color:#f30000}
`;
  }
});

// src/modules/settings/index.js
var addExportSettings, addClearCache, addAdvancedSettingsButtons, highlightLocationHud, addTogglesToSettings, moveTabToEnd, addMhImprovedIconToMenu, makeModuleIconStyles, linkVersionNumber, init69, settings_default31, init_settings32 = __esm({
  "src/modules/settings/index.js"() {
    init_utils2();
    init_settings_icons();
    init_settings31();
    init_styles110();
    addExportSettings = (append) => {
      let existing = document.querySelector(".mousehunt-improved-export-settings");
      existing && existing.remove();
      let exportSettings = makeElement("div", ["mousehunt-improved-export-settings", "mousehuntActionButton", "tiny"]);
      return makeElement("span", "", "Import / Export Settings", exportSettings), exportSettings.addEventListener("click", (e) => {
        e.preventDefault(), e.stopPropagation();
        let settings2 = JSON.stringify(JSON.parse(localStorage.getItem("mousehunt-improved-settings")), null, 2), content = `<div class="mousehunt-improved-settings-export-popup-content">
  <div class="mousehunt-improved-settings-export-popup-tip">
    To import settings, drag and drop the file into the box below, or paste the text in the box.
  </div>
  <textarea id="mousehunt-improved-settings-text" spellcheck="false">${settings2}</textarea>
  <div class="mousehunt-improved-settings-export-popup-buttons">
    <div class="mousehunt-improved-settings-export-details">
      <a href="#" class="export-copy">Copy to clipboard</a>
      <a href="#" class="export-download">Download file</a>
      <hr>
      <a href="#" class="export-upload">Upload file</a>
      <a href="#" class="export-format">Format</a>
      <a href="#" class="export-reset">Reset to default</a>
    </div>
    <div class="mousehunt-improved-settings-export-popup-buttons-buttons">
      <div class="mousehuntActionButton save">
        <span>Save</span>
      </div>
      <div class="mousehuntActionButton cancel">
        <span>Cancel</span>
      </div>
    </div>
  </div>`, popup = createPopup({
          title: `MouseHunt Improved Settings <code>v${mhImprovedVersion}</code>`,
          content,
          className: "mousehunt-improved-settings-export-popup",
          show: !0
        });
        localStorage.setItem("mousehunt-improved-settings-backup", JSON.stringify(getSettings()));
        let popupElement = document.querySelector(".mousehunt-improved-settings-export-popup");
        if (!popupElement)
          return;
        let textarea = popupElement.querySelector("textarea");
        textarea.addEventListener("dragover", (dragevent) => {
          dragevent.preventDefault(), textarea.classList.add("dragover");
        }), textarea.addEventListener("drop", (dropevent) => {
          var _a, _b;
          if (dropevent.preventDefault(), textarea.classList.remove("dragover"), !((_b = (_a = dropevent.dataTransfer) == null ? void 0 : _a.files) != null && _b.length))
            return;
          let file = dropevent.dataTransfer.files[0], reader = new FileReader();
          reader.onload = (loadEvent) => {
            textarea.value = loadEvent.target.result;
          }, reader.readAsText(file);
        }), document.querySelector(".export-upload").addEventListener("click", (evt) => {
          evt.preventDefault();
          let input = document.createElement("input");
          input.type = "file", input.accept = ".json", input.addEventListener("change", (changeEvent) => {
            var _a, _b;
            if (!((_b = (_a = changeEvent == null ? void 0 : changeEvent.target) == null ? void 0 : _a.files) != null && _b.length))
              return;
            let file = changeEvent.target.files[0], reader = new FileReader();
            reader.onload = (loadEvent) => {
              textarea.value = loadEvent.target.result;
            }, reader.readAsText(file);
          }), input.click();
        }), document.querySelector(".export-reset").addEventListener("click", (evt) => {
          evt.preventDefault(), textarea.value = JSON.stringify({
            "mh-improved-platform": mhImprovedPlatform,
            "mh-improved-version": mhImprovedVersion
          }, null, 2);
        }), document.querySelector(".export-format").addEventListener("click", (evt) => {
          evt.preventDefault();
          let currentSettings = JSON.parse(textarea.value), sorted = Object.keys(currentSettings).sort((a, b) => a.startsWith("mh-improved") && !b.startsWith("mh-improved") ? -1 : b.startsWith("mh-improved") && !a.startsWith("mh-improved") ? 1 : a.localeCompare(b)), newSettings = {};
          sorted.forEach((key) => {
            newSettings[key] = currentSettings[key];
          }), textarea.value = JSON.stringify(newSettings, null, 2);
        });
        let saveButton = popupElement.querySelector(".mousehuntActionButton.save");
        saveButton.addEventListener("click", () => {
          let newSettings = textarea.value;
          localStorage.setItem("mousehunt-improved-settings-backup", localStorage.getItem("mousehunt-improved-settings")), localStorage.setItem("mousehunt-improved-settings", newSettings), showSuccessMessage({
            message: "Settings saved. Refreshing\u2026",
            append: saveButton,
            after: !0,
            classname: "settings-export-save-success"
          }), setTimeout(() => {
            window.location.reload();
          });
        });
        let copyButton = popupElement.querySelector(".export-copy");
        copyButton.addEventListener("click", (evt) => {
          evt.preventDefault(), navigator.clipboard.writeText(textarea.value), showSuccessMessage({
            message: "Settings copied to clipboard.",
            append: copyButton,
            after: !0,
            classname: "settings-export-copy-success"
          });
        }), popupElement.querySelector(".export-download").addEventListener("click", (evt) => {
          evt.preventDefault();
          let link = document.createElement("a");
          link.download = "mousehunt-improved-settings.json", link.href = `data:application/json;base64,${btoa(settings2)}`, link.click();
        }), popupElement.querySelector(".mousehuntActionButton.cancel").addEventListener("click", () => {
          popup.hide();
        });
      }), append.append(exportSettings), exportSettings;
    }, addClearCache = (append) => {
      let existing = document.querySelector(".mousehunt-improved-clear-cache");
      existing && existing.remove(), makeMhButton({
        text: "Clear Cached Data",
        size: "tiny",
        className: "mousehunt-improved-clear-cache",
        appendTo: append,
        callback: () => __async(void 0, null, function* () {
          if (window.confirm("Are you sure you want to clear the cached data?")) {
            yield clearCaches();
            for (let key of Object.keys(sessionStorage))
              key.startsWith("mh-improved") && sessionStorage.removeItem(key);
            localStorage.removeItem(`mh-improved-cached-ar-v${mhImprovedVersion}`), window.location.reload();
          }
        })
      });
    }, addAdvancedSettingsButtons = () => {
      let settingInput = document.querySelector("#mousehunt-improved-settings-advanced-mh-improved-advanced-settings .PagePreferences__setting");
      settingInput && (addExportSettings(settingInput), addClearCache(settingInput));
      let settingWrapper = document.querySelector("#mousehunt-improved-settings-advanced-wrapper");
      if (!settingWrapper)
        return;
      let existing = document.querySelector(".mousehunt-improved-advanced-buttons");
      existing && existing.remove();
      let buttonsWrapper = makeElement("div", "mousehunt-improved-advanced-buttons"), resetJournalLink = makeElement("a", "reset-link", "Reset Journal History");
      resetJournalLink.href = "#", resetJournalLink.addEventListener("click", (e) => __async(void 0, null, function* () {
        e.preventDefault(), window.confirm("Are you sure you want to reset your journal history?") && (yield dbDeleteAll("journal"), window.location.reload());
      })), buttonsWrapper.append(resetJournalLink);
      let resetDashboardLink = makeElement("a", "reset-link", "Reset Location Dashboard");
      resetDashboardLink.href = "#", resetDashboardLink.addEventListener("click", (e) => __async(void 0, null, function* () {
        e.preventDefault(), window.confirm("Are you sure you want to reset your dashboard data?") && (yield cacheSet("quests", {}), window.location.reload());
      })), buttonsWrapper.append(resetDashboardLink), settingWrapper.append(buttonsWrapper);
    }, highlightLocationHud = () => {
      let locationHudSettings = document.querySelector(`#mousehunt-improved-settings-location-hud-location-huds-enabled-${getCurrentLocation()}`);
      locationHudSettings && locationHudSettings.classList.add("highlight");
    }, addTogglesToSettings = () => {
      let settingsPage = document.querySelectorAll(".PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__section");
      if (!settingsPage)
        return;
      document.querySelectorAll(".mhui-setting-toggle").forEach((toggle) => {
        toggle.remove();
      });
      let toggledSections = getSetting("settings.toggled-sections", ["mousehunt-improved-settings-beta", "mousehunt-improved-settings-advanced"]);
      settingsPage.forEach((setting) => {
        let toggle = makeElement("div", "mhui-setting-toggle"), titleText = setting.querySelector(".PagePreferences__titleText");
        titleText.childNodes.length > 1 ? titleText.insertBefore(toggle, titleText.childNodes[1]) : titleText.append(toggle), titleText.addEventListener("click", (event) => {
          event.preventDefault(), toggledSections = getSetting("settings.toggled-sections", ["mousehunt-improved-settings-beta", "mousehunt-improved-settings-advanced"]), setting.classList.contains("toggled") ? (setting.classList.remove("toggled"), toggle.classList.remove("toggled"), toggledSections = toggledSections.filter((section) => section !== setting.id)) : (setting.classList.add("toggled"), toggle.classList.add("toggled"), toggledSections.push(setting.id)), saveSetting("settings.toggled-sections", toggledSections);
        }), toggledSections.includes(setting.id) ? (setting.classList.add("toggled"), toggle.classList.add("toggled")) : (setting.classList.remove("toggled"), toggle.classList.remove("toggled"));
      });
    }, moveTabToEnd = () => {
      let mhImprovedTab = document.querySelector("#mousehunt-improved-settings");
      if (!mhImprovedTab)
        return;
      let userscriptTab = document.querySelector("#userscript-settings");
      userscriptTab && userscriptTab.after(mhImprovedTab);
    }, addMhImprovedIconToMenu = () => {
      addIconToMenu({
        id: "mousehunt-improved-icon-menu",
        href: "https://www.mousehuntgame.com/preferences.php?tab=mousehunt-improved-settings",
        title: "MouseHunt Improved Settings",
        position: "append",
        /**
         * The action to perform when the icon is clicked.
         *
         * @param {Event} e The event.
         */
        action: (e) => {
          getCurrentPage() === "preferences" && getCurrentTab() === "mousehunt-improved-settings" && (e.preventDefault(), setPage("Camp"));
        }
      });
    }, makeModuleIconStyles = () => Object.entries(settings_icons_default).map(
      ([category, icons]) => icons.map(
        (icon) => `#mousehunt-improved-settings-${category}-${icon.id}::before {
      background-image: url('data:image/svg+xml,${icon.icon.replaceAll("'", '"')}');
    }`
      ).join("")
    ).join(""), linkVersionNumber = () => {
      let version = document.querySelector("#mousehunt-improved-settings-better .PagePreferences__title .version");
      version && (version.addEventListener("click", (e) => {
        e.preventDefault(), e.stopPropagation(), doEvent2("mh-improved-show-update-summary");
      }), version.title = "Click to view the update summary");
    }, init69 = () => __async(void 0, null, function* () {
      addStyles([
        styles_default109,
        makeModuleIconStyles()
      ], "mousehunt-improved-settings"), addMhImprovedIconToMenu(), onNavigation(() => {
        moveTabToEnd(), highlightLocationHud(), addAdvancedSettingsButtons(), linkVersionNumber(), getSetting("experiments.new-settings-styles-columns", !1) || addTogglesToSettings();
      }, {
        page: "preferences",
        tab: "mousehunt-improved-settings"
      });
    }), settings_default31 = {
      id: "_settings",
      type: "advanced",
      alwaysLoad: !0,
      load: init69,
      settings: settings_default30
    };
  }
});

// src/modules/shield-goes-to-camp/index.js
var campToggle, init70, shield_goes_to_camp_default, init_shield_goes_to_camp = __esm({
  "src/modules/shield-goes-to-camp/index.js"() {
    init_utils2();
    campToggle = () => {
      let shield = document.querySelector(".mousehuntHud-shield");
      shield && (getCurrentPage() === "camp" ? shield.setAttribute("onclick", "hg.utils.PageUtil.showHunterProfile()") : shield.setAttribute("onclick", 'hg.utils.PageUtil.setPage("camp")'));
    }, init70 = () => __async(void 0, null, function* () {
      onNavigation(campToggle);
    }), shield_goes_to_camp_default = {
      id: "shield-goes-to-camp",
      name: "Shield Goes to Camp",
      type: "feature",
      default: !1,
      description: "On any page that isn't the Camp page, clicking the shield will take you to the Camp page, otherwise it will take your to your Hunter Profile",
      load: init70
    };
  }
});

// src/modules/show-auras/settings/index.js
var settings_default32, init_settings33 = __esm({
  "src/modules/show-auras/settings/index.js"() {
    settings_default32 = () => __async(void 0, null, function* () {
      return [
        {
          id: "show-auras.list",
          title: "Show auras as a list",
          default: !1
        },
        {
          id: "show-auras.icons",
          title: "Only show icons",
          default: !1
        }
      ];
    });
  }
});

// src/modules/show-auras/styles/grid.css
var grid_default, init_grid = __esm({
  "src/modules/show-auras/styles/grid.css"() {
    grid_default = `.mh-improved-aura-view .type{display:none}.mh-improved-aura-view.campPage-trap-trapEffectiveness{display:flex;flex-flow:row nowrap;justify-content:space-evenly;max-width:325px;padding:10px 0 0;margin:5px 0;cursor:default}.mh-improved-aura-view .aura{display:flex;flex-direction:column;align-content:center;align-items:center;min-width:50px}.mh-improved-aura-view .trapImageView-trapAura,.mh-improved-aura-view .trapImageView-trapAura.active{width:35px;height:35px;visibility:visible;opacity:1}.mh-improved-aura-view .time{font-size:10px}.mh-improved-aura-view .times{display:flex;flex-direction:column;align-items:center;justify-content:center;margin:2px 5px 0;font-weight:400;line-height:1.5;text-align:center}.mh-improved-aura-view .expiry{display:none}
`;
  }
});

// src/modules/show-auras/styles/list.css
var list_default, init_list = __esm({
  "src/modules/show-auras/styles/list.css"() {
    list_default = `.mh-improved-aura-view.campPage-trap-trapEffectiveness{display:flex;flex-flow:column nowrap;gap:10px;justify-content:space-evenly;padding:5px;margin:5px 0;cursor:default}.mh-improved-aura-view .trapImageView-trapAura,.mh-improved-aura-view .trapImageView-trapAura.active{width:35px;height:35px;visibility:visible;opacity:1}.mh-improved-aura-view .time{font-size:10px}.mh-improved-aura-view .aura{display:grid;grid-template-columns:35px 1fr 4fr;place-items:center stretch;min-width:50px;margin:3 0}.mh-improved-aura-view .type{margin-left:1em;font-size:12px;font-weight:900}.mh-improved-aura-view .times{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;font-weight:400;line-height:1.5}.mh-improved-aura-view .expiry{display:none}
`;
  }
});

// src/modules/show-auras/styles/icons.css
var icons_default, init_icons = __esm({
  "src/modules/show-auras/styles/icons.css"() {
    icons_default = `.mh-improved-aura-view.campPage-trap-trapEffectiveness{display:flex;flex-flow:row nowrap;gap:20px;justify-content:center;padding:10px;margin:5px 0;cursor:default}.mh-improved-aura-view .trapImageView-trapAura,.mh-improved-aura-view .trapImageView-trapAura.active{width:40px;height:40px;visibility:visible;opacity:1}.mh-improved-aura-view .type,.mh-improved-aura-view .times,.mh-improved-aura-view .expiry{display:none}
`;
  }
});

// src/modules/show-auras/styles/styles.css
var styles_default110, init_styles111 = __esm({
  "src/modules/show-auras/styles/styles.css"() {
    styles_default110 = `.mh-improved-aura-view .aura .mousehuntTooltip{right:-50px;bottom:70px;left:-50px;padding:5px;font-weight:400;line-height:1.5;text-align:center}.mh-improved-aura-view .aura{position:relative}.mh-improved-aura-view .QuestJetStreamAura{display:none}.mh-improved-aura-view .mousehuntTooltipContentTitle{font-size:12px;font-weight:900}
`;
  }
});

// src/modules/show-auras/index.js
var humanizer3, getExpiryFormatted, getExpiryRemainingFormatted, addExpiryWarning, isAppending, addTrapBlock, getAuras, aurasExpiry, init71, show_auras_default, init_show_auras = __esm({
  "src/modules/show-auras/index.js"() {
    init_utils2();
    init_settings33();
    init_grid();
    init_list();
    init_icons();
    init_styles111();
    humanizer3 = setupHumanizer(), getExpiryFormatted = (time) => new Date(time).toLocaleDateString(new Intl.DateTimeFormat("en", {
      dateStyle: "short",
      timeStyle: "short"
    })), getExpiryRemainingFormatted = (time) => humanizer3(time, {
      round: !0,
      units: ["d", "h"],
      spacer: " ",
      delimiter: "<br>"
    }), addExpiryWarning = () => {
      let soon = aurasExpiry.filter((aura) => aura.time < 3456e3);
      soon.length && soon.forEach((aura) => {
        aura.element.classList.add("expiring-soon");
      });
    }, isAppending = !1, addTrapBlock = () => {
      if (isAppending)
        return;
      isAppending = !0;
      let trapSummary = document.querySelector(".trapSelectorView__trapStatSummaryContainer");
      if (!trapSummary)
        return;
      let existing = document.querySelector("#mh-improved-aura-view");
      if (existing)
        return;
      let auraTrapBlock = makeElement("div", ["mh-improved-aura-view", "campPage-trap-trapEffectiveness"]);
      if (auraTrapBlock.id = "mh-improved-aura-view", aurasExpiry.forEach((aura) => {
        let auraKey = `mh-aura-${aura.type.toLowerCase().replaceAll(" ", "-").replaceAll("!", "")}`;
        if (document.querySelector(`#${auraKey}`))
          return;
        let auraClasses = aura.element.classList, questClass = [...auraClasses].find((c) => c.startsWith("Quest") || c.startsWith("Event") || c.startsWith("Mini")), auraEl = makeElement("div", ["aura", "mousehuntTooltipParent", questClass]);
        auraEl.id = auraKey;
        let expiryText = getExpiryFormatted(aura.expiry), remaining2 = getExpiryRemainingFormatted(aura.remaining * 1e3);
        auraEl.title = `Expires on ${expiryText}, ${remaining2} remaining`;
        let tooltip = makeElement("div", ["mousehuntTooltip", "noEvents"]), tooltipContent = makeElement("div", "mousehuntTooltipContent");
        makeElement("div", "mousehuntTooltipContentTitle", `${aura.type} Aura`, tooltipContent), makeElement("div", "mousehuntTooltipContentTime", `Expires on ${expiryText}`, tooltipContent), makeElement("div", "mousehuntTooltipContentTime", `${remaining2} remaining`, tooltipContent), tooltip.append(tooltipContent), auraEl.append(tooltip);
        let auraImage = makeElement("div", "image");
        auraImage.classList.add(...auraClasses), auraImage.classList.remove("mousehuntTooltipParent"), auraEl.append(auraImage), makeElement("div", "type", aura.type, auraEl);
        let times = makeElement("div", "times");
        makeElement("div", "expiry", expiryText, times), makeElement("div", "time", remaining2, times), auraEl.append(times), auraTrapBlock.append(auraEl);
      }), existing = document.querySelector("#mh-improved-aura-view"), existing)
        existing.replaceWith(auraTrapBlock);
      else {
        let tem = document.querySelector(".campPage-trap-trapEffectiveness.campPage-trap-statsContainer");
        tem ? tem.after(auraTrapBlock) : trapSummary.append(auraTrapBlock);
      }
      isAppending = !1;
    }, getAuras = () => {
      if (getCurrentPage() !== "camp")
        return;
      let auras = document.querySelectorAll(".trapSelectorView .trapImageView-trapAuraContainer .trapImageView-trapAura.active");
      auras && (aurasExpiry = [], auras.forEach((aura) => {
        let typeEl = aura.querySelector(".trapImageView-tooltip-trapAura-title");
        if (!typeEl)
          return;
        let type = typeEl.textContent.replaceAll("You have the ", "").replaceAll("Aura!", "").trim(), expiryEl = aura.querySelector(".trapImageView-tooltip-trapAura-expiry span");
        if (!expiryEl || !type)
          return;
        let origExpiryText = expiryEl.textContent.replaceAll("(Local Time)", "").replaceAll("  ", " ").trim(), expiryText = origExpiryText, dateParts = expiryText.split("@");
        if (dateParts.length > 1) {
          expiryText = dateParts[0].trim();
          let timeParts = dateParts[1].trim().split(":"), hours = Number.parseInt(timeParts[0], 10);
          hours = timeParts[1].includes("pm") ? hours + 12 : hours;
          let minutes = timeParts[1].replaceAll("pm", "").replaceAll("am", "").trim();
          expiryText = `${expiryText} ${hours}:${minutes}`;
        }
        let expiry = new Date(Date.parse(expiryText)), remaining2 = Math.floor((expiry - /* @__PURE__ */ new Date()) / 1e3);
        aurasExpiry.push({
          type,
          remaining: remaining2,
          expiry,
          expiryText: origExpiryText,
          element: aura
        });
      }));
    }, aurasExpiry = [], init71 = () => __async(void 0, null, function* () {
      let stylesToUse = [styles_default110];
      getSetting("show-auras.icons") ? stylesToUse.push(icons_default) : getSetting("show-auras.list") ? stylesToUse.push(list_default) : stylesToUse.push(grid_default), addStyles(stylesToUse, "show-auras"), onNavigation(() => {
        setTimeout(() => {
          getAuras(), addExpiryWarning(), addTrapBlock();
        }, 1e3);
      }, { page: "camp" });
    }), show_auras_default = {
      id: "show-auras",
      name: "Show Auras",
      description: "Show auras and their expiry time below the trap stats.",
      type: "feature",
      default: !1,
      load: init71,
      settings: settings_default32
    };
  }
});

// src/modules/ssdb-toothlet-counter/index.js
var init72, ssdb_toothlet_counter_default, init_ssdb_toothlet_counter = __esm({
  "src/modules/ssdb-toothlet-counter/index.js"() {
    init_utils2();
    init72 = () => __async(void 0, null, function* () {
      addTrapQuantity({
        baseIds: [3023, 2647],
        baseSlugs: ["upgraded_denture_base", "denture_base"],
        itemId: "fulmina_charged_tooth_stat_item"
      });
    }), ssdb_toothlet_counter_default = {
      id: "ssdb-teeth-counter",
      name: "SSDB Toothlet Counter",
      type: "feature",
      default: !0,
      description: "Shows the number of toothlets you have when SSDB is equipped.",
      load: init72
    };
  }
});

// src/modules/taller-windows/styles.css
var styles_default111, init_styles112 = __esm({
  "src/modules/taller-windows/styles.css"() {
    styles_default111 = `.springHuntHUD-popup-allEggs,.adventureBookPopup-titleContent,.convertibleOpenView-itemContainer,.marketplaceView-browse-content,.MHCheckoutAllRewardsPageView,.treasureMapView-block-content.tall,.treasureMapView-blockWrapper.tall .treasureMapView-block-content,#messengerUINotification .notificationHeader,#supplytransfer .drawer .listContainer,#supplytransfer .drawer .tabContent,#supplytransfer .drawer{height:auto;max-height:75vh}#messengerUINotification .notificationMessageList,.treasureMapView-block-content,.treasureMapView-block-content.halfHeight{height:auto;max-height:55vh}#supplytransfer .drawer{padding-bottom:75px}.adventureBookPopup-titleContent{max-height:unset}.treasureMapDialogView.limitHeight .treasureMapView-block-content{max-height:75vh}.treasureMapDialogView.wide.limitHeight.confirm .treasureMapView,.treasureMapDialogView.limitHeight .treasureMapDialogView-content{max-height:500px}.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-partsContainer{top:263px;left:113px;width:533px;height:auto;background-image:url(https://i.mouse.rip/fi-airships-middle.png);background-size:contain;border-radius:12px}.floatingIslandsWorkshop-parts-content{position:relative;height:100%;max-height:60vh}.floatingIslandsWorkshop-parts-title{padding:5px 10px 0;margin-top:-23px;margin-right:-1px;background:radial-gradient(circle,#fdf9bd,#fefdd6,#fdf9bd);border:none;border-radius:4px 5px 0 0}.floatingIslandsWorkshop-partsContainer:after{position:absolute;bottom:-3px;left:0;width:533px;height:30px;content:"";background-image:url(https://i.mouse.rip/fi-airships-bottom-2.png);background-position:bottom}.floatingIslandsWorkshop-stabilizer{position:absolute;top:250px;left:430px}.select2-results{max-height:50vh}.giftSelectorView-scroller{height:auto}.mh-gift-buttons-clone-wrapper{max-height:calc(75vh - 175px)}.mh-ui-goals-block .treasureMapView-block-content{max-height:75vh}.mh-ui-environments-block{max-height:68vh;overflow-y:auto}.treasureMapView-block-content{height:unset}.treasureMapView-blockWrapper.tall .treasureMapView-block-content.treasureMapShopsView-shopItems{height:100%;max-height:unset;overflow-x:hidden}
`;
  }
});

// src/modules/taller-windows/index.js
var init73, taller_windows_default, init_taller_windows = __esm({
  "src/modules/taller-windows/index.js"() {
    init_utils2();
    init_styles112();
    init73 = () => __async(void 0, null, function* () {
      addStyles(styles_default111, "taller-windows");
    }), taller_windows_default = {
      id: "taller-windows",
      name: "Taller Windows",
      type: "feature",
      default: !0,
      description: "Make popup and dialog windows taller.",
      load: init73
    };
  }
});

// src/modules/tem-crowns/styles.css
var styles_default112, init_styles113 = __esm({
  "src/modules/tem-crowns/styles.css"() {
    styles_default112 = `.campPage-trap-trapEffectiveness-mouse-name{display:inline-flex;flex-flow:column wrap;place-content:flex-start space-around;align-items:flex-start;justify-content:flex-start;width:100px;padding-left:0;margin-top:-10px}.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:-5px;z-index:2;box-sizing:border-box;width:22px;height:22px;vertical-align:middle;background-color:#f4f4f4;border:1px solid #8d8282;border-right:none;border-radius:50% 0 0 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:22px;padding:3px 4px 3px 20px;font-size:12px;font-weight:900;color:#926944;background-color:#f4f4f4;border:1px solid #8d8282}.mh-ui-tem-crown-wrapper{position:absolute;bottom:0;left:45px}.campPage-trap-trapEffectiveness-mouse-chance{display:block;margin-top:5px;color:#628ea9}.campPage-trap-trapEffectiveness-mouse-powerType{right:28px;bottom:-9px;background-color:#f4f4f4;background-size:70%;border-color:#8d8282}.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}
`;
  }
});

// src/modules/tem-crowns/index.js
var getCrownType, addCrownsToTEM, init74, tem_crowns_default, init_tem_crowns = __esm({
  "src/modules/tem-crowns/index.js"() {
    init_utils2();
    init_styles113();
    getCrownType = (catches) => catches < 10 ? "none" : catches < 100 ? "bronze" : catches < 500 ? "silver" : catches < 1e3 ? "gold" : catches < 2500 ? "platinum" : "diamond", addCrownsToTEM = (panel) => __async(void 0, null, function* () {
      if (panel !== "trap_effectiveness")
        return;
      let crowns = yield doRequest("managers/ajax/mice/getstat.php", {
        action: "get_hunting_stats"
      });
      if (!(crowns != null && crowns.hunting_stats && (crowns == null ? void 0 : crowns.hunting_stats.length) > 0))
        return;
      huntingStats = crowns == null ? void 0 : crowns.hunting_stats;
      let temMice = document.querySelectorAll(".campPage-trap-trapEffectiveness-mouse");
      !temMice || !temMice.length || temMice.forEach((mouse) => __async(void 0, null, function* () {
        if (mouse.getAttribute("data-mh-ui-tem-crown"))
          return;
        let type = mouse.getAttribute("data-mouse");
        if (!type)
          return;
        mouse.setAttribute("data-mh-ui-tem-crown", !0);
        let mouseStats2 = huntingStats.find((m) => m.type === type);
        if (!mouseStats2)
          return;
        let name = mouse.querySelector(".campPage-trap-trapEffectiveness-mouse-name");
        if (!name)
          return;
        let catches = mouseStats2.num_catches, crownType = getCrownType(catches), crownWrapper = makeElement("div", "mh-ui-tem-crown-wrapper"), crown = document.createElement("span");
        crown.classList.add("mh-ui-tem-crown", "mousebox");
        let 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);
      }));
    }), init74 = () => __async(void 0, null, function* () {
      addStyles(styles_default112, "tem-crowns"), onEvent("camp_page_toggle_blueprint", addCrownsToTEM);
    }), tem_crowns_default = {
      id: "tem-crowns",
      name: "TEM Crowns",
      type: "feature",
      default: !0,
      description: "Adds crowns and catches to the the Trap Effectiveness Meter.",
      load: init74
    };
  }
});

// src/modules/ultimate-checkmark/settings/index.js
var settings_default33, init_settings34 = __esm({
  "src/modules/ultimate-checkmark/settings/index.js"() {
    init_utils2();
    settings_default33 = () => __async(void 0, null, function* () {
      let options2 = [], categories = yield getData("ultimate-checkmark");
      return categories.sort((a, b) => a.name < b.name ? -1 : 1), categories.forEach((category) => {
        options2.push({
          id: category.id,
          name: category.name,
          value: getSetting(`ultimate-checkmark.show-${category.id}`, !0)
        });
      }), [{
        id: "ultimate-checkmark.show",
        title: "Ultimate Checkmark",
        default: [],
        description: "Adds more things collect on your Hunter profile.",
        settings: {
          type: "multi-toggle",
          options: options2
        }
      }];
    });
  }
});

// src/modules/ultimate-checkmark/styles.css
var styles_default113, init_styles114 = __esm({
  "src/modules/ultimate-checkmark/styles.css"() {
    styles_default113 = `.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}
`;
  }
});

// src/data/ultimate-checkmark.json
var ultimate_checkmark_default, init_ultimate_checkmark = __esm({
  "src/data/ultimate-checkmark.json"() {
    ultimate_checkmark_default = [
      {
        id: "treasure_chests",
        name: "Treasure Chests",
        type: "special",
        subtype: "treasure_chests",
        key: "chests",
        items: [
          "beanstalk_treasure_chest_convertible",
          "rare_beanstalk_treasure_chest_convertible",
          "boss_arduous_treasure_chest_convertible",
          "rare_boss_arduous_treasure_chest_convertible",
          "boss_easy_treasure_chest_convertible",
          "rare_boss_easy_treasure_chest_convertible",
          "boss_elaborate_treasure_chest_convertible",
          "rare_boss_elaborate_treasure_chest_convertible",
          "boss_elite_2021_treasure_chest_convertible",
          "rare_boss_elite_2021_treasure_chest_convertible",
          "boss_hard_treasure_chest_convertible",
          "rare_boss_hard_treasure_chest_convertible",
          "rare_boss_medium_treasure_chest_convertible",
          "boss_medium_treasure_chest_convertible",
          "bounty_reward_f_convertible",
          "rare_bounty_reward_f_convertible",
          "bristle_woods_rift_treasure_chest_convertible",
          "rare_bristle_woods_rift_treasure_chest_convertible",
          "burroughs_rift_treasure_chest_convertible",
          "rare_burroughs_rift_treasure_chest_convertible",
          "catacombs_treasure_chest_convertible",
          "rare_catacombs_treasure_chest_convertible",
          "chrome_arduous_treasure_chest_convertible",
          "rare_chrome_arduous_treasure_chest_convertible",
          "chrome_boss_easy_treasure_chest_convertible",
          "rare_c_boss_easy_treasure_chest_convertible",
          "chrome_boss_arduous_treasure_chest_convertible",
          "rare_c_boss_arduous_treasure_chest_convertible",
          "chrome_boss_elaborate_treasure_chest_convertible",
          "rare_c_boss_elaborate_treasure_chest_convertible",
          "chrome_boss_elite_treasure_chest_convertible",
          "rare_c_boss_elite_treasure_chest_convertible",
          "chrome_boss_hard_treasure_chest_convertible",
          "rare_c_boss_hard_treasure_chest_convertible",
          "chrome_boss_medium_treasure_chest_convertible",
          "rare_c_boss_medium_treasure_chest_convertible",
          "chrome_easy_treasure_chest_convertible",
          "rare_chrome_easy_treasure_chest_convertible",
          "chrome_elaborate_treasure_chest_convertible",
          "rare_chrome_elaborate_treasure_chest_convertible",
          "chrome_elite_treasure_chest_convertible",
          "rare_chrome_elite_treasure_chest_convertible",
          "chrome_hard_treasure_chest_convertible",
          "rare_chrome_hard_treasure_chest_convertible",
          "chrome_medium_treasure_chest_convertible",
          "rare_chrome_medium_treasure_chest_convertible",
          "digby_treasure_chest_convertible",
          "rare_digby_treasure_chest_convertible",
          "farming_fishing_treasure_chest_convertible",
          "rare_farming_fishing_treasure_chest_convertible",
          "ff_prelude_treasure_chest_convertible",
          "rare_ff_prelude_treasure_chest_convertible",
          "fort_rox_treasure_chest_convertible",
          "rare_fort_rox_treasure_chest_convertible",
          "fungal_cavern_treasure_chest_convertible",
          "rare_fungal_cavern_treasure_chest_convertible",
          "furoma_rift_treasure_chest_convertible",
          "rare_furoma_rift_treasure_chest_convertible",
          "geyser_dweller_treasure_chest_convertible",
          "rare_geyser_dweller_treasure_chest_convertible",
          "giant_rainbow_treasure_chest_convertible",
          "rare_giant_rainbow_treasure_chest_convertible",
          "gilded_coin_treasure_chest_convertible",
          "rare_gilded_coin_treasure_chest_convertible",
          "gnawnia_rift_treasure_chest_convertible",
          "rare_gnawnia_rift_treasure_chest_convertible",
          "gnawnia_treasure_chest_convertible",
          "rare_gnawnia_treasure_chest_convertible",
          "icebreaker_treasure_chest_convertible",
          "rare_icebreaker_treasure_chest_convertible",
          "isles_treasure_chest_convertible",
          "rare_isles_treasure_chest_convertible",
          "labyrinth_treasure_chest_convertible",
          "rare_labyrinth_treasure_chest_convertible",
          "large_rainbow_treasure_chest_convertible",
          "rare_large_rainbow_treasure_chest_convertible",
          "lightning_slayer_chest_convertible",
          "rare_lightning_slayer_chest_convertible",
          "living_garden_treasure_chest_f_convertible",
          "rare_living_garden_treasure_chest_f_convertible",
          "m1k_solo_treasure_chest_convertible",
          "rare_m1k_solo_treasure_chest_convertible",
          "m1k_team_treasure_chest_convertible",
          "rare_m1k_team_treasure_chest_convertible",
          "moussu_picchu_treasure_chest_convertible",
          "rare_moussu_picchu_treasure_chest_convertible",
          "muridae_treasure_chest_convertible",
          "rare_muridae_treasure_chest_convertible",
          "queso_canyon_tour_treasure_chest_convertible",
          "rare_queso_canyon_tour_treasure_chest_convertible",
          "queso_canyoneer_treasure_chest_convertible",
          "rare_queso_canyoneer_treasure_chest_convertible",
          "relic_treasure_chest_convertible",
          "rare_relic_treasure_chest_convertible",
          "riftstalker_treasure_chest_convertible",
          "rare_riftstalker_treasure_chest_convertible",
          "riftwalker_treasure_chest_convertible",
          "rare_riftwalker_treasure_chest_convertible",
          "school_of_sorcery_treasure_chest_convertible",
          "rare_school_of_sorcery_treasure_chest_convertible",
          "shelder_treasure_chest_convertible",
          "rare_shelder_treasure_chest_convertible",
          "sky_palace_treasure_chest_convertible",
          "rare_sky_palace_treasure_chest_convertible",
          "sky_pirate_treasure_chest_convertible",
          "rare_sky_pirate_treasure_chest_convertible",
          "small_rainbow_treasure_chest_convertible",
          "rare_small_rainbow_treasure_chest_convertible",
          "sunken_city_treasure_chest_convertible",
          "rare_sunken_city_treasure_chest_convertible",
          "toxic_arduous_treasure_chest_convertible",
          "rare_toxic_arduous_treasure_chest_convertible",
          "toxic_easy_treasure_chest_convertible",
          "rare_toxic_easy_treasure_chest_convertible",
          "toxic_elaborate_treasure_chest_convertible",
          "rare_toxic_elaborate_treasure_chest_convertible",
          "toxic_elite_treasure_chest_convertible",
          "rare_toxic_elite_treasure_chest_convertible",
          "toxic_hard_treasure_chest_convertible",
          "rare_toxic_hard_treasure_chest_convertible",
          "toxic_medium_treasure_chest_convertible",
          "rare_toxic_medium_treasure_chest_convertible",
          "undead_treasure_chest_convertible",
          "rare_undead_treasure_chest_convertible",
          "valour_rift_treasure_chest_convertible",
          "rare_valour_rift_treasure_chest_convertible",
          "valour_treasure_chest_convertible",
          "rare_valour_treasure_chest_convertible",
          "warpath_treasure_chest_convertible",
          "rare_warpath_treasure_chest_convertible",
          "whisker_woods_rift_treasure_chest_convertible",
          "rare_whisker_woods_rift_treasure_chest_convertible",
          "whisker_woods_treasure_chest_convertible",
          "rare_whisker_woods_treasure_chest_convertible",
          "zugzwang_treasure_chest_convertible",
          "rare_zugzwang_treasure_chest_convertible",
          "light_floating_loot_cache_convertible",
          "heavy_floating_loot_cache_convertible",
          "empyrean_floating_loot_cache_convertible"
        ]
      },
      {
        id: "airships",
        name: "Airships",
        type: "special",
        subtype: "cosmetics",
        key: "airships",
        items: [
          "airship_balloon_astral_stat_item",
          "airship_balloon_birthday_stat_item",
          "airship_balloon_bookmobile_stat_item",
          "airship_balloon_chrome_stat_item",
          "airship_balloon_cloud_stat_item",
          "airship_balloon_deluxe_stat_item",
          "airship_balloon_empyrean_stat_item",
          "airship_balloon_factory_stat_item",
          "airship_balloon_ghost_ship_stat_item",
          "airship_balloon_gilded_stat_item",
          "airship_balloon_gloomy_galleon_stat_item",
          "airship_balloon_holiday_express_stat_item",
          "airship_balloon_lny_ox_stat_item",
          "airship_balloon_lny_stat_item",
          "airship_balloon_marzipan_stat_item",
          "airship_balloon_mineral_stat_item",
          "airship_balloon_new_years_stat_item",
          "airship_balloon_pirate_stat_item",
          "airship_balloon_plant_stat_item",
          "airship_balloon_porcelain_stat_item",
          "airship_balloon_spring_stat_item",
          "airship_balloon_tiger_stat_item",
          "airship_balloon_vrift_stat_item",
          "airship_balloon_winter_stat_item",
          "airship_hull_astral_stat_item",
          "airship_hull_birthday_stat_item",
          "airship_hull_bookmobile_stat_item",
          "airship_hull_chrome_stat_item",
          "airship_hull_cloud_stat_item",
          "airship_hull_deluxe_stat_item",
          "airship_hull_empyrean_stat_item",
          "airship_hull_factory_stat_item",
          "airship_hull_ghost_ship_stat_item",
          "airship_hull_gilded_stat_item",
          "airship_hull_gloomy_galleon_stat_item",
          "airship_hull_holiday_express_stat_item",
          "airship_hull_lny_ox_stat_item",
          "airship_hull_lny_stat_item",
          "airship_hull_marzipan_stat_item",
          "airship_hull_mineral_stat_item",
          "airship_hull_new_years_stat_item",
          "airship_hull_pirate_stat_item",
          "airship_hull_plant_stat_item",
          "airship_hull_porcelain_stat_item",
          "airship_hull_spring_stat_item",
          "airship_hull_tiger_stat_item",
          "airship_hull_vrift_stat_item",
          "airship_hull_winter_stat_item",
          "airship_sail_astral_stat_item",
          "airship_sail_birthday_stat_item",
          "airship_sail_bookmobile_stat_item",
          "airship_sail_chrome_stat_item",
          "airship_sail_cloud_stat_item",
          "airship_sail_deluxe_stat_item",
          "airship_sail_empyrean_stat_item",
          "airship_sail_factory_stat_item",
          "airship_sail_ghost_ship_stat_item",
          "airship_sail_gilded_stat_item",
          "airship_sail_gloomy_galleon_stat_item",
          "airship_sail_holiday_express_stat_item",
          "airship_sail_lny_ox_stat_item",
          "airship_sail_lny_stat_item",
          "airship_sail_marzipan_stat_item",
          "airship_sail_mineral_stat_item",
          "airship_sail_new_years_stat_item",
          "airship_sail_pirate_stat_item",
          "airship_sail_plant_stat_item",
          "airship_sail_porcelain_stat_item",
          "airship_sail_spring_stat_item",
          "airship_sail_tiger_stat_item",
          "airship_sail_vrift_stat_item",
          "airship_sail_winter_stat_item"
        ]
      },
      {
        id: "codex",
        name: "Codex",
        type: "special",
        subtype: "codex",
        key: "codex",
        items: [
          "chrome_codex_stat_item",
          "codex_of_valour_stat_item",
          "codex_of_valor_bard_page_stat_item",
          "codex_of_valor_dust_page_stat_item",
          "codex_of_valor_eclipse_page_stat_item",
          "codex_of_valor_magic_page_stat_item",
          "codex_of_valor_melee_page_stat_item",
          "codex_of_valor_nobility_page_stat_item",
          "codex_of_valor_puppetry_page_stat_item",
          "codex_of_valor_thievery_page_stat_item",
          "empyrean_codex_stat_item",
          "rift_luck_codex_stat_item",
          "folklore_motif_index_arcane_luck_stat_item",
          "folklore_motif_index_arcane_power_stat_item",
          "folklore_motif_index_draconic_luck_stat_item",
          "folklore_motif_index_draconic_power_stat_item",
          "folklore_motif_index_forgotten_luck_stat_item",
          "folklore_motif_index_forgotten_power_stat_item",
          "folklore_motif_index_shadow_luck_stat_item",
          "folklore_motif_index_shadow_power_stat_item",
          "regal_charm_codex_stat_item"
        ]
      },
      {
        id: "equipment",
        name: "Equipment",
        type: "special",
        subtype: "equipment",
        key: "equipment",
        items: [
          "desert_warpath_victory_stat_item",
          "high_altitude_license_stat_item",
          "iceberg_drill_level_four_stat_item",
          "iceberg_drill_level_one_stat_item",
          "iceberg_drill_level_three_stat_item",
          "iceberg_drill_level_two_stat_item",
          "labyrinth_lantern",
          "large_waste_barrel_stat_item",
          "marketplace_buy_regal_stool_collectible",
          "marketplace_sell_regal_display_case_collectible",
          "moussu_picchu_fealty_stat_item",
          "moussu_picchu_scholar_stat_item",
          "moussu_picchu_tech_stat_item",
          "null_gauntlet_stat_item",
          "rift_chronometer_stat_item"
        ]
      },
      {
        id: "currency",
        name: "Currency",
        type: "special",
        subtype: "currency",
        key: "currency",
        items: [
          "amber_queso_stat_item",
          "ancient_relic_collectible",
          "arcane_sunstone_stat_item",
          "blood_stone_stat_item",
          "cloudstone_bangle_stat_item",
          "crop_coin_stat_item",
          "cursed_gold_stat_item",
          "dawn_dust_stat_item",
          "diamond_ice_drill_tip_stat_item",
          "droid_bird_stat_item",
          "empyrean_seal_stat_item",
          "enchanted_wing_stat_item",
          "floating_trap_upgrade_stat_item",
          "flour_stat_item",
          "fools_gold_stat_item",
          "gauntlet_elixir_stat_item",
          "gilded_coin_stat_item",
          "gnawbel_prize_stat_item",
          "golden_goose_egg_stat_item",
          "golden_goose_stat_item",
          "howlite_stat_item",
          "hydro_geyser_trap_stat_item",
          "magic_cork_dust_stat_item",
          "meteoric_core_fragments_stat_item",
          "nachore_stat_item",
          "physical_geyser_trap_stat_item",
          "pond_penny_stat_item",
          "prize_credit_stat_item",
          "raw_ancient_jade_stat_item",
          "raw_rift_crystal_stat_item",
          "rift_circuitry_stat_item",
          "rift_clockwork_cog_stat_item",
          "rift_gaunt_upgrade_a_stat_item",
          "rift_gaunt_upgrade_b_stat_item",
          "rift_sprocket_stat_item",
          "sand_dollar_stat_item",
          "shade_eclipse_resource_stat_item",
          "shadow_moonstone_stat_item",
          "silver_bolt_stat_item",
          "sky_pirate_seal_stat_item",
          "sky_sprocket_stat_item",
          "skysoft_silk_stat_item",
          "sorcerers_sapphire_stat_item",
          "tactical_geyser_trap_stat_item",
          "tattered_celestial_skin_pattern_stat_item",
          "temporal_rune_stat_item",
          "total_eclipse_resource_stat_item",
          "tournament_token_mega_stat_item",
          "tournament_token_stat_item",
          "war_scrap_stat_item"
        ]
      },
      {
        id: "plankrun",
        name: "Plankrun Pages",
        type: "plankrun",
        subtype: "general",
        key: "plankrun",
        items: [
          "rift_notes_1_torn_page",
          "dojo_torn_page",
          "back_cover_torn_page",
          "dark_magi_torn_page",
          "deep_mouse_torn_page",
          "king_scarab_torn_page",
          "shattered_carmine_2_torn_page",
          "shattered_carmine_1_torn_page",
          "rift_notes_2_torn_page",
          "whisker_woods_rift_torn_page",
          "rift_notes_3_torn_page",
          "gnawnia_torn_page",
          "front_cover_torn_page"
        ]
      }
    ];
  }
});

// src/modules/ultimate-checkmark/index.js
var getItems, getProgress, makeProgressString, makeCategory, makeItem2, makeContent, addCategoryAndItems, isOwnProfile, items4, run3, init75, ultimate_checkmark_default2, init_ultimate_checkmark2 = __esm({
  "src/modules/ultimate-checkmark/index.js"() {
    init_utils2();
    init_settings34();
    init_styles114();
    init_ultimate_checkmark();
    getItems = (_0, _1, _2, ..._3) => __async(void 0, [_0, _1, _2, ..._3], function* (required, queryTab, queryTag, allItems = []) {
      var _a;
      if (!allItems.length) {
        let inventoryData = yield doRequest("managers/ajax/pages/page.php", {
          page_class: "Inventory",
          "page_arguments[legacyMode]": "",
          "page_arguments[tab]": queryTab,
          "page_arguments[sub_tab]": "false"
        }), specialTab = (((_a = inventoryData == null ? void 0 : inventoryData.page) == null ? void 0 : _a.tabs) || []).find((tab) => queryTab === tab.type);
        if (!specialTab || !specialTab.subtabs || !specialTab.subtabs.length || !specialTab.subtabs[0].tags)
          return [];
        let owned = specialTab.subtabs[0].tags.filter((tag) => queryTag === tag.type);
        if (!owned || !owned.length || !owned[0].items)
          return [];
        allItems = owned[0].items;
      }
      return required.forEach((requiredItem) => {
        if (!allItems.find((i) => i.type === requiredItem)) {
          let itemToAdd = items4.find((i) => i.type === requiredItem);
          if (!itemToAdd)
            return;
          allItems.push({
            name: itemToAdd.name,
            name_formatted: itemToAdd.name,
            type: itemToAdd.type,
            item_id: itemToAdd.id,
            quantity: 0,
            quantity_formatted: "0",
            thumbnail: itemToAdd.images.thumbnail
          });
        }
      }), allItems = allItems.map((item) => (item.item_id || (item = items4.find((i) => i.type === item.type)), {
        item_id: item.item_id,
        type: item.type,
        name: item.name,
        thumbnail: item.thumbnail_gray || item.thumbnail,
        quantity: item.quantity || 0,
        quantity_formatted: item.quantity_formatted || "0",
        le: !required.includes(item.type)
      })), allItems.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0), allItems;
    }), getProgress = (items5, required) => {
      let le = 0, requiredCompleted = 0;
      return items5.forEach((item) => {
        item.quantity <= 0 || (item.le ? item.le && le++ : requiredCompleted++);
      }), {
        checkmark: required.total >= requiredCompleted,
        completed: requiredCompleted,
        required: required.length,
        le
      };
    }, makeProgressString = (progress) => {
      let { completed, required, le } = progress, text = `${completed} of ${required}`;
      return le && le > 0 && (text += ` (+${le} LE)`), text;
    }, makeCategory = (category, name, progress) => {
      if (document.querySelector(`.hunterProfileItemsView-category[data-category="${category}"]`))
        return;
      let sidebar = document.querySelector(".hunterProfileItemsView-directory");
      if (!sidebar)
        return;
      let catSidebarCategory = makeElement("a", "hunterProfileItemsView-category");
      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), !1));
      let 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) => {
      let { item_id, type, name, thumbnail, quantity, quantity_formatted, le } = item, itemDiv = makeElement("div", "hunterProfileItemsView-categoryContent-item");
      quantity > 0 ? (itemDiv.classList.add("collected"), le && itemDiv.classList.add("limited_edition")) : (itemDiv.classList.add("uncollected"), itemDiv.classList.add("hidden")), itemDiv.setAttribute("data-id", item_id), itemDiv.setAttribute("data-type", type);
      let itemPadding = makeElement("div", "hunterProfileItemsView-categoryContent-item-padding");
      itemPadding.addEventListener("click", () => {
        hg.views.ItemView.show(type);
      });
      let itemImage = makeElement("div", "itemImage");
      itemImage.style.backgroundImage = `url(${thumbnail})`, quantity > 0 && makeElement("div", "quantity", quantity_formatted, itemImage);
      let itemName = makeElement("div", "hunterProfileItemsView-categoryContent-item-name");
      return makeElement("span", "", name, itemName), itemPadding.append(itemImage), itemPadding.append(itemName), itemDiv.append(itemPadding), itemDiv;
    }, makeContent = (id, name, items5, completed) => {
      let content = document.querySelector(".hunterProfileItemsView-content-padding");
      if (!content || document.querySelector(`.hunterProfileItemsView-categoryContent[data-category="${id}"]`))
        return;
      let categoryDiv = makeElement("div", "hunterProfileItemsView-categoryContent");
      completed && categoryDiv.classList.add("collected"), categoryDiv.setAttribute("data-category", id);
      let nameDiv = makeElement("div", "hunterProfileItemsView-categoryContent-name", name), itemsDiv = document.createElement("div");
      items5.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0), items5.forEach((item) => {
        itemsDiv.append(makeItem2(item));
      }), categoryDiv.append(nameDiv), categoryDiv.append(itemsDiv), content.append(categoryDiv);
    }, addCategoryAndItems = (required, type, subtype, key, name) => __async(void 0, null, function* () {
      if (document.querySelector(`.hunterProfileItemsView-category[data-category="${key}"]`))
        return !1;
      let items5 = yield getItems(required, type, subtype), progress = getProgress(items5, required);
      return makeCategory(key, name, progress), makeContent(key, name, items5, progress.completed), !0;
    }), isOwnProfile = () => {
      var _a, _b;
      if (!((_b = (_a = hg == null ? void 0 : hg.utils) == null ? void 0 : _a.PageUtil) != null && _b.getQueryParams))
        return !1;
      let params = hg.utils.PageUtil.getQueryParams();
      return !params || !params.snuid ? !1 : params.snuid === user.sn_user_id;
    }, run3 = () => __async(void 0, null, function* () {
      if (!(getCurrentPage() !== "hunterprofile" || getCurrentTab() !== "items" || !isOwnProfile())) {
        items4 || (items4 = yield getData("items"));
        for (let category of ultimate_checkmark_default)
          getSetting(`ultimate-checkmark.show-${category.id}`, !0) && (yield addCategoryAndItems(category.items, category.type, category.subtype, category.key, category.name));
      }
    }), init75 = () => __async(void 0, null, function* () {
      addStyles(styles_default113, "ultimate-checkmark"), onNavigation(run3, {
        page: "hunterprofile",
        tab: "items",
        onLoad: !0
      });
    }), ultimate_checkmark_default2 = {
      id: "ultimate-checkmark",
      type: "feature",
      alwaysLoad: !0,
      load: init75,
      settings: settings_default33
    };
  }
});

// src/modules/unique-loot-count/styles.css
var styles_default114, init_styles115 = __esm({
  "src/modules/unique-loot-count/styles.css"() {
    styles_default114 = `.uniqueLootCount{margin-left:5px}
`;
  }
});

// src/modules/unique-loot-count/index.js
var updateSection, addUniqueLootCount, init76, unique_loot_count_default, init_unique_loot_count = __esm({
  "src/modules/unique-loot-count/index.js"() {
    init_utils2();
    init_styles115();
    updateSection = (selector) => __async(void 0, null, function* () {
      let section = document.querySelector(`#overlayPopup.hunting_summary .${selector}`);
      if (!section || section.querySelector(".uniqueLootCount"))
        return;
      let loots = section.querySelectorAll("a"), count2 = makeElement("span", "uniqueLootCount", `(${loots.length} unique)`);
      section.querySelector(".label").append(count2);
    }), addUniqueLootCount = () => __async(void 0, null, function* () {
      [
        "environmentContainer",
        "baitContainer",
        "lootContainer"
      ].forEach((section) => updateSection(section));
    }), init76 = () => __async(void 0, null, function* () {
      addStyles(styles_default114, "unique-loot-count"), onDialogShow("hunting_summary", () => setMultipleTimeout(addUniqueLootCount, 500, 1e3, 3e3));
    }), unique_loot_count_default = {
      id: "unique-loot-count",
      name: "Unique loot count in progress log",
      type: "beta",
      default: !1,
      description: "Shows the number of unique loot items in the progress log",
      load: init76
    };
  }
});

// src/modules/update-migration/utils.js
var isVersionBefore, saveSettingsBackup, restoreSettingsBackup, moveSetting, init_utils6 = __esm({
  "src/modules/update-migration/utils.js"() {
    init_utils2();
    isVersionBefore = (version, compare) => {
      if (!version || !compare)
        return !1;
      let versionParts = version.split("."), compareParts = compare.split(".");
      for (let i in versionParts) {
        if (compareParts[i] === "*")
          return !1;
        if (versionParts[i] < compareParts[i])
          return !0;
      }
      return !1;
    }, saveSettingsBackup = () => {
      localStorage.setItem("mousehunt-improved-settings-backup", localStorage.getItem("mousehunt-improved-settings"));
    }, restoreSettingsBackup = () => {
      let backedUpSettings = localStorage.getItem("mousehunt-improved-settings-backup");
      backedUpSettings && localStorage.setItem("mousehunt-improved-settings", backedUpSettings);
    }, moveSetting = (settingKey) => {
      if (!settingKey.from || !settingKey.to)
        return;
      debuglog("update-migration", `Migrating setting from ${settingKey.from} to ${settingKey.to}`);
      let setting = getSetting(settingKey.from, null);
      setting !== null && getSetting(settingKey.to, null) === null && (saveSetting(settingKey.to, setting), settingKey.clear ? saveSetting(settingKey.from, null) : settingKey.setTrue ? saveSetting(settingKey.from, !0) : settingKey.setFalse ? saveSetting(settingKey.from, !1) : deleteSetting(settingKey.from));
    };
  }
});

// src/modules/update-migration/versions/0.45.1.js
var migrateLegacyHud, migrateExperimentsToBeta, update, __default, init__ = __esm({
  "src/modules/update-migration/versions/0.45.1.js"() {
    init_utils2();
    init_utils6();
    migrateLegacyHud = () => __async(void 0, null, function* () {
      getSetting("legacy-hud.menu", "not-set") !== "not-set" && saveSetting("legacy-hud.menu", getSetting("experiments.legacy-hud-only-menu", !1)), getSetting("legacy-hud.stats", "not-set") !== "not-set" && saveSetting("legacy-hud.stats", getSetting("experiments.legacy-hud-only-stats", !1)), getSetting("legacy-hud.tweaks", "not-set") === "not-set" && saveSetting("legacy-hud.tweaks", getSetting("experiments.legacy-hud-tweaks", !0));
    }), migrateExperimentsToBeta = () => __async(void 0, null, function* () {
      [
        { from: "experiments.big-timer", to: "big-timer" },
        { from: "experiments.shield-goes-to-camp", to: "shield-goes-to-camp" },
        { from: "experiments.codex-at-bottom", to: "codex-at-bottom" },
        { from: "experiments.delayed-menus", to: "delayed-menus" },
        { from: "experiments.replace-favicon", to: "replace-favicon" },
        { from: "experiments.sticky-popups", to: "sticky-popups" },
        { from: "experiments.unique-loot-count", to: "unique-loot-count" }
      ].forEach((setting) => {
        getSetting(setting.from, !1) && moveSetting(setting);
      });
    }), update = () => __async(void 0, null, function* () {
      yield migrateLegacyHud(), yield migrateExperimentsToBeta();
    }), __default = {
      id: "0.45.0",
      update
    };
  }
});

// src/modules/update-migration/index.js
var imported8, versionUpdates, getVersionUpdates, doVersionUpdates, update2, previousVersion, init77, update_migration_default, init_update_migration = __esm({
  "src/modules/update-migration/index.js"() {
    init_utils2();
    init_utils6();
    init__();
    imported8 = [__default], versionUpdates = imported8, getVersionUpdates = () => {
      let updates = {};
      for (let version in versionUpdates) {
        let currentVersion = versionUpdates[version];
        isVersionBefore(previousVersion, currentVersion.id) && (updates[currentVersion.id] = currentVersion);
      }
      return updates;
    }, doVersionUpdates = () => __async(void 0, null, function* () {
      if (previousVersion === "0.0.0")
        return;
      let updates = getVersionUpdates();
      for (let version in updates) {
        let update3 = updates[version];
        try {
          debuglog("update-migration", `Running update for ${version}`), yield update3.update();
        } catch (error) {
          throw debuglog("update-migration", `Error updating to ${version}:`, error), error;
        }
      }
    }), update2 = () => __async(void 0, null, function* () {
      debuglog("update-migration", `Updating from ${previousVersion} to ${mhImprovedVersion}`);
      let updates = getVersionUpdates(), needsMigration = Object.keys(updates).length > 0, showPopup = setTimeout(() => {
        showLoadingPopup(`Updating MouseHunt Improved to v${mhImprovedVersion}...`), addBodyClass("mh-improved-updating"), setGlobal("mh-improved-updating", !0), saveSettingsBackup();
      }, 400);
      try {
        yield doVersionUpdates(), saveSetting("mh-improved-version", mhImprovedVersion), yield updateCaches(), clearTimeout(showPopup), needsMigration ? (showLoadingPopup("MouseHunt Improved has been updated. Refresh the page to continue."), setTimeout(refreshPage, 3e3)) : activejsDialog && (activejsDialog != null && activejsDialog.hide) && activejsDialog.hide(), doEvent2("mh-improved-updated", previousVersion);
      } catch (error) {
        throw restoreSettingsBackup(), clearTimeout(showPopup), showLoadingPopup("Error updating MouseHunt Improved. Please try refreshing the page."), error;
      }
    }), previousVersion = null, init77 = () => __async(void 0, null, function* () {
      previousVersion = getSetting("mh-improved-version", "0.0.0"), previousVersion !== "0.0.0" && previousVersion !== mhImprovedVersion && (debuglog("update-migration", `Previous version: ${previousVersion}`), yield update2(), doEvent2("mh-improved-updated", mhImprovedVersion));
    }), update_migration_default = {
      id: "update-migration",
      type: "required",
      alwaysLoad: !0,
      order: 300,
      load: init77
    };
  }
});

// src/modules/update-notifications/styles.css
var styles_default115, init_styles116 = __esm({
  "src/modules/update-notifications/styles.css"() {
    styles_default115 = `#overlayPopup.mh-improved-update-summary{margin-top:30px}#overlayPopup.mh-improved-update-summary .jsDialog.top,#overlayPopup.mh-improved-update-summary .jsDialog.bottom,#overlayPopup.mh-improved-update-summary .jsDialog.background,#overlayPopup.mh-improved-update-summary .jsDialogContainer .prefix,#overlayPopup.mh-improved-update-summary .jsDialogContainer .content,#overlayPopup.mh-improved-update-summary .jsDialogContainer .suffix{padding:0;margin:0;background:none;border:none}#overlayPopup.mh-improved-update-summary .jsDialog.top,#overlayPopup.mh-improved-update-summary .jsDialog.bottom{pointer-events:none}#overlayPopup.mh-improved-update-summary .jsDialogContainer{padding:0 20px;background-image:url(https://www.mousehuntgame.com/images/ui/newsposts/np_border.png);background-repeat:repeat-y;background-size:100%}#overlayPopup.mh-improved-update-summary .jsDialogContainer:before{position:absolute;top:-80px;right:0;left:0;z-index:-1;height:100px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/newsposts/np_header.png);background-repeat:no-repeat;background-size:100%}#overlayPopup.mh-improved-update-summary .jsDialogContainer:after{position:absolute;top:100%;right:0;left:0;height:126px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/newsposts/np_footer.png);background-repeat:no-repeat;background-size:100%}.mh-improved-update-summary-wrapper{margin:0 25px;line-height:1.5}.mh-improved-update-summary-body{display:grid;grid-template-columns:2fr 1fr;gap:30px}.mh-improved-update-summary h1{padding-bottom:5px;margin-top:-40px;font-size:1.75em;font-weight:700;color:#693312;text-align:center;text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:#c1915a;text-underline-offset:10px}.mh-improved-update-summary h2{padding-bottom:3px;margin-bottom:3px;font-size:1.25em;font-weight:900;border-bottom:1px solid #c1915a}.mh-improved-update-summary-links{display:flex;flex-direction:column}.mh-improved-update-summary ul{margin:0 0 5px 25px;list-style:disc}.mh-improved-update-summary-buttons{display:flex;align-items:center;justify-content:center}.mh-improved-update-summary-links ul{font-size:1.125em;line-height:2}.mh-improved-update-summary-misc{margin-bottom:5px}.mh-improved-update-summary-content p,p.mh-improved-update-summary-content{font-size:12px}.mh-improved-update-summary-lists{display:grid;grid-template-columns:1fr;gap:0 10px;justify-items:stretch;max-height:55vh;padding:10px;margin-bottom:20px;overflow:auto;background:linear-gradient(#e9d5a2 30%,#0000) center top,linear-gradient(#0000,#e9d5a2 70%) center bottom,radial-gradient(farthest-side at 50% 0,#0006,#0000) center top,radial-gradient(farthest-side at 50% 100%,#0006,#0000) center bottom;background-repeat:no-repeat;background-attachment:local,local,scroll,scroll;background-size:100% 50px,100% 50px,100% 15px,100% 15px;border:1px solid #b07842}
`;
  }
});

// src/data/update-summary.json
var update_summary_default, init_update_summary = __esm({
  "src/data/update-summary.json"() {
    update_summary_default = {
      summary: "Happy King's Giveaway!",
      details: [
        {
          items: [
            "Better Inventory: Updated message item indicator",
            "Better Journal: Updated King's Giveaway entry styles",
            "Better UI: Updated King's Giveaway styles",
            "Catch Rate Estimator: Fixed issue calculating power bonus in Fiery Warpath",
            "Inventory Lock and Hide: Added Hide/Show All buttons",
            "Inventory Lock and Hide: Fixed issue with Lock/Unlock All buttons not working",
            "Inventory Lock and Hide: Updated styles",
            "Native Dark Mode: Updated styles",
            "Toxic Spill Location HUD: Added barrel fill percentage indicator",
            "Ultimate Checkmark: Added Regal Codex"
          ]
        }
      ]
    };
  }
});

// src/modules/update-notifications/index.js
var makeDetailsList, showUpdateSummary, init78, update_notifications_default, init_update_notifications = __esm({
  "src/modules/update-notifications/index.js"() {
    init_utils2();
    init_styles116();
    init_update_summary();
    makeDetailsList = (modules) => modules.map(
      (module) => `<div class="update-list-section">
    ${module.title ? `<h2>${module.title}</h2>` : ""}
    <ul>
      ${module.items.map((item) => `<li>${item}</li>`).join("")}
    </ul>
  </div>`
    ).join(""), showUpdateSummary = (from, force = !1) => __async(void 0, null, function* () {
      if (!force && (from === "0.45.0" || from === "0.45.1" || from === "0.45.2") || !(update_summary_default.summary.length || update_summary_default.details.length) && !force)
        return;
      let markup = `<div class="mh-improved-update-summary-wrapper">
  <h1 class="mh-improved-update-summary-title">MouseHunt Improved v${mhImprovedVersion}</h1>
  <p class="mh-improved-update-summary-content">${update_summary_default.summary}</p>
  <div class="mh-improved-update-summary-lists">${update_summary_default.details.length ? makeDetailsList(update_summary_default.details) : '<p><a href="https://github.com/MHCommunity/mousehunt-improved/releases" target="_blank" rel="noopener noreferrer">Check out the latest release notes</a> for more information.</p>'}</div>
  <div class="mh-improved-update-summary-buttons">
    <a href="#" id="mh-improved-dismiss-popup" class="button">Continue</a>
  </div>
</div>
</div>`, popup = createPopup({
        hasCloseButton: !1,
        template: "ajax",
        content: markup,
        show: !1,
        className: "mh-improved-update-summary"
      });
      popup.addToken("{*prefix*}", ""), popup.addToken("{*suffix*}", ""), popup.show();
      let dismiss = document.querySelector("#mh-improved-dismiss-popup");
      dismiss && dismiss.addEventListener("click", (e) => {
        e.preventDefault(), popup.hide();
      });
    }), init78 = () => __async(void 0, null, function* () {
      addStyles(styles_default115, "update-notifications"), onEvent("mh-improved-updated", showUpdateSummary), onEvent("mh-improved-show-update-summary", () => {
        showUpdateSummary(mhImprovedVersion, !0);
      });
    }), update_notifications_default = {
      id: "update-notifications",
      type: "required",
      alwaysLoad: !0,
      order: 200,
      load: init78
    };
  }
});

// src/modules/user-highlighting/profile.css
var profile_default3, init_profile3 = __esm({
  "src/modules/user-highlighting/profile.css"() {
    profile_default3 = `.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,.mh-improved-fancy-profile .journalContainer .top,.mh-improved-fancy-profile .journalContainer .bottom,.mh-improved-fancy-profile .trapImageView-tooltip-trapAura-expiry span{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%)!important;border-radius:6px}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-hunterId{color:#252525!important;background-color:#dcf7ff!important}.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!important;background-color:#f0dfee!important;border-color:#de72ba;box-shadow:none}.mh-improved-fancy-profile .hunterInfoView-wrapper div.messageBoardView-message-container{border:1px solid #de72ba}.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-wrapper div .pagerView-container,.mh-dark .mh-improved-fancy-profile .hunterInfoView-wrapper div .pagerView-container,.mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message,.mh-dark .mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message,.mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message.new{background:#f8eff6;border-color:#de72ba!important}.mh-dark-mode .mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message{background:#513d4c}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .mousehuntPage-content textarea{background-color:#f8eff7;border-color:#de72ba}.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!important;border-color:#80b5b4!important}.mh-improved-fancy-profile .journalContainer .content{padding:0;margin:0;background:transparent!important}.mh-improved-fancy-profile .jlarge{overflow:hidden}.mh-improved-fancy-profile .journal .content .entry{background-color:#f0dfee;border-color:#de72ba}.mh-dark .mh-improved-fancy-profile .journal .content .entry{background-color:#f0dfee!important;border-color:#de72ba!important}.mh-dark .mh-improved-fancy-profile .journal .content .entry .journaldate,.mh-dark .mh-improved-fancy-profile .journal .content .entry .journalbody{color:#363636!important}.mh-dark .mh-improved-fancy-profile .journal .content .entry .journalbody .journaldate{border-bottom:1px solid rgb(0 0 0 / 30%)}.mh-improved-fancy-profile .journal .content .entry.short.travel{background-color:#f2f2f2}.mh-improved-fancy-profile .friendsPage-friendRow-image-border{background-image:none}.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:-4px;background:linear-gradient(#dcf7ff 45%,#89f0ee 55%);border-color:#8af1ef}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-thumbnail-image{border-color:#de72ba;box-shadow:none}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-title-container{top:1px;height:59px;border-top:none;border-bottom:1px solid #de72ba;border-radius:7px 50px 0 0}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-container{padding-top:1px;border:1px solid #de72ba}.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{z-index:0;height:220px}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats{padding:7px 0}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile.PageHunterProfile .friendsPage-friendRow-statsContainer,.mh-improved-fancy-profile .friendsPage-friendRow-statsContainer{color:#513645;background-color:#d2c0ec;border-top:1px solid #be9bbc;border-radius:0 0 6px 6px;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;text-shadow:0 0 0 #969696}.mh-improved-fancy-profile .loyaltyBadgeView{background-image:url(https://www.mousehuntgame.com/images/ui/profile/loyalty-badge-3-year.png);filter:hue-rotate(237deg)}.mh-improved-fancy-profile .userInteractionButtonsView-button{filter:hue-rotate(170deg) opacity(.6)}.mh-improved-fancy-profile .hunterInfoView-idCardBlock-stats-horn-image{filter:hue-rotate(250deg)}.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: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}.mh-dark-mode .mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail{color:#8e5d8b}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .mousehuntTabHeader span,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-header,.mh-improved-fancy-profile .hunterInfoView-wrapper .messageBoardView-title,.mh-dark .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{color:#615d5d!important;background:linear-gradient(#dcf7ff 45%,#8adff1 55%);border-color:#de72ba;border-radius:7px 7px 0 0;box-shadow:none}.pageFrameView #mousehuntContainer.PageHunterProfile.mh-improved-fancy-profile .campPage-trap-itemStats,.pageFrameView #mousehuntContainer.PageHunterProfile.mh-improved-fancy-profile .campPage-trap-itemStats .campPage-trap-trapStat .value,.pageFrameView #mousehuntContainer.PageHunterProfile.mh-improved-fancy-profile .campPage-trap-itemStats .campPage-trap-trapStat .value b,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .journalEntries,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .pagerView-container,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-items,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader:before,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .mousehuntTabHeader:before,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .mousehuntTabHeader.active span,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader:hover span{color:#615d5d;background-color:transparent}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-title,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-label,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .friendsProfileView-container,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContentContainer,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .friendsPage-friendRow{color:#615d5d}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot.middle{top:-2px;overflow:hidden;border-color:#99448e;border-radius:9px;outline:1px solid #f0dfee;box-shadow:1px -1px 0 3px #f0dfee,-1px -1px 0 3px #f0dfee}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-items{padding:0;margin:0 10px;background-color:#f0dfee;border-radius:10px;box-shadow:0 -6px 0 1px #f0dfee,-23px 10px 0 -19px #f0dfee,27px 10px 0 -19px #f0dfee,0 -6px 0 2px #de72ba}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-container{border-color:#de72ba}.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock,.PageHunterProfile .pageFrameView .mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock{border-color:#de72ba;box-shadow:none}
`;
  }
});

// src/modules/user-highlighting/styles.css
var styles_default116, init_styles117 = __esm({
  "src/modules/user-highlighting/styles.css"() {
    styles_default116 = `.mh-improved-highlight-user .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-highlight-user .friendsPage-friendRow-image:focus:after,.mh-improved-highlight-userr .friendsPage-friendRow-image:hover:after,.mh-improved-highlight-user .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,<svg xmlns="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}.mh-improved-highlight-user #tipButton{right:155px}
`;
  }
});

// src/modules/user-highlighting/index.js
var getUserHighlightingShield, highlightUsers, init79, user_highlighting_default, init_user_highlighting = __esm({
  "src/modules/user-highlighting/index.js"() {
    init_utils2();
    init_profile3();
    init_styles117();
    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;
      }
      let wrapper = makeElement("div", ["blackTooltip", "mh-improved-user-shield"]);
      return makeElement("div", "hunterInfoView-verifiedUserImage", null, wrapper), makeElement("span", "blackTooltiptext hunterInfoView-verifiedUser", text, wrapper), wrapper;
    }, highlightUsers = () => __async(void 0, null, function* () {
      let existing = document.querySelectorAll(".mh-improved-user-shield");
      existing && existing.forEach((el) => {
        el.remove();
      });
      let id = document.querySelector(".hunterInfoView-hunterId-idText span");
      if (!id)
        return;
      let profilePage = document.querySelector("#mousehuntContainer.PageHunterProfile");
      if (!profilePage)
        return;
      let idHeader = document.querySelector(".hunterInfoView-idCardBlock-secondaryHeader");
      if (!idHeader)
        return;
      let userId = Number.parseInt(id.textContent, 10), data = sessionGet(`mh-improved-user-highlighting-${userId}`);
      if (data || (data = yield (yield fetch(`https://api.mouse.rip/highlight-user/${userId}`)).json(), debug(`Retrieved user highlighting data for ${userId}`, data), sessionSet(`mh-improved-user-highlighting-${userId}`, data)), !data || !(data != null && data.highlighted))
        return;
      let type = data.type;
      profilePage.classList.add("mh-improved-highlight-user", `mh-improved-${type}`), idHeader.append(getUserHighlightingShield(type)), userId === 8209591 && profilePage.classList.add("mh-improved-highlight-user", "mh-improved-fancy-profile");
    }), init79 = () => __async(void 0, null, function* () {
      addStyles([styles_default116, profile_default3], "highlight-users"), onNavigation(highlightUsers, {
        page: "hunterprofile"
      });
    }), user_highlighting_default = {
      id: "highlight-users",
      type: "required",
      alwaysLoad: !0,
      load: init79
    };
  }
});

// src/modules/wisdom-in-stat-bar/settings/index.js
var settings_default34, init_settings35 = __esm({
  "src/modules/wisdom-in-stat-bar/settings/index.js"() {
    settings_default34 = () => __async(void 0, null, function* () {
      return [{
        id: "wisdom-in-stat-bar-auto-refresh",
        title: "Update automatically",
        default: !0
      }];
    });
  }
});

// src/modules/wisdom-in-stat-bar/index.js
var getWisdomSetting, saveWisdomSetting, getWisdom, getWisdomFormatted, addWisdomToStatBar, updateWisdom, addRefreshListener, useCachedWisdom, init80, wisdom_in_stat_bar_default, init_wisdom_in_stat_bar = __esm({
  "src/modules/wisdom-in-stat-bar/index.js"() {
    init_utils2();
    init_settings35();
    getWisdomSetting = (key) => __async(void 0, null, function* () {
      return yield cacheGet(`wisdom-stat-${key}`);
    }), saveWisdomSetting = (key, value) => {
      cacheSet(`wisdom-stat-${key}`, value);
    }, getWisdom = () => __async(void 0, null, function* () {
      var _a;
      let wisdom = 0;
      if (useCachedWisdom) {
        let cachedWisdom = yield getWisdomSetting("value");
        if (cachedWisdom)
          return cachedWisdom;
      }
      return wisdom = yield getUserItems(["wisdom_stat_item"], !0), wisdom = ((_a = wisdom[0]) == null ? void 0 : _a.quantity) || 0, saveWisdomSetting("value", wisdom), saveWisdomSetting("last-updated", Date.now()), wisdom;
    }), getWisdomFormatted = () => __async(void 0, null, function* () {
      return (yield getWisdom()).toLocaleString();
    }), addWisdomToStatBar = (wisdom) => {
      let existingWisdom = document.querySelector(".mousehuntHud-userStat-row.wisdom .value.hud_wisdom");
      if (existingWisdom) {
        existingWisdom.textContent = wisdom, typeof blinkText != "undefined" && blinkText(existingWisdom, "#59f659", "#fff", 0.7);
        return;
      }
      let pointsRow = document.querySelector(".mousehuntHud-userStat-row.points");
      if (!pointsRow)
        return;
      let wisdomRow = makeElement("div", ["mousehuntHud-userStat-row", "wisdom"]);
      makeElement("span", "label", "Wisdom", wisdomRow), makeElement("span", "value hud_wisdom", wisdom, wisdomRow), wisdomRow.setAttribute("title", "Click to refresh wisdom"), pointsRow.after(wisdomRow);
    }, updateWisdom = () => __async(void 0, null, function* () {
      let wisdom = yield getWisdomFormatted();
      addWisdomToStatBar(wisdom);
    }), addRefreshListener = () => {
      let wisdomRow = document.querySelector(".mousehuntHud-userStat-row.wisdom");
      wisdomRow && wisdomRow.addEventListener("click", () => {
        let cachedWisdomSetting = useCachedWisdom;
        useCachedWisdom = !1, updateWisdom(), useCachedWisdom = cachedWisdomSetting;
      });
    }, useCachedWisdom = !1, init80 = () => __async(void 0, null, function* () {
      getSetting("wisdom-in-stat-bar.auto-refresh", !0) && (useCachedWisdom = !1, onTurn(updateWisdom)), yield updateWisdom(), addRefreshListener(), onDeactivation(() => {
        let wisdomRow = document.querySelector(".mousehuntHud-userStat-row.wisdom");
        wisdomRow && wisdomRow.remove();
      });
    }), wisdom_in_stat_bar_default = {
      id: "wisdom-in-stat-bar",
      name: "Wisdom in Stat Bar",
      type: "feature",
      default: !1,
      description: "Show wisdom in the stat bar.",
      load: init80,
      settings: settings_default34
    };
  }
});

// src/index.js
var require_src = __commonJS({
  "src/index.js"(exports) {
    init_esm3();
    init_utils2();
    init_adblock();
    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_big_timer();
    init_better_ui();
    init_catch_rate_estimate();
    init_codex_at_bottom();
    init_copy_id();
    init_custom_background();
    init_custom_css();
    init_custom_horn();
    init_custom_hud();
    init_custom_shield();
    init_dark_mode();
    init_data_exporters();
    init_debug2();
    init_delayed_menus();
    init_delayed_tooltips();
    init_error_reporting();
    init_experiments();
    init_favorite_setups2();
    init_feature_flags();
    init_fixes();
    init_flrt_helper();
    init_global_styles();
    init_hide_codices();
    init_hide_daily_draw();
    init_hide_daily_reward_popup();
    init_hide_footer();
    init_hide_news_ticker();
    init_hide_share();
    init_hide_sidebar();
    init_hover_profiles();
    init_image_upscaling();
    init_inline_wiki();
    init_inventory_lock_and_hide();
    init_inventory_only_open_multiple();
    init_inventory_open_all();
    init_inventory_open_all_but_one();
    init_journal_changer();
    init_journal_privacy();
    init_keyboard_shortcuts();
    init_larger_codices();
    init_larger_skin_images();
    init_legacy_hud();
    init_lgs_reminder2();
    init_links2();
    init_location_catch_stats();
    init_location_dashboard();
    init_location_huds();
    init_metric();
    init_native_dark_mode();
    init_paste_hunter_id();
    init_prestige_base_stats();
    init_printing_press_paper_counter();
    init_quick_filters_and_sort();
    init_quick_send_supplies();
    init_replace_favicon();
    init_required();
    init_scoreboard_search_on_profiles();
    init_settings32();
    init_shield_goes_to_camp();
    init_show_auras();
    init_ssdb_toothlet_counter();
    init_taller_windows();
    init_tem_crowns();
    init_ultimate_checkmark2();
    init_unique_loot_count();
    init_update_migration();
    init_update_notifications();
    init_user_highlighting();
    init_wisdom_in_stat_bar();
    var imported9 = [adblock_default, 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, big_timer_default, better_ui_default, catch_rate_estimate_default, codex_at_bottom_default, copy_id_default, custom_background_default, custom_css_default, custom_horn_default, custom_hud_default, custom_shield_default, dark_mode_default, data_exporters_default, debug_default, delayed_menus_default, delayed_tooltips_default, error_reporting_default, experiments_default, favorite_setups_default2, feature_flags_default, fixes_default, flrt_helper_default, global_styles_default, hide_codices_default, hide_daily_draw_default, hide_daily_reward_popup_default, hide_footer_default, hide_news_ticker_default, hide_share_default, hide_sidebar_default, hover_profiles_default, image_upscaling_default, inline_wiki_default, inventory_lock_and_hide_default, inventory_only_open_multiple_default, inventory_open_all_default, inventory_open_all_but_one_default, journal_changer_default, journal_privacy_default, keyboard_shortcuts_default, larger_codices_default, larger_skin_images_default, legacy_hud_default, lgs_reminder_default2, links_default, location_catch_stats_default, location_dashboard_default, location_huds_default, metric_default, native_dark_mode_default, paste_hunter_id_default, prestige_base_stats_default, printing_press_paper_counter_default, quick_filters_and_sort_default, quick_send_supplies_default, replace_favicon_default, required_default, scoreboard_search_on_profiles_default, settings_default31, shield_goes_to_camp_default, show_auras_default, ssdb_toothlet_counter_default, taller_windows_default, tem_crowns_default, ultimate_checkmark_default2, unique_loot_count_default, update_migration_default, update_notifications_default, user_highlighting_default, wisdom_in_stat_bar_default], modules = imported9, loadModules = () => __async(exports, null, function* () {
      let categories = [
        { id: "required", name: "Always Loaded" },
        { id: "better", name: `MouseHunt Improved <a class="version">v${mhImprovedVersion}</a>` },
        { id: "feature", name: "Features" },
        { id: "design", name: "Design" },
        { id: "element-hiding", name: "Hide Page Elements" },
        { id: "location-hud", name: "Location HUDs" },
        { id: "beta", name: "Beta Features" },
        { id: "advanced", name: "Advanced" }
      ];
      if (getGlobal("loaded")) {
        debug("Already loaded, exiting.");
        return;
      }
      yield addSettingsTab("mousehunt-improved-settings", "MH Improved"), modules.forEach((m) => {
        let category = categories.find((c) => c.id === m.type);
        if (!category) {
          debug(`Unknown module category: ${m.type}`);
          return;
        }
        category.modules = category.modules || [], category.modules.push(m);
      });
      for (let category of categories)
        category.modules.sort((a, b) => (a.order = a.order || 1, b.order = b.order || 1, a.order !== b.order ? a.order - b.order : (a.name || a.id).localeCompare(b.name || b.id)));
      for (let module2 of categories)
        getCurrentPage() === "preferences" ? yield addSettingForModule(module2) : onNavigation(() => addSettingForModule(module2), {
          page: "preferences"
        });
      let load = [], allLoadedModules = [];
      for (let category of categories) {
        let loadedModules = [];
        for (let module2 of category.modules)
          if (!getFlag(`no-${module2.id}`) && (module2.alwaysLoad || category.id === "required" || getSetting(module2.id, module2.default)))
            try {
              load.push(module2.load()), loadedModules.push(module2.id);
            } catch (error) {
              throw debug(`Error loading "${module2.id}"`, error), error;
            }
        allLoadedModules.push(...loadedModules), debuglog("module-loading", `Loaded ${category.modules.length} ${category.id} modules`, loadedModules);
      }
      try {
        yield Promise.all(load);
      } catch (error) {
        throw getSetting("error-reporting", !0) && captureException(error), error;
      }
      setGlobal("modules", allLoadedModules);
    }), init81 = () => __async(exports, null, function* () {
      if (isUnsupportedFile()) {
        debug("Skipping unsupported filetype.");
        return;
      }
      if (isiFrame()) {
        debug("Loading inside an iframe is not supported.");
        return;
      }
      if (!isApp()) {
        maybeDoMaintenance(), debug("Global MouseHunt functions not found.");
        return;
      }
      if (!eventRegistry) {
        debug("Event registry not found.");
        return;
      }
      try {
        yield loadModules(), setGlobal("version", mhImprovedVersion), setGlobal("loaded", !0), doEvent2("mh-improved-loaded", {
          version: mhImprovedVersion,
          modules: getGlobal("modules")
        }), console.log(
          `%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"
        ), doEvent2("mh-improved-init", mhImprovedVersion);
      } catch (error) {
        showLoadingError(error);
      }
    });
    init81();
  }
});
return require_src();
})();