/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __toBinary = /* @__PURE__ */ (() => {
  var table = new Uint8Array(128);
  for (var i = 0; i < 64; i++)
    table[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i * 4 - 205] = i;
  return (base64) => {
    var n = base64.length, bytes = new Uint8Array((n - (base64[n - 1] == "=") - (base64[n - 2] == "=")) * 3 / 4 | 0);
    for (var i2 = 0, j = 0; i2 < n; ) {
      var c0 = table[base64.charCodeAt(i2++)], c1 = table[base64.charCodeAt(i2++)];
      var c2 = table[base64.charCodeAt(i2++)], c3 = table[base64.charCodeAt(i2++)];
      bytes[j++] = c0 << 2 | c1 >> 4;
      bytes[j++] = c1 << 4 | c2 >> 2;
      bytes[j++] = c2 << 6 | c3;
    }
    return bytes;
  };
})();

// node_modules/clean-css/lib/optimizer/level-0/optimize.js
var require_optimize = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-0/optimize.js"(exports, module2) {
    function level0Optimize(tokens) {
      return tokens;
    }
    module2.exports = level0Optimize;
  }
});

// node_modules/clean-css/lib/utils/natural-compare.js
var require_natural_compare = __commonJS({
  "node_modules/clean-css/lib/utils/natural-compare.js"(exports, module2) {
    var NUMBER_PATTERN = /([0-9]+)/;
    function naturalCompare(value1, value2) {
      var keys1 = ("" + value1).split(NUMBER_PATTERN).map(tryParseInt);
      var keys2 = ("" + value2).split(NUMBER_PATTERN).map(tryParseInt);
      var key1;
      var key2;
      var compareFirst = Math.min(keys1.length, keys2.length);
      var i, l;
      for (i = 0, l = compareFirst; i < l; i++) {
        key1 = keys1[i];
        key2 = keys2[i];
        if (key1 != key2) {
          return key1 > key2 ? 1 : -1;
        }
      }
      return keys1.length > keys2.length ? 1 : keys1.length == keys2.length ? 0 : -1;
    }
    function tryParseInt(value) {
      return "" + parseInt(value) == value ? parseInt(value) : value;
    }
    module2.exports = naturalCompare;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/sort-selectors.js
var require_sort_selectors = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/sort-selectors.js"(exports, module2) {
    var naturalCompare = require_natural_compare();
    function naturalSorter(scope1, scope2) {
      return naturalCompare(scope1[1], scope2[1]);
    }
    function standardSorter(scope1, scope2) {
      return scope1[1] > scope2[1] ? 1 : -1;
    }
    function sortSelectors(selectors, method) {
      switch (method) {
        case "natural":
          return selectors.sort(naturalSorter);
        case "standard":
          return selectors.sort(standardSorter);
        case "none":
        case false:
          return selectors;
      }
    }
    module2.exports = sortSelectors;
  }
});

// node_modules/clean-css/lib/utils/override.js
var require_override = __commonJS({
  "node_modules/clean-css/lib/utils/override.js"(exports, module2) {
    function override(source1, source2) {
      var target = {};
      var key1;
      var key2;
      var item;
      for (key1 in source1) {
        item = source1[key1];
        if (Array.isArray(item)) {
          target[key1] = item.slice(0);
        } else if (typeof item == "object" && item !== null) {
          target[key1] = override(item, {});
        } else {
          target[key1] = item;
        }
      }
      for (key2 in source2) {
        item = source2[key2];
        if (key2 in target && Array.isArray(item)) {
          target[key2] = item.slice(0);
        } else if (key2 in target && typeof item == "object" && item !== null) {
          target[key2] = override(target[key2], item);
        } else {
          target[key2] = item;
        }
      }
      return target;
    }
    module2.exports = override;
  }
});

// node_modules/clean-css/lib/options/format.js
var require_format = __commonJS({
  "node_modules/clean-css/lib/options/format.js"(exports, module2) {
    var systemLineBreak = require("os").EOL;
    var override = require_override();
    var Breaks = {
      AfterAtRule: "afterAtRule",
      AfterBlockBegins: "afterBlockBegins",
      AfterBlockEnds: "afterBlockEnds",
      AfterComment: "afterComment",
      AfterProperty: "afterProperty",
      AfterRuleBegins: "afterRuleBegins",
      AfterRuleEnds: "afterRuleEnds",
      BeforeBlockEnds: "beforeBlockEnds",
      BetweenSelectors: "betweenSelectors"
    };
    var BreakWith = {
      CarriageReturnLineFeed: "\r\n",
      LineFeed: "\n",
      System: systemLineBreak
    };
    var IndentWith = {
      Space: " ",
      Tab: "	"
    };
    var Spaces = {
      AroundSelectorRelation: "aroundSelectorRelation",
      BeforeBlockBegins: "beforeBlockBegins",
      BeforeValue: "beforeValue"
    };
    var DEFAULTS = {
      breaks: breaks(false),
      breakWith: BreakWith.System,
      indentBy: 0,
      indentWith: IndentWith.Space,
      spaces: spaces(false),
      wrapAt: false,
      semicolonAfterLastProperty: false
    };
    var BEAUTIFY_ALIAS = "beautify";
    var KEEP_BREAKS_ALIAS = "keep-breaks";
    var OPTION_SEPARATOR = ";";
    var OPTION_NAME_VALUE_SEPARATOR = ":";
    var HASH_VALUES_OPTION_SEPARATOR = ",";
    var HASH_VALUES_NAME_VALUE_SEPARATOR = "=";
    var FALSE_KEYWORD_1 = "false";
    var FALSE_KEYWORD_2 = "off";
    var TRUE_KEYWORD_1 = "true";
    var TRUE_KEYWORD_2 = "on";
    function breaks(value) {
      var breakOptions = {};
      breakOptions[Breaks.AfterAtRule] = value;
      breakOptions[Breaks.AfterBlockBegins] = value;
      breakOptions[Breaks.AfterBlockEnds] = value;
      breakOptions[Breaks.AfterComment] = value;
      breakOptions[Breaks.AfterProperty] = value;
      breakOptions[Breaks.AfterRuleBegins] = value;
      breakOptions[Breaks.AfterRuleEnds] = value;
      breakOptions[Breaks.BeforeBlockEnds] = value;
      breakOptions[Breaks.BetweenSelectors] = value;
      return breakOptions;
    }
    function spaces(value) {
      var spaceOptions = {};
      spaceOptions[Spaces.AroundSelectorRelation] = value;
      spaceOptions[Spaces.BeforeBlockBegins] = value;
      spaceOptions[Spaces.BeforeValue] = value;
      return spaceOptions;
    }
    function formatFrom(source) {
      if (source === void 0 || source === false) {
        return false;
      }
      if (typeof source == "object" && "breakWith" in source) {
        source = override(source, { breakWith: mapBreakWith(source.breakWith) });
      }
      if (typeof source == "object" && "indentBy" in source) {
        source = override(source, { indentBy: parseInt(source.indentBy) });
      }
      if (typeof source == "object" && "indentWith" in source) {
        source = override(source, { indentWith: mapIndentWith(source.indentWith) });
      }
      if (typeof source == "object") {
        return remapBreaks(override(DEFAULTS, source));
      }
      if (typeof source == "string" && source == BEAUTIFY_ALIAS) {
        return remapBreaks(override(DEFAULTS, {
          breaks: breaks(true),
          indentBy: 2,
          spaces: spaces(true)
        }));
      }
      if (typeof source == "string" && source == KEEP_BREAKS_ALIAS) {
        return remapBreaks(override(DEFAULTS, {
          breaks: {
            afterAtRule: true,
            afterBlockBegins: true,
            afterBlockEnds: true,
            afterComment: true,
            afterRuleEnds: true,
            beforeBlockEnds: true
          }
        }));
      }
      if (typeof source == "string") {
        return remapBreaks(override(DEFAULTS, toHash(source)));
      }
      return DEFAULTS;
    }
    function toHash(string) {
      return string.split(OPTION_SEPARATOR).reduce(function(accumulator, directive) {
        var parts = directive.split(OPTION_NAME_VALUE_SEPARATOR);
        var name = parts[0];
        var value = parts[1];
        if (name == "breaks" || name == "spaces") {
          accumulator[name] = hashValuesToHash(value);
        } else if (name == "indentBy" || name == "wrapAt") {
          accumulator[name] = parseInt(value);
        } else if (name == "indentWith") {
          accumulator[name] = mapIndentWith(value);
        } else if (name == "breakWith") {
          accumulator[name] = mapBreakWith(value);
        }
        return accumulator;
      }, {});
    }
    function hashValuesToHash(string) {
      return string.split(HASH_VALUES_OPTION_SEPARATOR).reduce(function(accumulator, directive) {
        var parts = directive.split(HASH_VALUES_NAME_VALUE_SEPARATOR);
        var name = parts[0];
        var value = parts[1];
        accumulator[name] = normalizeValue(value);
        return accumulator;
      }, {});
    }
    function normalizeValue(value) {
      switch (value) {
        case FALSE_KEYWORD_1:
        case FALSE_KEYWORD_2:
          return false;
        case TRUE_KEYWORD_1:
        case TRUE_KEYWORD_2:
          return true;
        default:
          return value;
      }
    }
    function mapBreakWith(value) {
      switch (value) {
        case "windows":
        case "crlf":
        case BreakWith.CarriageReturnLineFeed:
          return BreakWith.CarriageReturnLineFeed;
        case "unix":
        case "lf":
        case BreakWith.LineFeed:
          return BreakWith.LineFeed;
        default:
          return systemLineBreak;
      }
    }
    function mapIndentWith(value) {
      switch (value) {
        case "space":
          return IndentWith.Space;
        case "tab":
          return IndentWith.Tab;
        default:
          return value;
      }
    }
    function remapBreaks(source) {
      for (var key in Breaks) {
        var breakName = Breaks[key];
        var breakValue = source.breaks[breakName];
        if (breakValue === true) {
          source.breaks[breakName] = source.breakWith;
        } else if (breakValue === false) {
          source.breaks[breakName] = "";
        } else {
          source.breaks[breakName] = source.breakWith.repeat(parseInt(breakValue));
        }
      }
      return source;
    }
    module2.exports = {
      Breaks,
      Spaces,
      formatFrom
    };
  }
});

// node_modules/clean-css/lib/tokenizer/marker.js
var require_marker = __commonJS({
  "node_modules/clean-css/lib/tokenizer/marker.js"(exports, module2) {
    var Marker = {
      ASTERISK: "*",
      AT: "@",
      BACK_SLASH: "\\",
      CARRIAGE_RETURN: "\r",
      CLOSE_CURLY_BRACKET: "}",
      CLOSE_ROUND_BRACKET: ")",
      CLOSE_SQUARE_BRACKET: "]",
      COLON: ":",
      COMMA: ",",
      DOUBLE_QUOTE: '"',
      EXCLAMATION: "!",
      FORWARD_SLASH: "/",
      INTERNAL: "-clean-css-",
      NEW_LINE_NIX: "\n",
      OPEN_CURLY_BRACKET: "{",
      OPEN_ROUND_BRACKET: "(",
      OPEN_SQUARE_BRACKET: "[",
      SEMICOLON: ";",
      SINGLE_QUOTE: "'",
      SPACE: " ",
      TAB: "	",
      UNDERSCORE: "_"
    };
    module2.exports = Marker;
  }
});

// node_modules/clean-css/lib/utils/format-position.js
var require_format_position = __commonJS({
  "node_modules/clean-css/lib/utils/format-position.js"(exports, module2) {
    function formatPosition(metadata) {
      var line = metadata[0];
      var column = metadata[1];
      var source = metadata[2];
      return source ? source + ":" + line + ":" + column : line + ":" + column;
    }
    module2.exports = formatPosition;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/tidy-rules.js
var require_tidy_rules = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/tidy-rules.js"(exports, module2) {
    var Spaces = require_format().Spaces;
    var Marker = require_marker();
    var formatPosition = require_format_position();
    var CASE_ATTRIBUTE_PATTERN = /[\s"'][iI]\s*\]/;
    var CASE_RESTORE_PATTERN = /([\d\w])([iI])\]/g;
    var DOUBLE_QUOTE_CASE_PATTERN = /="([a-zA-Z][a-zA-Z\d\-_]+)"([iI])/g;
    var DOUBLE_QUOTE_PATTERN = /="([a-zA-Z][a-zA-Z\d\-_]+)"(\s|\])/g;
    var HTML_COMMENT_PATTERN = /^(?:(?:<!--|-->)\s*)+/;
    var SINGLE_QUOTE_CASE_PATTERN = /='([a-zA-Z][a-zA-Z\d\-_]+)'([iI])/g;
    var SINGLE_QUOTE_PATTERN = /='([a-zA-Z][a-zA-Z\d\-_]+)'(\s|\])/g;
    var RELATION_PATTERN = /[>+~]/;
    var WHITESPACE_PATTERN = /\s/;
    var ASTERISK_PLUS_HTML_HACK = "*+html ";
    var ASTERISK_FIRST_CHILD_PLUS_HTML_HACK = "*:first-child+html ";
    var LESS_THAN = "<";
    var PSEUDO_CLASSES_WITH_SELECTORS = [
      ":current",
      ":future",
      ":has",
      ":host",
      ":host-context",
      ":is",
      ":not",
      ":past",
      ":where"
    ];
    function hasInvalidCharacters(value) {
      var isEscaped;
      var isInvalid = false;
      var character;
      var isQuote = false;
      var i, l;
      for (i = 0, l = value.length; i < l; i++) {
        character = value[i];
        if (isEscaped) {
        } else if (character == Marker.SINGLE_QUOTE || character == Marker.DOUBLE_QUOTE) {
          isQuote = !isQuote;
        } else if (!isQuote && (character == Marker.CLOSE_CURLY_BRACKET || character == Marker.EXCLAMATION || character == LESS_THAN || character == Marker.SEMICOLON)) {
          isInvalid = true;
          break;
        } else if (!isQuote && i === 0 && RELATION_PATTERN.test(character)) {
          isInvalid = true;
          break;
        }
        isEscaped = character == Marker.BACK_SLASH;
      }
      return isInvalid;
    }
    function removeWhitespace(value, format) {
      var stripped = [];
      var character;
      var isNewLineNix;
      var isNewLineWin;
      var isEscaped;
      var wasEscaped;
      var isQuoted;
      var isSingleQuoted;
      var isDoubleQuoted;
      var isAttribute;
      var isRelation;
      var isWhitespace;
      var isSpaceAwarePseudoClass;
      var roundBracketLevel = 0;
      var wasComma = false;
      var wasRelation = false;
      var wasWhitespace = false;
      var withCaseAttribute = CASE_ATTRIBUTE_PATTERN.test(value);
      var spaceAroundRelation = format && format.spaces[Spaces.AroundSelectorRelation];
      var i, l;
      for (i = 0, l = value.length; i < l; i++) {
        character = value[i];
        isNewLineNix = character == Marker.NEW_LINE_NIX;
        isNewLineWin = character == Marker.NEW_LINE_NIX && value[i - 1] == Marker.CARRIAGE_RETURN;
        isQuoted = isSingleQuoted || isDoubleQuoted;
        isRelation = !isAttribute && !isEscaped && roundBracketLevel === 0 && RELATION_PATTERN.test(character);
        isWhitespace = WHITESPACE_PATTERN.test(character);
        isSpaceAwarePseudoClass = roundBracketLevel == 1 && character == Marker.CLOSE_ROUND_BRACKET ? false : isSpaceAwarePseudoClass || roundBracketLevel === 0 && character == Marker.COLON && isPseudoClassWithSelectors(value, i);
        if (wasEscaped && isQuoted && isNewLineWin) {
          stripped.pop();
          stripped.pop();
        } else if (isEscaped && isQuoted && isNewLineNix) {
          stripped.pop();
        } else if (isEscaped) {
          stripped.push(character);
        } else if (character == Marker.OPEN_SQUARE_BRACKET && !isQuoted) {
          stripped.push(character);
          isAttribute = true;
        } else if (character == Marker.CLOSE_SQUARE_BRACKET && !isQuoted) {
          stripped.push(character);
          isAttribute = false;
        } else if (character == Marker.OPEN_ROUND_BRACKET && !isQuoted) {
          stripped.push(character);
          roundBracketLevel++;
        } else if (character == Marker.CLOSE_ROUND_BRACKET && !isQuoted) {
          stripped.push(character);
          roundBracketLevel--;
        } else if (character == Marker.SINGLE_QUOTE && !isQuoted) {
          stripped.push(character);
          isSingleQuoted = true;
        } else if (character == Marker.DOUBLE_QUOTE && !isQuoted) {
          stripped.push(character);
          isDoubleQuoted = true;
        } else if (character == Marker.SINGLE_QUOTE && isQuoted) {
          stripped.push(character);
          isSingleQuoted = false;
        } else if (character == Marker.DOUBLE_QUOTE && isQuoted) {
          stripped.push(character);
          isDoubleQuoted = false;
        } else if (isWhitespace && wasRelation && !spaceAroundRelation) {
          continue;
        } else if (!isWhitespace && wasRelation && spaceAroundRelation) {
          stripped.push(Marker.SPACE);
          stripped.push(character);
        } else if (isWhitespace && !wasWhitespace && wasComma && roundBracketLevel > 0 && isSpaceAwarePseudoClass) {
        } else if (isWhitespace && !wasWhitespace && roundBracketLevel > 0 && isSpaceAwarePseudoClass) {
          stripped.push(character);
        } else if (isWhitespace && (isAttribute || roundBracketLevel > 0) && !isQuoted) {
        } else if (isWhitespace && wasWhitespace && !isQuoted) {
        } else if ((isNewLineWin || isNewLineNix) && (isAttribute || roundBracketLevel > 0) && isQuoted) {
        } else if (isRelation && wasWhitespace && !spaceAroundRelation) {
          stripped.pop();
          stripped.push(character);
        } else if (isRelation && !wasWhitespace && spaceAroundRelation) {
          stripped.push(Marker.SPACE);
          stripped.push(character);
        } else if (isWhitespace) {
          stripped.push(Marker.SPACE);
        } else {
          stripped.push(character);
        }
        wasEscaped = isEscaped;
        isEscaped = character == Marker.BACK_SLASH;
        wasRelation = isRelation;
        wasWhitespace = isWhitespace;
        wasComma = character == Marker.COMMA;
      }
      return withCaseAttribute ? stripped.join("").replace(CASE_RESTORE_PATTERN, "$1 $2]") : stripped.join("");
    }
    function isPseudoClassWithSelectors(value, colonPosition) {
      var pseudoClass = value.substring(colonPosition, value.indexOf(Marker.OPEN_ROUND_BRACKET, colonPosition));
      return PSEUDO_CLASSES_WITH_SELECTORS.indexOf(pseudoClass) > -1;
    }
    function removeQuotes(value) {
      if (value.indexOf("'") == -1 && value.indexOf('"') == -1) {
        return value;
      }
      return value.replace(SINGLE_QUOTE_CASE_PATTERN, "=$1 $2").replace(SINGLE_QUOTE_PATTERN, "=$1$2").replace(DOUBLE_QUOTE_CASE_PATTERN, "=$1 $2").replace(DOUBLE_QUOTE_PATTERN, "=$1$2");
    }
    function replacePseudoClasses(value) {
      return value.replace("nth-child(1)", "first-child").replace("nth-of-type(1)", "first-of-type").replace("nth-of-type(even)", "nth-of-type(2n)").replace("nth-child(even)", "nth-child(2n)").replace("nth-of-type(2n+1)", "nth-of-type(odd)").replace("nth-child(2n+1)", "nth-child(odd)").replace("nth-last-child(1)", "last-child").replace("nth-last-of-type(1)", "last-of-type").replace("nth-last-of-type(even)", "nth-last-of-type(2n)").replace("nth-last-child(even)", "nth-last-child(2n)").replace("nth-last-of-type(2n+1)", "nth-last-of-type(odd)").replace("nth-last-child(2n+1)", "nth-last-child(odd)");
    }
    function tidyRules(rules, removeUnsupported, adjacentSpace, format, warnings) {
      var list = [];
      var repeated = [];
      function removeHTMLComment(rule2, match) {
        warnings.push("HTML comment '" + match + "' at " + formatPosition(rule2[2][0]) + ". Removing.");
        return "";
      }
      for (var i = 0, l = rules.length; i < l; i++) {
        var rule = rules[i];
        var reduced = rule[1];
        reduced = reduced.replace(HTML_COMMENT_PATTERN, removeHTMLComment.bind(null, rule));
        if (hasInvalidCharacters(reduced)) {
          warnings.push("Invalid selector '" + rule[1] + "' at " + formatPosition(rule[2][0]) + ". Ignoring.");
          continue;
        }
        reduced = removeWhitespace(reduced, format);
        reduced = removeQuotes(reduced);
        if (adjacentSpace && reduced.indexOf("nav") > 0) {
          reduced = reduced.replace(/\+nav(\S|$)/, "+ nav$1");
        }
        if (removeUnsupported && reduced.indexOf(ASTERISK_PLUS_HTML_HACK) > -1) {
          continue;
        }
        if (removeUnsupported && reduced.indexOf(ASTERISK_FIRST_CHILD_PLUS_HTML_HACK) > -1) {
          continue;
        }
        if (reduced.indexOf("*") > -1) {
          reduced = reduced.replace(/\*([:#.[])/g, "$1").replace(/^(:first-child)?\+html/, "*$1+html");
        }
        if (repeated.indexOf(reduced) > -1) {
          continue;
        }
        reduced = replacePseudoClasses(reduced);
        rule[1] = reduced;
        repeated.push(reduced);
        list.push(rule);
      }
      if (list.length == 1 && list[0][1].length === 0) {
        warnings.push("Empty selector '" + list[0][1] + "' at " + formatPosition(list[0][2][0]) + ". Ignoring.");
        list = [];
      }
      return list;
    }
    module2.exports = tidyRules;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/tidy-block.js
var require_tidy_block = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/tidy-block.js"(exports, module2) {
    var SUPPORTED_COMPACT_BLOCK_MATCHER = /^@media\W/;
    var SUPPORTED_QUOTE_REMOVAL_MATCHER = /^@(?:keyframes|-moz-keyframes|-o-keyframes|-webkit-keyframes)\W/;
    function tidyBlock(values, spaceAfterClosingBrace) {
      var withoutSpaceAfterClosingBrace;
      var withoutQuotes;
      var i;
      for (i = values.length - 1; i >= 0; i--) {
        withoutSpaceAfterClosingBrace = !spaceAfterClosingBrace && SUPPORTED_COMPACT_BLOCK_MATCHER.test(values[i][1]);
        withoutQuotes = SUPPORTED_QUOTE_REMOVAL_MATCHER.test(values[i][1]);
        values[i][1] = values[i][1].replace(/\n|\r\n/g, " ").replace(/\s+/g, " ").replace(/(,|:|\() /g, "$1").replace(/ \)/g, ")");
        if (withoutQuotes) {
          values[i][1] = values[i][1].replace(/'([a-zA-Z][a-zA-Z\d\-_]+)'/, "$1").replace(/"([a-zA-Z][a-zA-Z\d\-_]+)"/, "$1");
        }
        if (withoutSpaceAfterClosingBrace) {
          values[i][1] = values[i][1].replace(/\) /g, ")");
        }
      }
      return values;
    }
    module2.exports = tidyBlock;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/tidy-at-rule.js
var require_tidy_at_rule = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/tidy-at-rule.js"(exports, module2) {
    function tidyAtRule(value) {
      return value.replace(/\s+/g, " ").replace(/url\(\s+/g, "url(").replace(/\s+\)/g, ")").trim();
    }
    module2.exports = tidyAtRule;
  }
});

// node_modules/clean-css/lib/optimizer/hack.js
var require_hack = __commonJS({
  "node_modules/clean-css/lib/optimizer/hack.js"(exports, module2) {
    var Hack = {
      ASTERISK: "asterisk",
      BANG: "bang",
      BACKSLASH: "backslash",
      UNDERSCORE: "underscore"
    };
    module2.exports = Hack;
  }
});

// node_modules/clean-css/lib/optimizer/remove-unused.js
var require_remove_unused = __commonJS({
  "node_modules/clean-css/lib/optimizer/remove-unused.js"(exports, module2) {
    function removeUnused(properties) {
      for (var i = properties.length - 1; i >= 0; i--) {
        var property = properties[i];
        if (property.unused) {
          property.all.splice(property.position, 1);
        }
      }
    }
    module2.exports = removeUnused;
  }
});

// node_modules/clean-css/lib/optimizer/restore-from-optimizing.js
var require_restore_from_optimizing = __commonJS({
  "node_modules/clean-css/lib/optimizer/restore-from-optimizing.js"(exports, module2) {
    var Hack = require_hack();
    var Marker = require_marker();
    var ASTERISK_HACK = "*";
    var BACKSLASH_HACK = "\\";
    var IMPORTANT_TOKEN = "!important";
    var UNDERSCORE_HACK = "_";
    var BANG_HACK = "!ie";
    function restoreFromOptimizing(properties, restoreCallback) {
      var property;
      var restored;
      var current;
      var i;
      for (i = properties.length - 1; i >= 0; i--) {
        property = properties[i];
        if (property.dynamic && property.important) {
          restoreImportant(property);
          continue;
        }
        if (property.dynamic) {
          continue;
        }
        if (property.unused) {
          continue;
        }
        if (!property.dirty && !property.important && !property.hack) {
          continue;
        }
        if (property.optimizable && restoreCallback) {
          restored = restoreCallback(property);
          property.value = restored;
        } else {
          restored = property.value;
        }
        if (property.important) {
          restoreImportant(property);
        }
        if (property.hack) {
          restoreHack(property);
        }
        if ("all" in property) {
          current = property.all[property.position];
          current[1][1] = property.name;
          current.splice(2, current.length - 1);
          Array.prototype.push.apply(current, restored);
        }
      }
    }
    function restoreImportant(property) {
      property.value[property.value.length - 1][1] += IMPORTANT_TOKEN;
    }
    function restoreHack(property) {
      if (property.hack[0] == Hack.UNDERSCORE) {
        property.name = UNDERSCORE_HACK + property.name;
      } else if (property.hack[0] == Hack.ASTERISK) {
        property.name = ASTERISK_HACK + property.name;
      } else if (property.hack[0] == Hack.BACKSLASH) {
        property.value[property.value.length - 1][1] += BACKSLASH_HACK + property.hack[1];
      } else if (property.hack[0] == Hack.BANG) {
        property.value[property.value.length - 1][1] += Marker.SPACE + BANG_HACK;
      }
    }
    module2.exports = restoreFromOptimizing;
  }
});

// node_modules/clean-css/lib/tokenizer/token.js
var require_token = __commonJS({
  "node_modules/clean-css/lib/tokenizer/token.js"(exports, module2) {
    var Token = {
      AT_RULE: "at-rule",
      AT_RULE_BLOCK: "at-rule-block",
      AT_RULE_BLOCK_SCOPE: "at-rule-block-scope",
      COMMENT: "comment",
      NESTED_BLOCK: "nested-block",
      NESTED_BLOCK_SCOPE: "nested-block-scope",
      PROPERTY: "property",
      PROPERTY_BLOCK: "property-block",
      PROPERTY_NAME: "property-name",
      PROPERTY_VALUE: "property-value",
      RAW: "raw",
      RULE: "rule",
      RULE_SCOPE: "rule-scope"
    };
    module2.exports = Token;
  }
});

// node_modules/clean-css/lib/optimizer/wrap-for-optimizing.js
var require_wrap_for_optimizing = __commonJS({
  "node_modules/clean-css/lib/optimizer/wrap-for-optimizing.js"(exports, module2) {
    var Hack = require_hack();
    var Marker = require_marker();
    var Token = require_token();
    var Match = {
      ASTERISK: "*",
      BACKSLASH: "\\",
      BANG: "!",
      BANG_SUFFIX_PATTERN: /!\w+$/,
      IMPORTANT_TOKEN: "!important",
      IMPORTANT_TOKEN_PATTERN: new RegExp("!important$", "i"),
      IMPORTANT_WORD: "important",
      IMPORTANT_WORD_PATTERN: new RegExp("important$", "i"),
      SUFFIX_BANG_PATTERN: /!$/,
      UNDERSCORE: "_",
      VARIABLE_REFERENCE_PATTERN: /var\(--.+\)$/
    };
    function wrapAll(properties, skipProperties) {
      var wrapped = [];
      var single;
      var property;
      var i;
      for (i = properties.length - 1; i >= 0; i--) {
        property = properties[i];
        if (property[0] != Token.PROPERTY) {
          continue;
        }
        if (skipProperties && skipProperties.indexOf(property[1][1]) > -1) {
          continue;
        }
        single = wrapSingle(property);
        single.all = properties;
        single.position = i;
        wrapped.unshift(single);
      }
      return wrapped;
    }
    function someVariableReferences(property) {
      var i, l;
      var value;
      for (i = 2, l = property.length; i < l; i++) {
        value = property[i];
        if (value[0] != Token.PROPERTY_VALUE) {
          continue;
        }
        if (isVariableReference(value[1])) {
          return true;
        }
      }
      return false;
    }
    function isVariableReference(value) {
      return Match.VARIABLE_REFERENCE_PATTERN.test(value);
    }
    function isMultiplex(property) {
      var value;
      var i, l;
      for (i = 3, l = property.length; i < l; i++) {
        value = property[i];
        if (value[0] == Token.PROPERTY_VALUE && (value[1] == Marker.COMMA || value[1] == Marker.FORWARD_SLASH)) {
          return true;
        }
      }
      return false;
    }
    function hackFrom(property) {
      var match = false;
      var name = property[1][1];
      var lastValue = property[property.length - 1];
      if (name[0] == Match.UNDERSCORE) {
        match = [Hack.UNDERSCORE];
      } else if (name[0] == Match.ASTERISK) {
        match = [Hack.ASTERISK];
      } else if (lastValue[1][0] == Match.BANG && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN)) {
        match = [Hack.BANG];
      } else if (lastValue[1].indexOf(Match.BANG) > 0 && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN) && Match.BANG_SUFFIX_PATTERN.test(lastValue[1])) {
        match = [Hack.BANG];
      } else if (lastValue[1].indexOf(Match.BACKSLASH) > 0 && lastValue[1].indexOf(Match.BACKSLASH) == lastValue[1].length - Match.BACKSLASH.length - 1) {
        match = [Hack.BACKSLASH, lastValue[1].substring(lastValue[1].indexOf(Match.BACKSLASH) + 1)];
      } else if (lastValue[1].indexOf(Match.BACKSLASH) === 0 && lastValue[1].length == 2) {
        match = [Hack.BACKSLASH, lastValue[1].substring(1)];
      }
      return match;
    }
    function isImportant(property) {
      if (property.length < 3) {
        return false;
      }
      var lastValue = property[property.length - 1];
      if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {
        return true;
      }
      if (Match.IMPORTANT_WORD_PATTERN.test(lastValue[1]) && Match.SUFFIX_BANG_PATTERN.test(property[property.length - 2][1])) {
        return true;
      }
      return false;
    }
    function stripImportant(property) {
      var lastValue = property[property.length - 1];
      var oneButLastValue = property[property.length - 2];
      if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {
        lastValue[1] = lastValue[1].replace(Match.IMPORTANT_TOKEN_PATTERN, "");
      } else {
        lastValue[1] = lastValue[1].replace(Match.IMPORTANT_WORD_PATTERN, "");
        oneButLastValue[1] = oneButLastValue[1].replace(Match.SUFFIX_BANG_PATTERN, "");
      }
      if (lastValue[1].length === 0) {
        property.pop();
      }
      if (oneButLastValue[1].length === 0) {
        property.pop();
      }
    }
    function stripPrefixHack(property) {
      property[1][1] = property[1][1].substring(1);
    }
    function stripSuffixHack(property, hackFrom2) {
      var lastValue = property[property.length - 1];
      lastValue[1] = lastValue[1].substring(0, lastValue[1].indexOf(hackFrom2[0] == Hack.BACKSLASH ? Match.BACKSLASH : Match.BANG)).trim();
      if (lastValue[1].length === 0) {
        property.pop();
      }
    }
    function wrapSingle(property) {
      var importantProperty = isImportant(property);
      if (importantProperty) {
        stripImportant(property);
      }
      var whichHack = hackFrom(property);
      if (whichHack[0] == Hack.ASTERISK || whichHack[0] == Hack.UNDERSCORE) {
        stripPrefixHack(property);
      } else if (whichHack[0] == Hack.BACKSLASH || whichHack[0] == Hack.BANG) {
        stripSuffixHack(property, whichHack);
      }
      return {
        block: property[2] && property[2][0] == Token.PROPERTY_BLOCK,
        components: [],
        dirty: false,
        dynamic: someVariableReferences(property),
        hack: whichHack,
        important: importantProperty,
        name: property[1][1],
        multiplex: property.length > 3 ? isMultiplex(property) : false,
        optimizable: true,
        position: 0,
        shorthand: false,
        unused: false,
        value: property.slice(2)
      };
    }
    module2.exports = {
      all: wrapAll,
      single: wrapSingle
    };
  }
});

// node_modules/clean-css/lib/optimizer/invalid-property-error.js
var require_invalid_property_error = __commonJS({
  "node_modules/clean-css/lib/optimizer/invalid-property-error.js"(exports, module2) {
    function InvalidPropertyError(message) {
      this.name = "InvalidPropertyError";
      this.message = message;
      this.stack = new Error().stack;
    }
    InvalidPropertyError.prototype = Object.create(Error.prototype);
    InvalidPropertyError.prototype.constructor = InvalidPropertyError;
    module2.exports = InvalidPropertyError;
  }
});

// node_modules/clean-css/lib/optimizer/configuration/break-up.js
var require_break_up = __commonJS({
  "node_modules/clean-css/lib/optimizer/configuration/break-up.js"(exports, module2) {
    var InvalidPropertyError = require_invalid_property_error();
    var wrapSingle = require_wrap_for_optimizing().single;
    var Token = require_token();
    var Marker = require_marker();
    var formatPosition = require_format_position();
    function _anyIsInherit(values) {
      var i, l;
      for (i = 0, l = values.length; i < l; i++) {
        if (values[i][1] == "inherit") {
          return true;
        }
      }
      return false;
    }
    function _colorFilter(validator) {
      return function(value) {
        return value[1] == "invert" || validator.isColor(value[1]) || validator.isPrefixed(value[1]);
      };
    }
    function _styleFilter(validator) {
      return function(value) {
        return value[1] != "inherit" && validator.isStyleKeyword(value[1]) && !validator.isColorFunction(value[1]);
      };
    }
    function _wrapDefault(name, property, configuration) {
      var descriptor = configuration[name];
      if (descriptor.doubleValues && descriptor.defaultValue.length == 2) {
        return wrapSingle([
          Token.PROPERTY,
          [Token.PROPERTY_NAME, name],
          [Token.PROPERTY_VALUE, descriptor.defaultValue[0]],
          [Token.PROPERTY_VALUE, descriptor.defaultValue[1]]
        ]);
      }
      if (descriptor.doubleValues && descriptor.defaultValue.length == 1) {
        return wrapSingle([
          Token.PROPERTY,
          [Token.PROPERTY_NAME, name],
          [Token.PROPERTY_VALUE, descriptor.defaultValue[0]]
        ]);
      }
      return wrapSingle([
        Token.PROPERTY,
        [Token.PROPERTY_NAME, name],
        [Token.PROPERTY_VALUE, descriptor.defaultValue]
      ]);
    }
    function _widthFilter(validator) {
      return function(value) {
        return value[1] != "inherit" && (validator.isWidth(value[1]) || validator.isUnit(value[1]) || validator.isDynamicUnit(value[1])) && !validator.isStyleKeyword(value[1]) && !validator.isColorFunction(value[1]);
      };
    }
    function animation(property, configuration, validator) {
      var duration = _wrapDefault(property.name + "-duration", property, configuration);
      var timing = _wrapDefault(property.name + "-timing-function", property, configuration);
      var delay = _wrapDefault(property.name + "-delay", property, configuration);
      var iteration = _wrapDefault(property.name + "-iteration-count", property, configuration);
      var direction = _wrapDefault(property.name + "-direction", property, configuration);
      var fill = _wrapDefault(property.name + "-fill-mode", property, configuration);
      var play = _wrapDefault(property.name + "-play-state", property, configuration);
      var name = _wrapDefault(property.name + "-name", property, configuration);
      var components = [duration, timing, delay, iteration, direction, fill, play, name];
      var values = property.value;
      var value;
      var durationSet = false;
      var timingSet = false;
      var delaySet = false;
      var iterationSet = false;
      var directionSet = false;
      var fillSet = false;
      var playSet = false;
      var nameSet = false;
      var i;
      var l;
      if (property.value.length == 1 && property.value[0][1] == "inherit") {
        duration.value = timing.value = delay.value = iteration.value = direction.value = fill.value = play.value = name.value = property.value;
        return components;
      }
      if (values.length > 1 && _anyIsInherit(values)) {
        throw new InvalidPropertyError("Invalid animation values at " + formatPosition(values[0][2][0]) + ". Ignoring.");
      }
      for (i = 0, l = values.length; i < l; i++) {
        value = values[i];
        if (validator.isTime(value[1]) && !durationSet) {
          duration.value = [value];
          durationSet = true;
        } else if (validator.isTime(value[1]) && !delaySet) {
          delay.value = [value];
          delaySet = true;
        } else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {
          timing.value = [value];
          timingSet = true;
        } else if ((validator.isAnimationIterationCountKeyword(value[1]) || validator.isPositiveNumber(value[1])) && !iterationSet) {
          iteration.value = [value];
          iterationSet = true;
        } else if (validator.isAnimationDirectionKeyword(value[1]) && !directionSet) {
          direction.value = [value];
          directionSet = true;
        } else if (validator.isAnimationFillModeKeyword(value[1]) && !fillSet) {
          fill.value = [value];
          fillSet = true;
        } else if (validator.isAnimationPlayStateKeyword(value[1]) && !playSet) {
          play.value = [value];
          playSet = true;
        } else if ((validator.isAnimationNameKeyword(value[1]) || validator.isIdentifier(value[1])) && !nameSet) {
          name.value = [value];
          nameSet = true;
        } else {
          throw new InvalidPropertyError("Invalid animation value at " + formatPosition(value[2][0]) + ". Ignoring.");
        }
      }
      return components;
    }
    function background(property, configuration, validator) {
      var image = _wrapDefault("background-image", property, configuration);
      var position = _wrapDefault("background-position", property, configuration);
      var size = _wrapDefault("background-size", property, configuration);
      var repeat = _wrapDefault("background-repeat", property, configuration);
      var attachment = _wrapDefault("background-attachment", property, configuration);
      var origin = _wrapDefault("background-origin", property, configuration);
      var clip = _wrapDefault("background-clip", property, configuration);
      var color = _wrapDefault("background-color", property, configuration);
      var components = [image, position, size, repeat, attachment, origin, clip, color];
      var values = property.value;
      var positionSet = false;
      var clipSet = false;
      var originSet = false;
      var repeatSet = false;
      var anyValueSet = false;
      if (property.value.length == 1 && property.value[0][1] == "inherit") {
        color.value = image.value = repeat.value = position.value = size.value = origin.value = clip.value = property.value;
        return components;
      }
      if (property.value.length == 1 && property.value[0][1] == "0 0") {
        return components;
      }
      for (var i = values.length - 1; i >= 0; i--) {
        var value = values[i];
        if (validator.isBackgroundAttachmentKeyword(value[1])) {
          attachment.value = [value];
          anyValueSet = true;
        } else if (validator.isBackgroundClipKeyword(value[1]) || validator.isBackgroundOriginKeyword(value[1])) {
          if (clipSet) {
            origin.value = [value];
            originSet = true;
          } else {
            clip.value = [value];
            clipSet = true;
          }
          anyValueSet = true;
        } else if (validator.isBackgroundRepeatKeyword(value[1])) {
          if (repeatSet) {
            repeat.value.unshift(value);
          } else {
            repeat.value = [value];
            repeatSet = true;
          }
          anyValueSet = true;
        } else if (validator.isBackgroundPositionKeyword(value[1]) || validator.isBackgroundSizeKeyword(value[1]) || validator.isUnit(value[1]) || validator.isDynamicUnit(value[1])) {
          if (i > 0) {
            var previousValue = values[i - 1];
            if (previousValue[1] == Marker.FORWARD_SLASH) {
              size.value = [value];
            } else if (i > 1 && values[i - 2][1] == Marker.FORWARD_SLASH) {
              size.value = [previousValue, value];
              i -= 2;
            } else {
              if (!positionSet) {
                position.value = [];
              }
              position.value.unshift(value);
              positionSet = true;
            }
          } else {
            if (!positionSet) {
              position.value = [];
            }
            position.value.unshift(value);
            positionSet = true;
          }
          anyValueSet = true;
        } else if ((color.value[0][1] == configuration[color.name].defaultValue || color.value[0][1] == "none") && (validator.isColor(value[1]) || validator.isPrefixed(value[1]))) {
          color.value = [value];
          anyValueSet = true;
        } else if (validator.isUrl(value[1]) || validator.isFunction(value[1])) {
          image.value = [value];
          anyValueSet = true;
        }
      }
      if (clipSet && !originSet) {
        origin.value = clip.value.slice(0);
      }
      if (!anyValueSet) {
        throw new InvalidPropertyError("Invalid background value at " + formatPosition(values[0][2][0]) + ". Ignoring.");
      }
      return components;
    }
    function borderRadius(property, configuration) {
      var values = property.value;
      var splitAt = -1;
      for (var i = 0, l = values.length; i < l; i++) {
        if (values[i][1] == Marker.FORWARD_SLASH) {
          splitAt = i;
          break;
        }
      }
      if (splitAt === 0 || splitAt === values.length - 1) {
        throw new InvalidPropertyError("Invalid border-radius value at " + formatPosition(values[0][2][0]) + ". Ignoring.");
      }
      var target = _wrapDefault(property.name, property, configuration);
      target.value = splitAt > -1 ? values.slice(0, splitAt) : values.slice(0);
      target.components = fourValues(target, configuration);
      var remainder = _wrapDefault(property.name, property, configuration);
      remainder.value = splitAt > -1 ? values.slice(splitAt + 1) : values.slice(0);
      remainder.components = fourValues(remainder, configuration);
      for (var j = 0; j < 4; j++) {
        target.components[j].multiplex = true;
        target.components[j].value = target.components[j].value.concat(remainder.components[j].value);
      }
      return target.components;
    }
    function font(property, configuration, validator) {
      var style = _wrapDefault("font-style", property, configuration);
      var variant = _wrapDefault("font-variant", property, configuration);
      var weight = _wrapDefault("font-weight", property, configuration);
      var stretch = _wrapDefault("font-stretch", property, configuration);
      var size = _wrapDefault("font-size", property, configuration);
      var height = _wrapDefault("line-height", property, configuration);
      var family = _wrapDefault("font-family", property, configuration);
      var components = [style, variant, weight, stretch, size, height, family];
      var values = property.value;
      var fuzzyMatched = 4;
      var index = 0;
      var isStretchSet = false;
      var isStretchValid;
      var isStyleSet = false;
      var isStyleValid;
      var isVariantSet = false;
      var isVariantValid;
      var isWeightSet = false;
      var isWeightValid;
      var appendableFamilyName = false;
      if (!values[index]) {
        throw new InvalidPropertyError("Missing font values at " + formatPosition(property.all[property.position][1][2][0]) + ". Ignoring.");
      }
      if (values.length == 1 && values[0][1] == "inherit") {
        style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;
        return components;
      }
      if (values.length == 1 && (validator.isFontKeyword(values[0][1]) || validator.isGlobal(values[0][1]) || validator.isPrefixed(values[0][1]))) {
        values[0][1] = Marker.INTERNAL + values[0][1];
        style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;
        return components;
      }
      if (values.length < 2 || !_anyIsFontSize(values, validator) || !_anyIsFontFamily(values, validator)) {
        throw new InvalidPropertyError("Invalid font values at " + formatPosition(property.all[property.position][1][2][0]) + ". Ignoring.");
      }
      if (values.length > 1 && _anyIsInherit(values)) {
        throw new InvalidPropertyError("Invalid font values at " + formatPosition(values[0][2][0]) + ". Ignoring.");
      }
      while (index < fuzzyMatched) {
        isStretchValid = validator.isFontStretchKeyword(values[index][1]) || validator.isGlobal(values[index][1]);
        isStyleValid = validator.isFontStyleKeyword(values[index][1]) || validator.isGlobal(values[index][1]);
        isVariantValid = validator.isFontVariantKeyword(values[index][1]) || validator.isGlobal(values[index][1]);
        isWeightValid = validator.isFontWeightKeyword(values[index][1]) || validator.isGlobal(values[index][1]);
        if (isStyleValid && !isStyleSet) {
          style.value = [values[index]];
          isStyleSet = true;
        } else if (isVariantValid && !isVariantSet) {
          variant.value = [values[index]];
          isVariantSet = true;
        } else if (isWeightValid && !isWeightSet) {
          weight.value = [values[index]];
          isWeightSet = true;
        } else if (isStretchValid && !isStretchSet) {
          stretch.value = [values[index]];
          isStretchSet = true;
        } else if (isStyleValid && isStyleSet || isVariantValid && isVariantSet || isWeightValid && isWeightSet || isStretchValid && isStretchSet) {
          throw new InvalidPropertyError("Invalid font style / variant / weight / stretch value at " + formatPosition(values[0][2][0]) + ". Ignoring.");
        } else {
          break;
        }
        index++;
      }
      if (validator.isFontSizeKeyword(values[index][1]) || validator.isUnit(values[index][1]) && !validator.isDynamicUnit(values[index][1])) {
        size.value = [values[index]];
        index++;
      } else {
        throw new InvalidPropertyError("Missing font size at " + formatPosition(values[0][2][0]) + ". Ignoring.");
      }
      if (!values[index]) {
        throw new InvalidPropertyError("Missing font family at " + formatPosition(values[0][2][0]) + ". Ignoring.");
      }
      if (values[index] && values[index][1] == Marker.FORWARD_SLASH && values[index + 1] && (validator.isLineHeightKeyword(values[index + 1][1]) || validator.isUnit(values[index + 1][1]) || validator.isNumber(values[index + 1][1]))) {
        height.value = [values[index + 1]];
        index++;
        index++;
      }
      family.value = [];
      while (values[index]) {
        if (values[index][1] == Marker.COMMA) {
          appendableFamilyName = false;
        } else {
          if (appendableFamilyName) {
            family.value[family.value.length - 1][1] += Marker.SPACE + values[index][1];
          } else {
            family.value.push(values[index]);
          }
          appendableFamilyName = true;
        }
        index++;
      }
      if (family.value.length === 0) {
        throw new InvalidPropertyError("Missing font family at " + formatPosition(values[0][2][0]) + ". Ignoring.");
      }
      return components;
    }
    function _anyIsFontSize(values, validator) {
      var value;
      var i, l;
      for (i = 0, l = values.length; i < l; i++) {
        value = values[i];
        if (validator.isFontSizeKeyword(value[1]) || validator.isUnit(value[1]) && !validator.isDynamicUnit(value[1]) || validator.isFunction(value[1])) {
          return true;
        }
      }
      return false;
    }
    function _anyIsFontFamily(values, validator) {
      var value;
      var i, l;
      for (i = 0, l = values.length; i < l; i++) {
        value = values[i];
        if (validator.isIdentifier(value[1]) || validator.isQuotedText(value[1])) {
          return true;
        }
      }
      return false;
    }
    function fourValues(property, configuration) {
      var componentNames = configuration[property.name].components;
      var components = [];
      var value = property.value;
      if (value.length < 1) {
        return [];
      }
      if (value.length < 2) {
        value[1] = value[0].slice(0);
      }
      if (value.length < 3) {
        value[2] = value[0].slice(0);
      }
      if (value.length < 4) {
        value[3] = value[1].slice(0);
      }
      for (var i = componentNames.length - 1; i >= 0; i--) {
        var component = wrapSingle([
          Token.PROPERTY,
          [Token.PROPERTY_NAME, componentNames[i]]
        ]);
        component.value = [value[i]];
        components.unshift(component);
      }
      return components;
    }
    function multiplex(splitWith) {
      return function(property, configuration, validator) {
        var splitsAt = [];
        var values = property.value;
        var i, j, l, m;
        for (i = 0, l = values.length; i < l; i++) {
          if (values[i][1] == ",") {
            splitsAt.push(i);
          }
        }
        if (splitsAt.length === 0) {
          return splitWith(property, configuration, validator);
        }
        var splitComponents = [];
        for (i = 0, l = splitsAt.length; i <= l; i++) {
          var from = i === 0 ? 0 : splitsAt[i - 1] + 1;
          var to = i < l ? splitsAt[i] : values.length;
          var _property = _wrapDefault(property.name, property, configuration);
          _property.value = values.slice(from, to);
          if (_property.value.length > 0) {
            splitComponents.push(splitWith(_property, configuration, validator));
          }
        }
        var components = splitComponents[0];
        for (i = 0, l = components.length; i < l; i++) {
          components[i].multiplex = true;
          for (j = 1, m = splitComponents.length; j < m; j++) {
            components[i].value.push([Token.PROPERTY_VALUE, Marker.COMMA]);
            Array.prototype.push.apply(components[i].value, splitComponents[j][i].value);
          }
        }
        return components;
      };
    }
    function listStyle(property, configuration, validator) {
      var type = _wrapDefault("list-style-type", property, configuration);
      var position = _wrapDefault("list-style-position", property, configuration);
      var image = _wrapDefault("list-style-image", property, configuration);
      var components = [type, position, image];
      if (property.value.length == 1 && property.value[0][1] == "inherit") {
        type.value = position.value = image.value = [property.value[0]];
        return components;
      }
      var values = property.value.slice(0);
      var total = values.length;
      var index = 0;
      for (index = 0, total = values.length; index < total; index++) {
        if (validator.isUrl(values[index][1]) || values[index][1] == "0") {
          image.value = [values[index]];
          values.splice(index, 1);
          break;
        }
      }
      for (index = 0, total = values.length; index < total; index++) {
        if (validator.isListStylePositionKeyword(values[index][1])) {
          position.value = [values[index]];
          values.splice(index, 1);
          break;
        }
      }
      if (values.length > 0 && (validator.isListStyleTypeKeyword(values[0][1]) || validator.isIdentifier(values[0][1]))) {
        type.value = [values[0]];
      }
      return components;
    }
    function transition(property, configuration, validator) {
      var prop = _wrapDefault(property.name + "-property", property, configuration);
      var duration = _wrapDefault(property.name + "-duration", property, configuration);
      var timing = _wrapDefault(property.name + "-timing-function", property, configuration);
      var delay = _wrapDefault(property.name + "-delay", property, configuration);
      var components = [prop, duration, timing, delay];
      var values = property.value;
      var value;
      var durationSet = false;
      var delaySet = false;
      var propSet = false;
      var timingSet = false;
      var i;
      var l;
      if (property.value.length == 1 && property.value[0][1] == "inherit") {
        prop.value = duration.value = timing.value = delay.value = property.value;
        return components;
      }
      if (values.length > 1 && _anyIsInherit(values)) {
        throw new InvalidPropertyError("Invalid animation values at " + formatPosition(values[0][2][0]) + ". Ignoring.");
      }
      for (i = 0, l = values.length; i < l; i++) {
        value = values[i];
        if (validator.isTime(value[1]) && !durationSet) {
          duration.value = [value];
          durationSet = true;
        } else if (validator.isTime(value[1]) && !delaySet) {
          delay.value = [value];
          delaySet = true;
        } else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {
          timing.value = [value];
          timingSet = true;
        } else if (validator.isIdentifier(value[1]) && !propSet) {
          prop.value = [value];
          propSet = true;
        } else {
          throw new InvalidPropertyError("Invalid animation value at " + formatPosition(value[2][0]) + ". Ignoring.");
        }
      }
      return components;
    }
    function widthStyleColor(property, configuration, validator) {
      var descriptor = configuration[property.name];
      var components = [
        _wrapDefault(descriptor.components[0], property, configuration),
        _wrapDefault(descriptor.components[1], property, configuration),
        _wrapDefault(descriptor.components[2], property, configuration)
      ];
      var color, style, width;
      for (var i = 0; i < 3; i++) {
        var component = components[i];
        if (component.name.indexOf("color") > 0) {
          color = component;
        } else if (component.name.indexOf("style") > 0) {
          style = component;
        } else {
          width = component;
        }
      }
      if (property.value.length == 1 && property.value[0][1] == "inherit" || property.value.length == 3 && property.value[0][1] == "inherit" && property.value[1][1] == "inherit" && property.value[2][1] == "inherit") {
        color.value = style.value = width.value = [property.value[0]];
        return components;
      }
      var values = property.value.slice(0);
      var match, matches;
      if (values.length > 0) {
        matches = values.filter(_widthFilter(validator));
        match = matches.length > 1 && (matches[0][1] == "none" || matches[0][1] == "auto") ? matches[1] : matches[0];
        if (match) {
          width.value = [match];
          values.splice(values.indexOf(match), 1);
        }
      }
      if (values.length > 0) {
        match = values.filter(_styleFilter(validator))[0];
        if (match) {
          style.value = [match];
          values.splice(values.indexOf(match), 1);
        }
      }
      if (values.length > 0) {
        match = values.filter(_colorFilter(validator))[0];
        if (match) {
          color.value = [match];
          values.splice(values.indexOf(match), 1);
        }
      }
      return components;
    }
    module2.exports = {
      animation,
      background,
      border: widthStyleColor,
      borderRadius,
      font,
      fourValues,
      listStyle,
      multiplex,
      outline: widthStyleColor,
      transition
    };
  }
});

// node_modules/clean-css/lib/optimizer/vendor-prefixes.js
var require_vendor_prefixes = __commonJS({
  "node_modules/clean-css/lib/optimizer/vendor-prefixes.js"(exports, module2) {
    var VENDOR_PREFIX_PATTERN = /(?:^|\W)(-\w+-)/g;
    function unique(value) {
      var prefixes = [];
      var match;
      while ((match = VENDOR_PREFIX_PATTERN.exec(value)) !== null) {
        if (prefixes.indexOf(match[0]) == -1) {
          prefixes.push(match[0]);
        }
      }
      return prefixes;
    }
    function same(value1, value2) {
      return unique(value1).sort().join(",") == unique(value2).sort().join(",");
    }
    module2.exports = {
      unique,
      same
    };
  }
});

// node_modules/clean-css/lib/optimizer/configuration/properties/understandable.js
var require_understandable = __commonJS({
  "node_modules/clean-css/lib/optimizer/configuration/properties/understandable.js"(exports, module2) {
    var sameVendorPrefixes = require_vendor_prefixes().same;
    function understandable(validator, value1, value2, _position, isPaired) {
      if (!sameVendorPrefixes(value1, value2)) {
        return false;
      }
      if (isPaired && validator.isVariable(value1) !== validator.isVariable(value2)) {
        return false;
      }
      return true;
    }
    module2.exports = understandable;
  }
});

// node_modules/clean-css/lib/optimizer/configuration/can-override.js
var require_can_override = __commonJS({
  "node_modules/clean-css/lib/optimizer/configuration/can-override.js"(exports, module2) {
    var understandable = require_understandable();
    function animationIterationCount(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !(validator.isAnimationIterationCountKeyword(value2) || validator.isPositiveNumber(value2))) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      return validator.isAnimationIterationCountKeyword(value2) || validator.isPositiveNumber(value2);
    }
    function animationName(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !(validator.isAnimationNameKeyword(value2) || validator.isIdentifier(value2))) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      return validator.isAnimationNameKeyword(value2) || validator.isIdentifier(value2);
    }
    function areSameFunction(validator, value1, value2) {
      if (!validator.isFunction(value1) || !validator.isFunction(value2)) {
        return false;
      }
      var function1Name = value1.substring(0, value1.indexOf("("));
      var function2Name = value2.substring(0, value2.indexOf("("));
      var function1Value = value1.substring(function1Name.length + 1, value1.length - 1);
      var function2Value = value2.substring(function2Name.length + 1, value2.length - 1);
      if (validator.isFunction(function1Value) || validator.isFunction(function2Value)) {
        return function1Name === function2Name && areSameFunction(validator, function1Value, function2Value);
      }
      return function1Name === function2Name;
    }
    function backgroundPosition(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !(validator.isBackgroundPositionKeyword(value2) || validator.isGlobal(value2))) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      if (validator.isBackgroundPositionKeyword(value2) || validator.isGlobal(value2)) {
        return true;
      }
      return unit(validator, value1, value2);
    }
    function backgroundSize(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !(validator.isBackgroundSizeKeyword(value2) || validator.isGlobal(value2))) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      if (validator.isBackgroundSizeKeyword(value2) || validator.isGlobal(value2)) {
        return true;
      }
      return unit(validator, value1, value2);
    }
    function color(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !validator.isColor(value2)) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      if (!validator.colorOpacity && (validator.isRgbColor(value1) || validator.isHslColor(value1))) {
        return false;
      }
      if (!validator.colorOpacity && (validator.isRgbColor(value2) || validator.isHslColor(value2))) {
        return false;
      }
      if (!validator.colorHexAlpha && (validator.isHexAlphaColor(value1) || validator.isHexAlphaColor(value2))) {
        return false;
      }
      if (validator.isColor(value1) && validator.isColor(value2)) {
        return true;
      }
      return sameFunctionOrValue(validator, value1, value2);
    }
    function components(overrideCheckers) {
      return function(validator, value1, value2, position) {
        return overrideCheckers[position](validator, value1, value2);
      };
    }
    function fontFamily(validator, value1, value2) {
      return understandable(validator, value1, value2, 0, true);
    }
    function image(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !validator.isImage(value2)) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      if (validator.isImage(value2)) {
        return true;
      }
      if (validator.isImage(value1)) {
        return false;
      }
      return sameFunctionOrValue(validator, value1, value2);
    }
    function keyword(propertyName2) {
      return function(validator, value1, value2) {
        if (!understandable(validator, value1, value2, 0, true) && !validator.isKeyword(propertyName2)(value2)) {
          return false;
        }
        if (validator.isVariable(value1) && validator.isVariable(value2)) {
          return true;
        }
        return validator.isKeyword(propertyName2)(value2);
      };
    }
    function keywordWithGlobal(propertyName2) {
      return function(validator, value1, value2) {
        if (!understandable(validator, value1, value2, 0, true) && !(validator.isKeyword(propertyName2)(value2) || validator.isGlobal(value2))) {
          return false;
        }
        if (validator.isVariable(value1) && validator.isVariable(value2)) {
          return true;
        }
        return validator.isKeyword(propertyName2)(value2) || validator.isGlobal(value2);
      };
    }
    function propertyName(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !validator.isIdentifier(value2)) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      return validator.isIdentifier(value2);
    }
    function sameFunctionOrValue(validator, value1, value2) {
      return areSameFunction(validator, value1, value2) ? true : value1 === value2;
    }
    function textShadow(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !(validator.isUnit(value2) || validator.isColor(value2) || validator.isGlobal(value2))) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      return validator.isUnit(value2) || validator.isColor(value2) || validator.isGlobal(value2);
    }
    function time(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !validator.isTime(value2)) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      if (validator.isTime(value1) && !validator.isTime(value2)) {
        return false;
      }
      if (validator.isTime(value2)) {
        return true;
      }
      if (validator.isTime(value1)) {
        return false;
      }
      if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {
        return true;
      }
      return sameFunctionOrValue(validator, value1, value2);
    }
    function timingFunction(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !(validator.isTimingFunction(value2) || validator.isGlobal(value2))) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      return validator.isTimingFunction(value2) || validator.isGlobal(value2);
    }
    function unit(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !validator.isUnit(value2)) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      if (validator.isUnit(value1) && !validator.isUnit(value2)) {
        return false;
      }
      if (validator.isUnit(value2)) {
        return true;
      }
      if (validator.isUnit(value1)) {
        return false;
      }
      if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {
        return true;
      }
      return sameFunctionOrValue(validator, value1, value2);
    }
    function unitOrKeywordWithGlobal(propertyName2) {
      var byKeyword = keywordWithGlobal(propertyName2);
      return function(validator, value1, value2) {
        return unit(validator, value1, value2) || byKeyword(validator, value1, value2);
      };
    }
    function unitOrNumber(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !(validator.isUnit(value2) || validator.isNumber(value2))) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      if ((validator.isUnit(value1) || validator.isNumber(value1)) && !(validator.isUnit(value2) || validator.isNumber(value2))) {
        return false;
      }
      if (validator.isUnit(value2) || validator.isNumber(value2)) {
        return true;
      }
      if (validator.isUnit(value1) || validator.isNumber(value1)) {
        return false;
      }
      if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {
        return true;
      }
      return sameFunctionOrValue(validator, value1, value2);
    }
    function zIndex(validator, value1, value2) {
      if (!understandable(validator, value1, value2, 0, true) && !validator.isZIndex(value2)) {
        return false;
      }
      if (validator.isVariable(value1) && validator.isVariable(value2)) {
        return true;
      }
      return validator.isZIndex(value2);
    }
    module2.exports = {
      generic: {
        color,
        components,
        image,
        propertyName,
        time,
        timingFunction,
        unit,
        unitOrNumber
      },
      property: {
        animationDirection: keywordWithGlobal("animation-direction"),
        animationFillMode: keyword("animation-fill-mode"),
        animationIterationCount,
        animationName,
        animationPlayState: keywordWithGlobal("animation-play-state"),
        backgroundAttachment: keyword("background-attachment"),
        backgroundClip: keywordWithGlobal("background-clip"),
        backgroundOrigin: keyword("background-origin"),
        backgroundPosition,
        backgroundRepeat: keyword("background-repeat"),
        backgroundSize,
        bottom: unitOrKeywordWithGlobal("bottom"),
        borderCollapse: keyword("border-collapse"),
        borderStyle: keywordWithGlobal("*-style"),
        clear: keywordWithGlobal("clear"),
        cursor: keywordWithGlobal("cursor"),
        display: keywordWithGlobal("display"),
        float: keywordWithGlobal("float"),
        left: unitOrKeywordWithGlobal("left"),
        fontFamily,
        fontStretch: keywordWithGlobal("font-stretch"),
        fontStyle: keywordWithGlobal("font-style"),
        fontVariant: keywordWithGlobal("font-variant"),
        fontWeight: keywordWithGlobal("font-weight"),
        listStyleType: keywordWithGlobal("list-style-type"),
        listStylePosition: keywordWithGlobal("list-style-position"),
        outlineStyle: keywordWithGlobal("*-style"),
        overflow: keywordWithGlobal("overflow"),
        position: keywordWithGlobal("position"),
        right: unitOrKeywordWithGlobal("right"),
        textAlign: keywordWithGlobal("text-align"),
        textDecoration: keywordWithGlobal("text-decoration"),
        textOverflow: keywordWithGlobal("text-overflow"),
        textShadow,
        top: unitOrKeywordWithGlobal("top"),
        transform: sameFunctionOrValue,
        verticalAlign: unitOrKeywordWithGlobal("vertical-align"),
        visibility: keywordWithGlobal("visibility"),
        whiteSpace: keywordWithGlobal("white-space"),
        zIndex
      }
    };
  }
});

// node_modules/clean-css/lib/optimizer/clone.js
var require_clone = __commonJS({
  "node_modules/clean-css/lib/optimizer/clone.js"(exports, module2) {
    var wrapSingle = require_wrap_for_optimizing().single;
    var Token = require_token();
    function deep(property) {
      var cloned = shallow(property);
      for (var i = property.components.length - 1; i >= 0; i--) {
        var component = shallow(property.components[i]);
        component.value = property.components[i].value.slice(0);
        cloned.components.unshift(component);
      }
      cloned.dirty = true;
      cloned.value = property.value.slice(0);
      return cloned;
    }
    function shallow(property) {
      var cloned = wrapSingle([
        Token.PROPERTY,
        [Token.PROPERTY_NAME, property.name]
      ]);
      cloned.important = property.important;
      cloned.hack = property.hack;
      cloned.unused = false;
      return cloned;
    }
    module2.exports = {
      deep,
      shallow
    };
  }
});

// node_modules/clean-css/lib/optimizer/configuration/restore.js
var require_restore = __commonJS({
  "node_modules/clean-css/lib/optimizer/configuration/restore.js"(exports, module2) {
    var shallowClone = require_clone().shallow;
    var Token = require_token();
    var Marker = require_marker();
    function isInheritOnly(values) {
      for (var i = 0, l = values.length; i < l; i++) {
        var value = values[i][1];
        if (value != "inherit" && value != Marker.COMMA && value != Marker.FORWARD_SLASH) {
          return false;
        }
      }
      return true;
    }
    function background(property, configuration, lastInMultiplex) {
      var components = property.components;
      var restored = [];
      var needsOne, needsBoth;
      function restoreValue(component2) {
        Array.prototype.unshift.apply(restored, component2.value);
      }
      function isDefaultValue(component2) {
        var descriptor = configuration[component2.name];
        if (descriptor.doubleValues && descriptor.defaultValue.length == 1) {
          return component2.value[0][1] == descriptor.defaultValue[0] && (component2.value[1] ? component2.value[1][1] == descriptor.defaultValue[0] : true);
        }
        if (descriptor.doubleValues && descriptor.defaultValue.length != 1) {
          return component2.value[0][1] == descriptor.defaultValue[0] && (component2.value[1] ? component2.value[1][1] : component2.value[0][1]) == descriptor.defaultValue[1];
        }
        return component2.value[0][1] == descriptor.defaultValue;
      }
      for (var i = components.length - 1; i >= 0; i--) {
        var component = components[i];
        var isDefault2 = isDefaultValue(component);
        if (component.name == "background-clip") {
          var originComponent = components[i - 1];
          var isOriginDefault = isDefaultValue(originComponent);
          needsOne = component.value[0][1] == originComponent.value[0][1];
          needsBoth = !needsOne && (isOriginDefault && !isDefault2 || !isOriginDefault && !isDefault2 || !isOriginDefault && isDefault2 && component.value[0][1] != originComponent.value[0][1]);
          if (needsOne) {
            restoreValue(originComponent);
          } else if (needsBoth) {
            restoreValue(component);
            restoreValue(originComponent);
          }
          i--;
        } else if (component.name == "background-size") {
          var positionComponent = components[i - 1];
          var isPositionDefault = isDefaultValue(positionComponent);
          needsOne = !isPositionDefault && isDefault2;
          needsBoth = !needsOne && (isPositionDefault && !isDefault2 || !isPositionDefault && !isDefault2);
          if (needsOne) {
            restoreValue(positionComponent);
          } else if (needsBoth) {
            restoreValue(component);
            restored.unshift([Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]);
            restoreValue(positionComponent);
          } else if (positionComponent.value.length == 1) {
            restoreValue(positionComponent);
          }
          i--;
        } else {
          if (isDefault2 || configuration[component.name].multiplexLastOnly && !lastInMultiplex) {
            continue;
          }
          restoreValue(component);
        }
      }
      if (restored.length === 0 && property.value.length == 1 && property.value[0][1] == "0") {
        restored.push(property.value[0]);
      }
      if (restored.length === 0) {
        restored.push([Token.PROPERTY_VALUE, configuration[property.name].defaultValue]);
      }
      if (isInheritOnly(restored)) {
        return [restored[0]];
      }
      return restored;
    }
    function borderRadius(property) {
      if (property.multiplex) {
        var horizontal = shallowClone(property);
        var vertical = shallowClone(property);
        for (var i = 0; i < 4; i++) {
          var component = property.components[i];
          var horizontalComponent = shallowClone(property);
          horizontalComponent.value = [component.value[0]];
          horizontal.components.push(horizontalComponent);
          var verticalComponent = shallowClone(property);
          verticalComponent.value = [component.value[1] || component.value[0]];
          vertical.components.push(verticalComponent);
        }
        var horizontalValues = fourValues(horizontal);
        var verticalValues = fourValues(vertical);
        if (horizontalValues.length == verticalValues.length && horizontalValues[0][1] == verticalValues[0][1] && (horizontalValues.length > 1 ? horizontalValues[1][1] == verticalValues[1][1] : true) && (horizontalValues.length > 2 ? horizontalValues[2][1] == verticalValues[2][1] : true) && (horizontalValues.length > 3 ? horizontalValues[3][1] == verticalValues[3][1] : true)) {
          return horizontalValues;
        }
        return horizontalValues.concat([[Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]]).concat(verticalValues);
      }
      return fourValues(property);
    }
    function font(property, configuration) {
      var components = property.components;
      var restored = [];
      var component;
      var componentIndex = 0;
      var fontFamilyIndex = 0;
      if (property.value[0][1].indexOf(Marker.INTERNAL) === 0) {
        property.value[0][1] = property.value[0][1].substring(Marker.INTERNAL.length);
        return property.value;
      }
      while (componentIndex < 4) {
        component = components[componentIndex];
        if (component.value[0][1] != configuration[component.name].defaultValue) {
          Array.prototype.push.apply(restored, component.value);
        }
        componentIndex++;
      }
      Array.prototype.push.apply(restored, components[componentIndex].value);
      componentIndex++;
      if (components[componentIndex].value[0][1] != configuration[components[componentIndex].name].defaultValue) {
        Array.prototype.push.apply(restored, [[Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]]);
        Array.prototype.push.apply(restored, components[componentIndex].value);
      }
      componentIndex++;
      while (components[componentIndex].value[fontFamilyIndex]) {
        restored.push(components[componentIndex].value[fontFamilyIndex]);
        if (components[componentIndex].value[fontFamilyIndex + 1]) {
          restored.push([Token.PROPERTY_VALUE, Marker.COMMA]);
        }
        fontFamilyIndex++;
      }
      if (isInheritOnly(restored)) {
        return [restored[0]];
      }
      return restored;
    }
    function fourValues(property) {
      var components = property.components;
      var value1 = components[0].value[0];
      var value2 = components[1].value[0];
      var value3 = components[2].value[0];
      var value4 = components[3].value[0];
      if (value1[1] == value2[1] && value1[1] == value3[1] && value1[1] == value4[1]) {
        return [value1];
      }
      if (value1[1] == value3[1] && value2[1] == value4[1]) {
        return [value1, value2];
      }
      if (value2[1] == value4[1]) {
        return [value1, value2, value3];
      }
      return [value1, value2, value3, value4];
    }
    function multiplex(restoreWith) {
      return function(property, configuration) {
        if (!property.multiplex) {
          return restoreWith(property, configuration, true);
        }
        var multiplexSize = 0;
        var restored = [];
        var componentMultiplexSoFar = {};
        var i, l;
        for (i = 0, l = property.components[0].value.length; i < l; i++) {
          if (property.components[0].value[i][1] == Marker.COMMA) {
            multiplexSize++;
          }
        }
        for (i = 0; i <= multiplexSize; i++) {
          var _property = shallowClone(property);
          for (var j = 0, m = property.components.length; j < m; j++) {
            var componentToClone = property.components[j];
            var _component = shallowClone(componentToClone);
            _property.components.push(_component);
            for (var k = componentMultiplexSoFar[_component.name] || 0, n = componentToClone.value.length; k < n; k++) {
              if (componentToClone.value[k][1] == Marker.COMMA) {
                componentMultiplexSoFar[_component.name] = k + 1;
                break;
              }
              _component.value.push(componentToClone.value[k]);
            }
          }
          var lastInMultiplex = i == multiplexSize;
          var _restored = restoreWith(_property, configuration, lastInMultiplex);
          Array.prototype.push.apply(restored, _restored);
          if (i < multiplexSize) {
            restored.push([Token.PROPERTY_VALUE, Marker.COMMA]);
          }
        }
        return restored;
      };
    }
    function withoutDefaults(property, configuration) {
      var components = property.components;
      var restored = [];
      for (var i = components.length - 1; i >= 0; i--) {
        var component = components[i];
        var descriptor = configuration[component.name];
        if (component.value[0][1] != descriptor.defaultValue || "keepUnlessDefault" in descriptor && !isDefault(components, configuration, descriptor.keepUnlessDefault)) {
          restored.unshift(component.value[0]);
        }
      }
      if (restored.length === 0) {
        restored.push([Token.PROPERTY_VALUE, configuration[property.name].defaultValue]);
      }
      if (isInheritOnly(restored)) {
        return [restored[0]];
      }
      return restored;
    }
    function isDefault(components, configuration, propertyName) {
      var component;
      var i, l;
      for (i = 0, l = components.length; i < l; i++) {
        component = components[i];
        if (component.name == propertyName && component.value[0][1] == configuration[propertyName].defaultValue) {
          return true;
        }
      }
      return false;
    }
    module2.exports = {
      background,
      borderRadius,
      font,
      fourValues,
      multiplex,
      withoutDefaults
    };
  }
});

// node_modules/clean-css/lib/options/rounding-precision.js
var require_rounding_precision = __commonJS({
  "node_modules/clean-css/lib/options/rounding-precision.js"(exports, module2) {
    var override = require_override();
    var INTEGER_PATTERN = /^\d+$/;
    var ALL_UNITS = ["*", "all"];
    var DEFAULT_PRECISION = "off";
    var DIRECTIVES_SEPARATOR = ",";
    var DIRECTIVE_VALUE_SEPARATOR = "=";
    function roundingPrecisionFrom(source) {
      return override(defaults(DEFAULT_PRECISION), buildPrecisionFrom(source));
    }
    function defaults(value) {
      return {
        ch: value,
        cm: value,
        em: value,
        ex: value,
        in: value,
        mm: value,
        pc: value,
        pt: value,
        px: value,
        q: value,
        rem: value,
        vh: value,
        vmax: value,
        vmin: value,
        vw: value,
        "%": value
      };
    }
    function buildPrecisionFrom(source) {
      if (source === null || source === void 0) {
        return {};
      }
      if (typeof source == "boolean") {
        return {};
      }
      if (typeof source == "number" && source == -1) {
        return defaults(DEFAULT_PRECISION);
      }
      if (typeof source == "number") {
        return defaults(source);
      }
      if (typeof source == "string" && INTEGER_PATTERN.test(source)) {
        return defaults(parseInt(source));
      }
      if (typeof source == "string" && source == DEFAULT_PRECISION) {
        return defaults(DEFAULT_PRECISION);
      }
      if (typeof source == "object") {
        return source;
      }
      return source.split(DIRECTIVES_SEPARATOR).reduce(function(accumulator, directive) {
        var directiveParts = directive.split(DIRECTIVE_VALUE_SEPARATOR);
        var name = directiveParts[0];
        var value = parseInt(directiveParts[1]);
        if (Number.isNaN(value) || value == -1) {
          value = DEFAULT_PRECISION;
        }
        if (ALL_UNITS.indexOf(name) > -1) {
          accumulator = override(accumulator, defaults(value));
        } else {
          accumulator[name] = value;
        }
        return accumulator;
      }, {});
    }
    module2.exports = {
      DEFAULT: DEFAULT_PRECISION,
      roundingPrecisionFrom
    };
  }
});

// node_modules/clean-css/lib/options/optimization-level.js
var require_optimization_level = __commonJS({
  "node_modules/clean-css/lib/options/optimization-level.js"(exports, module2) {
    var roundingPrecisionFrom = require_rounding_precision().roundingPrecisionFrom;
    var override = require_override();
    var OptimizationLevel = {
      Zero: "0",
      One: "1",
      Two: "2"
    };
    var DEFAULTS = {};
    DEFAULTS[OptimizationLevel.Zero] = {};
    DEFAULTS[OptimizationLevel.One] = {
      cleanupCharsets: true,
      normalizeUrls: true,
      optimizeBackground: true,
      optimizeBorderRadius: true,
      optimizeFilter: true,
      optimizeFontWeight: true,
      optimizeOutline: true,
      removeEmpty: true,
      removeNegativePaddings: true,
      removeQuotes: true,
      removeWhitespace: true,
      replaceMultipleZeros: true,
      replaceTimeUnits: true,
      replaceZeroUnits: true,
      roundingPrecision: roundingPrecisionFrom(void 0),
      selectorsSortingMethod: "standard",
      specialComments: "all",
      tidyAtRules: true,
      tidyBlockScopes: true,
      tidySelectors: true,
      variableValueOptimizers: []
    };
    DEFAULTS[OptimizationLevel.Two] = {
      mergeAdjacentRules: true,
      mergeIntoShorthands: true,
      mergeMedia: true,
      mergeNonAdjacentRules: true,
      mergeSemantically: false,
      overrideProperties: true,
      removeEmpty: true,
      reduceNonAdjacentRules: true,
      removeDuplicateFontRules: true,
      removeDuplicateMediaBlocks: true,
      removeDuplicateRules: true,
      removeUnusedAtRules: false,
      restructureRules: false,
      skipProperties: []
    };
    var ALL_KEYWORD_1 = "*";
    var ALL_KEYWORD_2 = "all";
    var FALSE_KEYWORD_1 = "false";
    var FALSE_KEYWORD_2 = "off";
    var TRUE_KEYWORD_1 = "true";
    var TRUE_KEYWORD_2 = "on";
    var LIST_VALUE_SEPARATOR = ",";
    var OPTION_SEPARATOR = ";";
    var OPTION_VALUE_SEPARATOR = ":";
    function optimizationLevelFrom(source) {
      var level = override(DEFAULTS, {});
      var Zero = OptimizationLevel.Zero;
      var One = OptimizationLevel.One;
      var Two = OptimizationLevel.Two;
      if (source === void 0) {
        delete level[Two];
        return level;
      }
      if (typeof source == "string") {
        source = parseInt(source);
      }
      if (typeof source == "number" && source === parseInt(Two)) {
        return level;
      }
      if (typeof source == "number" && source === parseInt(One)) {
        delete level[Two];
        return level;
      }
      if (typeof source == "number" && source === parseInt(Zero)) {
        delete level[Two];
        delete level[One];
        return level;
      }
      if (typeof source == "object") {
        source = covertValuesToHashes(source);
      }
      if (One in source && "roundingPrecision" in source[One]) {
        source[One].roundingPrecision = roundingPrecisionFrom(source[One].roundingPrecision);
      }
      if (Two in source && "skipProperties" in source[Two] && typeof source[Two].skipProperties == "string") {
        source[Two].skipProperties = source[Two].skipProperties.split(LIST_VALUE_SEPARATOR);
      }
      if (Zero in source || One in source || Two in source) {
        level[Zero] = override(level[Zero], source[Zero]);
      }
      if (One in source && ALL_KEYWORD_1 in source[One]) {
        level[One] = override(level[One], defaults(One, normalizeValue(source[One][ALL_KEYWORD_1])));
        delete source[One][ALL_KEYWORD_1];
      }
      if (One in source && ALL_KEYWORD_2 in source[One]) {
        level[One] = override(level[One], defaults(One, normalizeValue(source[One][ALL_KEYWORD_2])));
        delete source[One][ALL_KEYWORD_2];
      }
      if (One in source || Two in source) {
        level[One] = override(level[One], source[One]);
      } else {
        delete level[One];
      }
      if (Two in source && ALL_KEYWORD_1 in source[Two]) {
        level[Two] = override(level[Two], defaults(Two, normalizeValue(source[Two][ALL_KEYWORD_1])));
        delete source[Two][ALL_KEYWORD_1];
      }
      if (Two in source && ALL_KEYWORD_2 in source[Two]) {
        level[Two] = override(level[Two], defaults(Two, normalizeValue(source[Two][ALL_KEYWORD_2])));
        delete source[Two][ALL_KEYWORD_2];
      }
      if (Two in source) {
        level[Two] = override(level[Two], source[Two]);
      } else {
        delete level[Two];
      }
      return level;
    }
    function defaults(level, value) {
      var options = override(DEFAULTS[level], {});
      var key;
      for (key in options) {
        if (typeof options[key] == "boolean") {
          options[key] = value;
        }
      }
      return options;
    }
    function normalizeValue(value) {
      switch (value) {
        case FALSE_KEYWORD_1:
        case FALSE_KEYWORD_2:
          return false;
        case TRUE_KEYWORD_1:
        case TRUE_KEYWORD_2:
          return true;
        default:
          return value;
      }
    }
    function covertValuesToHashes(source) {
      var clonedSource = override(source, {});
      var level;
      var i;
      for (i = 0; i <= 2; i++) {
        level = "" + i;
        if (level in clonedSource && (clonedSource[level] === void 0 || clonedSource[level] === false)) {
          delete clonedSource[level];
        }
        if (level in clonedSource && clonedSource[level] === true) {
          clonedSource[level] = {};
        }
        if (level in clonedSource && typeof clonedSource[level] == "string") {
          clonedSource[level] = covertToHash(clonedSource[level], level);
        }
      }
      return clonedSource;
    }
    function covertToHash(asString, level) {
      return asString.split(OPTION_SEPARATOR).reduce(function(accumulator, directive) {
        var parts = directive.split(OPTION_VALUE_SEPARATOR);
        var name = parts[0];
        var value = parts[1];
        var normalizedValue = normalizeValue(value);
        if (ALL_KEYWORD_1 == name || ALL_KEYWORD_2 == name) {
          accumulator = override(accumulator, defaults(level, normalizedValue));
        } else {
          accumulator[name] = normalizedValue;
        }
        return accumulator;
      }, {});
    }
    module2.exports = {
      OptimizationLevel,
      optimizationLevelFrom
    };
  }
});

// node_modules/clean-css/lib/optimizer/level-1/property-optimizers/background.js
var require_background = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/property-optimizers/background.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var plugin = {
      level1: {
        property: function background(_rule, property, options) {
          var values = property.value;
          if (!options.level[OptimizationLevel.One].optimizeBackground) {
            return;
          }
          if (values.length == 1 && values[0][1] == "none") {
            values[0][1] = "0 0";
          }
          if (values.length == 1 && values[0][1] == "transparent") {
            values[0][1] = "0 0";
          }
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/property-optimizers/box-shadow.js
var require_box_shadow = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/property-optimizers/box-shadow.js"(exports, module2) {
    var plugin = {
      level1: {
        property: function boxShadow(_rule, property) {
          var values = property.value;
          if (values.length == 4 && values[0][1] === "0" && values[1][1] === "0" && values[2][1] === "0" && values[3][1] === "0") {
            property.value.splice(2);
            property.dirty = true;
          }
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/property-optimizers/border-radius.js
var require_border_radius = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/property-optimizers/border-radius.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var plugin = {
      level1: {
        property: function borderRadius(_rule, property, options) {
          var values = property.value;
          if (!options.level[OptimizationLevel.One].optimizeBorderRadius) {
            return;
          }
          if (values.length == 3 && values[1][1] == "/" && values[0][1] == values[2][1]) {
            property.value.splice(1);
            property.dirty = true;
          } else if (values.length == 5 && values[2][1] == "/" && values[0][1] == values[3][1] && values[1][1] == values[4][1]) {
            property.value.splice(2);
            property.dirty = true;
          } else if (values.length == 7 && values[3][1] == "/" && values[0][1] == values[4][1] && values[1][1] == values[5][1] && values[2][1] == values[6][1]) {
            property.value.splice(3);
            property.dirty = true;
          } else if (values.length == 9 && values[4][1] == "/" && values[0][1] == values[5][1] && values[1][1] == values[6][1] && values[2][1] == values[7][1] && values[3][1] == values[8][1]) {
            property.value.splice(4);
            property.dirty = true;
          }
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/property-optimizers/filter.js
var require_filter = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/property-optimizers/filter.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var ALPHA_OR_CHROMA_FILTER_PATTERN = /progid:DXImageTransform\.Microsoft\.(Alpha|Chroma)(\W)/;
    var NO_SPACE_AFTER_COMMA_PATTERN = /,(\S)/g;
    var WHITESPACE_AROUND_EQUALS_PATTERN = / ?= ?/g;
    var plugin = {
      level1: {
        property: function filter(_rule, property, options) {
          if (!options.compatibility.properties.ieFilters) {
            return;
          }
          if (!options.level[OptimizationLevel.One].optimizeFilter) {
            return;
          }
          if (property.value.length == 1) {
            property.value[0][1] = property.value[0][1].replace(ALPHA_OR_CHROMA_FILTER_PATTERN, function(match, filter2, suffix) {
              return filter2.toLowerCase() + suffix;
            });
          }
          property.value[0][1] = property.value[0][1].replace(NO_SPACE_AFTER_COMMA_PATTERN, ", $1").replace(WHITESPACE_AROUND_EQUALS_PATTERN, "=");
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/property-optimizers/font-weight.js
var require_font_weight = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/property-optimizers/font-weight.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var plugin = {
      level1: {
        property: function fontWeight(_rule, property, options) {
          var value = property.value[0][1];
          if (!options.level[OptimizationLevel.One].optimizeFontWeight) {
            return;
          }
          if (value == "normal") {
            value = "400";
          } else if (value == "bold") {
            value = "700";
          }
          property.value[0][1] = value;
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/property-optimizers/margin.js
var require_margin = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/property-optimizers/margin.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var plugin = {
      level1: {
        property: function margin(_rule, property, options) {
          var values = property.value;
          if (!options.level[OptimizationLevel.One].replaceMultipleZeros) {
            return;
          }
          if (values.length == 4 && values[0][1] === "0" && values[1][1] === "0" && values[2][1] === "0" && values[3][1] === "0") {
            property.value.splice(1);
            property.dirty = true;
          }
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/property-optimizers/outline.js
var require_outline = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/property-optimizers/outline.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var plugin = {
      level1: {
        property: function outline(_rule, property, options) {
          var values = property.value;
          if (!options.level[OptimizationLevel.One].optimizeOutline) {
            return;
          }
          if (values.length == 1 && values[0][1] == "none") {
            values[0][1] = "0";
          }
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/property-optimizers/padding.js
var require_padding = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/property-optimizers/padding.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    function isNegative(value) {
      return value && value[1][0] == "-" && parseFloat(value[1]) < 0;
    }
    var plugin = {
      level1: {
        property: function padding(_rule, property, options) {
          var values = property.value;
          if (values.length == 4 && values[0][1] === "0" && values[1][1] === "0" && values[2][1] === "0" && values[3][1] === "0") {
            property.value.splice(1);
            property.dirty = true;
          }
          if (options.level[OptimizationLevel.One].removeNegativePaddings && (isNegative(property.value[0]) || isNegative(property.value[1]) || isNegative(property.value[2]) || isNegative(property.value[3]))) {
            property.unused = true;
          }
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/property-optimizers.js
var require_property_optimizers = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/property-optimizers.js"(exports, module2) {
    module2.exports = {
      background: require_background().level1.property,
      boxShadow: require_box_shadow().level1.property,
      borderRadius: require_border_radius().level1.property,
      filter: require_filter().level1.property,
      fontWeight: require_font_weight().level1.property,
      margin: require_margin().level1.property,
      outline: require_outline().level1.property,
      padding: require_padding().level1.property
    };
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-hex.js
var require_shorten_hex = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-hex.js"(exports, module2) {
    var COLORS = {
      aliceblue: "#f0f8ff",
      antiquewhite: "#faebd7",
      aqua: "#0ff",
      aquamarine: "#7fffd4",
      azure: "#f0ffff",
      beige: "#f5f5dc",
      bisque: "#ffe4c4",
      black: "#000",
      blanchedalmond: "#ffebcd",
      blue: "#00f",
      blueviolet: "#8a2be2",
      brown: "#a52a2a",
      burlywood: "#deb887",
      cadetblue: "#5f9ea0",
      chartreuse: "#7fff00",
      chocolate: "#d2691e",
      coral: "#ff7f50",
      cornflowerblue: "#6495ed",
      cornsilk: "#fff8dc",
      crimson: "#dc143c",
      cyan: "#0ff",
      darkblue: "#00008b",
      darkcyan: "#008b8b",
      darkgoldenrod: "#b8860b",
      darkgray: "#a9a9a9",
      darkgreen: "#006400",
      darkgrey: "#a9a9a9",
      darkkhaki: "#bdb76b",
      darkmagenta: "#8b008b",
      darkolivegreen: "#556b2f",
      darkorange: "#ff8c00",
      darkorchid: "#9932cc",
      darkred: "#8b0000",
      darksalmon: "#e9967a",
      darkseagreen: "#8fbc8f",
      darkslateblue: "#483d8b",
      darkslategray: "#2f4f4f",
      darkslategrey: "#2f4f4f",
      darkturquoise: "#00ced1",
      darkviolet: "#9400d3",
      deeppink: "#ff1493",
      deepskyblue: "#00bfff",
      dimgray: "#696969",
      dimgrey: "#696969",
      dodgerblue: "#1e90ff",
      firebrick: "#b22222",
      floralwhite: "#fffaf0",
      forestgreen: "#228b22",
      fuchsia: "#f0f",
      gainsboro: "#dcdcdc",
      ghostwhite: "#f8f8ff",
      gold: "#ffd700",
      goldenrod: "#daa520",
      gray: "#808080",
      green: "#008000",
      greenyellow: "#adff2f",
      grey: "#808080",
      honeydew: "#f0fff0",
      hotpink: "#ff69b4",
      indianred: "#cd5c5c",
      indigo: "#4b0082",
      ivory: "#fffff0",
      khaki: "#f0e68c",
      lavender: "#e6e6fa",
      lavenderblush: "#fff0f5",
      lawngreen: "#7cfc00",
      lemonchiffon: "#fffacd",
      lightblue: "#add8e6",
      lightcoral: "#f08080",
      lightcyan: "#e0ffff",
      lightgoldenrodyellow: "#fafad2",
      lightgray: "#d3d3d3",
      lightgreen: "#90ee90",
      lightgrey: "#d3d3d3",
      lightpink: "#ffb6c1",
      lightsalmon: "#ffa07a",
      lightseagreen: "#20b2aa",
      lightskyblue: "#87cefa",
      lightslategray: "#778899",
      lightslategrey: "#778899",
      lightsteelblue: "#b0c4de",
      lightyellow: "#ffffe0",
      lime: "#0f0",
      limegreen: "#32cd32",
      linen: "#faf0e6",
      magenta: "#ff00ff",
      maroon: "#800000",
      mediumaquamarine: "#66cdaa",
      mediumblue: "#0000cd",
      mediumorchid: "#ba55d3",
      mediumpurple: "#9370db",
      mediumseagreen: "#3cb371",
      mediumslateblue: "#7b68ee",
      mediumspringgreen: "#00fa9a",
      mediumturquoise: "#48d1cc",
      mediumvioletred: "#c71585",
      midnightblue: "#191970",
      mintcream: "#f5fffa",
      mistyrose: "#ffe4e1",
      moccasin: "#ffe4b5",
      navajowhite: "#ffdead",
      navy: "#000080",
      oldlace: "#fdf5e6",
      olive: "#808000",
      olivedrab: "#6b8e23",
      orange: "#ffa500",
      orangered: "#ff4500",
      orchid: "#da70d6",
      palegoldenrod: "#eee8aa",
      palegreen: "#98fb98",
      paleturquoise: "#afeeee",
      palevioletred: "#db7093",
      papayawhip: "#ffefd5",
      peachpuff: "#ffdab9",
      peru: "#cd853f",
      pink: "#ffc0cb",
      plum: "#dda0dd",
      powderblue: "#b0e0e6",
      purple: "#800080",
      rebeccapurple: "#663399",
      red: "#f00",
      rosybrown: "#bc8f8f",
      royalblue: "#4169e1",
      saddlebrown: "#8b4513",
      salmon: "#fa8072",
      sandybrown: "#f4a460",
      seagreen: "#2e8b57",
      seashell: "#fff5ee",
      sienna: "#a0522d",
      silver: "#c0c0c0",
      skyblue: "#87ceeb",
      slateblue: "#6a5acd",
      slategray: "#708090",
      slategrey: "#708090",
      snow: "#fffafa",
      springgreen: "#00ff7f",
      steelblue: "#4682b4",
      tan: "#d2b48c",
      teal: "#008080",
      thistle: "#d8bfd8",
      tomato: "#ff6347",
      turquoise: "#40e0d0",
      violet: "#ee82ee",
      wheat: "#f5deb3",
      white: "#fff",
      whitesmoke: "#f5f5f5",
      yellow: "#ff0",
      yellowgreen: "#9acd32"
    };
    var toHex = {};
    var toName = {};
    for (name in COLORS) {
      hex = COLORS[name];
      if (name.length < hex.length) {
        toName[hex] = name;
      } else {
        toHex[name] = hex;
      }
    }
    var hex;
    var name;
    var toHexPattern = new RegExp("(^| |,|\\))(" + Object.keys(toHex).join("|") + ")( |,|\\)|$)", "ig");
    var toNamePattern = new RegExp("(" + Object.keys(toName).join("|") + ")([^a-f0-9]|$)", "ig");
    function hexConverter(match, prefix, colorValue, suffix) {
      return prefix + toHex[colorValue.toLowerCase()] + suffix;
    }
    function nameConverter(match, colorValue, suffix) {
      return toName[colorValue.toLowerCase()] + suffix;
    }
    function shortenHex(value) {
      var hasHex = value.indexOf("#") > -1;
      var shortened = value.replace(toHexPattern, hexConverter);
      if (shortened != value) {
        shortened = shortened.replace(toHexPattern, hexConverter);
      }
      return hasHex ? shortened.replace(toNamePattern, nameConverter) : shortened;
    }
    module2.exports = shortenHex;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-hsl.js
var require_shorten_hsl = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-hsl.js"(exports, module2) {
    function hslToRgb(h, s, l) {
      var r, g, b;
      h %= 360;
      if (h < 0) {
        h += 360;
      }
      h = ~~h / 360;
      if (s < 0) {
        s = 0;
      } else if (s > 100) {
        s = 100;
      }
      s = ~~s / 100;
      if (l < 0) {
        l = 0;
      } else if (l > 100) {
        l = 100;
      }
      l = ~~l / 100;
      if (s === 0) {
        r = g = b = l;
      } else {
        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
        var p = 2 * l - q;
        r = hueToRgb(p, q, h + 1 / 3);
        g = hueToRgb(p, q, h);
        b = hueToRgb(p, q, h - 1 / 3);
      }
      return [~~(r * 255), ~~(g * 255), ~~(b * 255)];
    }
    function hueToRgb(p, q, t) {
      if (t < 0) {
        t += 1;
      }
      if (t > 1) {
        t -= 1;
      }
      if (t < 1 / 6) {
        return p + (q - p) * 6 * t;
      }
      if (t < 1 / 2) {
        return q;
      }
      if (t < 2 / 3) {
        return p + (q - p) * (2 / 3 - t) * 6;
      }
      return p;
    }
    function shortenHsl(hue, saturation, lightness) {
      var asRgb = hslToRgb(hue, saturation, lightness);
      var redAsHex = asRgb[0].toString(16);
      var greenAsHex = asRgb[1].toString(16);
      var blueAsHex = asRgb[2].toString(16);
      return "#" + ((redAsHex.length == 1 ? "0" : "") + redAsHex) + ((greenAsHex.length == 1 ? "0" : "") + greenAsHex) + ((blueAsHex.length == 1 ? "0" : "") + blueAsHex);
    }
    module2.exports = shortenHsl;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-rgb.js
var require_shorten_rgb = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-rgb.js"(exports, module2) {
    function shortenRgb(red, green, blue) {
      var normalizedRed = Math.max(0, Math.min(parseInt(red), 255));
      var normalizedGreen = Math.max(0, Math.min(parseInt(green), 255));
      var normalizedBlue = Math.max(0, Math.min(parseInt(blue), 255));
      return "#" + ("00000" + (normalizedRed << 16 | normalizedGreen << 8 | normalizedBlue).toString(16)).slice(-6);
    }
    module2.exports = shortenRgb;
  }
});

// node_modules/clean-css/lib/utils/split.js
var require_split = __commonJS({
  "node_modules/clean-css/lib/utils/split.js"(exports, module2) {
    var Marker = require_marker();
    function is(value, separator, isSeparatorRegex) {
      return isSeparatorRegex ? separator.test(value) : value === separator;
    }
    function split(value, separator) {
      var openLevel = Marker.OPEN_ROUND_BRACKET;
      var closeLevel = Marker.CLOSE_ROUND_BRACKET;
      var level = 0;
      var cursor = 0;
      var lastStart = 0;
      var lastValue;
      var lastCharacter;
      var len = value.length;
      var parts = [];
      var isSeparatorRegex = typeof separator == "object" && "exec" in separator;
      if (!isSeparatorRegex && value.indexOf(separator) == -1) {
        return [value];
      }
      if (value.indexOf(openLevel) == -1) {
        return value.split(separator);
      }
      while (cursor < len) {
        if (value[cursor] == openLevel) {
          level++;
        } else if (value[cursor] == closeLevel) {
          level--;
        }
        if (level === 0 && cursor > 0 && cursor + 1 < len && is(value[cursor], separator, isSeparatorRegex)) {
          parts.push(value.substring(lastStart, cursor));
          if (isSeparatorRegex && separator.exec(value[cursor]).length > 1) {
            parts.push(value[cursor]);
          }
          lastStart = cursor + 1;
        }
        cursor++;
      }
      if (lastStart < cursor + 1) {
        lastValue = value.substring(lastStart);
        lastCharacter = lastValue[lastValue.length - 1];
        if (is(lastCharacter, separator, isSeparatorRegex)) {
          lastValue = lastValue.substring(0, lastValue.length - 1);
        }
        parts.push(lastValue);
      }
      return parts;
    }
    module2.exports = split;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color.js
var require_color = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color.js"(exports, module2) {
    var shortenHex = require_shorten_hex();
    var shortenHsl = require_shorten_hsl();
    var shortenRgb = require_shorten_rgb();
    var split = require_split();
    var ANY_COLOR_FUNCTION_PATTERN = /(rgb|rgba|hsl|hsla)\(([^()]+)\)/gi;
    var COLOR_PREFIX_PATTERN = /#|rgb|hsl/gi;
    var HEX_LONG_PATTERN = /(^|[^='"])#([0-9a-f]{6})/gi;
    var HEX_SHORT_PATTERN = /(^|[^='"])#([0-9a-f]{3})/gi;
    var HEX_VALUE_PATTERN = /[0-9a-f]/i;
    var HSL_PATTERN = /hsl\((-?\d+),(-?\d+)%?,(-?\d+)%?\)/gi;
    var RGBA_HSLA_PATTERN = /(rgb|hsl)a?\((-?\d+),(-?\d+%?),(-?\d+%?),(0*[1-9]+[0-9]*(\.?\d*)?)\)/gi;
    var RGB_PATTERN = /rgb\((-?\d+),(-?\d+),(-?\d+)\)/gi;
    var TRANSPARENT_FUNCTION_PATTERN = /(?:rgba|hsla)\(0,0%?,0%?,0\)/g;
    var plugin = {
      level1: {
        value: function color(name, value, options) {
          if (!options.compatibility.properties.colors) {
            return value;
          }
          if (!value.match(COLOR_PREFIX_PATTERN)) {
            return shortenHex(value);
          }
          value = value.replace(RGBA_HSLA_PATTERN, function(match, colorFn, p1, p2, p3, alpha) {
            return parseInt(alpha) >= 1 ? colorFn + "(" + [p1, p2, p3].join(",") + ")" : match;
          }).replace(RGB_PATTERN, function(match, red, green, blue) {
            return shortenRgb(red, green, blue);
          }).replace(HSL_PATTERN, function(match, hue, saturation, lightness) {
            return shortenHsl(hue, saturation, lightness);
          }).replace(HEX_LONG_PATTERN, function(match, prefix, color2, at, inputValue) {
            var suffix = inputValue[at + match.length];
            if (suffix && HEX_VALUE_PATTERN.test(suffix)) {
              return match;
            }
            if (color2[0] == color2[1] && color2[2] == color2[3] && color2[4] == color2[5]) {
              return (prefix + "#" + color2[0] + color2[2] + color2[4]).toLowerCase();
            }
            return (prefix + "#" + color2).toLowerCase();
          }).replace(HEX_SHORT_PATTERN, function(match, prefix, color2) {
            return prefix + "#" + color2.toLowerCase();
          }).replace(ANY_COLOR_FUNCTION_PATTERN, function(match, colorFunction, colorDef) {
            var tokens = colorDef.split(",");
            var colorFnLowercase = colorFunction && colorFunction.toLowerCase();
            var applies = colorFnLowercase == "hsl" && tokens.length == 3 || colorFnLowercase == "hsla" && tokens.length == 4 || colorFnLowercase == "rgb" && tokens.length === 3 && colorDef.indexOf("%") > 0 || colorFnLowercase == "rgba" && tokens.length == 4 && tokens[0].indexOf("%") > 0;
            if (!applies) {
              return match;
            }
            if (tokens[1].indexOf("%") == -1) {
              tokens[1] += "%";
            }
            if (tokens[2].indexOf("%") == -1) {
              tokens[2] += "%";
            }
            return colorFunction + "(" + tokens.join(",") + ")";
          });
          if (options.compatibility.colors.opacity && name.indexOf("background") == -1) {
            value = value.replace(TRANSPARENT_FUNCTION_PATTERN, function(match) {
              if (split(value, ",").pop().indexOf("gradient(") > -1) {
                return match;
              }
              return "transparent";
            });
          }
          return shortenHex(value);
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/degrees.js
var require_degrees = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/degrees.js"(exports, module2) {
    var ZERO_DEG_PATTERN = /\(0deg\)/g;
    var plugin = {
      level1: {
        value: function degrees(_name, value, options) {
          if (!options.compatibility.properties.zeroUnits) {
            return value;
          }
          if (value.indexOf("0deg") == -1) {
            return value;
          }
          return value.replace(ZERO_DEG_PATTERN, "(0)");
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/starts-as-url.js
var require_starts_as_url = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/starts-as-url.js"(exports, module2) {
    var URL_PREFIX_PATTERN = /^url\(/i;
    function startsAsUrl(value) {
      return URL_PREFIX_PATTERN.test(value);
    }
    module2.exports = startsAsUrl;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/fraction.js
var require_fraction = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/fraction.js"(exports, module2) {
    var split = require_split();
    var startsAsUrl = require_starts_as_url();
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var EXPRESSION_PATTERN = /^expression\(.*\)$/;
    var ANY_FUNCTION_PATTERN = /^(-(?:moz|ms|o|webkit)-[a-z-]+|[a-z-]+)\((.+)\)$/;
    var TOKEN_SEPARATOR_PATTERN = /([\s,/])/;
    var DOT_ZERO_PATTERN = /(^|\D)\.0+(\D|$)/g;
    var FRACTION_PATTERN = /\.([1-9]*)0+(\D|$)/g;
    var LEADING_ZERO_FRACTION_PATTERN = /(^|\D)0\.(\d)/g;
    var MINUS_ZERO_FRACTION_PATTERN = /([^\w\d-]|^)-0([^.]|$)/g;
    var ZERO_PREFIXED_UNIT_PATTERN = /(^|\s)0+([1-9])/g;
    function optimizeRecursively(value) {
      var functionTokens;
      var tokens;
      if (startsAsUrl(value)) {
        return value;
      }
      if (EXPRESSION_PATTERN.test(value)) {
        return value;
      }
      functionTokens = ANY_FUNCTION_PATTERN.exec(value);
      if (!functionTokens) {
        return optimizeFractions(value);
      }
      tokens = split(functionTokens[2], TOKEN_SEPARATOR_PATTERN).map(function(token) {
        return optimizeRecursively(token);
      });
      return functionTokens[1] + "(" + tokens.join("") + ")";
    }
    function optimizeFractions(value) {
      if (value.indexOf("0") == -1) {
        return value;
      }
      if (value.indexOf("-") > -1) {
        value = value.replace(MINUS_ZERO_FRACTION_PATTERN, "$10$2").replace(MINUS_ZERO_FRACTION_PATTERN, "$10$2");
      }
      return value.replace(ZERO_PREFIXED_UNIT_PATTERN, "$1$2").replace(DOT_ZERO_PATTERN, "$10$2").replace(FRACTION_PATTERN, function(match, nonZeroPart, suffix) {
        return (nonZeroPart.length > 0 ? "." : "") + nonZeroPart + suffix;
      }).replace(LEADING_ZERO_FRACTION_PATTERN, "$1.$2");
    }
    var plugin = {
      level1: {
        value: function fraction(name, value, options) {
          if (!options.level[OptimizationLevel.One].replaceZeroUnits) {
            return value;
          }
          return optimizeRecursively(value);
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/precision.js
var require_precision = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/precision.js"(exports, module2) {
    var plugin = {
      level1: {
        value: function precision(_name, value, options) {
          if (!options.precision.enabled || value.indexOf(".") === -1) {
            return value;
          }
          return value.replace(options.precision.decimalPointMatcher, "$1$2$3").replace(options.precision.zeroMatcher, function(match, integerPart, fractionPart, unit) {
            var multiplier = options.precision.units[unit].multiplier;
            var parsedInteger = parseInt(integerPart);
            var integer = Number.isNaN(parsedInteger) ? 0 : parsedInteger;
            var fraction = parseFloat(fractionPart);
            return Math.round((integer + fraction) * multiplier) / multiplier + unit;
          });
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/text-quotes.js
var require_text_quotes = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/text-quotes.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var LOCAL_PREFIX_PATTERN = /^local\(/i;
    var QUOTED_PATTERN = /^('.*'|".*")$/;
    var QUOTED_BUT_SAFE_PATTERN = /^['"][a-zA-Z][a-zA-Z\d\-_]+['"]$/;
    var GENERIC_FONT_FAMILY_PATTERN = /^['"](?:cursive|default|emoji|fangsong|fantasy|inherit|initial|math|monospace|revert|revert-layer|sans-serif|serif|system-ui|ui-monospace|ui-rounded|ui-sans-serif|ui-serif|unset)['"]$/;
    var plugin = {
      level1: {
        value: function textQuotes(name, value, options) {
          if ((name == "font-family" || name == "font") && GENERIC_FONT_FAMILY_PATTERN.test(value)) {
            return value;
          }
          if (!options.level[OptimizationLevel.One].removeQuotes) {
            return value;
          }
          if (!QUOTED_PATTERN.test(value) && !LOCAL_PREFIX_PATTERN.test(value)) {
            return value;
          }
          return QUOTED_BUT_SAFE_PATTERN.test(value) ? value.substring(1, value.length - 1) : value;
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/time.js
var require_time = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/time.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var TIME_VALUE = /^(-?[\d.]+)(m?s)$/;
    var plugin = {
      level1: {
        value: function time(name, value, options) {
          if (!options.level[OptimizationLevel.One].replaceTimeUnits) {
            return value;
          }
          if (!TIME_VALUE.test(value)) {
            return value;
          }
          return value.replace(TIME_VALUE, function(match, val, unit) {
            var newValue;
            if (unit == "ms") {
              newValue = parseInt(val) / 1e3 + "s";
            } else if (unit == "s") {
              newValue = parseFloat(val) * 1e3 + "ms";
            }
            return newValue.length < match.length ? newValue : match;
          });
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/unit.js
var require_unit = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/unit.js"(exports, module2) {
    var WHOLE_PIXEL_VALUE = /(?:^|\s|\()(-?\d+)px/;
    var plugin = {
      level1: {
        value: function unit(_name, value, options) {
          if (!WHOLE_PIXEL_VALUE.test(value)) {
            return value;
          }
          return value.replace(WHOLE_PIXEL_VALUE, function(match, val) {
            var newValue;
            var intVal = parseInt(val);
            if (intVal === 0) {
              return match;
            }
            if (options.compatibility.properties.shorterLengthUnits && options.compatibility.units.pt && intVal * 3 % 4 === 0) {
              newValue = intVal * 3 / 4 + "pt";
            }
            if (options.compatibility.properties.shorterLengthUnits && options.compatibility.units.pc && intVal % 16 === 0) {
              newValue = intVal / 16 + "pc";
            }
            if (options.compatibility.properties.shorterLengthUnits && options.compatibility.units.in && intVal % 96 === 0) {
              newValue = intVal / 96 + "in";
            }
            if (newValue) {
              newValue = match.substring(0, match.indexOf(val)) + newValue;
            }
            return newValue && newValue.length < match.length ? newValue : match;
          });
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-prefix.js
var require_url_prefix = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-prefix.js"(exports, module2) {
    var startsAsUrl = require_starts_as_url();
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var URL_PREFIX_PATTERN = /^url\(/i;
    var plugin = {
      level1: {
        value: function urlPrefix(_name, value, options) {
          if (!options.level[OptimizationLevel.One].normalizeUrls) {
            return value;
          }
          if (!startsAsUrl(value)) {
            return value;
          }
          return value.replace(URL_PREFIX_PATTERN, "url(");
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-quotes.js
var require_url_quotes = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-quotes.js"(exports, module2) {
    var QUOTED_URL_PATTERN = /^url\(['"].+['"]\)$/;
    var QUOTED_URL_WITH_WHITESPACE_PATTERN = /^url\(['"].*[*\s()'"].*['"]\)$/;
    var QUOTES_PATTERN = /["']/g;
    var URL_DATA_PATTERN = /^url\(['"]data:[^;]+;charset/;
    var plugin = {
      level1: {
        value: function urlQuotes(_name, value, options) {
          if (options.compatibility.properties.urlQuotes) {
            return value;
          }
          return QUOTED_URL_PATTERN.test(value) && !QUOTED_URL_WITH_WHITESPACE_PATTERN.test(value) && !URL_DATA_PATTERN.test(value) ? value.replace(QUOTES_PATTERN, "") : value;
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-whitespace.js
var require_url_whitespace = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-whitespace.js"(exports, module2) {
    var startsAsUrl = require_starts_as_url();
    var WHITESPACE_PATTERN = /\\?\n|\\?\r\n/g;
    var WHITESPACE_PREFIX_PATTERN = /(\()\s+/g;
    var WHITESPACE_SUFFIX_PATTERN = /\s+(\))/g;
    var plugin = {
      level1: {
        value: function urlWhitespace(_name, value) {
          if (!startsAsUrl(value)) {
            return value;
          }
          return value.replace(WHITESPACE_PATTERN, "").replace(WHITESPACE_PREFIX_PATTERN, "$1").replace(WHITESPACE_SUFFIX_PATTERN, "$1");
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/whitespace.js
var require_whitespace = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/whitespace.js"(exports, module2) {
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var Marker = require_marker();
    var CALC_DIVISION_WHITESPACE_PATTERN = /\) ?\/ ?/g;
    var COMMA_AND_SPACE_PATTERN = /, /g;
    var LINE_BREAK_PATTERN = /\r?\n/g;
    var MULTI_WHITESPACE_PATTERN = /\s+/g;
    var FUNCTION_CLOSING_BRACE_WHITESPACE_PATTERN = /\s+(;?\))/g;
    var FUNCTION_OPENING_BRACE_WHITESPACE_PATTERN = /(\(;?)\s+/g;
    var VARIABLE_NAME_PATTERN = /^--\S+$/;
    var VARIABLE_VALUE_PATTERN = /^var\(\s*--\S+\s*\)$/;
    var plugin = {
      level1: {
        value: function whitespace(name, value, options) {
          if (!options.level[OptimizationLevel.One].removeWhitespace) {
            return value;
          }
          if (VARIABLE_NAME_PATTERN.test(name) && !VARIABLE_VALUE_PATTERN.test(value)) {
            return value;
          }
          if (value.indexOf(" ") == -1 && value.indexOf("\n") == -1 || value.indexOf("expression") === 0) {
            return value;
          }
          if (value.indexOf(Marker.SINGLE_QUOTE) > -1 || value.indexOf(Marker.DOUBLE_QUOTE) > -1) {
            return value;
          }
          value = value.replace(LINE_BREAK_PATTERN, "");
          value = value.replace(MULTI_WHITESPACE_PATTERN, " ");
          if (value.indexOf("calc") > -1) {
            value = value.replace(CALC_DIVISION_WHITESPACE_PATTERN, ")/ ");
          }
          return value.replace(FUNCTION_OPENING_BRACE_WHITESPACE_PATTERN, "$1").replace(FUNCTION_CLOSING_BRACE_WHITESPACE_PATTERN, "$1").replace(COMMA_AND_SPACE_PATTERN, ",");
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers/zero.js
var require_zero = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers/zero.js"(exports, module2) {
    var split = require_split();
    var ANY_FUNCTION_PATTERN = /^(-(?:moz|ms|o|webkit)-[a-z-]+|[a-z-]+)\((.+)\)$/;
    var SKIP_FUNCTION_PATTERN = /^(?:-moz-calc|-webkit-calc|calc|rgb|hsl|rgba|hsla|min|max|clamp|expression)\(/;
    var TOKEN_SEPARATOR_PATTERN = /([\s,/])/;
    function removeRecursively(value, options) {
      var functionTokens;
      var tokens;
      if (SKIP_FUNCTION_PATTERN.test(value)) {
        return value;
      }
      functionTokens = ANY_FUNCTION_PATTERN.exec(value);
      if (!functionTokens) {
        return removeZeros(value, options);
      }
      tokens = split(functionTokens[2], TOKEN_SEPARATOR_PATTERN).map(function(token) {
        return removeRecursively(token, options);
      });
      return functionTokens[1] + "(" + tokens.join("") + ")";
    }
    function removeZeros(value, options) {
      return value.replace(options.unitsRegexp, "$10$2").replace(options.unitsRegexp, "$10$2");
    }
    var plugin = {
      level1: {
        value: function zero(name, value, options) {
          if (!options.compatibility.properties.zeroUnits) {
            return value;
          }
          if (value.indexOf("%") > 0 && (name == "height" || name == "max-height" || name == "width" || name == "max-width")) {
            return value;
          }
          return removeRecursively(value, options);
        }
      }
    };
    module2.exports = plugin;
  }
});

// node_modules/clean-css/lib/optimizer/level-1/value-optimizers.js
var require_value_optimizers = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/value-optimizers.js"(exports, module2) {
    module2.exports = {
      color: require_color().level1.value,
      degrees: require_degrees().level1.value,
      fraction: require_fraction().level1.value,
      precision: require_precision().level1.value,
      textQuotes: require_text_quotes().level1.value,
      time: require_time().level1.value,
      unit: require_unit().level1.value,
      urlPrefix: require_url_prefix().level1.value,
      urlQuotes: require_url_quotes().level1.value,
      urlWhiteSpace: require_url_whitespace().level1.value,
      whiteSpace: require_whitespace().level1.value,
      zero: require_zero().level1.value
    };
  }
});

// node_modules/clean-css/lib/optimizer/configuration.js
var require_configuration = __commonJS({
  "node_modules/clean-css/lib/optimizer/configuration.js"(exports, module2) {
    var breakUp = require_break_up();
    var canOverride = require_can_override();
    var restore = require_restore();
    var propertyOptimizers = require_property_optimizers();
    var valueOptimizers = require_value_optimizers();
    var override = require_override();
    var configuration = {
      animation: {
        canOverride: canOverride.generic.components([
          canOverride.generic.time,
          canOverride.generic.timingFunction,
          canOverride.generic.time,
          canOverride.property.animationIterationCount,
          canOverride.property.animationDirection,
          canOverride.property.animationFillMode,
          canOverride.property.animationPlayState,
          canOverride.property.animationName
        ]),
        components: [
          "animation-duration",
          "animation-timing-function",
          "animation-delay",
          "animation-iteration-count",
          "animation-direction",
          "animation-fill-mode",
          "animation-play-state",
          "animation-name"
        ],
        breakUp: breakUp.multiplex(breakUp.animation),
        defaultValue: "none",
        restore: restore.multiplex(restore.withoutDefaults),
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.textQuotes,
          valueOptimizers.time,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ],
        vendorPrefixes: [
          "-moz-",
          "-o-",
          "-webkit-"
        ]
      },
      "animation-delay": {
        canOverride: canOverride.generic.time,
        componentOf: [
          "animation"
        ],
        defaultValue: "0s",
        intoMultiplexMode: "real",
        valueOptimizers: [
          valueOptimizers.time,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ],
        vendorPrefixes: [
          "-moz-",
          "-o-",
          "-webkit-"
        ]
      },
      "animation-direction": {
        canOverride: canOverride.property.animationDirection,
        componentOf: [
          "animation"
        ],
        defaultValue: "normal",
        intoMultiplexMode: "real",
        vendorPrefixes: [
          "-moz-",
          "-o-",
          "-webkit-"
        ]
      },
      "animation-duration": {
        canOverride: canOverride.generic.time,
        componentOf: [
          "animation"
        ],
        defaultValue: "0s",
        intoMultiplexMode: "real",
        keepUnlessDefault: "animation-delay",
        valueOptimizers: [
          valueOptimizers.time,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ],
        vendorPrefixes: [
          "-moz-",
          "-o-",
          "-webkit-"
        ]
      },
      "animation-fill-mode": {
        canOverride: canOverride.property.animationFillMode,
        componentOf: [
          "animation"
        ],
        defaultValue: "none",
        intoMultiplexMode: "real",
        vendorPrefixes: [
          "-moz-",
          "-o-",
          "-webkit-"
        ]
      },
      "animation-iteration-count": {
        canOverride: canOverride.property.animationIterationCount,
        componentOf: [
          "animation"
        ],
        defaultValue: "1",
        intoMultiplexMode: "real",
        vendorPrefixes: [
          "-moz-",
          "-o-",
          "-webkit-"
        ]
      },
      "animation-name": {
        canOverride: canOverride.property.animationName,
        componentOf: [
          "animation"
        ],
        defaultValue: "none",
        intoMultiplexMode: "real",
        valueOptimizers: [
          valueOptimizers.textQuotes
        ],
        vendorPrefixes: [
          "-moz-",
          "-o-",
          "-webkit-"
        ]
      },
      "animation-play-state": {
        canOverride: canOverride.property.animationPlayState,
        componentOf: [
          "animation"
        ],
        defaultValue: "running",
        intoMultiplexMode: "real",
        vendorPrefixes: [
          "-moz-",
          "-o-",
          "-webkit-"
        ]
      },
      "animation-timing-function": {
        canOverride: canOverride.generic.timingFunction,
        componentOf: [
          "animation"
        ],
        defaultValue: "ease",
        intoMultiplexMode: "real",
        vendorPrefixes: [
          "-moz-",
          "-o-",
          "-webkit-"
        ]
      },
      background: {
        canOverride: canOverride.generic.components([
          canOverride.generic.image,
          canOverride.property.backgroundPosition,
          canOverride.property.backgroundSize,
          canOverride.property.backgroundRepeat,
          canOverride.property.backgroundAttachment,
          canOverride.property.backgroundOrigin,
          canOverride.property.backgroundClip,
          canOverride.generic.color
        ]),
        components: [
          "background-image",
          "background-position",
          "background-size",
          "background-repeat",
          "background-attachment",
          "background-origin",
          "background-clip",
          "background-color"
        ],
        breakUp: breakUp.multiplex(breakUp.background),
        defaultValue: "0 0",
        propertyOptimizer: propertyOptimizers.background,
        restore: restore.multiplex(restore.background),
        shortestValue: "0",
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.urlWhiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.zero,
          valueOptimizers.color,
          valueOptimizers.urlPrefix,
          valueOptimizers.urlQuotes
        ]
      },
      "background-attachment": {
        canOverride: canOverride.property.backgroundAttachment,
        componentOf: [
          "background"
        ],
        defaultValue: "scroll",
        intoMultiplexMode: "real"
      },
      "background-clip": {
        canOverride: canOverride.property.backgroundClip,
        componentOf: [
          "background"
        ],
        defaultValue: "border-box",
        intoMultiplexMode: "real",
        shortestValue: "border-box"
      },
      "background-color": {
        canOverride: canOverride.generic.color,
        componentOf: [
          "background"
        ],
        defaultValue: "transparent",
        intoMultiplexMode: "real",
        multiplexLastOnly: true,
        nonMergeableValue: "none",
        shortestValue: "red",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.color
        ]
      },
      "background-image": {
        canOverride: canOverride.generic.image,
        componentOf: [
          "background"
        ],
        defaultValue: "none",
        intoMultiplexMode: "default",
        valueOptimizers: [
          valueOptimizers.urlWhiteSpace,
          valueOptimizers.urlPrefix,
          valueOptimizers.urlQuotes,
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero,
          valueOptimizers.color
        ]
      },
      "background-origin": {
        canOverride: canOverride.property.backgroundOrigin,
        componentOf: [
          "background"
        ],
        defaultValue: "padding-box",
        intoMultiplexMode: "real",
        shortestValue: "border-box"
      },
      "background-position": {
        canOverride: canOverride.property.backgroundPosition,
        componentOf: [
          "background"
        ],
        defaultValue: ["0", "0"],
        doubleValues: true,
        intoMultiplexMode: "real",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "background-repeat": {
        canOverride: canOverride.property.backgroundRepeat,
        componentOf: [
          "background"
        ],
        defaultValue: ["repeat"],
        doubleValues: true,
        intoMultiplexMode: "real"
      },
      "background-size": {
        canOverride: canOverride.property.backgroundSize,
        componentOf: [
          "background"
        ],
        defaultValue: ["auto"],
        doubleValues: true,
        intoMultiplexMode: "real",
        shortestValue: "0 0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      bottom: {
        canOverride: canOverride.property.bottom,
        defaultValue: "auto",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      border: {
        breakUp: breakUp.border,
        canOverride: canOverride.generic.components([
          canOverride.generic.unit,
          canOverride.property.borderStyle,
          canOverride.generic.color
        ]),
        components: [
          "border-width",
          "border-style",
          "border-color"
        ],
        defaultValue: "none",
        overridesShorthands: [
          "border-bottom",
          "border-left",
          "border-right",
          "border-top"
        ],
        restore: restore.withoutDefaults,
        shorthand: true,
        shorthandComponents: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.zero,
          valueOptimizers.color
        ]
      },
      "border-bottom": {
        breakUp: breakUp.border,
        canOverride: canOverride.generic.components([
          canOverride.generic.unit,
          canOverride.property.borderStyle,
          canOverride.generic.color
        ]),
        components: [
          "border-bottom-width",
          "border-bottom-style",
          "border-bottom-color"
        ],
        defaultValue: "none",
        restore: restore.withoutDefaults,
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.zero,
          valueOptimizers.color
        ]
      },
      "border-bottom-color": {
        canOverride: canOverride.generic.color,
        componentOf: [
          "border-bottom",
          "border-color"
        ],
        defaultValue: "none",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.color
        ]
      },
      "border-bottom-left-radius": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "border-radius"
        ],
        defaultValue: "0",
        propertyOptimizer: propertyOptimizers.borderRadius,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ],
        vendorPrefixes: [
          "-moz-",
          "-o-"
        ]
      },
      "border-bottom-right-radius": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "border-radius"
        ],
        defaultValue: "0",
        propertyOptimizer: propertyOptimizers.borderRadius,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ],
        vendorPrefixes: [
          "-moz-",
          "-o-"
        ]
      },
      "border-bottom-style": {
        canOverride: canOverride.property.borderStyle,
        componentOf: [
          "border-bottom",
          "border-style"
        ],
        defaultValue: "none"
      },
      "border-bottom-width": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "border-bottom",
          "border-width"
        ],
        defaultValue: "medium",
        oppositeTo: "border-top-width",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "border-collapse": {
        canOverride: canOverride.property.borderCollapse,
        defaultValue: "separate"
      },
      "border-color": {
        breakUp: breakUp.fourValues,
        canOverride: canOverride.generic.components([
          canOverride.generic.color,
          canOverride.generic.color,
          canOverride.generic.color,
          canOverride.generic.color
        ]),
        componentOf: [
          "border"
        ],
        components: [
          "border-top-color",
          "border-right-color",
          "border-bottom-color",
          "border-left-color"
        ],
        defaultValue: "none",
        restore: restore.fourValues,
        shortestValue: "red",
        shorthand: true,
        singleTypeComponents: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.color
        ]
      },
      "border-left": {
        breakUp: breakUp.border,
        canOverride: canOverride.generic.components([
          canOverride.generic.unit,
          canOverride.property.borderStyle,
          canOverride.generic.color
        ]),
        components: [
          "border-left-width",
          "border-left-style",
          "border-left-color"
        ],
        defaultValue: "none",
        restore: restore.withoutDefaults,
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.zero,
          valueOptimizers.color
        ]
      },
      "border-left-color": {
        canOverride: canOverride.generic.color,
        componentOf: [
          "border-color",
          "border-left"
        ],
        defaultValue: "none",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.color
        ]
      },
      "border-left-style": {
        canOverride: canOverride.property.borderStyle,
        componentOf: [
          "border-left",
          "border-style"
        ],
        defaultValue: "none"
      },
      "border-left-width": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "border-left",
          "border-width"
        ],
        defaultValue: "medium",
        oppositeTo: "border-right-width",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "border-radius": {
        breakUp: breakUp.borderRadius,
        canOverride: canOverride.generic.components([
          canOverride.generic.unit,
          canOverride.generic.unit,
          canOverride.generic.unit,
          canOverride.generic.unit
        ]),
        components: [
          "border-top-left-radius",
          "border-top-right-radius",
          "border-bottom-right-radius",
          "border-bottom-left-radius"
        ],
        defaultValue: "0",
        propertyOptimizer: propertyOptimizers.borderRadius,
        restore: restore.borderRadius,
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ],
        vendorPrefixes: [
          "-moz-",
          "-o-"
        ]
      },
      "border-right": {
        breakUp: breakUp.border,
        canOverride: canOverride.generic.components([
          canOverride.generic.unit,
          canOverride.property.borderStyle,
          canOverride.generic.color
        ]),
        components: [
          "border-right-width",
          "border-right-style",
          "border-right-color"
        ],
        defaultValue: "none",
        restore: restore.withoutDefaults,
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.color
        ]
      },
      "border-right-color": {
        canOverride: canOverride.generic.color,
        componentOf: [
          "border-color",
          "border-right"
        ],
        defaultValue: "none",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.color
        ]
      },
      "border-right-style": {
        canOverride: canOverride.property.borderStyle,
        componentOf: [
          "border-right",
          "border-style"
        ],
        defaultValue: "none"
      },
      "border-right-width": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "border-right",
          "border-width"
        ],
        defaultValue: "medium",
        oppositeTo: "border-left-width",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "border-style": {
        breakUp: breakUp.fourValues,
        canOverride: canOverride.generic.components([
          canOverride.property.borderStyle,
          canOverride.property.borderStyle,
          canOverride.property.borderStyle,
          canOverride.property.borderStyle
        ]),
        componentOf: [
          "border"
        ],
        components: [
          "border-top-style",
          "border-right-style",
          "border-bottom-style",
          "border-left-style"
        ],
        defaultValue: "none",
        restore: restore.fourValues,
        shorthand: true,
        singleTypeComponents: true
      },
      "border-top": {
        breakUp: breakUp.border,
        canOverride: canOverride.generic.components([
          canOverride.generic.unit,
          canOverride.property.borderStyle,
          canOverride.generic.color
        ]),
        components: [
          "border-top-width",
          "border-top-style",
          "border-top-color"
        ],
        defaultValue: "none",
        restore: restore.withoutDefaults,
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.zero,
          valueOptimizers.color,
          valueOptimizers.unit
        ]
      },
      "border-top-color": {
        canOverride: canOverride.generic.color,
        componentOf: [
          "border-color",
          "border-top"
        ],
        defaultValue: "none",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.color
        ]
      },
      "border-top-left-radius": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "border-radius"
        ],
        defaultValue: "0",
        propertyOptimizer: propertyOptimizers.borderRadius,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ],
        vendorPrefixes: [
          "-moz-",
          "-o-"
        ]
      },
      "border-top-right-radius": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "border-radius"
        ],
        defaultValue: "0",
        propertyOptimizer: propertyOptimizers.borderRadius,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ],
        vendorPrefixes: [
          "-moz-",
          "-o-"
        ]
      },
      "border-top-style": {
        canOverride: canOverride.property.borderStyle,
        componentOf: [
          "border-style",
          "border-top"
        ],
        defaultValue: "none"
      },
      "border-top-width": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "border-top",
          "border-width"
        ],
        defaultValue: "medium",
        oppositeTo: "border-bottom-width",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "border-width": {
        breakUp: breakUp.fourValues,
        canOverride: canOverride.generic.components([
          canOverride.generic.unit,
          canOverride.generic.unit,
          canOverride.generic.unit,
          canOverride.generic.unit
        ]),
        componentOf: [
          "border"
        ],
        components: [
          "border-top-width",
          "border-right-width",
          "border-bottom-width",
          "border-left-width"
        ],
        defaultValue: "medium",
        restore: restore.fourValues,
        shortestValue: "0",
        shorthand: true,
        singleTypeComponents: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "box-shadow": {
        propertyOptimizer: propertyOptimizers.boxShadow,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero,
          valueOptimizers.color
        ],
        vendorPrefixes: [
          "-moz-",
          "-ms-",
          "-o-",
          "-webkit-"
        ]
      },
      clear: {
        canOverride: canOverride.property.clear,
        defaultValue: "none"
      },
      clip: {
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      color: {
        canOverride: canOverride.generic.color,
        defaultValue: "transparent",
        shortestValue: "red",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.color
        ]
      },
      "column-gap": {
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      cursor: {
        canOverride: canOverride.property.cursor,
        defaultValue: "auto"
      },
      display: { canOverride: canOverride.property.display },
      filter: {
        propertyOptimizer: propertyOptimizers.filter,
        valueOptimizers: [
          valueOptimizers.fraction
        ]
      },
      float: {
        canOverride: canOverride.property.float,
        defaultValue: "none"
      },
      font: {
        breakUp: breakUp.font,
        canOverride: canOverride.generic.components([
          canOverride.property.fontStyle,
          canOverride.property.fontVariant,
          canOverride.property.fontWeight,
          canOverride.property.fontStretch,
          canOverride.generic.unit,
          canOverride.generic.unit,
          canOverride.property.fontFamily
        ]),
        components: [
          "font-style",
          "font-variant",
          "font-weight",
          "font-stretch",
          "font-size",
          "line-height",
          "font-family"
        ],
        restore: restore.font,
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.textQuotes
        ]
      },
      "font-family": {
        canOverride: canOverride.property.fontFamily,
        defaultValue: "user|agent|specific",
        valueOptimizers: [
          valueOptimizers.textQuotes
        ]
      },
      "font-size": {
        canOverride: canOverride.generic.unit,
        defaultValue: "medium",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.fraction
        ]
      },
      "font-stretch": {
        canOverride: canOverride.property.fontStretch,
        defaultValue: "normal"
      },
      "font-style": {
        canOverride: canOverride.property.fontStyle,
        defaultValue: "normal"
      },
      "font-variant": {
        canOverride: canOverride.property.fontVariant,
        defaultValue: "normal"
      },
      "font-weight": {
        canOverride: canOverride.property.fontWeight,
        defaultValue: "normal",
        propertyOptimizer: propertyOptimizers.fontWeight,
        shortestValue: "400"
      },
      gap: {
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      height: {
        canOverride: canOverride.generic.unit,
        defaultValue: "auto",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      left: {
        canOverride: canOverride.property.left,
        defaultValue: "auto",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "letter-spacing": {
        valueOptimizers: [
          valueOptimizers.fraction,
          valueOptimizers.zero
        ]
      },
      "line-height": {
        canOverride: canOverride.generic.unitOrNumber,
        defaultValue: "normal",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.fraction,
          valueOptimizers.zero
        ]
      },
      "list-style": {
        canOverride: canOverride.generic.components([
          canOverride.property.listStyleType,
          canOverride.property.listStylePosition,
          canOverride.property.listStyleImage
        ]),
        components: [
          "list-style-type",
          "list-style-position",
          "list-style-image"
        ],
        breakUp: breakUp.listStyle,
        restore: restore.withoutDefaults,
        defaultValue: "outside",
        shortestValue: "none",
        shorthand: true
      },
      "list-style-image": {
        canOverride: canOverride.generic.image,
        componentOf: [
          "list-style"
        ],
        defaultValue: "none"
      },
      "list-style-position": {
        canOverride: canOverride.property.listStylePosition,
        componentOf: [
          "list-style"
        ],
        defaultValue: "outside",
        shortestValue: "inside"
      },
      "list-style-type": {
        canOverride: canOverride.property.listStyleType,
        componentOf: [
          "list-style"
        ],
        defaultValue: "decimal|disc",
        shortestValue: "none"
      },
      margin: {
        breakUp: breakUp.fourValues,
        canOverride: canOverride.generic.components([
          canOverride.generic.unit,
          canOverride.generic.unit,
          canOverride.generic.unit,
          canOverride.generic.unit
        ]),
        components: [
          "margin-top",
          "margin-right",
          "margin-bottom",
          "margin-left"
        ],
        defaultValue: "0",
        propertyOptimizer: propertyOptimizers.margin,
        restore: restore.fourValues,
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "margin-bottom": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "margin"
        ],
        defaultValue: "0",
        oppositeTo: "margin-top",
        propertyOptimizer: propertyOptimizers.margin,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "margin-inline-end": {
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "margin-inline-start": {
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "margin-left": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "margin"
        ],
        defaultValue: "0",
        oppositeTo: "margin-right",
        propertyOptimizer: propertyOptimizers.margin,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "margin-right": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "margin"
        ],
        defaultValue: "0",
        oppositeTo: "margin-left",
        propertyOptimizer: propertyOptimizers.margin,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "margin-top": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "margin"
        ],
        defaultValue: "0",
        oppositeTo: "margin-bottom",
        propertyOptimizer: propertyOptimizers.margin,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "max-height": {
        canOverride: canOverride.generic.unit,
        defaultValue: "none",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "max-width": {
        canOverride: canOverride.generic.unit,
        defaultValue: "none",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "min-height": {
        canOverride: canOverride.generic.unit,
        defaultValue: "0",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "min-width": {
        canOverride: canOverride.generic.unit,
        defaultValue: "0",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      opacity: {
        valueOptimizers: [
          valueOptimizers.fraction,
          valueOptimizers.precision
        ]
      },
      outline: {
        canOverride: canOverride.generic.components([
          canOverride.generic.color,
          canOverride.property.outlineStyle,
          canOverride.generic.unit
        ]),
        components: [
          "outline-color",
          "outline-style",
          "outline-width"
        ],
        breakUp: breakUp.outline,
        restore: restore.withoutDefaults,
        defaultValue: "0",
        propertyOptimizer: propertyOptimizers.outline,
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "outline-color": {
        canOverride: canOverride.generic.color,
        componentOf: [
          "outline"
        ],
        defaultValue: "invert",
        shortestValue: "red",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.color
        ]
      },
      "outline-style": {
        canOverride: canOverride.property.outlineStyle,
        componentOf: [
          "outline"
        ],
        defaultValue: "none"
      },
      "outline-width": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "outline"
        ],
        defaultValue: "medium",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      overflow: {
        canOverride: canOverride.property.overflow,
        defaultValue: "visible"
      },
      "overflow-x": {
        canOverride: canOverride.property.overflow,
        defaultValue: "visible"
      },
      "overflow-y": {
        canOverride: canOverride.property.overflow,
        defaultValue: "visible"
      },
      padding: {
        breakUp: breakUp.fourValues,
        canOverride: canOverride.generic.components([
          canOverride.generic.unit,
          canOverride.generic.unit,
          canOverride.generic.unit,
          canOverride.generic.unit
        ]),
        components: [
          "padding-top",
          "padding-right",
          "padding-bottom",
          "padding-left"
        ],
        defaultValue: "0",
        propertyOptimizer: propertyOptimizers.padding,
        restore: restore.fourValues,
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "padding-bottom": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "padding"
        ],
        defaultValue: "0",
        oppositeTo: "padding-top",
        propertyOptimizer: propertyOptimizers.padding,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "padding-left": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "padding"
        ],
        defaultValue: "0",
        oppositeTo: "padding-right",
        propertyOptimizer: propertyOptimizers.padding,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "padding-right": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "padding"
        ],
        defaultValue: "0",
        oppositeTo: "padding-left",
        propertyOptimizer: propertyOptimizers.padding,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "padding-top": {
        canOverride: canOverride.generic.unit,
        componentOf: [
          "padding"
        ],
        defaultValue: "0",
        oppositeTo: "padding-bottom",
        propertyOptimizer: propertyOptimizers.padding,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      position: {
        canOverride: canOverride.property.position,
        defaultValue: "static"
      },
      right: {
        canOverride: canOverride.property.right,
        defaultValue: "auto",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "row-gap": {
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      src: {
        valueOptimizers: [
          valueOptimizers.urlWhiteSpace,
          valueOptimizers.urlPrefix,
          valueOptimizers.urlQuotes
        ]
      },
      "stroke-width": {
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "text-align": {
        canOverride: canOverride.property.textAlign,
        defaultValue: "left|right"
      },
      "text-decoration": {
        canOverride: canOverride.property.textDecoration,
        defaultValue: "none"
      },
      "text-indent": {
        canOverride: canOverride.property.textOverflow,
        defaultValue: "none",
        valueOptimizers: [
          valueOptimizers.fraction,
          valueOptimizers.zero
        ]
      },
      "text-overflow": {
        canOverride: canOverride.property.textOverflow,
        defaultValue: "none"
      },
      "text-shadow": {
        canOverride: canOverride.property.textShadow,
        defaultValue: "none",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.zero,
          valueOptimizers.color
        ]
      },
      top: {
        canOverride: canOverride.property.top,
        defaultValue: "auto",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      transform: {
        canOverride: canOverride.property.transform,
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.degrees,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ],
        vendorPrefixes: [
          "-moz-",
          "-ms-",
          "-o-",
          "-webkit-"
        ]
      },
      transition: {
        breakUp: breakUp.multiplex(breakUp.transition),
        canOverride: canOverride.generic.components([
          canOverride.property.transitionProperty,
          canOverride.generic.time,
          canOverride.generic.timingFunction,
          canOverride.generic.time
        ]),
        components: [
          "transition-property",
          "transition-duration",
          "transition-timing-function",
          "transition-delay"
        ],
        defaultValue: "none",
        restore: restore.multiplex(restore.withoutDefaults),
        shorthand: true,
        valueOptimizers: [
          valueOptimizers.time,
          valueOptimizers.fraction
        ],
        vendorPrefixes: [
          "-moz-",
          "-ms-",
          "-o-",
          "-webkit-"
        ]
      },
      "transition-delay": {
        canOverride: canOverride.generic.time,
        componentOf: [
          "transition"
        ],
        defaultValue: "0s",
        intoMultiplexMode: "real",
        valueOptimizers: [
          valueOptimizers.time
        ],
        vendorPrefixes: [
          "-moz-",
          "-ms-",
          "-o-",
          "-webkit-"
        ]
      },
      "transition-duration": {
        canOverride: canOverride.generic.time,
        componentOf: [
          "transition"
        ],
        defaultValue: "0s",
        intoMultiplexMode: "real",
        keepUnlessDefault: "transition-delay",
        valueOptimizers: [
          valueOptimizers.time,
          valueOptimizers.fraction
        ],
        vendorPrefixes: [
          "-moz-",
          "-ms-",
          "-o-",
          "-webkit-"
        ]
      },
      "transition-property": {
        canOverride: canOverride.generic.propertyName,
        componentOf: [
          "transition"
        ],
        defaultValue: "all",
        intoMultiplexMode: "placeholder",
        placeholderValue: "_",
        vendorPrefixes: [
          "-moz-",
          "-ms-",
          "-o-",
          "-webkit-"
        ]
      },
      "transition-timing-function": {
        canOverride: canOverride.generic.timingFunction,
        componentOf: [
          "transition"
        ],
        defaultValue: "ease",
        intoMultiplexMode: "real",
        vendorPrefixes: [
          "-moz-",
          "-ms-",
          "-o-",
          "-webkit-"
        ]
      },
      "vertical-align": {
        canOverride: canOverride.property.verticalAlign,
        defaultValue: "baseline",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      visibility: {
        canOverride: canOverride.property.visibility,
        defaultValue: "visible"
      },
      "-webkit-tap-highlight-color": {
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.color
        ]
      },
      "-webkit-margin-end": {
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "white-space": {
        canOverride: canOverride.property.whiteSpace,
        defaultValue: "normal"
      },
      width: {
        canOverride: canOverride.generic.unit,
        defaultValue: "auto",
        shortestValue: "0",
        valueOptimizers: [
          valueOptimizers.whiteSpace,
          valueOptimizers.fraction,
          valueOptimizers.precision,
          valueOptimizers.unit,
          valueOptimizers.zero
        ]
      },
      "z-index": {
        canOverride: canOverride.property.zIndex,
        defaultValue: "auto"
      }
    };
    var vendorPrefixedConfiguration = {};
    function cloneDescriptor(propertyName2, prefix2) {
      var clonedDescriptor2 = override(configuration[propertyName2], {});
      if ("componentOf" in clonedDescriptor2) {
        clonedDescriptor2.componentOf = clonedDescriptor2.componentOf.map(function(shorthandName) {
          return prefix2 + shorthandName;
        });
      }
      if ("components" in clonedDescriptor2) {
        clonedDescriptor2.components = clonedDescriptor2.components.map(function(longhandName) {
          return prefix2 + longhandName;
        });
      }
      if ("keepUnlessDefault" in clonedDescriptor2) {
        clonedDescriptor2.keepUnlessDefault = prefix2 + clonedDescriptor2.keepUnlessDefault;
      }
      return clonedDescriptor2;
    }
    for (propertyName in configuration) {
      descriptor = configuration[propertyName];
      if (!("vendorPrefixes" in descriptor)) {
        continue;
      }
      for (i = 0; i < descriptor.vendorPrefixes.length; i++) {
        prefix = descriptor.vendorPrefixes[i];
        clonedDescriptor = cloneDescriptor(propertyName, prefix);
        delete clonedDescriptor.vendorPrefixes;
        vendorPrefixedConfiguration[prefix + propertyName] = clonedDescriptor;
      }
      delete descriptor.vendorPrefixes;
    }
    var descriptor;
    var prefix;
    var clonedDescriptor;
    var i;
    var propertyName;
    module2.exports = override(configuration, vendorPrefixedConfiguration);
  }
});

// node_modules/clean-css/lib/writer/helpers.js
var require_helpers = __commonJS({
  "node_modules/clean-css/lib/writer/helpers.js"(exports, module2) {
    var emptyCharacter = "";
    var Breaks = require_format().Breaks;
    var Spaces = require_format().Spaces;
    var Marker = require_marker();
    var Token = require_token();
    function supportsAfterClosingBrace(token) {
      return token[1][1] == "background" || token[1][1] == "transform" || token[1][1] == "src";
    }
    function afterClosingBrace(token, valueIndex) {
      return token[valueIndex][1][token[valueIndex][1].length - 1] == Marker.CLOSE_ROUND_BRACKET;
    }
    function afterComma(token, valueIndex) {
      return token[valueIndex][1] == Marker.COMMA;
    }
    function afterSlash(token, valueIndex) {
      return token[valueIndex][1] == Marker.FORWARD_SLASH;
    }
    function beforeComma(token, valueIndex) {
      return token[valueIndex + 1] && token[valueIndex + 1][1] == Marker.COMMA;
    }
    function beforeSlash(token, valueIndex) {
      return token[valueIndex + 1] && token[valueIndex + 1][1] == Marker.FORWARD_SLASH;
    }
    function inFilter(token) {
      return token[1][1] == "filter" || token[1][1] == "-ms-filter";
    }
    function disallowsSpace(context, token, valueIndex) {
      return !context.spaceAfterClosingBrace && supportsAfterClosingBrace(token) && afterClosingBrace(token, valueIndex) || beforeSlash(token, valueIndex) || afterSlash(token, valueIndex) || beforeComma(token, valueIndex) || afterComma(token, valueIndex);
    }
    function rules(context, tokens) {
      var store = context.store;
      for (var i = 0, l = tokens.length; i < l; i++) {
        store(context, tokens[i]);
        if (i < l - 1) {
          store(context, comma(context));
        }
      }
    }
    function body(context, tokens) {
      var lastPropertyAt = lastPropertyIndex(tokens);
      for (var i = 0, l = tokens.length; i < l; i++) {
        property(context, tokens, i, lastPropertyAt);
      }
    }
    function lastPropertyIndex(tokens) {
      var index = tokens.length - 1;
      for (; index >= 0; index--) {
        if (tokens[index][0] != Token.COMMENT) {
          break;
        }
      }
      return index;
    }
    function property(context, tokens, position, lastPropertyAt) {
      var store = context.store;
      var token = tokens[position];
      var propertyValue = token[2];
      var isPropertyBlock = propertyValue && propertyValue[0] === Token.PROPERTY_BLOCK;
      var needsSemicolon;
      if (context.format) {
        if (context.format.semicolonAfterLastProperty || isPropertyBlock) {
          needsSemicolon = true;
        } else if (position < lastPropertyAt) {
          needsSemicolon = true;
        } else {
          needsSemicolon = false;
        }
      } else {
        needsSemicolon = position < lastPropertyAt || isPropertyBlock;
      }
      var isLast = position === lastPropertyAt;
      switch (token[0]) {
        case Token.AT_RULE:
          store(context, token);
          store(context, semicolon(context, Breaks.AfterProperty, false));
          break;
        case Token.AT_RULE_BLOCK:
          rules(context, token[1]);
          store(context, openBrace(context, Breaks.AfterRuleBegins, true));
          body(context, token[2]);
          store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));
          break;
        case Token.COMMENT:
          store(context, token);
          store(context, breakFor(context, Breaks.AfterComment) + context.indentWith);
          break;
        case Token.PROPERTY:
          store(context, token[1]);
          store(context, colon(context));
          if (propertyValue) {
            value(context, token);
          }
          store(context, needsSemicolon ? semicolon(context, Breaks.AfterProperty, isLast) : emptyCharacter);
          break;
        case Token.RAW:
          store(context, token);
      }
    }
    function value(context, token) {
      var store = context.store;
      var j, m;
      if (token[2][0] == Token.PROPERTY_BLOCK) {
        store(context, openBrace(context, Breaks.AfterBlockBegins, false));
        body(context, token[2][1]);
        store(context, closeBrace(context, Breaks.AfterBlockEnds, false, true));
      } else {
        for (j = 2, m = token.length; j < m; j++) {
          store(context, token[j]);
          if (j < m - 1 && (inFilter(token) || !disallowsSpace(context, token, j))) {
            store(context, Marker.SPACE);
          }
        }
      }
    }
    function breakFor(context, where) {
      return context.format ? context.format.breaks[where] : emptyCharacter;
    }
    function allowsSpace(context, where) {
      return context.format && context.format.spaces[where];
    }
    function openBrace(context, where, needsPrefixSpace) {
      if (context.format) {
        context.indentBy += context.format.indentBy;
        context.indentWith = context.format.indentWith.repeat(context.indentBy);
        return (needsPrefixSpace && allowsSpace(context, Spaces.BeforeBlockBegins) ? Marker.SPACE : emptyCharacter) + Marker.OPEN_CURLY_BRACKET + breakFor(context, where) + context.indentWith;
      }
      return Marker.OPEN_CURLY_BRACKET;
    }
    function closeBrace(context, where, beforeBlockEnd, isLast) {
      if (context.format) {
        context.indentBy -= context.format.indentBy;
        context.indentWith = context.format.indentWith.repeat(context.indentBy);
        return (beforeBlockEnd ? breakFor(context, Breaks.BeforeBlockEnds) : breakFor(context, Breaks.AfterProperty)) + context.indentWith + Marker.CLOSE_CURLY_BRACKET + (isLast ? emptyCharacter : breakFor(context, where) + context.indentWith);
      }
      return Marker.CLOSE_CURLY_BRACKET;
    }
    function colon(context) {
      return context.format ? Marker.COLON + (allowsSpace(context, Spaces.BeforeValue) ? Marker.SPACE : emptyCharacter) : Marker.COLON;
    }
    function semicolon(context, where, isLast) {
      return context.format ? Marker.SEMICOLON + (isLast ? emptyCharacter : breakFor(context, where) + context.indentWith) : Marker.SEMICOLON;
    }
    function comma(context) {
      return context.format ? Marker.COMMA + breakFor(context, Breaks.BetweenSelectors) + context.indentWith : Marker.COMMA;
    }
    function all(context, tokens) {
      var store = context.store;
      var token;
      var isLast;
      var i, l;
      for (i = 0, l = tokens.length; i < l; i++) {
        token = tokens[i];
        isLast = i == l - 1;
        switch (token[0]) {
          case Token.AT_RULE:
            store(context, token);
            store(context, semicolon(context, Breaks.AfterAtRule, isLast));
            break;
          case Token.AT_RULE_BLOCK:
            rules(context, token[1]);
            store(context, openBrace(context, Breaks.AfterRuleBegins, true));
            body(context, token[2]);
            store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));
            break;
          case Token.NESTED_BLOCK:
            rules(context, token[1]);
            store(context, openBrace(context, Breaks.AfterBlockBegins, true));
            all(context, token[2]);
            store(context, closeBrace(context, Breaks.AfterBlockEnds, true, isLast));
            break;
          case Token.COMMENT:
            store(context, token);
            store(context, breakFor(context, Breaks.AfterComment) + context.indentWith);
            break;
          case Token.RAW:
            store(context, token);
            break;
          case Token.RULE:
            rules(context, token[1]);
            store(context, openBrace(context, Breaks.AfterRuleBegins, true));
            body(context, token[2]);
            store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));
            break;
        }
      }
    }
    module2.exports = {
      all,
      body,
      property,
      rules,
      value
    };
  }
});

// node_modules/clean-css/lib/writer/one-time.js
var require_one_time = __commonJS({
  "node_modules/clean-css/lib/writer/one-time.js"(exports, module2) {
    var helpers = require_helpers();
    function store(serializeContext, token) {
      serializeContext.output.push(typeof token == "string" ? token : token[1]);
    }
    function context() {
      var newContext = {
        output: [],
        store
      };
      return newContext;
    }
    function all(tokens) {
      var oneTimeContext = context();
      helpers.all(oneTimeContext, tokens);
      return oneTimeContext.output.join("");
    }
    function body(tokens) {
      var oneTimeContext = context();
      helpers.body(oneTimeContext, tokens);
      return oneTimeContext.output.join("");
    }
    function property(tokens, position) {
      var oneTimeContext = context();
      helpers.property(oneTimeContext, tokens, position, true);
      return oneTimeContext.output.join("");
    }
    function rules(tokens) {
      var oneTimeContext = context();
      helpers.rules(oneTimeContext, tokens);
      return oneTimeContext.output.join("");
    }
    function value(tokens) {
      var oneTimeContext = context();
      helpers.value(oneTimeContext, tokens);
      return oneTimeContext.output.join("");
    }
    module2.exports = {
      all,
      body,
      property,
      rules,
      value
    };
  }
});

// node_modules/clean-css/lib/optimizer/level-1/optimize.js
var require_optimize2 = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-1/optimize.js"(exports, module2) {
    var sortSelectors = require_sort_selectors();
    var tidyRules = require_tidy_rules();
    var tidyBlock = require_tidy_block();
    var tidyAtRule = require_tidy_at_rule();
    var Hack = require_hack();
    var removeUnused = require_remove_unused();
    var restoreFromOptimizing = require_restore_from_optimizing();
    var wrapForOptimizing = require_wrap_for_optimizing().all;
    var configuration = require_configuration();
    var optimizers = require_value_optimizers();
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var Token = require_token();
    var Marker = require_marker();
    var formatPosition = require_format_position();
    var serializeRules = require_one_time().rules;
    var CHARSET_TOKEN = "@charset";
    var CHARSET_REGEXP = new RegExp("^" + CHARSET_TOKEN, "i");
    var DEFAULT_ROUNDING_PRECISION = require_rounding_precision().DEFAULT;
    var VARIABLE_PROPERTY_NAME_PATTERN = /^--\S+$/;
    var PROPERTY_NAME_PATTERN = /^(?:-chrome-|-[\w-]+\w|\w[\w-]+\w|\w{1,})$/;
    var IMPORT_PREFIX_PATTERN = /^@import/i;
    var URL_PREFIX_PATTERN = /^url\(/i;
    function startsAsUrl(value) {
      return URL_PREFIX_PATTERN.test(value);
    }
    function isImport(token) {
      return IMPORT_PREFIX_PATTERN.test(token[1]);
    }
    function isLegacyFilter(property) {
      var value;
      if (property.name == "filter" || property.name == "-ms-filter") {
        value = property.value[0][1];
        return value.indexOf("progid") > -1 || value.indexOf("alpha") === 0 || value.indexOf("chroma") === 0;
      }
      return false;
    }
    function noop() {
    }
    function noopValueOptimizer(_name, value, _options) {
      return value;
    }
    function optimizeBody(rule, properties, context) {
      var options = context.options;
      var valueOptimizers;
      var property, name, type, value;
      var propertyToken;
      var propertyOptimizer;
      var serializedRule = serializeRules(rule);
      var _properties = wrapForOptimizing(properties);
      var pluginValueOptimizers = context.options.plugins.level1Value;
      var pluginPropertyOptimizers = context.options.plugins.level1Property;
      var isVariable;
      var i, l;
      for (i = 0, l = _properties.length; i < l; i++) {
        var j, k, m, n;
        property = _properties[i];
        name = property.name;
        propertyOptimizer = configuration[name] && configuration[name].propertyOptimizer || noop;
        valueOptimizers = configuration[name] && configuration[name].valueOptimizers || [optimizers.whiteSpace];
        isVariable = VARIABLE_PROPERTY_NAME_PATTERN.test(name);
        if (isVariable) {
          valueOptimizers = options.variableOptimizers.length > 0 ? options.variableOptimizers : [optimizers.whiteSpace];
        }
        if (!isVariable && !PROPERTY_NAME_PATTERN.test(name)) {
          propertyToken = property.all[property.position];
          context.warnings.push("Invalid property name '" + name + "' at " + formatPosition(propertyToken[1][2][0]) + ". Ignoring.");
          property.unused = true;
          continue;
        }
        if (property.value.length === 0) {
          propertyToken = property.all[property.position];
          context.warnings.push("Empty property '" + name + "' at " + formatPosition(propertyToken[1][2][0]) + ". Ignoring.");
          property.unused = true;
          continue;
        }
        if (property.hack && ((property.hack[0] == Hack.ASTERISK || property.hack[0] == Hack.UNDERSCORE) && !options.compatibility.properties.iePrefixHack || property.hack[0] == Hack.BACKSLASH && !options.compatibility.properties.ieSuffixHack || property.hack[0] == Hack.BANG && !options.compatibility.properties.ieBangHack)) {
          property.unused = true;
          continue;
        }
        if (!options.compatibility.properties.ieFilters && isLegacyFilter(property)) {
          property.unused = true;
          continue;
        }
        if (property.block) {
          optimizeBody(rule, property.value[0][1], context);
          continue;
        }
        for (j = 0, m = property.value.length; j < m; j++) {
          type = property.value[j][0];
          value = property.value[j][1];
          if (type == Token.PROPERTY_BLOCK) {
            property.unused = true;
            context.warnings.push("Invalid value token at " + formatPosition(value[0][1][2][0]) + ". Ignoring.");
            break;
          }
          if (startsAsUrl(value) && !context.validator.isUrl(value)) {
            property.unused = true;
            context.warnings.push("Broken URL '" + value + "' at " + formatPosition(property.value[j][2][0]) + ". Ignoring.");
            break;
          }
          for (k = 0, n = valueOptimizers.length; k < n; k++) {
            value = valueOptimizers[k](name, value, options);
          }
          for (k = 0, n = pluginValueOptimizers.length; k < n; k++) {
            value = pluginValueOptimizers[k](name, value, options);
          }
          property.value[j][1] = value;
        }
        propertyOptimizer(serializedRule, property, options);
        for (j = 0, m = pluginPropertyOptimizers.length; j < m; j++) {
          pluginPropertyOptimizers[j](serializedRule, property, options);
        }
      }
      restoreFromOptimizing(_properties);
      removeUnused(_properties);
      removeComments(properties, options);
    }
    function removeComments(tokens, options) {
      var token;
      var i;
      for (i = 0; i < tokens.length; i++) {
        token = tokens[i];
        if (token[0] != Token.COMMENT) {
          continue;
        }
        optimizeComment(token, options);
        if (token[1].length === 0) {
          tokens.splice(i, 1);
          i--;
        }
      }
    }
    function optimizeComment(token, options) {
      if (token[1][2] == Marker.EXCLAMATION && (options.level[OptimizationLevel.One].specialComments == "all" || options.commentsKept < options.level[OptimizationLevel.One].specialComments)) {
        options.commentsKept++;
        return;
      }
      token[1] = [];
    }
    function cleanupCharsets(tokens) {
      var hasCharset = false;
      for (var i = 0, l = tokens.length; i < l; i++) {
        var token = tokens[i];
        if (token[0] != Token.AT_RULE) {
          continue;
        }
        if (!CHARSET_REGEXP.test(token[1])) {
          continue;
        }
        if (hasCharset || token[1].indexOf(CHARSET_TOKEN) == -1) {
          tokens.splice(i, 1);
          i--;
          l--;
        } else {
          hasCharset = true;
          tokens.splice(i, 1);
          tokens.unshift([Token.AT_RULE, token[1].replace(CHARSET_REGEXP, CHARSET_TOKEN)]);
        }
      }
    }
    function buildUnitRegexp(options) {
      var units = ["px", "em", "ex", "cm", "mm", "in", "pt", "pc", "%"];
      var otherUnits = ["ch", "rem", "vh", "vm", "vmax", "vmin", "vw"];
      otherUnits.forEach(function(unit) {
        if (options.compatibility.units[unit]) {
          units.push(unit);
        }
      });
      return new RegExp("(^|\\s|\\(|,)0(?:" + units.join("|") + ")(\\W|$)", "g");
    }
    function buildPrecisionOptions(roundingPrecision) {
      var precisionOptions = {
        matcher: null,
        units: {}
      };
      var optimizable = [];
      var unit;
      var value;
      for (unit in roundingPrecision) {
        value = roundingPrecision[unit];
        if (value != DEFAULT_ROUNDING_PRECISION) {
          precisionOptions.units[unit] = {};
          precisionOptions.units[unit].value = value;
          precisionOptions.units[unit].multiplier = 10 ** value;
          optimizable.push(unit);
        }
      }
      if (optimizable.length > 0) {
        precisionOptions.enabled = true;
        precisionOptions.decimalPointMatcher = new RegExp("(\\d)\\.($|" + optimizable.join("|") + ")($|\\W)", "g");
        precisionOptions.zeroMatcher = new RegExp("(\\d*)(\\.\\d+)(" + optimizable.join("|") + ")", "g");
      }
      return precisionOptions;
    }
    function buildVariableOptimizers(options) {
      return options.level[OptimizationLevel.One].variableValueOptimizers.map(function(optimizer) {
        if (typeof optimizer == "string") {
          return optimizers[optimizer] || noopValueOptimizer;
        }
        return optimizer;
      });
    }
    function level1Optimize(tokens, context) {
      var options = context.options;
      var levelOptions = options.level[OptimizationLevel.One];
      var ie7Hack = options.compatibility.selectors.ie7Hack;
      var adjacentSpace = options.compatibility.selectors.adjacentSpace;
      var spaceAfterClosingBrace = options.compatibility.properties.spaceAfterClosingBrace;
      var format = options.format;
      var mayHaveCharset = false;
      var afterRules = false;
      options.unitsRegexp = options.unitsRegexp || buildUnitRegexp(options);
      options.precision = options.precision || buildPrecisionOptions(levelOptions.roundingPrecision);
      options.commentsKept = options.commentsKept || 0;
      options.variableOptimizers = options.variableOptimizers || buildVariableOptimizers(options);
      for (var i = 0, l = tokens.length; i < l; i++) {
        var token = tokens[i];
        switch (token[0]) {
          case Token.AT_RULE:
            token[1] = isImport(token) && afterRules ? "" : token[1];
            token[1] = levelOptions.tidyAtRules ? tidyAtRule(token[1]) : token[1];
            mayHaveCharset = true;
            break;
          case Token.AT_RULE_BLOCK:
            optimizeBody(token[1], token[2], context);
            afterRules = true;
            break;
          case Token.NESTED_BLOCK:
            token[1] = levelOptions.tidyBlockScopes ? tidyBlock(token[1], spaceAfterClosingBrace) : token[1];
            level1Optimize(token[2], context);
            afterRules = true;
            break;
          case Token.COMMENT:
            optimizeComment(token, options);
            break;
          case Token.RULE:
            token[1] = levelOptions.tidySelectors ? tidyRules(token[1], !ie7Hack, adjacentSpace, format, context.warnings) : token[1];
            token[1] = token[1].length > 1 ? sortSelectors(token[1], levelOptions.selectorsSortingMethod) : token[1];
            optimizeBody(token[1], token[2], context);
            afterRules = true;
            break;
        }
        if (token[0] == Token.COMMENT && token[1].length === 0 || levelOptions.removeEmpty && (token[1].length === 0 || token[2] && token[2].length === 0)) {
          tokens.splice(i, 1);
          i--;
          l--;
        }
      }
      if (levelOptions.cleanupCharsets && mayHaveCharset) {
        cleanupCharsets(tokens);
      }
      return tokens;
    }
    module2.exports = level1Optimize;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/is-mergeable.js
var require_is_mergeable = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/is-mergeable.js"(exports, module2) {
    var Marker = require_marker();
    var split = require_split();
    var DEEP_SELECTOR_PATTERN = /\/deep\//;
    var DOUBLE_COLON_PATTERN = /^::/;
    var VENDOR_PREFIXED_PATTERN = /:(-moz-|-ms-|-o-|-webkit-)/;
    var NOT_PSEUDO = ":not";
    var PSEUDO_CLASSES_WITH_ARGUMENTS = [
      ":dir",
      ":lang",
      ":not",
      ":nth-child",
      ":nth-last-child",
      ":nth-last-of-type",
      ":nth-of-type"
    ];
    var RELATION_PATTERN = /[>+~]/;
    var UNMIXABLE_PSEUDO_CLASSES = [
      ":after",
      ":before",
      ":first-letter",
      ":first-line",
      ":lang"
    ];
    var UNMIXABLE_PSEUDO_ELEMENTS = [
      "::after",
      "::before",
      "::first-letter",
      "::first-line"
    ];
    var Level = {
      DOUBLE_QUOTE: "double-quote",
      SINGLE_QUOTE: "single-quote",
      ROOT: "root"
    };
    function isMergeable(selector, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) {
      var singleSelectors = split(selector, Marker.COMMA);
      var singleSelector;
      var i, l;
      for (i = 0, l = singleSelectors.length; i < l; i++) {
        singleSelector = singleSelectors[i];
        if (singleSelector.length === 0 || isDeepSelector(singleSelector) || isVendorPrefixed(singleSelector) || singleSelector.indexOf(Marker.COLON) > -1 && !areMergeable(singleSelector, extractPseudoFrom(singleSelector), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging)) {
          return false;
        }
      }
      return true;
    }
    function isDeepSelector(selector) {
      return DEEP_SELECTOR_PATTERN.test(selector);
    }
    function isVendorPrefixed(selector) {
      return VENDOR_PREFIXED_PATTERN.test(selector);
    }
    function extractPseudoFrom(selector) {
      var list = [];
      var character;
      var buffer = [];
      var level = Level.ROOT;
      var roundBracketLevel = 0;
      var isQuoted;
      var isEscaped;
      var isPseudo = false;
      var isRelation;
      var wasColon = false;
      var index;
      var len;
      for (index = 0, len = selector.length; index < len; index++) {
        character = selector[index];
        isRelation = !isEscaped && RELATION_PATTERN.test(character);
        isQuoted = level == Level.DOUBLE_QUOTE || level == Level.SINGLE_QUOTE;
        if (isEscaped) {
          buffer.push(character);
        } else if (character == Marker.DOUBLE_QUOTE && level == Level.ROOT) {
          buffer.push(character);
          level = Level.DOUBLE_QUOTE;
        } else if (character == Marker.DOUBLE_QUOTE && level == Level.DOUBLE_QUOTE) {
          buffer.push(character);
          level = Level.ROOT;
        } else if (character == Marker.SINGLE_QUOTE && level == Level.ROOT) {
          buffer.push(character);
          level = Level.SINGLE_QUOTE;
        } else if (character == Marker.SINGLE_QUOTE && level == Level.SINGLE_QUOTE) {
          buffer.push(character);
          level = Level.ROOT;
        } else if (isQuoted) {
          buffer.push(character);
        } else if (character == Marker.OPEN_ROUND_BRACKET) {
          buffer.push(character);
          roundBracketLevel++;
        } else if (character == Marker.CLOSE_ROUND_BRACKET && roundBracketLevel == 1 && isPseudo) {
          buffer.push(character);
          list.push(buffer.join(""));
          roundBracketLevel--;
          buffer = [];
          isPseudo = false;
        } else if (character == Marker.CLOSE_ROUND_BRACKET) {
          buffer.push(character);
          roundBracketLevel--;
        } else if (character == Marker.COLON && roundBracketLevel === 0 && isPseudo && !wasColon) {
          list.push(buffer.join(""));
          buffer = [];
          buffer.push(character);
        } else if (character == Marker.COLON && roundBracketLevel === 0 && !wasColon) {
          buffer = [];
          buffer.push(character);
          isPseudo = true;
        } else if (character == Marker.SPACE && roundBracketLevel === 0 && isPseudo) {
          list.push(buffer.join(""));
          buffer = [];
          isPseudo = false;
        } else if (isRelation && roundBracketLevel === 0 && isPseudo) {
          list.push(buffer.join(""));
          buffer = [];
          isPseudo = false;
        } else {
          buffer.push(character);
        }
        isEscaped = character == Marker.BACK_SLASH;
        wasColon = character == Marker.COLON;
      }
      if (buffer.length > 0 && isPseudo) {
        list.push(buffer.join(""));
      }
      return list;
    }
    function areMergeable(selector, matches, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) {
      return areAllowed(matches, mergeablePseudoClasses, mergeablePseudoElements) && needArguments(matches) && (matches.length < 2 || !someIncorrectlyChained(selector, matches)) && (matches.length < 2 || multiplePseudoMerging && allMixable(matches));
    }
    function areAllowed(matches, mergeablePseudoClasses, mergeablePseudoElements) {
      var match;
      var name;
      var i, l;
      for (i = 0, l = matches.length; i < l; i++) {
        match = matches[i];
        name = match.indexOf(Marker.OPEN_ROUND_BRACKET) > -1 ? match.substring(0, match.indexOf(Marker.OPEN_ROUND_BRACKET)) : match;
        if (mergeablePseudoClasses.indexOf(name) === -1 && mergeablePseudoElements.indexOf(name) === -1) {
          return false;
        }
      }
      return true;
    }
    function needArguments(matches) {
      var match;
      var name;
      var bracketOpensAt;
      var hasArguments;
      var i, l;
      for (i = 0, l = matches.length; i < l; i++) {
        match = matches[i];
        bracketOpensAt = match.indexOf(Marker.OPEN_ROUND_BRACKET);
        hasArguments = bracketOpensAt > -1;
        name = hasArguments ? match.substring(0, bracketOpensAt) : match;
        if (hasArguments && PSEUDO_CLASSES_WITH_ARGUMENTS.indexOf(name) == -1) {
          return false;
        }
        if (!hasArguments && PSEUDO_CLASSES_WITH_ARGUMENTS.indexOf(name) > -1) {
          return false;
        }
      }
      return true;
    }
    function someIncorrectlyChained(selector, matches) {
      var positionInSelector = 0;
      var match;
      var matchAt;
      var nextMatch;
      var nextMatchAt;
      var name;
      var nextName;
      var areChained;
      var i, l;
      for (i = 0, l = matches.length; i < l; i++) {
        match = matches[i];
        nextMatch = matches[i + 1];
        if (!nextMatch) {
          break;
        }
        matchAt = selector.indexOf(match, positionInSelector);
        nextMatchAt = selector.indexOf(match, matchAt + 1);
        positionInSelector = nextMatchAt;
        areChained = matchAt + match.length == nextMatchAt;
        if (areChained) {
          name = match.indexOf(Marker.OPEN_ROUND_BRACKET) > -1 ? match.substring(0, match.indexOf(Marker.OPEN_ROUND_BRACKET)) : match;
          nextName = nextMatch.indexOf(Marker.OPEN_ROUND_BRACKET) > -1 ? nextMatch.substring(0, nextMatch.indexOf(Marker.OPEN_ROUND_BRACKET)) : nextMatch;
          if (name != NOT_PSEUDO || nextName != NOT_PSEUDO) {
            return true;
          }
        }
      }
      return false;
    }
    function allMixable(matches) {
      var unmixableMatches = 0;
      var match;
      var i, l;
      for (i = 0, l = matches.length; i < l; i++) {
        match = matches[i];
        if (isPseudoElement(match)) {
          unmixableMatches += UNMIXABLE_PSEUDO_ELEMENTS.indexOf(match) > -1 ? 1 : 0;
        } else {
          unmixableMatches += UNMIXABLE_PSEUDO_CLASSES.indexOf(match) > -1 ? 1 : 0;
        }
        if (unmixableMatches > 1) {
          return false;
        }
      }
      return true;
    }
    function isPseudoElement(pseudo) {
      return DOUBLE_COLON_PATTERN.test(pseudo);
    }
    module2.exports = isMergeable;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/every-values-pair.js
var require_every_values_pair = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/every-values-pair.js"(exports, module2) {
    var Marker = require_marker();
    function everyValuesPair(fn, left, right) {
      var leftSize = left.value.length;
      var rightSize = right.value.length;
      var total = Math.max(leftSize, rightSize);
      var lowerBound = Math.min(leftSize, rightSize) - 1;
      var leftValue;
      var rightValue;
      var position;
      for (position = 0; position < total; position++) {
        leftValue = left.value[position] && left.value[position][1] || leftValue;
        rightValue = right.value[position] && right.value[position][1] || rightValue;
        if (leftValue == Marker.COMMA || rightValue == Marker.COMMA) {
          continue;
        }
        if (!fn(leftValue, rightValue, position, position <= lowerBound)) {
          return false;
        }
      }
      return true;
    }
    module2.exports = everyValuesPair;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/has-inherit.js
var require_has_inherit = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/has-inherit.js"(exports, module2) {
    function hasInherit(property) {
      for (var i = property.value.length - 1; i >= 0; i--) {
        if (property.value[i][1] == "inherit") {
          return true;
        }
      }
      return false;
    }
    module2.exports = hasInherit;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/has-same-values.js
var require_has_same_values = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/has-same-values.js"(exports, module2) {
    function hasSameValues(property) {
      var firstValue = property.value[0][1];
      var i, l;
      for (i = 1, l = property.value.length; i < l; i++) {
        if (property.value[i][1] != firstValue) {
          return false;
        }
      }
      return true;
    }
    module2.exports = hasSameValues;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/populate-components.js
var require_populate_components = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/populate-components.js"(exports, module2) {
    var configuration = require_configuration();
    var InvalidPropertyError = require_invalid_property_error();
    function populateComponents(properties, validator, warnings) {
      var component;
      var j, m;
      for (var i = properties.length - 1; i >= 0; i--) {
        var property = properties[i];
        var descriptor = configuration[property.name];
        if (!property.dynamic && descriptor && descriptor.shorthand) {
          if (onlyValueIsVariable(property, validator) || moreThanOneValueIsVariable(property, validator)) {
            property.optimizable = false;
            continue;
          }
          property.shorthand = true;
          property.dirty = true;
          try {
            property.components = descriptor.breakUp(property, configuration, validator);
            if (descriptor.shorthandComponents) {
              for (j = 0, m = property.components.length; j < m; j++) {
                component = property.components[j];
                component.components = configuration[component.name].breakUp(component, configuration, validator);
              }
            }
          } catch (e) {
            if (e instanceof InvalidPropertyError) {
              property.components = [];
              warnings.push(e.message);
            } else {
              throw e;
            }
          }
          if (property.components.length > 0) {
            property.multiplex = property.components[0].multiplex;
          } else {
            property.unused = true;
          }
        }
      }
    }
    function onlyValueIsVariable(property, validator) {
      return property.value.length == 1 && validator.isVariable(property.value[0][1]);
    }
    function moreThanOneValueIsVariable(property, validator) {
      return property.value.length > 1 && property.value.filter(function(value) {
        return validator.isVariable(value[1]);
      }).length > 1;
    }
    module2.exports = populateComponents;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/restore-with-components.js
var require_restore_with_components = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/restore-with-components.js"(exports, module2) {
    var configuration = require_configuration();
    function restoreWithComponents(property) {
      var descriptor = configuration[property.name];
      if (descriptor && descriptor.shorthand) {
        return descriptor.restore(property, configuration);
      }
      return property.value;
    }
    module2.exports = restoreWithComponents;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/merge-into-shorthands.js
var require_merge_into_shorthands = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/merge-into-shorthands.js"(exports, module2) {
    var everyValuesPair = require_every_values_pair();
    var hasInherit = require_has_inherit();
    var hasSameValues = require_has_same_values();
    var populateComponents = require_populate_components();
    var configuration = require_configuration();
    var deepClone = require_clone().deep;
    var restoreWithComponents = require_restore_with_components();
    var restoreFromOptimizing = require_restore_from_optimizing();
    var wrapSingle = require_wrap_for_optimizing().single;
    var serializeBody = require_one_time().body;
    var Token = require_token();
    function mergeIntoShorthands(properties, validator) {
      var candidates = {};
      var descriptor;
      var componentOf;
      var property;
      var i, l;
      var j, m;
      if (properties.length < 3) {
        return;
      }
      for (i = 0, l = properties.length; i < l; i++) {
        property = properties[i];
        descriptor = configuration[property.name];
        if (property.dynamic) {
          continue;
        }
        if (property.unused) {
          continue;
        }
        if (property.hack) {
          continue;
        }
        if (property.block) {
          continue;
        }
        if (descriptor && descriptor.singleTypeComponents && !hasSameValues(property)) {
          continue;
        }
        invalidateOrCompact(properties, i, candidates, validator);
        if (descriptor && descriptor.componentOf) {
          for (j = 0, m = descriptor.componentOf.length; j < m; j++) {
            componentOf = descriptor.componentOf[j];
            candidates[componentOf] = candidates[componentOf] || {};
            candidates[componentOf][property.name] = property;
          }
        }
      }
      invalidateOrCompact(properties, i, candidates, validator);
    }
    function invalidateOrCompact(properties, position, candidates, validator) {
      var invalidatedBy = properties[position];
      var shorthandName;
      var shorthandDescriptor;
      var candidateComponents;
      var replacedCandidates = [];
      var i;
      for (shorthandName in candidates) {
        if (invalidatedBy !== void 0 && shorthandName == invalidatedBy.name) {
          continue;
        }
        shorthandDescriptor = configuration[shorthandName];
        candidateComponents = candidates[shorthandName];
        if (invalidatedBy && invalidates(candidates, shorthandName, invalidatedBy)) {
          delete candidates[shorthandName];
          continue;
        }
        if (shorthandDescriptor.components.length > Object.keys(candidateComponents).length) {
          continue;
        }
        if (mixedImportance(candidateComponents)) {
          continue;
        }
        if (!overridable(candidateComponents, shorthandName, validator)) {
          continue;
        }
        if (!mergeable(candidateComponents)) {
          continue;
        }
        if (mixedInherit(candidateComponents)) {
          replaceWithInheritBestFit(properties, candidateComponents, shorthandName, validator);
        } else {
          replaceWithShorthand(properties, candidateComponents, shorthandName, validator);
        }
        replacedCandidates.push(shorthandName);
      }
      for (i = replacedCandidates.length - 1; i >= 0; i--) {
        delete candidates[replacedCandidates[i]];
      }
    }
    function invalidates(candidates, shorthandName, invalidatedBy) {
      var shorthandDescriptor = configuration[shorthandName];
      var invalidatedByDescriptor = configuration[invalidatedBy.name];
      var componentName;
      if ("overridesShorthands" in shorthandDescriptor && shorthandDescriptor.overridesShorthands.indexOf(invalidatedBy.name) > -1) {
        return true;
      }
      if (invalidatedByDescriptor && "componentOf" in invalidatedByDescriptor) {
        for (componentName in candidates[shorthandName]) {
          if (invalidatedByDescriptor.componentOf.indexOf(componentName) > -1) {
            return true;
          }
        }
      }
      return false;
    }
    function mixedImportance(components) {
      var important;
      var componentName;
      for (componentName in components) {
        if (important !== void 0 && components[componentName].important != important) {
          return true;
        }
        important = components[componentName].important;
      }
      return false;
    }
    function overridable(components, shorthandName, validator) {
      var descriptor = configuration[shorthandName];
      var newValuePlaceholder = [
        Token.PROPERTY,
        [Token.PROPERTY_NAME, shorthandName],
        [Token.PROPERTY_VALUE, descriptor.defaultValue]
      ];
      var newProperty = wrapSingle(newValuePlaceholder);
      var component;
      var mayOverride;
      var i, l;
      populateComponents([newProperty], validator, []);
      for (i = 0, l = descriptor.components.length; i < l; i++) {
        component = components[descriptor.components[i]];
        mayOverride = configuration[component.name].canOverride || sameValue;
        if (!everyValuesPair(mayOverride.bind(null, validator), newProperty.components[i], component)) {
          return false;
        }
      }
      return true;
    }
    function sameValue(_validator, value1, value2) {
      return value1 === value2;
    }
    function mergeable(components) {
      var lastCount = null;
      var currentCount;
      var componentName;
      var component;
      var descriptor;
      var values;
      for (componentName in components) {
        component = components[componentName];
        descriptor = configuration[componentName];
        if (!("restore" in descriptor)) {
          continue;
        }
        restoreFromOptimizing([component.all[component.position]], restoreWithComponents);
        values = descriptor.restore(component, configuration);
        currentCount = values.length;
        if (lastCount !== null && currentCount !== lastCount) {
          return false;
        }
        lastCount = currentCount;
      }
      return true;
    }
    function mixedInherit(components) {
      var componentName;
      var lastValue = null;
      var currentValue;
      for (componentName in components) {
        currentValue = hasInherit(components[componentName]);
        if (lastValue !== null && lastValue !== currentValue) {
          return true;
        }
        lastValue = currentValue;
      }
      return false;
    }
    function replaceWithInheritBestFit(properties, candidateComponents, shorthandName, validator) {
      var viaLonghands = buildSequenceWithInheritLonghands(candidateComponents, shorthandName, validator);
      var viaShorthand = buildSequenceWithInheritShorthand(candidateComponents, shorthandName, validator);
      var longhandTokensSequence = viaLonghands[0];
      var shorthandTokensSequence = viaShorthand[0];
      var isLonghandsShorter = serializeBody(longhandTokensSequence).length < serializeBody(shorthandTokensSequence).length;
      var newTokensSequence = isLonghandsShorter ? longhandTokensSequence : shorthandTokensSequence;
      var newProperty = isLonghandsShorter ? viaLonghands[1] : viaShorthand[1];
      var newComponents = isLonghandsShorter ? viaLonghands[2] : viaShorthand[2];
      var lastComponent = candidateComponents[Object.keys(candidateComponents).pop()];
      var all = lastComponent.all;
      var insertAt = lastComponent.position;
      var componentName;
      var oldComponent;
      var newComponent;
      var newToken;
      newProperty.position = insertAt;
      newProperty.shorthand = true;
      newProperty.important = lastComponent.important;
      newProperty.multiplex = false;
      newProperty.dirty = true;
      newProperty.all = all;
      newProperty.all[insertAt] = newTokensSequence[0];
      properties.splice(insertAt, 1, newProperty);
      for (componentName in candidateComponents) {
        oldComponent = candidateComponents[componentName];
        oldComponent.unused = true;
        newProperty.multiplex = newProperty.multiplex || oldComponent.multiplex;
        if (oldComponent.name in newComponents) {
          newComponent = newComponents[oldComponent.name];
          newToken = findTokenIn(newTokensSequence, componentName);
          newComponent.position = all.length;
          newComponent.all = all;
          newComponent.all.push(newToken);
          properties.push(newComponent);
        }
      }
    }
    function buildSequenceWithInheritLonghands(components, shorthandName, validator) {
      var tokensSequence = [];
      var inheritComponents = {};
      var nonInheritComponents = {};
      var descriptor = configuration[shorthandName];
      var shorthandToken = [
        Token.PROPERTY,
        [Token.PROPERTY_NAME, shorthandName],
        [Token.PROPERTY_VALUE, descriptor.defaultValue]
      ];
      var newProperty = wrapSingle(shorthandToken);
      var component;
      var longhandToken;
      var newComponent;
      var nameMetadata;
      var i, l;
      populateComponents([newProperty], validator, []);
      for (i = 0, l = descriptor.components.length; i < l; i++) {
        component = components[descriptor.components[i]];
        if (hasInherit(component)) {
          longhandToken = component.all[component.position].slice(0, 2);
          Array.prototype.push.apply(longhandToken, component.value);
          tokensSequence.push(longhandToken);
          newComponent = deepClone(component);
          newComponent.value = inferComponentValue(components, newComponent.name);
          newProperty.components[i] = newComponent;
          inheritComponents[component.name] = deepClone(component);
        } else {
          newComponent = deepClone(component);
          newComponent.all = component.all;
          newProperty.components[i] = newComponent;
          nonInheritComponents[component.name] = component;
        }
      }
      newProperty.important = components[Object.keys(components).pop()].important;
      nameMetadata = joinMetadata(nonInheritComponents, 1);
      shorthandToken[1].push(nameMetadata);
      restoreFromOptimizing([newProperty], restoreWithComponents);
      shorthandToken = shorthandToken.slice(0, 2);
      Array.prototype.push.apply(shorthandToken, newProperty.value);
      tokensSequence.unshift(shorthandToken);
      return [tokensSequence, newProperty, inheritComponents];
    }
    function inferComponentValue(components, propertyName) {
      var descriptor = configuration[propertyName];
      if ("oppositeTo" in descriptor) {
        return components[descriptor.oppositeTo].value;
      }
      return [[Token.PROPERTY_VALUE, descriptor.defaultValue]];
    }
    function joinMetadata(components, at) {
      var metadata = [];
      var component;
      var originalValue;
      var componentMetadata;
      var componentName;
      for (componentName in components) {
        component = components[componentName];
        originalValue = component.all[component.position];
        componentMetadata = originalValue[at][originalValue[at].length - 1];
        Array.prototype.push.apply(metadata, componentMetadata);
      }
      return metadata.sort(metadataSorter);
    }
    function metadataSorter(metadata1, metadata2) {
      var line1 = metadata1[0];
      var line2 = metadata2[0];
      var column1 = metadata1[1];
      var column2 = metadata2[1];
      if (line1 < line2) {
        return -1;
      }
      if (line1 === line2) {
        return column1 < column2 ? -1 : 1;
      }
      return 1;
    }
    function buildSequenceWithInheritShorthand(components, shorthandName, validator) {
      var tokensSequence = [];
      var inheritComponents = {};
      var nonInheritComponents = {};
      var descriptor = configuration[shorthandName];
      var shorthandToken = [
        Token.PROPERTY,
        [Token.PROPERTY_NAME, shorthandName],
        [Token.PROPERTY_VALUE, "inherit"]
      ];
      var newProperty = wrapSingle(shorthandToken);
      var component;
      var longhandToken;
      var nameMetadata;
      var valueMetadata;
      var i, l;
      populateComponents([newProperty], validator, []);
      for (i = 0, l = descriptor.components.length; i < l; i++) {
        component = components[descriptor.components[i]];
        if (hasInherit(component)) {
          inheritComponents[component.name] = component;
        } else {
          longhandToken = component.all[component.position].slice(0, 2);
          Array.prototype.push.apply(longhandToken, component.value);
          tokensSequence.push(longhandToken);
          nonInheritComponents[component.name] = deepClone(component);
        }
      }
      nameMetadata = joinMetadata(inheritComponents, 1);
      shorthandToken[1].push(nameMetadata);
      valueMetadata = joinMetadata(inheritComponents, 2);
      shorthandToken[2].push(valueMetadata);
      tokensSequence.unshift(shorthandToken);
      return [tokensSequence, newProperty, nonInheritComponents];
    }
    function findTokenIn(tokens, componentName) {
      var i, l;
      for (i = 0, l = tokens.length; i < l; i++) {
        if (tokens[i][1][1] == componentName) {
          return tokens[i];
        }
      }
    }
    function replaceWithShorthand(properties, candidateComponents, shorthandName, validator) {
      var descriptor = configuration[shorthandName];
      var nameMetadata;
      var valueMetadata;
      var newValuePlaceholder = [
        Token.PROPERTY,
        [Token.PROPERTY_NAME, shorthandName],
        [Token.PROPERTY_VALUE, descriptor.defaultValue]
      ];
      var all;
      var insertAt = inferInsertAtFrom(properties, candidateComponents, shorthandName);
      var newProperty = wrapSingle(newValuePlaceholder);
      newProperty.shorthand = true;
      newProperty.dirty = true;
      newProperty.multiplex = false;
      populateComponents([newProperty], validator, []);
      for (var i = 0, l = descriptor.components.length; i < l; i++) {
        var component = candidateComponents[descriptor.components[i]];
        newProperty.components[i] = deepClone(component);
        newProperty.important = component.important;
        newProperty.multiplex = newProperty.multiplex || component.multiplex;
        all = component.all;
      }
      for (var componentName in candidateComponents) {
        candidateComponents[componentName].unused = true;
      }
      nameMetadata = joinMetadata(candidateComponents, 1);
      newValuePlaceholder[1].push(nameMetadata);
      valueMetadata = joinMetadata(candidateComponents, 2);
      newValuePlaceholder[2].push(valueMetadata);
      newProperty.position = insertAt;
      newProperty.all = all;
      newProperty.all[insertAt] = newValuePlaceholder;
      properties.splice(insertAt, 1, newProperty);
    }
    function inferInsertAtFrom(properties, candidateComponents, shorthandName) {
      var candidateComponentNames = Object.keys(candidateComponents);
      var firstCandidatePosition = candidateComponents[candidateComponentNames[0]].position;
      var lastCandidatePosition = candidateComponents[candidateComponentNames[candidateComponentNames.length - 1]].position;
      if (shorthandName == "border" && traversesVia(properties.slice(firstCandidatePosition, lastCandidatePosition), "border-image")) {
        return firstCandidatePosition;
      }
      return lastCandidatePosition;
    }
    function traversesVia(properties, propertyName) {
      for (var i = properties.length - 1; i >= 0; i--) {
        if (properties[i].name == propertyName) {
          return true;
        }
      }
      return false;
    }
    module2.exports = mergeIntoShorthands;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/has-unset.js
var require_has_unset = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/has-unset.js"(exports, module2) {
    function hasUnset(property) {
      for (var i = property.value.length - 1; i >= 0; i--) {
        if (property.value[i][1] == "unset") {
          return true;
        }
      }
      return false;
    }
    module2.exports = hasUnset;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/find-component-in.js
var require_find_component_in = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/find-component-in.js"(exports, module2) {
    var configuration = require_configuration();
    function findComponentIn(shorthand, longhand) {
      var comparator = nameComparator(longhand);
      return findInDirectComponents(shorthand, comparator) || findInSubComponents(shorthand, comparator);
    }
    function nameComparator(to) {
      return function(property) {
        return to.name === property.name;
      };
    }
    function findInDirectComponents(shorthand, comparator) {
      return shorthand.components.filter(comparator)[0];
    }
    function findInSubComponents(shorthand, comparator) {
      var shorthandComponent;
      var longhandMatch;
      var i, l;
      if (!configuration[shorthand.name].shorthandComponents) {
        return;
      }
      for (i = 0, l = shorthand.components.length; i < l; i++) {
        shorthandComponent = shorthand.components[i];
        longhandMatch = findInDirectComponents(shorthandComponent, comparator);
        if (longhandMatch) {
          return longhandMatch;
        }
      }
    }
    module2.exports = findComponentIn;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/is-component-of.js
var require_is_component_of = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/is-component-of.js"(exports, module2) {
    var configuration = require_configuration();
    function isComponentOf(property1, property2, shallow) {
      return isDirectComponentOf(property1, property2) || !shallow && !!configuration[property1.name].shorthandComponents && isSubComponentOf(property1, property2);
    }
    function isDirectComponentOf(property1, property2) {
      var descriptor = configuration[property1.name];
      return "components" in descriptor && descriptor.components.indexOf(property2.name) > -1;
    }
    function isSubComponentOf(property1, property2) {
      return property1.components.some(function(component) {
        return isDirectComponentOf(component, property2);
      });
    }
    module2.exports = isComponentOf;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/is-mergeable-shorthand.js
var require_is_mergeable_shorthand = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/is-mergeable-shorthand.js"(exports, module2) {
    var Marker = require_marker();
    function isMergeableShorthand(shorthand) {
      if (shorthand.name != "font") {
        return true;
      }
      return shorthand.value[0][1].indexOf(Marker.INTERNAL) == -1;
    }
    module2.exports = isMergeableShorthand;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/overrides-non-component-shorthand.js
var require_overrides_non_component_shorthand = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/overrides-non-component-shorthand.js"(exports, module2) {
    var configuration = require_configuration();
    function overridesNonComponentShorthand(property1, property2) {
      return property1.name in configuration && "overridesShorthands" in configuration[property1.name] && configuration[property1.name].overridesShorthands.indexOf(property2.name) > -1;
    }
    module2.exports = overridesNonComponentShorthand;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/override-properties.js
var require_override_properties = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/override-properties.js"(exports, module2) {
    var hasInherit = require_has_inherit();
    var hasUnset = require_has_unset();
    var everyValuesPair = require_every_values_pair();
    var findComponentIn = require_find_component_in();
    var isComponentOf = require_is_component_of();
    var isMergeableShorthand = require_is_mergeable_shorthand();
    var overridesNonComponentShorthand = require_overrides_non_component_shorthand();
    var sameVendorPrefixesIn = require_vendor_prefixes().same;
    var configuration = require_configuration();
    var deepClone = require_clone().deep;
    var restoreWithComponents = require_restore_with_components();
    var shallowClone = require_clone().shallow;
    var restoreFromOptimizing = require_restore_from_optimizing();
    var Token = require_token();
    var Marker = require_marker();
    var serializeProperty = require_one_time().property;
    function sameValue(_validator, value1, value2) {
      return value1 === value2;
    }
    function wouldBreakCompatibility(property, validator) {
      for (var i = 0; i < property.components.length; i++) {
        var component = property.components[i];
        var descriptor = configuration[component.name];
        var canOverride = descriptor && descriptor.canOverride || sameValue;
        var _component = shallowClone(component);
        _component.value = [[Token.PROPERTY_VALUE, descriptor.defaultValue]];
        if (!everyValuesPair(canOverride.bind(null, validator), _component, component)) {
          return true;
        }
      }
      return false;
    }
    function overrideIntoMultiplex(property, by) {
      by.unused = true;
      turnIntoMultiplex(by, multiplexSize(property));
      property.value = by.value;
    }
    function overrideByMultiplex(property, by) {
      by.unused = true;
      property.multiplex = true;
      property.value = by.value;
    }
    function overrideSimple(property, by) {
      by.unused = true;
      property.value = by.value;
    }
    function override(property, by) {
      if (by.multiplex) {
        overrideByMultiplex(property, by);
      } else if (property.multiplex) {
        overrideIntoMultiplex(property, by);
      } else {
        overrideSimple(property, by);
      }
    }
    function overrideShorthand(property, by) {
      by.unused = true;
      for (var i = 0, l = property.components.length; i < l; i++) {
        override(property.components[i], by.components[i]);
      }
    }
    function turnIntoMultiplex(property, size) {
      property.multiplex = true;
      if (configuration[property.name].shorthand) {
        turnShorthandValueIntoMultiplex(property, size);
      } else {
        turnLonghandValueIntoMultiplex(property, size);
      }
    }
    function turnShorthandValueIntoMultiplex(property, size) {
      var component;
      var i, l;
      for (i = 0, l = property.components.length; i < l; i++) {
        component = property.components[i];
        if (!component.multiplex) {
          turnLonghandValueIntoMultiplex(component, size);
        }
      }
    }
    function turnLonghandValueIntoMultiplex(property, size) {
      var descriptor = configuration[property.name];
      var withRealValue = descriptor.intoMultiplexMode == "real";
      var withValue = descriptor.intoMultiplexMode == "real" ? property.value.slice(0) : descriptor.intoMultiplexMode == "placeholder" ? descriptor.placeholderValue : descriptor.defaultValue;
      var i = multiplexSize(property);
      var j;
      var m = withValue.length;
      for (; i < size; i++) {
        property.value.push([Token.PROPERTY_VALUE, Marker.COMMA]);
        if (Array.isArray(withValue)) {
          for (j = 0; j < m; j++) {
            property.value.push(withRealValue ? withValue[j] : [Token.PROPERTY_VALUE, withValue[j]]);
          }
        } else {
          property.value.push(withRealValue ? withValue : [Token.PROPERTY_VALUE, withValue]);
        }
      }
    }
    function multiplexSize(component) {
      var size = 0;
      for (var i = 0, l = component.value.length; i < l; i++) {
        if (component.value[i][1] == Marker.COMMA) {
          size++;
        }
      }
      return size + 1;
    }
    function lengthOf(property) {
      var fakeAsArray = [
        Token.PROPERTY,
        [Token.PROPERTY_NAME, property.name]
      ].concat(property.value);
      return serializeProperty([fakeAsArray], 0).length;
    }
    function moreSameShorthands(properties, startAt, name) {
      var count = 0;
      for (var i = startAt; i >= 0; i--) {
        if (properties[i].name == name && !properties[i].unused) {
          count++;
        }
        if (count > 1) {
          break;
        }
      }
      return count > 1;
    }
    function overridingFunction(shorthand, validator) {
      for (var i = 0, l = shorthand.components.length; i < l; i++) {
        if (!anyValue(validator.isUrl, shorthand.components[i]) && anyValue(validator.isFunction, shorthand.components[i])) {
          return true;
        }
      }
      return false;
    }
    function anyValue(fn, property) {
      for (var i = 0, l = property.value.length; i < l; i++) {
        if (property.value[i][1] == Marker.COMMA) {
          continue;
        }
        if (fn(property.value[i][1])) {
          return true;
        }
      }
      return false;
    }
    function wouldResultInLongerValue(left, right) {
      if (!left.multiplex && !right.multiplex || left.multiplex && right.multiplex) {
        return false;
      }
      var multiplex = left.multiplex ? left : right;
      var simple = left.multiplex ? right : left;
      var component;
      var multiplexClone = deepClone(multiplex);
      restoreFromOptimizing([multiplexClone], restoreWithComponents);
      var simpleClone = deepClone(simple);
      restoreFromOptimizing([simpleClone], restoreWithComponents);
      var lengthBefore = lengthOf(multiplexClone) + 1 + lengthOf(simpleClone);
      if (left.multiplex) {
        component = findComponentIn(multiplexClone, simpleClone);
        overrideIntoMultiplex(component, simpleClone);
      } else {
        component = findComponentIn(simpleClone, multiplexClone);
        turnIntoMultiplex(simpleClone, multiplexSize(multiplexClone));
        overrideByMultiplex(component, multiplexClone);
      }
      restoreFromOptimizing([simpleClone], restoreWithComponents);
      var lengthAfter = lengthOf(simpleClone);
      return lengthBefore <= lengthAfter;
    }
    function isCompactable(property) {
      return property.name in configuration;
    }
    function noneOverrideHack(left, right) {
      return !left.multiplex && (left.name == "background" || left.name == "background-image") && right.multiplex && (right.name == "background" || right.name == "background-image") && anyLayerIsNone(right.value);
    }
    function anyLayerIsNone(values) {
      var layers = intoLayers(values);
      for (var i = 0, l = layers.length; i < l; i++) {
        if (layers[i].length == 1 && layers[i][0][1] == "none") {
          return true;
        }
      }
      return false;
    }
    function intoLayers(values) {
      var layers = [];
      for (var i = 0, layer = [], l = values.length; i < l; i++) {
        var value = values[i];
        if (value[1] == Marker.COMMA) {
          layers.push(layer);
          layer = [];
        } else {
          layer.push(value);
        }
      }
      layers.push(layer);
      return layers;
    }
    function overrideProperties(properties, withMerging, compatibility, validator) {
      var mayOverride, right, left, component;
      var overriddenComponents;
      var overriddenComponent;
      var overridingComponent;
      var overridable;
      var i, j, k;
      propertyLoop:
        for (i = properties.length - 1; i >= 0; i--) {
          right = properties[i];
          if (!isCompactable(right)) {
            continue;
          }
          if (right.block) {
            continue;
          }
          mayOverride = configuration[right.name].canOverride || sameValue;
          traverseLoop:
            for (j = i - 1; j >= 0; j--) {
              left = properties[j];
              if (!isCompactable(left)) {
                continue;
              }
              if (left.block) {
                continue;
              }
              if (left.dynamic || right.dynamic) {
                continue;
              }
              if (left.unused || right.unused) {
                continue;
              }
              if (left.hack && !right.hack && !right.important || !left.hack && !left.important && right.hack) {
                continue;
              }
              if (left.important == right.important && left.hack[0] != right.hack[0]) {
                continue;
              }
              if (left.important == right.important && (left.hack[0] != right.hack[0] || left.hack[1] && left.hack[1] != right.hack[1])) {
                continue;
              }
              if (hasInherit(right)) {
                continue;
              }
              if (noneOverrideHack(left, right)) {
                continue;
              }
              if (right.shorthand && isComponentOf(right, left)) {
                if (!right.important && left.important) {
                  continue;
                }
                if (!sameVendorPrefixesIn([left], right.components)) {
                  continue;
                }
                if (!anyValue(validator.isFunction, left) && overridingFunction(right, validator)) {
                  continue;
                }
                if (!isMergeableShorthand(right)) {
                  left.unused = true;
                  continue;
                }
                component = findComponentIn(right, left);
                mayOverride = configuration[left.name].canOverride || sameValue;
                if (everyValuesPair(mayOverride.bind(null, validator), left, component)) {
                  left.unused = true;
                }
              } else if (right.shorthand && overridesNonComponentShorthand(right, left)) {
                if (!right.important && left.important) {
                  continue;
                }
                if (!sameVendorPrefixesIn([left], right.components)) {
                  continue;
                }
                if (!anyValue(validator.isFunction, left) && overridingFunction(right, validator)) {
                  continue;
                }
                overriddenComponents = left.shorthand ? left.components : [left];
                for (k = overriddenComponents.length - 1; k >= 0; k--) {
                  overriddenComponent = overriddenComponents[k];
                  overridingComponent = findComponentIn(right, overriddenComponent);
                  mayOverride = configuration[overriddenComponent.name].canOverride || sameValue;
                  if (!everyValuesPair(mayOverride.bind(null, validator), left, overridingComponent)) {
                    continue traverseLoop;
                  }
                }
                left.unused = true;
              } else if (withMerging && left.shorthand && !right.shorthand && isComponentOf(left, right, true)) {
                if (right.important && !left.important) {
                  continue;
                }
                if (!right.important && left.important) {
                  right.unused = true;
                  continue;
                }
                if (moreSameShorthands(properties, i - 1, left.name)) {
                  continue;
                }
                if (overridingFunction(left, validator)) {
                  continue;
                }
                if (!isMergeableShorthand(left)) {
                  continue;
                }
                if (hasUnset(left) || hasUnset(right)) {
                  continue;
                }
                component = findComponentIn(left, right);
                if (everyValuesPair(mayOverride.bind(null, validator), component, right)) {
                  var disabledBackgroundMerging = !compatibility.properties.backgroundClipMerging && component.name.indexOf("background-clip") > -1 || !compatibility.properties.backgroundOriginMerging && component.name.indexOf("background-origin") > -1 || !compatibility.properties.backgroundSizeMerging && component.name.indexOf("background-size") > -1;
                  var nonMergeableValue = configuration[right.name].nonMergeableValue === right.value[0][1];
                  if (disabledBackgroundMerging || nonMergeableValue) {
                    continue;
                  }
                  if (!compatibility.properties.merging && wouldBreakCompatibility(left, validator)) {
                    continue;
                  }
                  if (component.value[0][1] != right.value[0][1] && (hasInherit(left) || hasInherit(right))) {
                    continue;
                  }
                  if (wouldResultInLongerValue(left, right)) {
                    continue;
                  }
                  if (!left.multiplex && right.multiplex) {
                    turnIntoMultiplex(left, multiplexSize(right));
                  }
                  override(component, right);
                  left.dirty = true;
                }
              } else if (withMerging && left.shorthand && right.shorthand && left.name == right.name) {
                if (!left.multiplex && right.multiplex) {
                  continue;
                }
                if (!right.important && left.important) {
                  right.unused = true;
                  continue propertyLoop;
                }
                if (right.important && !left.important) {
                  left.unused = true;
                  continue;
                }
                if (!isMergeableShorthand(right)) {
                  left.unused = true;
                  continue;
                }
                for (k = left.components.length - 1; k >= 0; k--) {
                  var leftComponent = left.components[k];
                  var rightComponent = right.components[k];
                  mayOverride = configuration[leftComponent.name].canOverride || sameValue;
                  if (!everyValuesPair(mayOverride.bind(null, validator), leftComponent, rightComponent)) {
                    continue propertyLoop;
                  }
                }
                overrideShorthand(left, right);
                left.dirty = true;
              } else if (withMerging && left.shorthand && right.shorthand && isComponentOf(left, right)) {
                if (!left.important && right.important) {
                  continue;
                }
                component = findComponentIn(left, right);
                mayOverride = configuration[right.name].canOverride || sameValue;
                if (!everyValuesPair(mayOverride.bind(null, validator), component, right)) {
                  continue;
                }
                if (left.important && !right.important) {
                  right.unused = true;
                  continue;
                }
                var rightRestored = configuration[right.name].restore(right, configuration);
                if (rightRestored.length > 1) {
                  continue;
                }
                component = findComponentIn(left, right);
                override(component, right);
                right.dirty = true;
              } else if (left.name == right.name) {
                overridable = true;
                if (right.shorthand) {
                  for (k = right.components.length - 1; k >= 0 && overridable; k--) {
                    overriddenComponent = left.components[k];
                    overridingComponent = right.components[k];
                    mayOverride = configuration[overridingComponent.name].canOverride || sameValue;
                    overridable = everyValuesPair(mayOverride.bind(null, validator), overriddenComponent, overridingComponent);
                  }
                } else {
                  mayOverride = configuration[right.name].canOverride || sameValue;
                  overridable = everyValuesPair(mayOverride.bind(null, validator), left, right);
                }
                if (left.important && !right.important && overridable) {
                  right.unused = true;
                  continue;
                }
                if (!left.important && right.important && overridable) {
                  left.unused = true;
                  continue;
                }
                if (!overridable) {
                  continue;
                }
                left.unused = true;
              }
            }
        }
    }
    module2.exports = overrideProperties;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/properties/optimize.js
var require_optimize3 = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/properties/optimize.js"(exports, module2) {
    var mergeIntoShorthands = require_merge_into_shorthands();
    var overrideProperties = require_override_properties();
    var populateComponents = require_populate_components();
    var restoreWithComponents = require_restore_with_components();
    var wrapForOptimizing = require_wrap_for_optimizing().all;
    var removeUnused = require_remove_unused();
    var restoreFromOptimizing = require_restore_from_optimizing();
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    function optimizeProperties(properties, withOverriding, withMerging, context) {
      var levelOptions = context.options.level[OptimizationLevel.Two];
      var _properties = wrapForOptimizing(properties, levelOptions.skipProperties);
      var _property;
      var i, l;
      populateComponents(_properties, context.validator, context.warnings);
      for (i = 0, l = _properties.length; i < l; i++) {
        _property = _properties[i];
        if (_property.block) {
          optimizeProperties(_property.value[0][1], withOverriding, withMerging, context);
        }
      }
      if (withMerging && levelOptions.mergeIntoShorthands) {
        mergeIntoShorthands(_properties, context.validator);
      }
      if (withOverriding && levelOptions.overrideProperties) {
        overrideProperties(_properties, withMerging, context.options.compatibility, context.validator);
      }
      restoreFromOptimizing(_properties, restoreWithComponents);
      removeUnused(_properties);
    }
    module2.exports = optimizeProperties;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/merge-adjacent.js
var require_merge_adjacent = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/merge-adjacent.js"(exports, module2) {
    var isMergeable = require_is_mergeable();
    var optimizeProperties = require_optimize3();
    var sortSelectors = require_sort_selectors();
    var tidyRules = require_tidy_rules();
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var serializeBody = require_one_time().body;
    var serializeRules = require_one_time().rules;
    var Token = require_token();
    function mergeAdjacent(tokens, context) {
      var lastToken = [null, [], []];
      var options = context.options;
      var adjacentSpace = options.compatibility.selectors.adjacentSpace;
      var selectorsSortingMethod = options.level[OptimizationLevel.One].selectorsSortingMethod;
      var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
      var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
      var mergeLimit = options.compatibility.selectors.mergeLimit;
      var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
      for (var i = 0, l = tokens.length; i < l; i++) {
        var token = tokens[i];
        if (token[0] != Token.RULE) {
          lastToken = [null, [], []];
          continue;
        }
        if (lastToken[0] == Token.RULE && serializeRules(token[1]) == serializeRules(lastToken[1])) {
          Array.prototype.push.apply(lastToken[2], token[2]);
          optimizeProperties(lastToken[2], true, true, context);
          token[2] = [];
        } else if (lastToken[0] == Token.RULE && serializeBody(token[2]) == serializeBody(lastToken[2]) && isMergeable(serializeRules(token[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) && isMergeable(serializeRules(lastToken[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) && lastToken[1].length < mergeLimit) {
          lastToken[1] = tidyRules(lastToken[1].concat(token[1]), false, adjacentSpace, false, context.warnings);
          lastToken[1] = lastToken.length > 1 ? sortSelectors(lastToken[1], selectorsSortingMethod) : lastToken[1];
          token[2] = [];
        } else {
          lastToken = token;
        }
      }
    }
    module2.exports = mergeAdjacent;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/rules-overlap.js
var require_rules_overlap = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/rules-overlap.js"(exports, module2) {
    var MODIFIER_PATTERN = /--.+$/;
    function rulesOverlap(rule1, rule2, bemMode) {
      var scope1;
      var scope2;
      var i, l;
      var j, m;
      for (i = 0, l = rule1.length; i < l; i++) {
        scope1 = rule1[i][1];
        for (j = 0, m = rule2.length; j < m; j++) {
          scope2 = rule2[j][1];
          if (scope1 == scope2) {
            return true;
          }
          if (bemMode && withoutModifiers(scope1) == withoutModifiers(scope2)) {
            return true;
          }
        }
      }
      return false;
    }
    function withoutModifiers(scope) {
      return scope.replace(MODIFIER_PATTERN, "");
    }
    module2.exports = rulesOverlap;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/specificity.js
var require_specificity = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/specificity.js"(exports, module2) {
    var Marker = require_marker();
    var Selector = {
      ADJACENT_SIBLING: "+",
      DESCENDANT: ">",
      DOT: ".",
      HASH: "#",
      NON_ADJACENT_SIBLING: "~",
      PSEUDO: ":"
    };
    var LETTER_PATTERN = /[a-zA-Z]/;
    var NOT_PREFIX = ":not(";
    var SEPARATOR_PATTERN = /[\s,(>~+]/;
    function specificity(selector) {
      var result = [0, 0, 0];
      var character;
      var isEscaped;
      var isSingleQuoted;
      var isDoubleQuoted;
      var roundBracketLevel = 0;
      var couldIntroduceNewTypeSelector;
      var withinNotPseudoClass = false;
      var wasPseudoClass = false;
      var i, l;
      for (i = 0, l = selector.length; i < l; i++) {
        character = selector[i];
        if (isEscaped) {
        } else if (character == Marker.SINGLE_QUOTE && !isDoubleQuoted && !isSingleQuoted) {
          isSingleQuoted = true;
        } else if (character == Marker.SINGLE_QUOTE && !isDoubleQuoted && isSingleQuoted) {
          isSingleQuoted = false;
        } else if (character == Marker.DOUBLE_QUOTE && !isDoubleQuoted && !isSingleQuoted) {
          isDoubleQuoted = true;
        } else if (character == Marker.DOUBLE_QUOTE && isDoubleQuoted && !isSingleQuoted) {
          isDoubleQuoted = false;
        } else if (isSingleQuoted || isDoubleQuoted) {
          continue;
        } else if (roundBracketLevel > 0 && !withinNotPseudoClass) {
        } else if (character == Marker.OPEN_ROUND_BRACKET) {
          roundBracketLevel++;
        } else if (character == Marker.CLOSE_ROUND_BRACKET && roundBracketLevel == 1) {
          roundBracketLevel--;
          withinNotPseudoClass = false;
        } else if (character == Marker.CLOSE_ROUND_BRACKET) {
          roundBracketLevel--;
        } else if (character == Selector.HASH) {
          result[0]++;
        } else if (character == Selector.DOT || character == Marker.OPEN_SQUARE_BRACKET) {
          result[1]++;
        } else if (character == Selector.PSEUDO && !wasPseudoClass && !isNotPseudoClass(selector, i)) {
          result[1]++;
          withinNotPseudoClass = false;
        } else if (character == Selector.PSEUDO) {
          withinNotPseudoClass = true;
        } else if ((i === 0 || couldIntroduceNewTypeSelector) && LETTER_PATTERN.test(character)) {
          result[2]++;
        }
        isEscaped = character == Marker.BACK_SLASH;
        wasPseudoClass = character == Selector.PSEUDO;
        couldIntroduceNewTypeSelector = !isEscaped && SEPARATOR_PATTERN.test(character);
      }
      return result;
    }
    function isNotPseudoClass(selector, index) {
      return selector.indexOf(NOT_PREFIX, index) === index;
    }
    module2.exports = specificity;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/specificities-overlap.js
var require_specificities_overlap = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/specificities-overlap.js"(exports, module2) {
    var specificity = require_specificity();
    function specificitiesOverlap(selector1, selector2, cache) {
      var specificity1;
      var specificity2;
      var i, l;
      var j, m;
      for (i = 0, l = selector1.length; i < l; i++) {
        specificity1 = findSpecificity(selector1[i][1], cache);
        for (j = 0, m = selector2.length; j < m; j++) {
          specificity2 = findSpecificity(selector2[j][1], cache);
          if (specificity1[0] === specificity2[0] && specificity1[1] === specificity2[1] && specificity1[2] === specificity2[2]) {
            return true;
          }
        }
      }
      return false;
    }
    function findSpecificity(selector, cache) {
      var value;
      if (!(selector in cache)) {
        cache[selector] = value = specificity(selector);
      }
      return value || cache[selector];
    }
    module2.exports = specificitiesOverlap;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/reorderable.js
var require_reorderable = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/reorderable.js"(exports, module2) {
    var rulesOverlap = require_rules_overlap();
    var specificitiesOverlap = require_specificities_overlap();
    var FLEX_PROPERTIES = /align-items|box-align|box-pack|flex|justify/;
    var BORDER_PROPERTIES = /^border-(top|right|bottom|left|color|style|width|radius)/;
    function canReorder(left, right, cache) {
      for (var i = right.length - 1; i >= 0; i--) {
        for (var j = left.length - 1; j >= 0; j--) {
          if (!canReorderSingle(left[j], right[i], cache)) {
            return false;
          }
        }
      }
      return true;
    }
    function canReorderSingle(left, right, cache) {
      var leftName = left[0];
      var leftValue = left[1];
      var leftNameRoot = left[2];
      var leftSelector = left[5];
      var leftInSpecificSelector = left[6];
      var rightName = right[0];
      var rightValue = right[1];
      var rightNameRoot = right[2];
      var rightSelector = right[5];
      var rightInSpecificSelector = right[6];
      if (leftName == "font" && rightName == "line-height" || rightName == "font" && leftName == "line-height") {
        return false;
      }
      if (FLEX_PROPERTIES.test(leftName) && FLEX_PROPERTIES.test(rightName)) {
        return false;
      }
      if (leftNameRoot == rightNameRoot && unprefixed(leftName) == unprefixed(rightName) && vendorPrefixed(leftName) ^ vendorPrefixed(rightName)) {
        return false;
      }
      if (leftNameRoot == "border" && BORDER_PROPERTIES.test(rightNameRoot) && (leftName == "border" || leftName == rightNameRoot || leftValue != rightValue && sameBorderComponent(leftName, rightName))) {
        return false;
      }
      if (rightNameRoot == "border" && BORDER_PROPERTIES.test(leftNameRoot) && (rightName == "border" || rightName == leftNameRoot || leftValue != rightValue && sameBorderComponent(leftName, rightName))) {
        return false;
      }
      if (leftNameRoot == "border" && rightNameRoot == "border" && leftName != rightName && (isSideBorder(leftName) && isStyleBorder(rightName) || isStyleBorder(leftName) && isSideBorder(rightName))) {
        return false;
      }
      if (leftNameRoot != rightNameRoot) {
        return true;
      }
      if (leftName == rightName && leftNameRoot == rightNameRoot && (leftValue == rightValue || withDifferentVendorPrefix(leftValue, rightValue))) {
        return true;
      }
      if (leftName != rightName && leftNameRoot == rightNameRoot && leftName != leftNameRoot && rightName != rightNameRoot) {
        return true;
      }
      if (leftName != rightName && leftNameRoot == rightNameRoot && leftValue == rightValue) {
        return true;
      }
      if (rightInSpecificSelector && leftInSpecificSelector && !inheritable(leftNameRoot) && !inheritable(rightNameRoot) && !rulesOverlap(rightSelector, leftSelector, false)) {
        return true;
      }
      if (!specificitiesOverlap(leftSelector, rightSelector, cache)) {
        return true;
      }
      return false;
    }
    function vendorPrefixed(name) {
      return /^-(?:moz|webkit|ms|o)-/.test(name);
    }
    function unprefixed(name) {
      return name.replace(/^-(?:moz|webkit|ms|o)-/, "");
    }
    function sameBorderComponent(name1, name2) {
      return name1.split("-").pop() == name2.split("-").pop();
    }
    function isSideBorder(name) {
      return name == "border-top" || name == "border-right" || name == "border-bottom" || name == "border-left";
    }
    function isStyleBorder(name) {
      return name == "border-color" || name == "border-style" || name == "border-width";
    }
    function withDifferentVendorPrefix(value1, value2) {
      return vendorPrefixed(value1) && vendorPrefixed(value2) && value1.split("-")[1] != value2.split("-")[2];
    }
    function inheritable(name) {
      return name == "font" || name == "line-height" || name == "list-style";
    }
    module2.exports = {
      canReorder,
      canReorderSingle
    };
  }
});

// node_modules/clean-css/lib/optimizer/level-2/extract-properties.js
var require_extract_properties = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/extract-properties.js"(exports, module2) {
    var Token = require_token();
    var serializeRules = require_one_time().rules;
    var serializeValue = require_one_time().value;
    function extractProperties(token) {
      var properties = [];
      var inSpecificSelector;
      var property;
      var name;
      var value;
      var i, l;
      if (token[0] == Token.RULE) {
        inSpecificSelector = !/[.+>~]/.test(serializeRules(token[1]));
        for (i = 0, l = token[2].length; i < l; i++) {
          property = token[2][i];
          if (property[0] != Token.PROPERTY) {
            continue;
          }
          name = property[1][1];
          if (name.length === 0) {
            continue;
          }
          value = serializeValue(property, i);
          properties.push([
            name,
            value,
            findNameRoot(name),
            token[2][i],
            name + ":" + value,
            token[1],
            inSpecificSelector
          ]);
        }
      } else if (token[0] == Token.NESTED_BLOCK) {
        for (i = 0, l = token[2].length; i < l; i++) {
          properties = properties.concat(extractProperties(token[2][i]));
        }
      }
      return properties;
    }
    function findNameRoot(name) {
      if (name == "list-style") {
        return name;
      }
      if (name.indexOf("-radius") > 0) {
        return "border-radius";
      }
      if (name == "border-collapse" || name == "border-spacing" || name == "border-image") {
        return name;
      }
      if (name.indexOf("border-") === 0 && /^border-\w+-\w+$/.test(name)) {
        return name.match(/border-\w+/)[0];
      }
      if (name.indexOf("border-") === 0 && /^border-\w+$/.test(name)) {
        return "border";
      }
      if (name.indexOf("text-") === 0) {
        return name;
      }
      if (name == "-chrome-") {
        return name;
      }
      return name.replace(/^-\w+-/, "").match(/([a-zA-Z]+)/)[0].toLowerCase();
    }
    module2.exports = extractProperties;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/merge-media-queries.js
var require_merge_media_queries = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/merge-media-queries.js"(exports, module2) {
    var canReorder = require_reorderable().canReorder;
    var canReorderSingle = require_reorderable().canReorderSingle;
    var extractProperties = require_extract_properties();
    var rulesOverlap = require_rules_overlap();
    var serializeRules = require_one_time().rules;
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var Token = require_token();
    function mergeMediaQueries(tokens, context) {
      var mergeSemantically = context.options.level[OptimizationLevel.Two].mergeSemantically;
      var specificityCache = context.cache.specificity;
      var candidates = {};
      var reduced = [];
      for (var i = tokens.length - 1; i >= 0; i--) {
        var token = tokens[i];
        if (token[0] != Token.NESTED_BLOCK) {
          continue;
        }
        var key = serializeRules(token[1]);
        var candidate = candidates[key];
        if (!candidate) {
          candidate = [];
          candidates[key] = candidate;
        }
        candidate.push(i);
      }
      for (var name in candidates) {
        var positions = candidates[name];
        positionLoop:
          for (var j = positions.length - 1; j > 0; j--) {
            var positionOne = positions[j];
            var tokenOne = tokens[positionOne];
            var positionTwo = positions[j - 1];
            var tokenTwo = tokens[positionTwo];
            directionLoop:
              for (var direction = 1; direction >= -1; direction -= 2) {
                var topToBottom = direction == 1;
                var from = topToBottom ? positionOne + 1 : positionTwo - 1;
                var to = topToBottom ? positionTwo : positionOne;
                var delta = topToBottom ? 1 : -1;
                var source = topToBottom ? tokenOne : tokenTwo;
                var target = topToBottom ? tokenTwo : tokenOne;
                var movedProperties = extractProperties(source);
                while (from != to) {
                  var traversedProperties = extractProperties(tokens[from]);
                  from += delta;
                  if (mergeSemantically && allSameRulePropertiesCanBeReordered(movedProperties, traversedProperties, specificityCache)) {
                    continue;
                  }
                  if (!canReorder(movedProperties, traversedProperties, specificityCache)) {
                    continue directionLoop;
                  }
                }
                target[2] = topToBottom ? source[2].concat(target[2]) : target[2].concat(source[2]);
                source[2] = [];
                reduced.push(target);
                continue positionLoop;
              }
          }
      }
      return reduced;
    }
    function allSameRulePropertiesCanBeReordered(movedProperties, traversedProperties, specificityCache) {
      var movedProperty;
      var movedRule;
      var traversedProperty;
      var traversedRule;
      var i, l;
      var j, m;
      for (i = 0, l = movedProperties.length; i < l; i++) {
        movedProperty = movedProperties[i];
        movedRule = movedProperty[5];
        for (j = 0, m = traversedProperties.length; j < m; j++) {
          traversedProperty = traversedProperties[j];
          traversedRule = traversedProperty[5];
          if (rulesOverlap(movedRule, traversedRule, true) && !canReorderSingle(movedProperty, traversedProperty, specificityCache)) {
            return false;
          }
        }
      }
      return true;
    }
    module2.exports = mergeMediaQueries;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-body.js
var require_merge_non_adjacent_by_body = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-body.js"(exports, module2) {
    var isMergeable = require_is_mergeable();
    var sortSelectors = require_sort_selectors();
    var tidyRules = require_tidy_rules();
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var serializeBody = require_one_time().body;
    var serializeRules = require_one_time().rules;
    var Token = require_token();
    function unsafeSelector(value) {
      return /\.|\*| :/.test(value);
    }
    function isBemElement(token) {
      var asString = serializeRules(token[1]);
      return asString.indexOf("__") > -1 || asString.indexOf("--") > -1;
    }
    function withoutModifier(selector) {
      return selector.replace(/--[^ ,>+~:]+/g, "");
    }
    function removeAnyUnsafeElements(left, candidates) {
      var leftSelector = withoutModifier(serializeRules(left[1]));
      for (var body in candidates) {
        var right = candidates[body];
        var rightSelector = withoutModifier(serializeRules(right[1]));
        if (rightSelector.indexOf(leftSelector) > -1 || leftSelector.indexOf(rightSelector) > -1) {
          delete candidates[body];
        }
      }
    }
    function mergeNonAdjacentByBody(tokens, context) {
      var options = context.options;
      var mergeSemantically = options.level[OptimizationLevel.Two].mergeSemantically;
      var adjacentSpace = options.compatibility.selectors.adjacentSpace;
      var selectorsSortingMethod = options.level[OptimizationLevel.One].selectorsSortingMethod;
      var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
      var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
      var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
      var candidates = {};
      for (var i = tokens.length - 1; i >= 0; i--) {
        var token = tokens[i];
        if (token[0] != Token.RULE) {
          continue;
        }
        if (token[2].length > 0 && (!mergeSemantically && unsafeSelector(serializeRules(token[1])))) {
          candidates = {};
        }
        if (token[2].length > 0 && mergeSemantically && isBemElement(token)) {
          removeAnyUnsafeElements(token, candidates);
        }
        var candidateBody = serializeBody(token[2]);
        var oldToken = candidates[candidateBody];
        if (oldToken && isMergeable(serializeRules(token[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) && isMergeable(serializeRules(oldToken[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging)) {
          if (token[2].length > 0) {
            token[1] = tidyRules(oldToken[1].concat(token[1]), false, adjacentSpace, false, context.warnings);
            token[1] = token[1].length > 1 ? sortSelectors(token[1], selectorsSortingMethod) : token[1];
          } else {
            token[1] = oldToken[1].concat(token[1]);
          }
          oldToken[2] = [];
          candidates[candidateBody] = null;
        }
        candidates[serializeBody(token[2])] = token;
      }
    }
    module2.exports = mergeNonAdjacentByBody;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-selector.js
var require_merge_non_adjacent_by_selector = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-selector.js"(exports, module2) {
    var canReorder = require_reorderable().canReorder;
    var extractProperties = require_extract_properties();
    var optimizeProperties = require_optimize3();
    var serializeRules = require_one_time().rules;
    var Token = require_token();
    function mergeNonAdjacentBySelector(tokens, context) {
      var specificityCache = context.cache.specificity;
      var allSelectors = {};
      var repeatedSelectors = [];
      var i;
      for (i = tokens.length - 1; i >= 0; i--) {
        if (tokens[i][0] != Token.RULE) {
          continue;
        }
        if (tokens[i][2].length === 0) {
          continue;
        }
        var selector = serializeRules(tokens[i][1]);
        allSelectors[selector] = [i].concat(allSelectors[selector] || []);
        if (allSelectors[selector].length == 2) {
          repeatedSelectors.push(selector);
        }
      }
      for (i = repeatedSelectors.length - 1; i >= 0; i--) {
        var positions = allSelectors[repeatedSelectors[i]];
        selectorIterator:
          for (var j = positions.length - 1; j > 0; j--) {
            var positionOne = positions[j - 1];
            var tokenOne = tokens[positionOne];
            var positionTwo = positions[j];
            var tokenTwo = tokens[positionTwo];
            directionIterator:
              for (var direction = 1; direction >= -1; direction -= 2) {
                var topToBottom = direction == 1;
                var from = topToBottom ? positionOne + 1 : positionTwo - 1;
                var to = topToBottom ? positionTwo : positionOne;
                var delta = topToBottom ? 1 : -1;
                var moved = topToBottom ? tokenOne : tokenTwo;
                var target = topToBottom ? tokenTwo : tokenOne;
                var movedProperties = extractProperties(moved);
                while (from != to) {
                  var traversedProperties = extractProperties(tokens[from]);
                  from += delta;
                  var reorderable = topToBottom ? canReorder(movedProperties, traversedProperties, specificityCache) : canReorder(traversedProperties, movedProperties, specificityCache);
                  if (!reorderable && !topToBottom) {
                    continue selectorIterator;
                  }
                  if (!reorderable && topToBottom) {
                    continue directionIterator;
                  }
                }
                if (topToBottom) {
                  Array.prototype.push.apply(moved[2], target[2]);
                  target[2] = moved[2];
                } else {
                  Array.prototype.push.apply(target[2], moved[2]);
                }
                optimizeProperties(target[2], true, true, context);
                moved[2] = [];
              }
          }
      }
    }
    module2.exports = mergeNonAdjacentBySelector;
  }
});

// node_modules/clean-css/lib/utils/clone-array.js
var require_clone_array = __commonJS({
  "node_modules/clean-css/lib/utils/clone-array.js"(exports, module2) {
    function cloneArray(array) {
      var cloned = array.slice(0);
      for (var i = 0, l = cloned.length; i < l; i++) {
        if (Array.isArray(cloned[i])) {
          cloned[i] = cloneArray(cloned[i]);
        }
      }
      return cloned;
    }
    module2.exports = cloneArray;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/reduce-non-adjacent.js
var require_reduce_non_adjacent = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/reduce-non-adjacent.js"(exports, module2) {
    var isMergeable = require_is_mergeable();
    var optimizeProperties = require_optimize3();
    var cloneArray = require_clone_array();
    var Token = require_token();
    var serializeBody = require_one_time().body;
    var serializeRules = require_one_time().rules;
    function reduceNonAdjacent(tokens, context) {
      var options = context.options;
      var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
      var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
      var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
      var candidates = {};
      var repeated = [];
      for (var i = tokens.length - 1; i >= 0; i--) {
        var token = tokens[i];
        if (token[0] != Token.RULE) {
          continue;
        } else if (token[2].length === 0) {
          continue;
        }
        var selectorAsString = serializeRules(token[1]);
        var isComplexAndNotSpecial = token[1].length > 1 && isMergeable(selectorAsString, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging);
        var wrappedSelectors = wrappedSelectorsFrom(token[1]);
        var selectors = isComplexAndNotSpecial ? [selectorAsString].concat(wrappedSelectors) : [selectorAsString];
        for (var j = 0, m = selectors.length; j < m; j++) {
          var selector = selectors[j];
          if (!candidates[selector]) {
            candidates[selector] = [];
          } else {
            repeated.push(selector);
          }
          candidates[selector].push({
            where: i,
            list: wrappedSelectors,
            isPartial: isComplexAndNotSpecial && j > 0,
            isComplex: isComplexAndNotSpecial && j === 0
          });
        }
      }
      reduceSimpleNonAdjacentCases(tokens, repeated, candidates, options, context);
      reduceComplexNonAdjacentCases(tokens, candidates, options, context);
    }
    function wrappedSelectorsFrom(list) {
      var wrapped = [];
      for (var i = 0; i < list.length; i++) {
        wrapped.push([list[i][1]]);
      }
      return wrapped;
    }
    function reduceSimpleNonAdjacentCases(tokens, repeated, candidates, options, context) {
      function filterOut(idx, bodies) {
        return data[idx].isPartial && bodies.length === 0;
      }
      function reduceBody(token, newBody, processedCount, tokenIdx) {
        if (!data[processedCount - tokenIdx - 1].isPartial) {
          token[2] = newBody;
        }
      }
      for (var i = 0, l = repeated.length; i < l; i++) {
        var selector = repeated[i];
        var data = candidates[selector];
        reduceSelector(tokens, data, {
          filterOut,
          callback: reduceBody
        }, options, context);
      }
    }
    function reduceComplexNonAdjacentCases(tokens, candidates, options, context) {
      var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
      var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
      var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
      var localContext = {};
      function filterOut(idx) {
        return localContext.data[idx].where < localContext.intoPosition;
      }
      function collectReducedBodies(token, newBody, processedCount, tokenIdx) {
        if (tokenIdx === 0) {
          localContext.reducedBodies.push(newBody);
        }
      }
      allSelectors:
        for (var complexSelector in candidates) {
          var into = candidates[complexSelector];
          if (!into[0].isComplex) {
            continue;
          }
          var intoPosition = into[into.length - 1].where;
          var intoToken = tokens[intoPosition];
          var reducedBodies = [];
          var selectors = isMergeable(complexSelector, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) ? into[0].list : [complexSelector];
          localContext.intoPosition = intoPosition;
          localContext.reducedBodies = reducedBodies;
          for (var j = 0, m = selectors.length; j < m; j++) {
            var selector = selectors[j];
            var data = candidates[selector];
            if (data.length < 2) {
              continue allSelectors;
            }
            localContext.data = data;
            reduceSelector(tokens, data, {
              filterOut,
              callback: collectReducedBodies
            }, options, context);
            if (serializeBody(reducedBodies[reducedBodies.length - 1]) != serializeBody(reducedBodies[0])) {
              continue allSelectors;
            }
          }
          intoToken[2] = reducedBodies[0];
        }
    }
    function reduceSelector(tokens, data, context, options, outerContext) {
      var bodies = [];
      var bodiesAsList = [];
      var processedTokens = [];
      for (var j = data.length - 1; j >= 0; j--) {
        if (context.filterOut(j, bodies)) {
          continue;
        }
        var where = data[j].where;
        var token = tokens[where];
        var clonedBody = cloneArray(token[2]);
        bodies = bodies.concat(clonedBody);
        bodiesAsList.push(clonedBody);
        processedTokens.push(where);
      }
      optimizeProperties(bodies, true, false, outerContext);
      var processedCount = processedTokens.length;
      var propertyIdx = bodies.length - 1;
      var tokenIdx = processedCount - 1;
      while (tokenIdx >= 0) {
        if ((tokenIdx === 0 || bodies[propertyIdx] && bodiesAsList[tokenIdx].indexOf(bodies[propertyIdx]) > -1) && propertyIdx > -1) {
          propertyIdx--;
          continue;
        }
        var newBody = bodies.splice(propertyIdx + 1);
        context.callback(tokens[processedTokens[tokenIdx]], newBody, processedCount, tokenIdx);
        tokenIdx--;
      }
    }
    module2.exports = reduceNonAdjacent;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-font-at-rules.js
var require_remove_duplicate_font_at_rules = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-font-at-rules.js"(exports, module2) {
    var Token = require_token();
    var serializeAll = require_one_time().all;
    var FONT_FACE_SCOPE = "@font-face";
    function removeDuplicateFontAtRules(tokens) {
      var fontAtRules = [];
      var token;
      var key;
      var i, l;
      for (i = 0, l = tokens.length; i < l; i++) {
        token = tokens[i];
        if (token[0] != Token.AT_RULE_BLOCK && token[1][0][1] != FONT_FACE_SCOPE) {
          continue;
        }
        key = serializeAll([token]);
        if (fontAtRules.indexOf(key) > -1) {
          token[2] = [];
        } else {
          fontAtRules.push(key);
        }
      }
    }
    module2.exports = removeDuplicateFontAtRules;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-media-queries.js
var require_remove_duplicate_media_queries = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-media-queries.js"(exports, module2) {
    var Token = require_token();
    var serializeAll = require_one_time().all;
    var serializeRules = require_one_time().rules;
    function removeDuplicateMediaQueries(tokens) {
      var candidates = {};
      var candidate;
      var token;
      var key;
      var i, l;
      for (i = 0, l = tokens.length; i < l; i++) {
        token = tokens[i];
        if (token[0] != Token.NESTED_BLOCK) {
          continue;
        }
        key = serializeRules(token[1]) + "%" + serializeAll(token[2]);
        candidate = candidates[key];
        if (candidate) {
          candidate[2] = [];
        }
        candidates[key] = token;
      }
    }
    module2.exports = removeDuplicateMediaQueries;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/remove-duplicates.js
var require_remove_duplicates = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/remove-duplicates.js"(exports, module2) {
    var Token = require_token();
    var serializeBody = require_one_time().body;
    var serializeRules = require_one_time().rules;
    function removeDuplicates(tokens) {
      var matched = {};
      var moreThanOnce = [];
      var id, token;
      var body, bodies;
      for (var i = 0, l = tokens.length; i < l; i++) {
        token = tokens[i];
        if (token[0] != Token.RULE) {
          continue;
        }
        id = serializeRules(token[1]);
        if (matched[id] && matched[id].length == 1) {
          moreThanOnce.push(id);
        } else {
          matched[id] = matched[id] || [];
        }
        matched[id].push(i);
      }
      for (i = 0, l = moreThanOnce.length; i < l; i++) {
        id = moreThanOnce[i];
        bodies = [];
        for (var j = matched[id].length - 1; j >= 0; j--) {
          token = tokens[matched[id][j]];
          body = serializeBody(token[2]);
          if (bodies.indexOf(body) > -1) {
            token[2] = [];
          } else {
            bodies.push(body);
          }
        }
      }
    }
    module2.exports = removeDuplicates;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/remove-unused-at-rules.js
var require_remove_unused_at_rules = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/remove-unused-at-rules.js"(exports, module2) {
    var populateComponents = require_populate_components();
    var wrapForOptimizing = require_wrap_for_optimizing().single;
    var restoreFromOptimizing = require_restore_from_optimizing();
    var Token = require_token();
    var animationNameRegex = /^(-moz-|-o-|-webkit-)?animation-name$/;
    var animationRegex = /^(-moz-|-o-|-webkit-)?animation$/;
    var keyframeRegex = /^@(-moz-|-o-|-webkit-)?keyframes /;
    var importantRegex = /\s{0,31}!important$/;
    var optionalMatchingQuotesRegex = /^(['"]?)(.*)\1$/;
    function normalize(value) {
      return value.replace(optionalMatchingQuotesRegex, "$2").replace(importantRegex, "");
    }
    function removeUnusedAtRules(tokens, context) {
      removeUnusedAtRule(tokens, matchCounterStyle, markCounterStylesAsUsed, context);
      removeUnusedAtRule(tokens, matchFontFace, markFontFacesAsUsed, context);
      removeUnusedAtRule(tokens, matchKeyframe, markKeyframesAsUsed, context);
      removeUnusedAtRule(tokens, matchNamespace, markNamespacesAsUsed, context);
    }
    function removeUnusedAtRule(tokens, matchCallback, markCallback, context) {
      var atRules = {};
      var atRule;
      var atRuleTokens;
      var atRuleToken;
      var zeroAt;
      var i, l;
      for (i = 0, l = tokens.length; i < l; i++) {
        matchCallback(tokens[i], atRules);
      }
      if (Object.keys(atRules).length === 0) {
        return;
      }
      markUsedAtRules(tokens, markCallback, atRules, context);
      for (atRule in atRules) {
        atRuleTokens = atRules[atRule];
        for (i = 0, l = atRuleTokens.length; i < l; i++) {
          atRuleToken = atRuleTokens[i];
          zeroAt = atRuleToken[0] == Token.AT_RULE ? 1 : 2;
          atRuleToken[zeroAt] = [];
        }
      }
    }
    function markUsedAtRules(tokens, markCallback, atRules, context) {
      var boundMarkCallback = markCallback(atRules);
      var i, l;
      for (i = 0, l = tokens.length; i < l; i++) {
        switch (tokens[i][0]) {
          case Token.RULE:
            boundMarkCallback(tokens[i], context);
            break;
          case Token.NESTED_BLOCK:
            markUsedAtRules(tokens[i][2], markCallback, atRules, context);
        }
      }
    }
    function matchCounterStyle(token, atRules) {
      var match;
      if (token[0] == Token.AT_RULE_BLOCK && token[1][0][1].indexOf("@counter-style") === 0) {
        match = token[1][0][1].split(" ")[1];
        atRules[match] = atRules[match] || [];
        atRules[match].push(token);
      }
    }
    function markCounterStylesAsUsed(atRules) {
      return function(token, context) {
        var property;
        var wrappedProperty;
        var i, l;
        for (i = 0, l = token[2].length; i < l; i++) {
          property = token[2][i];
          if (property[1][1] == "list-style") {
            wrappedProperty = wrapForOptimizing(property);
            populateComponents([wrappedProperty], context.validator, context.warnings);
            if (wrappedProperty.components[0].value[0][1] in atRules) {
              delete atRules[property[2][1]];
            }
            restoreFromOptimizing([wrappedProperty]);
          }
          if (property[1][1] == "list-style-type" && property[2][1] in atRules) {
            delete atRules[property[2][1]];
          }
        }
      };
    }
    function matchFontFace(token, atRules) {
      var property;
      var match;
      var i, l;
      if (token[0] == Token.AT_RULE_BLOCK && token[1][0][1] == "@font-face") {
        for (i = 0, l = token[2].length; i < l; i++) {
          property = token[2][i];
          if (property[1][1] == "font-family") {
            match = normalize(property[2][1].toLowerCase());
            atRules[match] = atRules[match] || [];
            atRules[match].push(token);
            break;
          }
        }
      }
    }
    function markFontFacesAsUsed(atRules) {
      return function(token, context) {
        var property;
        var wrappedProperty;
        var component;
        var normalizedMatch;
        var i, l;
        var j, m;
        for (i = 0, l = token[2].length; i < l; i++) {
          property = token[2][i];
          if (property[1][1] == "font") {
            wrappedProperty = wrapForOptimizing(property);
            populateComponents([wrappedProperty], context.validator, context.warnings);
            component = wrappedProperty.components[6];
            for (j = 0, m = component.value.length; j < m; j++) {
              normalizedMatch = normalize(component.value[j][1].toLowerCase());
              if (normalizedMatch in atRules) {
                delete atRules[normalizedMatch];
              }
            }
            restoreFromOptimizing([wrappedProperty]);
          }
          if (property[1][1] == "font-family") {
            for (j = 2, m = property.length; j < m; j++) {
              normalizedMatch = normalize(property[j][1].toLowerCase());
              if (normalizedMatch in atRules) {
                delete atRules[normalizedMatch];
              }
            }
          }
        }
      };
    }
    function matchKeyframe(token, atRules) {
      var match;
      if (token[0] == Token.NESTED_BLOCK && keyframeRegex.test(token[1][0][1])) {
        match = token[1][0][1].split(" ")[1];
        atRules[match] = atRules[match] || [];
        atRules[match].push(token);
      }
    }
    function markKeyframesAsUsed(atRules) {
      return function(token, context) {
        var property;
        var wrappedProperty;
        var component;
        var i, l;
        var j, m;
        for (i = 0, l = token[2].length; i < l; i++) {
          property = token[2][i];
          if (animationRegex.test(property[1][1])) {
            wrappedProperty = wrapForOptimizing(property);
            populateComponents([wrappedProperty], context.validator, context.warnings);
            component = wrappedProperty.components[7];
            for (j = 0, m = component.value.length; j < m; j++) {
              if (component.value[j][1] in atRules) {
                delete atRules[component.value[j][1]];
              }
            }
            restoreFromOptimizing([wrappedProperty]);
          }
          if (animationNameRegex.test(property[1][1])) {
            for (j = 2, m = property.length; j < m; j++) {
              if (property[j][1] in atRules) {
                delete atRules[property[j][1]];
              }
            }
          }
        }
      };
    }
    function matchNamespace(token, atRules) {
      var match;
      if (token[0] == Token.AT_RULE && token[1].indexOf("@namespace") === 0) {
        match = token[1].split(" ")[1];
        atRules[match] = atRules[match] || [];
        atRules[match].push(token);
      }
    }
    function markNamespacesAsUsed(atRules) {
      var namespaceRegex = new RegExp(Object.keys(atRules).join("\\||") + "\\|", "g");
      return function(token) {
        var match;
        var scope;
        var normalizedMatch;
        var i, l;
        var j, m;
        for (i = 0, l = token[1].length; i < l; i++) {
          scope = token[1][i];
          match = scope[1].match(namespaceRegex);
          for (j = 0, m = match.length; j < m; j++) {
            normalizedMatch = match[j].substring(0, match[j].length - 1);
            if (normalizedMatch in atRules) {
              delete atRules[normalizedMatch];
            }
          }
        }
      };
    }
    module2.exports = removeUnusedAtRules;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/tidy-rule-duplicates.js
var require_tidy_rule_duplicates = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/tidy-rule-duplicates.js"(exports, module2) {
    function ruleSorter(s1, s2) {
      return s1[1] > s2[1] ? 1 : -1;
    }
    function tidyRuleDuplicates(rules) {
      var list = [];
      var repeated = [];
      for (var i = 0, l = rules.length; i < l; i++) {
        var rule = rules[i];
        if (repeated.indexOf(rule[1]) == -1) {
          repeated.push(rule[1]);
          list.push(rule);
        }
      }
      return list.sort(ruleSorter);
    }
    module2.exports = tidyRuleDuplicates;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/restructure.js
var require_restructure = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/restructure.js"(exports, module2) {
    var canReorderSingle = require_reorderable().canReorderSingle;
    var extractProperties = require_extract_properties();
    var isMergeable = require_is_mergeable();
    var tidyRuleDuplicates = require_tidy_rule_duplicates();
    var Token = require_token();
    var cloneArray = require_clone_array();
    var serializeBody = require_one_time().body;
    var serializeRules = require_one_time().rules;
    function naturalSorter(a, b) {
      return a > b ? 1 : -1;
    }
    function cloneAndMergeSelectors(propertyA, propertyB) {
      var cloned = cloneArray(propertyA);
      cloned[5] = cloned[5].concat(propertyB[5]);
      return cloned;
    }
    function restructure(tokens, context) {
      var options = context.options;
      var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
      var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
      var mergeLimit = options.compatibility.selectors.mergeLimit;
      var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
      var specificityCache = context.cache.specificity;
      var movableTokens = {};
      var movedProperties = [];
      var multiPropertyMoveCache = {};
      var movedToBeDropped = [];
      var maxCombinationsLevel = 2;
      var ID_JOIN_CHARACTER = "%";
      function sendToMultiPropertyMoveCache(position2, movedProperty2, allFits) {
        for (var i2 = allFits.length - 1; i2 >= 0; i2--) {
          var fit = allFits[i2][0];
          var id = addToCache(movedProperty2, fit);
          if (multiPropertyMoveCache[id].length > 1 && processMultiPropertyMove(position2, multiPropertyMoveCache[id])) {
            removeAllMatchingFromCache(id);
            break;
          }
        }
      }
      function addToCache(movedProperty2, fit) {
        var id = cacheId(fit);
        multiPropertyMoveCache[id] = multiPropertyMoveCache[id] || [];
        multiPropertyMoveCache[id].push([movedProperty2, fit]);
        return id;
      }
      function removeAllMatchingFromCache(matchId) {
        var matchSelectors = matchId.split(ID_JOIN_CHARACTER);
        var forRemoval = [];
        var i2;
        for (var id in multiPropertyMoveCache) {
          var selectors = id.split(ID_JOIN_CHARACTER);
          for (i2 = selectors.length - 1; i2 >= 0; i2--) {
            if (matchSelectors.indexOf(selectors[i2]) > -1) {
              forRemoval.push(id);
              break;
            }
          }
        }
        for (i2 = forRemoval.length - 1; i2 >= 0; i2--) {
          delete multiPropertyMoveCache[forRemoval[i2]];
        }
      }
      function cacheId(cachedTokens) {
        var id = [];
        for (var i2 = 0, l = cachedTokens.length; i2 < l; i2++) {
          id.push(serializeRules(cachedTokens[i2][1]));
        }
        return id.join(ID_JOIN_CHARACTER);
      }
      function tokensToMerge(sourceTokens) {
        var uniqueTokensWithBody = [];
        var mergeableTokens = [];
        for (var i2 = sourceTokens.length - 1; i2 >= 0; i2--) {
          if (!isMergeable(serializeRules(sourceTokens[i2][1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging)) {
            continue;
          }
          mergeableTokens.unshift(sourceTokens[i2]);
          if (sourceTokens[i2][2].length > 0 && uniqueTokensWithBody.indexOf(sourceTokens[i2]) == -1) {
            uniqueTokensWithBody.push(sourceTokens[i2]);
          }
        }
        return uniqueTokensWithBody.length > 1 ? mergeableTokens : [];
      }
      function shortenIfPossible(position2, movedProperty2) {
        var name = movedProperty2[0];
        var value = movedProperty2[1];
        var key2 = movedProperty2[4];
        var valueSize = name.length + value.length + 1;
        var allSelectors = [];
        var qualifiedTokens = [];
        var mergeableTokens = tokensToMerge(movableTokens[key2]);
        if (mergeableTokens.length < 2) {
          return;
        }
        var allFits = findAllFits(mergeableTokens, valueSize, 1);
        var bestFit = allFits[0];
        if (bestFit[1] > 0) {
          return sendToMultiPropertyMoveCache(position2, movedProperty2, allFits);
        }
        for (var i2 = bestFit[0].length - 1; i2 >= 0; i2--) {
          allSelectors = bestFit[0][i2][1].concat(allSelectors);
          qualifiedTokens.unshift(bestFit[0][i2]);
        }
        allSelectors = tidyRuleDuplicates(allSelectors);
        dropAsNewTokenAt(position2, [movedProperty2], allSelectors, qualifiedTokens);
      }
      function fitSorter(fit1, fit2) {
        return fit1[1] > fit2[1] ? 1 : fit1[1] == fit2[1] ? 0 : -1;
      }
      function findAllFits(mergeableTokens, propertySize, propertiesCount) {
        var combinations = allCombinations(mergeableTokens, propertySize, propertiesCount, maxCombinationsLevel - 1);
        return combinations.sort(fitSorter);
      }
      function allCombinations(tokensVariant, propertySize, propertiesCount, level) {
        var differenceVariants = [[tokensVariant, sizeDifference(tokensVariant, propertySize, propertiesCount)]];
        if (tokensVariant.length > 2 && level > 0) {
          for (var i2 = tokensVariant.length - 1; i2 >= 0; i2--) {
            var subVariant = Array.prototype.slice.call(tokensVariant, 0);
            subVariant.splice(i2, 1);
            differenceVariants = differenceVariants.concat(allCombinations(subVariant, propertySize, propertiesCount, level - 1));
          }
        }
        return differenceVariants;
      }
      function sizeDifference(tokensVariant, propertySize, propertiesCount) {
        var allSelectorsSize = 0;
        for (var i2 = tokensVariant.length - 1; i2 >= 0; i2--) {
          allSelectorsSize += tokensVariant[i2][2].length > propertiesCount ? serializeRules(tokensVariant[i2][1]).length : -1;
        }
        return allSelectorsSize - (tokensVariant.length - 1) * propertySize + 1;
      }
      function dropAsNewTokenAt(position2, properties2, allSelectors, mergeableTokens) {
        var i2, j2, k2, m2;
        var allProperties = [];
        for (i2 = mergeableTokens.length - 1; i2 >= 0; i2--) {
          var mergeableToken = mergeableTokens[i2];
          for (j2 = mergeableToken[2].length - 1; j2 >= 0; j2--) {
            var mergeableProperty = mergeableToken[2][j2];
            for (k2 = 0, m2 = properties2.length; k2 < m2; k2++) {
              var property2 = properties2[k2];
              var mergeablePropertyName = mergeableProperty[1][1];
              var propertyName = property2[0];
              var propertyBody = property2[4];
              if (mergeablePropertyName == propertyName && serializeBody([mergeableProperty]) == propertyBody) {
                mergeableToken[2].splice(j2, 1);
                break;
              }
            }
          }
        }
        for (i2 = properties2.length - 1; i2 >= 0; i2--) {
          allProperties.unshift(properties2[i2][3]);
        }
        var newToken = [Token.RULE, allSelectors, allProperties];
        tokens.splice(position2, 0, newToken);
      }
      function dropPropertiesAt(position2, movedProperty2) {
        var key2 = movedProperty2[4];
        var toMove = movableTokens[key2];
        if (toMove && toMove.length > 1) {
          if (!shortenMultiMovesIfPossible(position2, movedProperty2)) {
            shortenIfPossible(position2, movedProperty2);
          }
        }
      }
      function shortenMultiMovesIfPossible(position2, movedProperty2) {
        var candidates = [];
        var propertiesAndMergableTokens = [];
        var key2 = movedProperty2[4];
        var j2, k2;
        var mergeableTokens = tokensToMerge(movableTokens[key2]);
        if (mergeableTokens.length < 2) {
          return;
        }
        movableLoop:
          for (var value in movableTokens) {
            var tokensList = movableTokens[value];
            for (j2 = mergeableTokens.length - 1; j2 >= 0; j2--) {
              if (tokensList.indexOf(mergeableTokens[j2]) == -1) {
                continue movableLoop;
              }
            }
            candidates.push(value);
          }
        if (candidates.length < 2) {
          return false;
        }
        for (j2 = candidates.length - 1; j2 >= 0; j2--) {
          for (k2 = movedProperties.length - 1; k2 >= 0; k2--) {
            if (movedProperties[k2][4] == candidates[j2]) {
              propertiesAndMergableTokens.unshift([movedProperties[k2], mergeableTokens]);
              break;
            }
          }
        }
        return processMultiPropertyMove(position2, propertiesAndMergableTokens);
      }
      function processMultiPropertyMove(position2, propertiesAndMergableTokens) {
        var valueSize = 0;
        var properties2 = [];
        var property2;
        for (var i2 = propertiesAndMergableTokens.length - 1; i2 >= 0; i2--) {
          property2 = propertiesAndMergableTokens[i2][0];
          var fullValue = property2[4];
          valueSize += fullValue.length + (i2 > 0 ? 1 : 0);
          properties2.push(property2);
        }
        var mergeableTokens = propertiesAndMergableTokens[0][1];
        var bestFit = findAllFits(mergeableTokens, valueSize, properties2.length)[0];
        if (bestFit[1] > 0) {
          return false;
        }
        var allSelectors = [];
        var qualifiedTokens = [];
        for (i2 = bestFit[0].length - 1; i2 >= 0; i2--) {
          allSelectors = bestFit[0][i2][1].concat(allSelectors);
          qualifiedTokens.unshift(bestFit[0][i2]);
        }
        allSelectors = tidyRuleDuplicates(allSelectors);
        dropAsNewTokenAt(position2, properties2, allSelectors, qualifiedTokens);
        for (i2 = properties2.length - 1; i2 >= 0; i2--) {
          property2 = properties2[i2];
          var index = movedProperties.indexOf(property2);
          delete movableTokens[property2[4]];
          if (index > -1 && movedToBeDropped.indexOf(index) == -1) {
            movedToBeDropped.push(index);
          }
        }
        return true;
      }
      function boundToAnotherPropertyInCurrrentToken(property2, movedProperty2, token2) {
        var propertyName = property2[0];
        var movedPropertyName = movedProperty2[0];
        if (propertyName != movedPropertyName) {
          return false;
        }
        var key2 = movedProperty2[4];
        var toMove = movableTokens[key2];
        return toMove && toMove.indexOf(token2) > -1;
      }
      for (var i = tokens.length - 1; i >= 0; i--) {
        var token = tokens[i];
        var isRule;
        var j, k, m;
        var samePropertyAt;
        if (token[0] == Token.RULE) {
          isRule = true;
        } else if (token[0] == Token.NESTED_BLOCK) {
          isRule = false;
        } else {
          continue;
        }
        var movedCount = movedProperties.length;
        var properties = extractProperties(token);
        movedToBeDropped = [];
        var unmovableInCurrentToken = [];
        for (j = properties.length - 1; j >= 0; j--) {
          for (k = j - 1; k >= 0; k--) {
            if (!canReorderSingle(properties[j], properties[k], specificityCache)) {
              unmovableInCurrentToken.push(j);
              break;
            }
          }
        }
        for (j = properties.length - 1; j >= 0; j--) {
          var property = properties[j];
          var movedSameProperty = false;
          for (k = 0; k < movedCount; k++) {
            var movedProperty = movedProperties[k];
            if (movedToBeDropped.indexOf(k) == -1 && (!canReorderSingle(property, movedProperty, specificityCache) && !boundToAnotherPropertyInCurrrentToken(property, movedProperty, token) || movableTokens[movedProperty[4]] && movableTokens[movedProperty[4]].length === mergeLimit)) {
              dropPropertiesAt(i + 1, movedProperty);
              if (movedToBeDropped.indexOf(k) == -1) {
                movedToBeDropped.push(k);
                delete movableTokens[movedProperty[4]];
              }
            }
            if (!movedSameProperty) {
              movedSameProperty = property[0] == movedProperty[0] && property[1] == movedProperty[1];
              if (movedSameProperty) {
                samePropertyAt = k;
              }
            }
          }
          if (!isRule || unmovableInCurrentToken.indexOf(j) > -1) {
            continue;
          }
          var key = property[4];
          if (movedSameProperty && movedProperties[samePropertyAt][5].length + property[5].length > mergeLimit) {
            dropPropertiesAt(i + 1, movedProperties[samePropertyAt]);
            movedProperties.splice(samePropertyAt, 1);
            movableTokens[key] = [token];
            movedSameProperty = false;
          } else {
            movableTokens[key] = movableTokens[key] || [];
            movableTokens[key].push(token);
          }
          if (movedSameProperty) {
            movedProperties[samePropertyAt] = cloneAndMergeSelectors(movedProperties[samePropertyAt], property);
          } else {
            movedProperties.push(property);
          }
        }
        movedToBeDropped = movedToBeDropped.sort(naturalSorter);
        for (j = 0, m = movedToBeDropped.length; j < m; j++) {
          var dropAt = movedToBeDropped[j] - j;
          movedProperties.splice(dropAt, 1);
        }
      }
      var position = tokens[0] && tokens[0][0] == Token.AT_RULE && tokens[0][1].indexOf("@charset") === 0 ? 1 : 0;
      for (; position < tokens.length - 1; position++) {
        var isImportRule = tokens[position][0] === Token.AT_RULE && tokens[position][1].indexOf("@import") === 0;
        var isComment = tokens[position][0] === Token.COMMENT;
        if (!(isImportRule || isComment)) {
          break;
        }
      }
      for (i = 0; i < movedProperties.length; i++) {
        dropPropertiesAt(position, movedProperties[i]);
      }
    }
    module2.exports = restructure;
  }
});

// node_modules/clean-css/lib/optimizer/level-2/optimize.js
var require_optimize4 = __commonJS({
  "node_modules/clean-css/lib/optimizer/level-2/optimize.js"(exports, module2) {
    var mergeAdjacent = require_merge_adjacent();
    var mergeMediaQueries = require_merge_media_queries();
    var mergeNonAdjacentByBody = require_merge_non_adjacent_by_body();
    var mergeNonAdjacentBySelector = require_merge_non_adjacent_by_selector();
    var reduceNonAdjacent = require_reduce_non_adjacent();
    var removeDuplicateFontAtRules = require_remove_duplicate_font_at_rules();
    var removeDuplicateMediaQueries = require_remove_duplicate_media_queries();
    var removeDuplicates = require_remove_duplicates();
    var removeUnusedAtRules = require_remove_unused_at_rules();
    var restructure = require_restructure();
    var optimizeProperties = require_optimize3();
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var Token = require_token();
    function removeEmpty(tokens) {
      for (var i = 0, l = tokens.length; i < l; i++) {
        var token = tokens[i];
        var isEmpty = false;
        switch (token[0]) {
          case Token.RULE:
            isEmpty = token[1].length === 0 || token[2].length === 0;
            break;
          case Token.NESTED_BLOCK:
            removeEmpty(token[2]);
            isEmpty = token[2].length === 0;
            break;
          case Token.AT_RULE:
            isEmpty = token[1].length === 0;
            break;
          case Token.AT_RULE_BLOCK:
            isEmpty = token[2].length === 0;
        }
        if (isEmpty) {
          tokens.splice(i, 1);
          i--;
          l--;
        }
      }
    }
    function recursivelyOptimizeBlocks(tokens, context) {
      for (var i = 0, l = tokens.length; i < l; i++) {
        var token = tokens[i];
        if (token[0] == Token.NESTED_BLOCK) {
          var isKeyframes = /@(-moz-|-o-|-webkit-)?keyframes/.test(token[1][0][1]);
          level2Optimize(token[2], context, !isKeyframes);
        }
      }
    }
    function recursivelyOptimizeProperties(tokens, context) {
      for (var i = 0, l = tokens.length; i < l; i++) {
        var token = tokens[i];
        switch (token[0]) {
          case Token.RULE:
            optimizeProperties(token[2], true, true, context);
            break;
          case Token.NESTED_BLOCK:
            recursivelyOptimizeProperties(token[2], context);
        }
      }
    }
    function level2Optimize(tokens, context, withRestructuring) {
      var levelOptions = context.options.level[OptimizationLevel.Two];
      var level2Plugins = context.options.plugins.level2Block;
      var reduced;
      var i;
      recursivelyOptimizeBlocks(tokens, context);
      recursivelyOptimizeProperties(tokens, context);
      if (levelOptions.removeDuplicateRules) {
        removeDuplicates(tokens, context);
      }
      if (levelOptions.mergeAdjacentRules) {
        mergeAdjacent(tokens, context);
      }
      if (levelOptions.reduceNonAdjacentRules) {
        reduceNonAdjacent(tokens, context);
      }
      if (levelOptions.mergeNonAdjacentRules && levelOptions.mergeNonAdjacentRules != "body") {
        mergeNonAdjacentBySelector(tokens, context);
      }
      if (levelOptions.mergeNonAdjacentRules && levelOptions.mergeNonAdjacentRules != "selector") {
        mergeNonAdjacentByBody(tokens, context);
      }
      if (levelOptions.restructureRules && levelOptions.mergeAdjacentRules && withRestructuring) {
        restructure(tokens, context);
        mergeAdjacent(tokens, context);
      }
      if (levelOptions.restructureRules && !levelOptions.mergeAdjacentRules && withRestructuring) {
        restructure(tokens, context);
      }
      if (levelOptions.removeDuplicateFontRules) {
        removeDuplicateFontAtRules(tokens, context);
      }
      if (levelOptions.removeDuplicateMediaBlocks) {
        removeDuplicateMediaQueries(tokens, context);
      }
      if (levelOptions.removeUnusedAtRules) {
        removeUnusedAtRules(tokens, context);
      }
      if (levelOptions.mergeMedia) {
        reduced = mergeMediaQueries(tokens, context);
        for (i = reduced.length - 1; i >= 0; i--) {
          level2Optimize(reduced[i][2], context, false);
        }
      }
      for (i = 0; i < level2Plugins.length; i++) {
        level2Plugins[i](tokens);
      }
      if (levelOptions.removeEmpty) {
        removeEmpty(tokens);
      }
      return tokens;
    }
    module2.exports = level2Optimize;
  }
});

// node_modules/clean-css/lib/optimizer/validator.js
var require_validator = __commonJS({
  "node_modules/clean-css/lib/optimizer/validator.js"(exports, module2) {
    var functionNoVendorRegexStr = "[A-Z]+(\\-|[A-Z]|[0-9])+\\(.*?\\)";
    var functionVendorRegexStr = "\\-(\\-|[A-Z]|[0-9])+\\(.*?\\)";
    var variableRegexStr = "var\\(\\-\\-[^\\)]+\\)";
    var functionAnyRegexStr = "(" + variableRegexStr + "|" + functionNoVendorRegexStr + "|" + functionVendorRegexStr + ")";
    var calcRegex = new RegExp("^(\\-moz\\-|\\-webkit\\-)?calc\\([^\\)]+\\)$", "i");
    var decimalRegex = /[0-9]/;
    var functionAnyRegex = new RegExp("^" + functionAnyRegexStr + "$", "i");
    var hexAlphaColorRegex = /^#(?:[0-9a-f]{4}|[0-9a-f]{8})$/i;
    var hslColorRegex = /^hsl\(\s{0,31}[-.]?\d+\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31}\)|hsla\(\s{0,31}[-.]?\d+\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31},\s{0,31}\.?\d+\s{0,31}\)$/;
    var hslColorWithSpacesRegex = /^hsl\(\s{0,31}[-.]?\d+(deg)?\s{1,31}\d*\.?\d+%\s{1,31}\d*\.?\d+%\s{0,31}\)|hsla\(\s{0,31}[-.]?\d+(deg)?\s{1,31}\d*\.?\d+%\s{1,31}\d*\.?\d+%\s{1,31}\/\s{1,31}\d*\.?\d+%?\s{0,31}\)$/;
    var identifierRegex = /^(-[a-z0-9_][a-z0-9\-_]*|[a-z_][a-z0-9\-_]*)$/i;
    var namedEntityRegex = /^[a-z]+$/i;
    var prefixRegex = /^-([a-z0-9]|-)*$/i;
    var quotedTextRegex = /^("[^"]*"|'[^']*')$/i;
    var rgbColorRegex = /^rgb\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31}\)|rgba\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[.\d]+\s{0,31}\)$/i;
    var rgbColorWithSpacesRegex = /^rgb\(\s{0,31}[\d]{1,3}\s{1,31}[\d]{1,3}\s{1,31}[\d]{1,3}\s{0,31}\)|rgba\(\s{0,31}[\d]{1,3}\s{1,31}[\d]{1,3}\s{1,31}[\d]{1,3}\s{1,31}\/\s{1,31}[\d]*\.?[.\d]+%?\s{0,31}\)$/i;
    var timeUnitPattern = /\d+(s|ms)/;
    var timingFunctionRegex = /^(cubic-bezier|steps)\([^)]+\)$/;
    var validTimeUnits = ["ms", "s"];
    var urlRegex = /^url\([\s\S]+\)$/i;
    var variableRegex = new RegExp("^" + variableRegexStr + "$", "i");
    var eightValueColorRegex = /^#[0-9a-f]{8}$/i;
    var fourValueColorRegex = /^#[0-9a-f]{4}$/i;
    var sixValueColorRegex = /^#[0-9a-f]{6}$/i;
    var threeValueColorRegex = /^#[0-9a-f]{3}$/i;
    var DECIMAL_DOT = ".";
    var MINUS_SIGN = "-";
    var PLUS_SIGN = "+";
    var Keywords = {
      "^": [
        "inherit",
        "initial",
        "unset"
      ],
      "*-style": [
        "auto",
        "dashed",
        "dotted",
        "double",
        "groove",
        "hidden",
        "inset",
        "none",
        "outset",
        "ridge",
        "solid"
      ],
      "*-timing-function": [
        "ease",
        "ease-in",
        "ease-in-out",
        "ease-out",
        "linear",
        "step-end",
        "step-start"
      ],
      "animation-direction": [
        "alternate",
        "alternate-reverse",
        "normal",
        "reverse"
      ],
      "animation-fill-mode": [
        "backwards",
        "both",
        "forwards",
        "none"
      ],
      "animation-iteration-count": [
        "infinite"
      ],
      "animation-name": [
        "none"
      ],
      "animation-play-state": [
        "paused",
        "running"
      ],
      "background-attachment": [
        "fixed",
        "inherit",
        "local",
        "scroll"
      ],
      "background-clip": [
        "border-box",
        "content-box",
        "inherit",
        "padding-box",
        "text"
      ],
      "background-origin": [
        "border-box",
        "content-box",
        "inherit",
        "padding-box"
      ],
      "background-position": [
        "bottom",
        "center",
        "left",
        "right",
        "top"
      ],
      "background-repeat": [
        "no-repeat",
        "inherit",
        "repeat",
        "repeat-x",
        "repeat-y",
        "round",
        "space"
      ],
      "background-size": [
        "auto",
        "cover",
        "contain"
      ],
      "border-collapse": [
        "collapse",
        "inherit",
        "separate"
      ],
      bottom: [
        "auto"
      ],
      clear: [
        "both",
        "left",
        "none",
        "right"
      ],
      color: [
        "transparent"
      ],
      cursor: [
        "all-scroll",
        "auto",
        "col-resize",
        "crosshair",
        "default",
        "e-resize",
        "help",
        "move",
        "n-resize",
        "ne-resize",
        "no-drop",
        "not-allowed",
        "nw-resize",
        "pointer",
        "progress",
        "row-resize",
        "s-resize",
        "se-resize",
        "sw-resize",
        "text",
        "vertical-text",
        "w-resize",
        "wait"
      ],
      display: [
        "block",
        "inline",
        "inline-block",
        "inline-table",
        "list-item",
        "none",
        "table",
        "table-caption",
        "table-cell",
        "table-column",
        "table-column-group",
        "table-footer-group",
        "table-header-group",
        "table-row",
        "table-row-group"
      ],
      float: [
        "left",
        "none",
        "right"
      ],
      left: [
        "auto"
      ],
      font: [
        "caption",
        "icon",
        "menu",
        "message-box",
        "small-caption",
        "status-bar",
        "unset"
      ],
      "font-size": [
        "large",
        "larger",
        "medium",
        "small",
        "smaller",
        "x-large",
        "x-small",
        "xx-large",
        "xx-small"
      ],
      "font-stretch": [
        "condensed",
        "expanded",
        "extra-condensed",
        "extra-expanded",
        "normal",
        "semi-condensed",
        "semi-expanded",
        "ultra-condensed",
        "ultra-expanded"
      ],
      "font-style": [
        "italic",
        "normal",
        "oblique"
      ],
      "font-variant": [
        "normal",
        "small-caps"
      ],
      "font-weight": [
        "100",
        "200",
        "300",
        "400",
        "500",
        "600",
        "700",
        "800",
        "900",
        "bold",
        "bolder",
        "lighter",
        "normal"
      ],
      "line-height": [
        "normal"
      ],
      "list-style-position": [
        "inside",
        "outside"
      ],
      "list-style-type": [
        "armenian",
        "circle",
        "decimal",
        "decimal-leading-zero",
        "disc",
        "decimal|disc",
        "georgian",
        "lower-alpha",
        "lower-greek",
        "lower-latin",
        "lower-roman",
        "none",
        "square",
        "upper-alpha",
        "upper-latin",
        "upper-roman"
      ],
      overflow: [
        "auto",
        "hidden",
        "scroll",
        "visible"
      ],
      position: [
        "absolute",
        "fixed",
        "relative",
        "static"
      ],
      right: [
        "auto"
      ],
      "text-align": [
        "center",
        "justify",
        "left",
        "left|right",
        "right"
      ],
      "text-decoration": [
        "line-through",
        "none",
        "overline",
        "underline"
      ],
      "text-overflow": [
        "clip",
        "ellipsis"
      ],
      top: [
        "auto"
      ],
      "vertical-align": [
        "baseline",
        "bottom",
        "middle",
        "sub",
        "super",
        "text-bottom",
        "text-top",
        "top"
      ],
      visibility: [
        "collapse",
        "hidden",
        "visible"
      ],
      "white-space": [
        "normal",
        "nowrap",
        "pre"
      ],
      width: [
        "inherit",
        "initial",
        "medium",
        "thick",
        "thin"
      ]
    };
    var Units = [
      "%",
      "ch",
      "cm",
      "em",
      "ex",
      "in",
      "mm",
      "pc",
      "pt",
      "px",
      "rem",
      "vh",
      "vm",
      "vmax",
      "vmin",
      "vw"
    ];
    function isColor(value) {
      return value != "auto" && (isKeyword("color")(value) || isHexColor(value) || isColorFunction(value) || isNamedEntity(value));
    }
    function isColorFunction(value) {
      return isRgbColor(value) || isHslColor(value);
    }
    function isDynamicUnit(value) {
      return calcRegex.test(value);
    }
    function isFunction(value) {
      return functionAnyRegex.test(value);
    }
    function isHexColor(value) {
      return threeValueColorRegex.test(value) || fourValueColorRegex.test(value) || sixValueColorRegex.test(value) || eightValueColorRegex.test(value);
    }
    function isHslColor(value) {
      return hslColorRegex.test(value) || hslColorWithSpacesRegex.test(value);
    }
    function isHexAlphaColor(value) {
      return hexAlphaColorRegex.test(value);
    }
    function isIdentifier(value) {
      return identifierRegex.test(value);
    }
    function isQuotedText(value) {
      return quotedTextRegex.test(value);
    }
    function isImage(value) {
      return value == "none" || value == "inherit" || isUrl(value);
    }
    function isKeyword(propertyName) {
      return function(value) {
        return Keywords[propertyName].indexOf(value) > -1;
      };
    }
    function isNamedEntity(value) {
      return namedEntityRegex.test(value);
    }
    function isNumber(value) {
      return scanForNumber(value) == value.length;
    }
    function isRgbColor(value) {
      return rgbColorRegex.test(value) || rgbColorWithSpacesRegex.test(value);
    }
    function isPrefixed(value) {
      return prefixRegex.test(value);
    }
    function isPositiveNumber(value) {
      return isNumber(value) && parseFloat(value) >= 0;
    }
    function isVariable(value) {
      return variableRegex.test(value);
    }
    function isTime(value) {
      var numberUpTo = scanForNumber(value);
      return numberUpTo == value.length && parseInt(value) === 0 || numberUpTo > -1 && validTimeUnits.indexOf(value.slice(numberUpTo + 1)) > -1 || isCalculatedTime(value);
    }
    function isCalculatedTime(value) {
      return isFunction(value) && timeUnitPattern.test(value);
    }
    function isTimingFunction() {
      var isTimingFunctionKeyword = isKeyword("*-timing-function");
      return function(value) {
        return isTimingFunctionKeyword(value) || timingFunctionRegex.test(value);
      };
    }
    function isUnit(validUnits, value) {
      var numberUpTo = scanForNumber(value);
      return numberUpTo == value.length && parseInt(value) === 0 || numberUpTo > -1 && validUnits.indexOf(value.slice(numberUpTo + 1).toLowerCase()) > -1 || value == "auto" || value == "inherit";
    }
    function isUrl(value) {
      return urlRegex.test(value);
    }
    function isZIndex(value) {
      return value == "auto" || isNumber(value) || isKeyword("^")(value);
    }
    function scanForNumber(value) {
      var hasDot = false;
      var hasSign = false;
      var character;
      var i, l;
      for (i = 0, l = value.length; i < l; i++) {
        character = value[i];
        if (i === 0 && (character == PLUS_SIGN || character == MINUS_SIGN)) {
          hasSign = true;
        } else if (i > 0 && hasSign && (character == PLUS_SIGN || character == MINUS_SIGN)) {
          return i - 1;
        } else if (character == DECIMAL_DOT && !hasDot) {
          hasDot = true;
        } else if (character == DECIMAL_DOT && hasDot) {
          return i - 1;
        } else if (decimalRegex.test(character)) {
          continue;
        } else {
          return i - 1;
        }
      }
      return i;
    }
    function validator(compatibility) {
      var validUnits = Units.slice(0).filter(function(value) {
        return !(value in compatibility.units) || compatibility.units[value] === true;
      });
      if (compatibility.customUnits.rpx) {
        validUnits.push("rpx");
      }
      return {
        colorOpacity: compatibility.colors.opacity,
        colorHexAlpha: compatibility.colors.hexAlpha,
        isAnimationDirectionKeyword: isKeyword("animation-direction"),
        isAnimationFillModeKeyword: isKeyword("animation-fill-mode"),
        isAnimationIterationCountKeyword: isKeyword("animation-iteration-count"),
        isAnimationNameKeyword: isKeyword("animation-name"),
        isAnimationPlayStateKeyword: isKeyword("animation-play-state"),
        isTimingFunction: isTimingFunction(),
        isBackgroundAttachmentKeyword: isKeyword("background-attachment"),
        isBackgroundClipKeyword: isKeyword("background-clip"),
        isBackgroundOriginKeyword: isKeyword("background-origin"),
        isBackgroundPositionKeyword: isKeyword("background-position"),
        isBackgroundRepeatKeyword: isKeyword("background-repeat"),
        isBackgroundSizeKeyword: isKeyword("background-size"),
        isColor,
        isColorFunction,
        isDynamicUnit,
        isFontKeyword: isKeyword("font"),
        isFontSizeKeyword: isKeyword("font-size"),
        isFontStretchKeyword: isKeyword("font-stretch"),
        isFontStyleKeyword: isKeyword("font-style"),
        isFontVariantKeyword: isKeyword("font-variant"),
        isFontWeightKeyword: isKeyword("font-weight"),
        isFunction,
        isGlobal: isKeyword("^"),
        isHexAlphaColor,
        isHslColor,
        isIdentifier,
        isImage,
        isKeyword,
        isLineHeightKeyword: isKeyword("line-height"),
        isListStylePositionKeyword: isKeyword("list-style-position"),
        isListStyleTypeKeyword: isKeyword("list-style-type"),
        isNumber,
        isPrefixed,
        isPositiveNumber,
        isQuotedText,
        isRgbColor,
        isStyleKeyword: isKeyword("*-style"),
        isTime,
        isUnit: isUnit.bind(null, validUnits),
        isUrl,
        isVariable,
        isWidth: isKeyword("width"),
        isZIndex
      };
    }
    module2.exports = validator;
  }
});

// node_modules/clean-css/lib/options/compatibility.js
var require_compatibility = __commonJS({
  "node_modules/clean-css/lib/options/compatibility.js"(exports, module2) {
    var DEFAULTS = {
      "*": {
        colors: {
          hexAlpha: false,
          opacity: true
        },
        customUnits: { rpx: false },
        properties: {
          backgroundClipMerging: true,
          backgroundOriginMerging: true,
          backgroundSizeMerging: true,
          colors: true,
          ieBangHack: false,
          ieFilters: false,
          iePrefixHack: false,
          ieSuffixHack: false,
          merging: true,
          shorterLengthUnits: false,
          spaceAfterClosingBrace: true,
          urlQuotes: true,
          zeroUnits: true
        },
        selectors: {
          adjacentSpace: false,
          ie7Hack: false,
          mergeablePseudoClasses: [
            ":active",
            ":after",
            ":before",
            ":empty",
            ":checked",
            ":disabled",
            ":empty",
            ":enabled",
            ":first-child",
            ":first-letter",
            ":first-line",
            ":first-of-type",
            ":focus",
            ":hover",
            ":lang",
            ":last-child",
            ":last-of-type",
            ":link",
            ":not",
            ":nth-child",
            ":nth-last-child",
            ":nth-last-of-type",
            ":nth-of-type",
            ":only-child",
            ":only-of-type",
            ":root",
            ":target",
            ":visited"
          ],
          mergeablePseudoElements: [
            "::after",
            "::before",
            "::first-letter",
            "::first-line"
          ],
          mergeLimit: 8191,
          multiplePseudoMerging: true
        },
        units: {
          ch: true,
          in: true,
          pc: true,
          pt: true,
          rem: true,
          vh: true,
          vm: true,
          vmax: true,
          vmin: true,
          vw: true
        }
      }
    };
    DEFAULTS.ie11 = merge2(DEFAULTS["*"], { properties: { ieSuffixHack: true } });
    DEFAULTS.ie10 = merge2(DEFAULTS["*"], { properties: { ieSuffixHack: true } });
    DEFAULTS.ie9 = merge2(DEFAULTS["*"], {
      properties: {
        ieFilters: true,
        ieSuffixHack: true
      }
    });
    DEFAULTS.ie8 = merge2(DEFAULTS.ie9, {
      colors: { opacity: false },
      properties: {
        backgroundClipMerging: false,
        backgroundOriginMerging: false,
        backgroundSizeMerging: false,
        iePrefixHack: true,
        merging: false
      },
      selectors: {
        mergeablePseudoClasses: [
          ":after",
          ":before",
          ":first-child",
          ":first-letter",
          ":focus",
          ":hover",
          ":visited"
        ],
        mergeablePseudoElements: []
      },
      units: {
        ch: false,
        rem: false,
        vh: false,
        vm: false,
        vmax: false,
        vmin: false,
        vw: false
      }
    });
    DEFAULTS.ie7 = merge2(DEFAULTS.ie8, {
      properties: { ieBangHack: true },
      selectors: {
        ie7Hack: true,
        mergeablePseudoClasses: [
          ":first-child",
          ":first-letter",
          ":hover",
          ":visited"
        ]
      }
    });
    function compatibilityFrom(source) {
      return merge2(DEFAULTS["*"], calculateSource(source));
    }
    function merge2(source, target) {
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          var value = source[key];
          if (Object.prototype.hasOwnProperty.call(target, key) && typeof value === "object" && !Array.isArray(value)) {
            target[key] = merge2(value, target[key] || {});
          } else {
            target[key] = key in target ? target[key] : value;
          }
        }
      }
      return target;
    }
    function calculateSource(source) {
      if (typeof source == "object") {
        return source;
      }
      if (!/[,+-]/.test(source)) {
        return DEFAULTS[source] || DEFAULTS["*"];
      }
      var parts = source.split(",");
      var template = parts[0] in DEFAULTS ? DEFAULTS[parts.shift()] : DEFAULTS["*"];
      source = {};
      parts.forEach(function(part) {
        var isAdd = part[0] == "+";
        var key = part.substring(1).split(".");
        var group = key[0];
        var option = key[1];
        source[group] = source[group] || {};
        source[group][option] = isAdd;
      });
      return merge2(template, source);
    }
    module2.exports = compatibilityFrom;
  }
});

// node_modules/clean-css/lib/utils/is-http-resource.js
var require_is_http_resource = __commonJS({
  "node_modules/clean-css/lib/utils/is-http-resource.js"(exports, module2) {
    var HTTP_RESOURCE_PATTERN = /^http:\/\//;
    function isHttpResource(uri) {
      return HTTP_RESOURCE_PATTERN.test(uri);
    }
    module2.exports = isHttpResource;
  }
});

// node_modules/clean-css/lib/utils/is-https-resource.js
var require_is_https_resource = __commonJS({
  "node_modules/clean-css/lib/utils/is-https-resource.js"(exports, module2) {
    var HTTPS_RESOURCE_PATTERN = /^https:\/\//;
    function isHttpsResource(uri) {
      return HTTPS_RESOURCE_PATTERN.test(uri);
    }
    module2.exports = isHttpsResource;
  }
});

// node_modules/clean-css/lib/reader/load-remote-resource.js
var require_load_remote_resource = __commonJS({
  "node_modules/clean-css/lib/reader/load-remote-resource.js"(exports, module2) {
    var http = require("http");
    var https = require("https");
    var url = require("url");
    var isHttpResource = require_is_http_resource();
    var isHttpsResource = require_is_https_resource();
    var override = require_override();
    var HTTP_PROTOCOL = "http:";
    function loadRemoteResource(uri, inlineRequest, inlineTimeout, callback) {
      var proxyProtocol = inlineRequest.protocol || inlineRequest.hostname;
      var errorHandled = false;
      var requestOptions;
      var fetch2;
      requestOptions = override(url.parse(uri), inlineRequest || {});
      if (inlineRequest.hostname !== void 0) {
        requestOptions.protocol = inlineRequest.protocol || HTTP_PROTOCOL;
        requestOptions.path = requestOptions.href;
      }
      fetch2 = proxyProtocol && !isHttpsResource(proxyProtocol) || isHttpResource(uri) ? http.get : https.get;
      fetch2(requestOptions, function(res) {
        var chunks = [];
        var movedUri;
        if (errorHandled) {
          return;
        }
        if (res.statusCode < 200 || res.statusCode > 399) {
          return callback(res.statusCode, null);
        }
        if (res.statusCode > 299) {
          movedUri = url.resolve(uri, res.headers.location);
          return loadRemoteResource(movedUri, inlineRequest, inlineTimeout, callback);
        }
        res.on("data", function(chunk) {
          chunks.push(chunk.toString());
        });
        res.on("end", function() {
          var body = chunks.join("");
          callback(null, body);
        });
      }).on("error", function(res) {
        if (errorHandled) {
          return;
        }
        errorHandled = true;
        callback(res.message, null);
      }).on("timeout", function() {
        if (errorHandled) {
          return;
        }
        errorHandled = true;
        callback("timeout", null);
      }).setTimeout(inlineTimeout);
    }
    module2.exports = loadRemoteResource;
  }
});

// node_modules/clean-css/lib/options/fetch.js
var require_fetch = __commonJS({
  "node_modules/clean-css/lib/options/fetch.js"(exports, module2) {
    var loadRemoteResource = require_load_remote_resource();
    function fetchFrom(callback) {
      return callback || loadRemoteResource;
    }
    module2.exports = fetchFrom;
  }
});

// node_modules/clean-css/lib/options/inline.js
var require_inline = __commonJS({
  "node_modules/clean-css/lib/options/inline.js"(exports, module2) {
    function inlineOptionsFrom(rules) {
      if (Array.isArray(rules)) {
        return rules;
      }
      if (rules === false) {
        return ["none"];
      }
      return rules === void 0 ? ["local"] : rules.split(",");
    }
    module2.exports = inlineOptionsFrom;
  }
});

// node_modules/clean-css/lib/options/inline-request.js
var require_inline_request = __commonJS({
  "node_modules/clean-css/lib/options/inline-request.js"(exports, module2) {
    var url = require("url");
    var override = require_override();
    function inlineRequestFrom(option) {
      return override(proxyOptionsFrom(process.env.HTTP_PROXY || process.env.http_proxy), option || {});
    }
    function proxyOptionsFrom(httpProxy) {
      return httpProxy ? {
        hostname: url.parse(httpProxy).hostname,
        port: parseInt(url.parse(httpProxy).port)
      } : {};
    }
    module2.exports = inlineRequestFrom;
  }
});

// node_modules/clean-css/lib/options/inline-timeout.js
var require_inline_timeout = __commonJS({
  "node_modules/clean-css/lib/options/inline-timeout.js"(exports, module2) {
    var DEFAULT_TIMEOUT = 5e3;
    function inlineTimeoutFrom(option) {
      return option || DEFAULT_TIMEOUT;
    }
    module2.exports = inlineTimeoutFrom;
  }
});

// node_modules/clean-css/lib/options/plugins.js
var require_plugins = __commonJS({
  "node_modules/clean-css/lib/options/plugins.js"(exports, module2) {
    function pluginsFrom(plugins) {
      var flatPlugins = {
        level1Value: [],
        level1Property: [],
        level2Block: []
      };
      plugins = plugins || [];
      flatPlugins.level1Value = plugins.map(function(plugin) {
        return plugin.level1 && plugin.level1.value;
      }).filter(function(plugin) {
        return plugin != null;
      });
      flatPlugins.level1Property = plugins.map(function(plugin) {
        return plugin.level1 && plugin.level1.property;
      }).filter(function(plugin) {
        return plugin != null;
      });
      flatPlugins.level2Block = plugins.map(function(plugin) {
        return plugin.level2 && plugin.level2.block;
      }).filter(function(plugin) {
        return plugin != null;
      });
      return flatPlugins;
    }
    module2.exports = pluginsFrom;
  }
});

// node_modules/clean-css/lib/options/rebase.js
var require_rebase = __commonJS({
  "node_modules/clean-css/lib/options/rebase.js"(exports, module2) {
    function rebaseFrom(rebaseOption, rebaseToOption) {
      if (rebaseToOption !== void 0) {
        return true;
      }
      if (rebaseOption === void 0) {
        return false;
      }
      return !!rebaseOption;
    }
    module2.exports = rebaseFrom;
  }
});

// node_modules/clean-css/lib/options/rebase-to.js
var require_rebase_to = __commonJS({
  "node_modules/clean-css/lib/options/rebase-to.js"(exports, module2) {
    var path = require("path");
    function rebaseToFrom(option) {
      return option ? path.resolve(option) : process.cwd();
    }
    module2.exports = rebaseToFrom;
  }
});

// node_modules/source-map/lib/base64.js
var require_base64 = __commonJS({
  "node_modules/source-map/lib/base64.js"(exports) {
    var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
    exports.encode = function(number) {
      if (0 <= number && number < intToCharMap.length) {
        return intToCharMap[number];
      }
      throw new TypeError("Must be between 0 and 63: " + number);
    };
    exports.decode = function(charCode) {
      var bigA = 65;
      var bigZ = 90;
      var littleA = 97;
      var littleZ = 122;
      var zero = 48;
      var nine = 57;
      var plus = 43;
      var slash = 47;
      var littleOffset = 26;
      var numberOffset = 52;
      if (bigA <= charCode && charCode <= bigZ) {
        return charCode - bigA;
      }
      if (littleA <= charCode && charCode <= littleZ) {
        return charCode - littleA + littleOffset;
      }
      if (zero <= charCode && charCode <= nine) {
        return charCode - zero + numberOffset;
      }
      if (charCode == plus) {
        return 62;
      }
      if (charCode == slash) {
        return 63;
      }
      return -1;
    };
  }
});

// node_modules/source-map/lib/base64-vlq.js
var require_base64_vlq = __commonJS({
  "node_modules/source-map/lib/base64-vlq.js"(exports) {
    var base64 = require_base64();
    var VLQ_BASE_SHIFT = 5;
    var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
    var VLQ_BASE_MASK = VLQ_BASE - 1;
    var VLQ_CONTINUATION_BIT = VLQ_BASE;
    function toVLQSigned(aValue) {
      return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
    }
    function fromVLQSigned(aValue) {
      var isNegative = (aValue & 1) === 1;
      var shifted = aValue >> 1;
      return isNegative ? -shifted : shifted;
    }
    exports.encode = function base64VLQ_encode(aValue) {
      var encoded = "";
      var digit;
      var vlq = toVLQSigned(aValue);
      do {
        digit = vlq & VLQ_BASE_MASK;
        vlq >>>= VLQ_BASE_SHIFT;
        if (vlq > 0) {
          digit |= VLQ_CONTINUATION_BIT;
        }
        encoded += base64.encode(digit);
      } while (vlq > 0);
      return encoded;
    };
    exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
      var strLen = aStr.length;
      var result = 0;
      var shift = 0;
      var continuation, digit;
      do {
        if (aIndex >= strLen) {
          throw new Error("Expected more digits in base 64 VLQ value.");
        }
        digit = base64.decode(aStr.charCodeAt(aIndex++));
        if (digit === -1) {
          throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
        }
        continuation = !!(digit & VLQ_CONTINUATION_BIT);
        digit &= VLQ_BASE_MASK;
        result = result + (digit << shift);
        shift += VLQ_BASE_SHIFT;
      } while (continuation);
      aOutParam.value = fromVLQSigned(result);
      aOutParam.rest = aIndex;
    };
  }
});

// node_modules/source-map/lib/util.js
var require_util = __commonJS({
  "node_modules/source-map/lib/util.js"(exports) {
    function getArg(aArgs, aName, aDefaultValue) {
      if (aName in aArgs) {
        return aArgs[aName];
      } else if (arguments.length === 3) {
        return aDefaultValue;
      } else {
        throw new Error('"' + aName + '" is a required argument.');
      }
    }
    exports.getArg = getArg;
    var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
    var dataUrlRegexp = /^data:.+\,.+$/;
    function urlParse(aUrl) {
      var match = aUrl.match(urlRegexp);
      if (!match) {
        return null;
      }
      return {
        scheme: match[1],
        auth: match[2],
        host: match[3],
        port: match[4],
        path: match[5]
      };
    }
    exports.urlParse = urlParse;
    function urlGenerate(aParsedUrl) {
      var url = "";
      if (aParsedUrl.scheme) {
        url += aParsedUrl.scheme + ":";
      }
      url += "//";
      if (aParsedUrl.auth) {
        url += aParsedUrl.auth + "@";
      }
      if (aParsedUrl.host) {
        url += aParsedUrl.host;
      }
      if (aParsedUrl.port) {
        url += ":" + aParsedUrl.port;
      }
      if (aParsedUrl.path) {
        url += aParsedUrl.path;
      }
      return url;
    }
    exports.urlGenerate = urlGenerate;
    function normalize(aPath) {
      var path = aPath;
      var url = urlParse(aPath);
      if (url) {
        if (!url.path) {
          return aPath;
        }
        path = url.path;
      }
      var isAbsolute = exports.isAbsolute(path);
      var parts = path.split(/\/+/);
      for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
        part = parts[i];
        if (part === ".") {
          parts.splice(i, 1);
        } else if (part === "..") {
          up++;
        } else if (up > 0) {
          if (part === "") {
            parts.splice(i + 1, up);
            up = 0;
          } else {
            parts.splice(i, 2);
            up--;
          }
        }
      }
      path = parts.join("/");
      if (path === "") {
        path = isAbsolute ? "/" : ".";
      }
      if (url) {
        url.path = path;
        return urlGenerate(url);
      }
      return path;
    }
    exports.normalize = normalize;
    function join(aRoot, aPath) {
      if (aRoot === "") {
        aRoot = ".";
      }
      if (aPath === "") {
        aPath = ".";
      }
      var aPathUrl = urlParse(aPath);
      var aRootUrl = urlParse(aRoot);
      if (aRootUrl) {
        aRoot = aRootUrl.path || "/";
      }
      if (aPathUrl && !aPathUrl.scheme) {
        if (aRootUrl) {
          aPathUrl.scheme = aRootUrl.scheme;
        }
        return urlGenerate(aPathUrl);
      }
      if (aPathUrl || aPath.match(dataUrlRegexp)) {
        return aPath;
      }
      if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
        aRootUrl.host = aPath;
        return urlGenerate(aRootUrl);
      }
      var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
      if (aRootUrl) {
        aRootUrl.path = joined;
        return urlGenerate(aRootUrl);
      }
      return joined;
    }
    exports.join = join;
    exports.isAbsolute = function(aPath) {
      return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
    };
    function relative(aRoot, aPath) {
      if (aRoot === "") {
        aRoot = ".";
      }
      aRoot = aRoot.replace(/\/$/, "");
      var level = 0;
      while (aPath.indexOf(aRoot + "/") !== 0) {
        var index = aRoot.lastIndexOf("/");
        if (index < 0) {
          return aPath;
        }
        aRoot = aRoot.slice(0, index);
        if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
          return aPath;
        }
        ++level;
      }
      return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
    }
    exports.relative = relative;
    var supportsNullProto = function() {
      var obj = /* @__PURE__ */ Object.create(null);
      return !("__proto__" in obj);
    }();
    function identity(s) {
      return s;
    }
    function toSetString(aStr) {
      if (isProtoString(aStr)) {
        return "$" + aStr;
      }
      return aStr;
    }
    exports.toSetString = supportsNullProto ? identity : toSetString;
    function fromSetString(aStr) {
      if (isProtoString(aStr)) {
        return aStr.slice(1);
      }
      return aStr;
    }
    exports.fromSetString = supportsNullProto ? identity : fromSetString;
    function isProtoString(s) {
      if (!s) {
        return false;
      }
      var length = s.length;
      if (length < 9) {
        return false;
      }
      if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
        return false;
      }
      for (var i = length - 10; i >= 0; i--) {
        if (s.charCodeAt(i) !== 36) {
          return false;
        }
      }
      return true;
    }
    function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
      var cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0 || onlyCompareOriginal) {
        return cmp;
      }
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0) {
        return cmp;
      }
      return strcmp(mappingA.name, mappingB.name);
    }
    exports.compareByOriginalPositions = compareByOriginalPositions;
    function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
      var cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0 || onlyCompareGenerated) {
        return cmp;
      }
      cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0) {
        return cmp;
      }
      return strcmp(mappingA.name, mappingB.name);
    }
    exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
    function strcmp(aStr1, aStr2) {
      if (aStr1 === aStr2) {
        return 0;
      }
      if (aStr1 === null) {
        return 1;
      }
      if (aStr2 === null) {
        return -1;
      }
      if (aStr1 > aStr2) {
        return 1;
      }
      return -1;
    }
    function compareByGeneratedPositionsInflated(mappingA, mappingB) {
      var cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0) {
        return cmp;
      }
      return strcmp(mappingA.name, mappingB.name);
    }
    exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
    function parseSourceMapInput(str) {
      return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
    }
    exports.parseSourceMapInput = parseSourceMapInput;
    function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
      sourceURL = sourceURL || "";
      if (sourceRoot) {
        if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
          sourceRoot += "/";
        }
        sourceURL = sourceRoot + sourceURL;
      }
      if (sourceMapURL) {
        var parsed = urlParse(sourceMapURL);
        if (!parsed) {
          throw new Error("sourceMapURL could not be parsed");
        }
        if (parsed.path) {
          var index = parsed.path.lastIndexOf("/");
          if (index >= 0) {
            parsed.path = parsed.path.substring(0, index + 1);
          }
        }
        sourceURL = join(urlGenerate(parsed), sourceURL);
      }
      return normalize(sourceURL);
    }
    exports.computeSourceURL = computeSourceURL;
  }
});

// node_modules/source-map/lib/array-set.js
var require_array_set = __commonJS({
  "node_modules/source-map/lib/array-set.js"(exports) {
    var util = require_util();
    var has = Object.prototype.hasOwnProperty;
    var hasNativeMap = typeof Map !== "undefined";
    function ArraySet() {
      this._array = [];
      this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
    }
    ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
      var set = new ArraySet();
      for (var i = 0, len = aArray.length; i < len; i++) {
        set.add(aArray[i], aAllowDuplicates);
      }
      return set;
    };
    ArraySet.prototype.size = function ArraySet_size() {
      return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
    };
    ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
      var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
      var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
      var idx = this._array.length;
      if (!isDuplicate || aAllowDuplicates) {
        this._array.push(aStr);
      }
      if (!isDuplicate) {
        if (hasNativeMap) {
          this._set.set(aStr, idx);
        } else {
          this._set[sStr] = idx;
        }
      }
    };
    ArraySet.prototype.has = function ArraySet_has(aStr) {
      if (hasNativeMap) {
        return this._set.has(aStr);
      } else {
        var sStr = util.toSetString(aStr);
        return has.call(this._set, sStr);
      }
    };
    ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
      if (hasNativeMap) {
        var idx = this._set.get(aStr);
        if (idx >= 0) {
          return idx;
        }
      } else {
        var sStr = util.toSetString(aStr);
        if (has.call(this._set, sStr)) {
          return this._set[sStr];
        }
      }
      throw new Error('"' + aStr + '" is not in the set.');
    };
    ArraySet.prototype.at = function ArraySet_at(aIdx) {
      if (aIdx >= 0 && aIdx < this._array.length) {
        return this._array[aIdx];
      }
      throw new Error("No element indexed by " + aIdx);
    };
    ArraySet.prototype.toArray = function ArraySet_toArray() {
      return this._array.slice();
    };
    exports.ArraySet = ArraySet;
  }
});

// node_modules/source-map/lib/mapping-list.js
var require_mapping_list = __commonJS({
  "node_modules/source-map/lib/mapping-list.js"(exports) {
    var util = require_util();
    function generatedPositionAfter(mappingA, mappingB) {
      var lineA = mappingA.generatedLine;
      var lineB = mappingB.generatedLine;
      var columnA = mappingA.generatedColumn;
      var columnB = mappingB.generatedColumn;
      return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
    }
    function MappingList() {
      this._array = [];
      this._sorted = true;
      this._last = { generatedLine: -1, generatedColumn: 0 };
    }
    MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
      this._array.forEach(aCallback, aThisArg);
    };
    MappingList.prototype.add = function MappingList_add(aMapping) {
      if (generatedPositionAfter(this._last, aMapping)) {
        this._last = aMapping;
        this._array.push(aMapping);
      } else {
        this._sorted = false;
        this._array.push(aMapping);
      }
    };
    MappingList.prototype.toArray = function MappingList_toArray() {
      if (!this._sorted) {
        this._array.sort(util.compareByGeneratedPositionsInflated);
        this._sorted = true;
      }
      return this._array;
    };
    exports.MappingList = MappingList;
  }
});

// node_modules/source-map/lib/source-map-generator.js
var require_source_map_generator = __commonJS({
  "node_modules/source-map/lib/source-map-generator.js"(exports) {
    var base64VLQ = require_base64_vlq();
    var util = require_util();
    var ArraySet = require_array_set().ArraySet;
    var MappingList = require_mapping_list().MappingList;
    function SourceMapGenerator(aArgs) {
      if (!aArgs) {
        aArgs = {};
      }
      this._file = util.getArg(aArgs, "file", null);
      this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
      this._skipValidation = util.getArg(aArgs, "skipValidation", false);
      this._sources = new ArraySet();
      this._names = new ArraySet();
      this._mappings = new MappingList();
      this._sourcesContents = null;
    }
    SourceMapGenerator.prototype._version = 3;
    SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
      var sourceRoot = aSourceMapConsumer.sourceRoot;
      var generator = new SourceMapGenerator({
        file: aSourceMapConsumer.file,
        sourceRoot
      });
      aSourceMapConsumer.eachMapping(function(mapping) {
        var newMapping = {
          generated: {
            line: mapping.generatedLine,
            column: mapping.generatedColumn
          }
        };
        if (mapping.source != null) {
          newMapping.source = mapping.source;
          if (sourceRoot != null) {
            newMapping.source = util.relative(sourceRoot, newMapping.source);
          }
          newMapping.original = {
            line: mapping.originalLine,
            column: mapping.originalColumn
          };
          if (mapping.name != null) {
            newMapping.name = mapping.name;
          }
        }
        generator.addMapping(newMapping);
      });
      aSourceMapConsumer.sources.forEach(function(sourceFile) {
        var sourceRelative = sourceFile;
        if (sourceRoot !== null) {
          sourceRelative = util.relative(sourceRoot, sourceFile);
        }
        if (!generator._sources.has(sourceRelative)) {
          generator._sources.add(sourceRelative);
        }
        var content = aSourceMapConsumer.sourceContentFor(sourceFile);
        if (content != null) {
          generator.setSourceContent(sourceFile, content);
        }
      });
      return generator;
    };
    SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
      var generated = util.getArg(aArgs, "generated");
      var original = util.getArg(aArgs, "original", null);
      var source = util.getArg(aArgs, "source", null);
      var name = util.getArg(aArgs, "name", null);
      if (!this._skipValidation) {
        this._validateMapping(generated, original, source, name);
      }
      if (source != null) {
        source = String(source);
        if (!this._sources.has(source)) {
          this._sources.add(source);
        }
      }
      if (name != null) {
        name = String(name);
        if (!this._names.has(name)) {
          this._names.add(name);
        }
      }
      this._mappings.add({
        generatedLine: generated.line,
        generatedColumn: generated.column,
        originalLine: original != null && original.line,
        originalColumn: original != null && original.column,
        source,
        name
      });
    };
    SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
      var source = aSourceFile;
      if (this._sourceRoot != null) {
        source = util.relative(this._sourceRoot, source);
      }
      if (aSourceContent != null) {
        if (!this._sourcesContents) {
          this._sourcesContents = /* @__PURE__ */ Object.create(null);
        }
        this._sourcesContents[util.toSetString(source)] = aSourceContent;
      } else if (this._sourcesContents) {
        delete this._sourcesContents[util.toSetString(source)];
        if (Object.keys(this._sourcesContents).length === 0) {
          this._sourcesContents = null;
        }
      }
    };
    SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
      var sourceFile = aSourceFile;
      if (aSourceFile == null) {
        if (aSourceMapConsumer.file == null) {
          throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);
        }
        sourceFile = aSourceMapConsumer.file;
      }
      var sourceRoot = this._sourceRoot;
      if (sourceRoot != null) {
        sourceFile = util.relative(sourceRoot, sourceFile);
      }
      var newSources = new ArraySet();
      var newNames = new ArraySet();
      this._mappings.unsortedForEach(function(mapping) {
        if (mapping.source === sourceFile && mapping.originalLine != null) {
          var original = aSourceMapConsumer.originalPositionFor({
            line: mapping.originalLine,
            column: mapping.originalColumn
          });
          if (original.source != null) {
            mapping.source = original.source;
            if (aSourceMapPath != null) {
              mapping.source = util.join(aSourceMapPath, mapping.source);
            }
            if (sourceRoot != null) {
              mapping.source = util.relative(sourceRoot, mapping.source);
            }
            mapping.originalLine = original.line;
            mapping.originalColumn = original.column;
            if (original.name != null) {
              mapping.name = original.name;
            }
          }
        }
        var source = mapping.source;
        if (source != null && !newSources.has(source)) {
          newSources.add(source);
        }
        var name = mapping.name;
        if (name != null && !newNames.has(name)) {
          newNames.add(name);
        }
      }, this);
      this._sources = newSources;
      this._names = newNames;
      aSourceMapConsumer.sources.forEach(function(sourceFile2) {
        var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
        if (content != null) {
          if (aSourceMapPath != null) {
            sourceFile2 = util.join(aSourceMapPath, sourceFile2);
          }
          if (sourceRoot != null) {
            sourceFile2 = util.relative(sourceRoot, sourceFile2);
          }
          this.setSourceContent(sourceFile2, content);
        }
      }, this);
    };
    SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
      if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
        throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");
      }
      if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
        return;
      } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
        return;
      } else {
        throw new Error("Invalid mapping: " + JSON.stringify({
          generated: aGenerated,
          source: aSource,
          original: aOriginal,
          name: aName
        }));
      }
    };
    SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
      var previousGeneratedColumn = 0;
      var previousGeneratedLine = 1;
      var previousOriginalColumn = 0;
      var previousOriginalLine = 0;
      var previousName = 0;
      var previousSource = 0;
      var result = "";
      var next;
      var mapping;
      var nameIdx;
      var sourceIdx;
      var mappings = this._mappings.toArray();
      for (var i = 0, len = mappings.length; i < len; i++) {
        mapping = mappings[i];
        next = "";
        if (mapping.generatedLine !== previousGeneratedLine) {
          previousGeneratedColumn = 0;
          while (mapping.generatedLine !== previousGeneratedLine) {
            next += ";";
            previousGeneratedLine++;
          }
        } else {
          if (i > 0) {
            if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
              continue;
            }
            next += ",";
          }
        }
        next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
        previousGeneratedColumn = mapping.generatedColumn;
        if (mapping.source != null) {
          sourceIdx = this._sources.indexOf(mapping.source);
          next += base64VLQ.encode(sourceIdx - previousSource);
          previousSource = sourceIdx;
          next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
          previousOriginalLine = mapping.originalLine - 1;
          next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
          previousOriginalColumn = mapping.originalColumn;
          if (mapping.name != null) {
            nameIdx = this._names.indexOf(mapping.name);
            next += base64VLQ.encode(nameIdx - previousName);
            previousName = nameIdx;
          }
        }
        result += next;
      }
      return result;
    };
    SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
      return aSources.map(function(source) {
        if (!this._sourcesContents) {
          return null;
        }
        if (aSourceRoot != null) {
          source = util.relative(aSourceRoot, source);
        }
        var key = util.toSetString(source);
        return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
      }, this);
    };
    SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
      var map = {
        version: this._version,
        sources: this._sources.toArray(),
        names: this._names.toArray(),
        mappings: this._serializeMappings()
      };
      if (this._file != null) {
        map.file = this._file;
      }
      if (this._sourceRoot != null) {
        map.sourceRoot = this._sourceRoot;
      }
      if (this._sourcesContents) {
        map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
      }
      return map;
    };
    SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
      return JSON.stringify(this.toJSON());
    };
    exports.SourceMapGenerator = SourceMapGenerator;
  }
});

// node_modules/source-map/lib/binary-search.js
var require_binary_search = __commonJS({
  "node_modules/source-map/lib/binary-search.js"(exports) {
    exports.GREATEST_LOWER_BOUND = 1;
    exports.LEAST_UPPER_BOUND = 2;
    function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
      var mid = Math.floor((aHigh - aLow) / 2) + aLow;
      var cmp = aCompare(aNeedle, aHaystack[mid], true);
      if (cmp === 0) {
        return mid;
      } else if (cmp > 0) {
        if (aHigh - mid > 1) {
          return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
        }
        if (aBias == exports.LEAST_UPPER_BOUND) {
          return aHigh < aHaystack.length ? aHigh : -1;
        } else {
          return mid;
        }
      } else {
        if (mid - aLow > 1) {
          return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
        }
        if (aBias == exports.LEAST_UPPER_BOUND) {
          return mid;
        } else {
          return aLow < 0 ? -1 : aLow;
        }
      }
    }
    exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
      if (aHaystack.length === 0) {
        return -1;
      }
      var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
      if (index < 0) {
        return -1;
      }
      while (index - 1 >= 0) {
        if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
          break;
        }
        --index;
      }
      return index;
    };
  }
});

// node_modules/source-map/lib/quick-sort.js
var require_quick_sort = __commonJS({
  "node_modules/source-map/lib/quick-sort.js"(exports) {
    function swap(ary, x, y) {
      var temp = ary[x];
      ary[x] = ary[y];
      ary[y] = temp;
    }
    function randomIntInRange(low, high) {
      return Math.round(low + Math.random() * (high - low));
    }
    function doQuickSort(ary, comparator, p, r) {
      if (p < r) {
        var pivotIndex = randomIntInRange(p, r);
        var i = p - 1;
        swap(ary, pivotIndex, r);
        var pivot = ary[r];
        for (var j = p; j < r; j++) {
          if (comparator(ary[j], pivot) <= 0) {
            i += 1;
            swap(ary, i, j);
          }
        }
        swap(ary, i + 1, j);
        var q = i + 1;
        doQuickSort(ary, comparator, p, q - 1);
        doQuickSort(ary, comparator, q + 1, r);
      }
    }
    exports.quickSort = function(ary, comparator) {
      doQuickSort(ary, comparator, 0, ary.length - 1);
    };
  }
});

// node_modules/source-map/lib/source-map-consumer.js
var require_source_map_consumer = __commonJS({
  "node_modules/source-map/lib/source-map-consumer.js"(exports) {
    var util = require_util();
    var binarySearch = require_binary_search();
    var ArraySet = require_array_set().ArraySet;
    var base64VLQ = require_base64_vlq();
    var quickSort = require_quick_sort().quickSort;
    function SourceMapConsumer(aSourceMap, aSourceMapURL) {
      var sourceMap = aSourceMap;
      if (typeof aSourceMap === "string") {
        sourceMap = util.parseSourceMapInput(aSourceMap);
      }
      return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
    }
    SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
      return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
    };
    SourceMapConsumer.prototype._version = 3;
    SourceMapConsumer.prototype.__generatedMappings = null;
    Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
      configurable: true,
      enumerable: true,
      get: function() {
        if (!this.__generatedMappings) {
          this._parseMappings(this._mappings, this.sourceRoot);
        }
        return this.__generatedMappings;
      }
    });
    SourceMapConsumer.prototype.__originalMappings = null;
    Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
      configurable: true,
      enumerable: true,
      get: function() {
        if (!this.__originalMappings) {
          this._parseMappings(this._mappings, this.sourceRoot);
        }
        return this.__originalMappings;
      }
    });
    SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
      var c = aStr.charAt(index);
      return c === ";" || c === ",";
    };
    SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
      throw new Error("Subclasses must implement _parseMappings");
    };
    SourceMapConsumer.GENERATED_ORDER = 1;
    SourceMapConsumer.ORIGINAL_ORDER = 2;
    SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
    SourceMapConsumer.LEAST_UPPER_BOUND = 2;
    SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
      var context = aContext || null;
      var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
      var mappings;
      switch (order) {
        case SourceMapConsumer.GENERATED_ORDER:
          mappings = this._generatedMappings;
          break;
        case SourceMapConsumer.ORIGINAL_ORDER:
          mappings = this._originalMappings;
          break;
        default:
          throw new Error("Unknown order of iteration.");
      }
      var sourceRoot = this.sourceRoot;
      mappings.map(function(mapping) {
        var source = mapping.source === null ? null : this._sources.at(mapping.source);
        source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
        return {
          source,
          generatedLine: mapping.generatedLine,
          generatedColumn: mapping.generatedColumn,
          originalLine: mapping.originalLine,
          originalColumn: mapping.originalColumn,
          name: mapping.name === null ? null : this._names.at(mapping.name)
        };
      }, this).forEach(aCallback, context);
    };
    SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
      var line = util.getArg(aArgs, "line");
      var needle = {
        source: util.getArg(aArgs, "source"),
        originalLine: line,
        originalColumn: util.getArg(aArgs, "column", 0)
      };
      needle.source = this._findSourceIndex(needle.source);
      if (needle.source < 0) {
        return [];
      }
      var mappings = [];
      var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
      if (index >= 0) {
        var mapping = this._originalMappings[index];
        if (aArgs.column === void 0) {
          var originalLine = mapping.originalLine;
          while (mapping && mapping.originalLine === originalLine) {
            mappings.push({
              line: util.getArg(mapping, "generatedLine", null),
              column: util.getArg(mapping, "generatedColumn", null),
              lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
            });
            mapping = this._originalMappings[++index];
          }
        } else {
          var originalColumn = mapping.originalColumn;
          while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
            mappings.push({
              line: util.getArg(mapping, "generatedLine", null),
              column: util.getArg(mapping, "generatedColumn", null),
              lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
            });
            mapping = this._originalMappings[++index];
          }
        }
      }
      return mappings;
    };
    exports.SourceMapConsumer = SourceMapConsumer;
    function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
      var sourceMap = aSourceMap;
      if (typeof aSourceMap === "string") {
        sourceMap = util.parseSourceMapInput(aSourceMap);
      }
      var version = util.getArg(sourceMap, "version");
      var sources = util.getArg(sourceMap, "sources");
      var names = util.getArg(sourceMap, "names", []);
      var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
      var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
      var mappings = util.getArg(sourceMap, "mappings");
      var file = util.getArg(sourceMap, "file", null);
      if (version != this._version) {
        throw new Error("Unsupported version: " + version);
      }
      if (sourceRoot) {
        sourceRoot = util.normalize(sourceRoot);
      }
      sources = sources.map(String).map(util.normalize).map(function(source) {
        return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
      });
      this._names = ArraySet.fromArray(names.map(String), true);
      this._sources = ArraySet.fromArray(sources, true);
      this._absoluteSources = this._sources.toArray().map(function(s) {
        return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
      });
      this.sourceRoot = sourceRoot;
      this.sourcesContent = sourcesContent;
      this._mappings = mappings;
      this._sourceMapURL = aSourceMapURL;
      this.file = file;
    }
    BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
    BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
    BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
      var relativeSource = aSource;
      if (this.sourceRoot != null) {
        relativeSource = util.relative(this.sourceRoot, relativeSource);
      }
      if (this._sources.has(relativeSource)) {
        return this._sources.indexOf(relativeSource);
      }
      var i;
      for (i = 0; i < this._absoluteSources.length; ++i) {
        if (this._absoluteSources[i] == aSource) {
          return i;
        }
      }
      return -1;
    };
    BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
      var smc = Object.create(BasicSourceMapConsumer.prototype);
      var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
      var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
      smc.sourceRoot = aSourceMap._sourceRoot;
      smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
      smc.file = aSourceMap._file;
      smc._sourceMapURL = aSourceMapURL;
      smc._absoluteSources = smc._sources.toArray().map(function(s) {
        return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
      });
      var generatedMappings = aSourceMap._mappings.toArray().slice();
      var destGeneratedMappings = smc.__generatedMappings = [];
      var destOriginalMappings = smc.__originalMappings = [];
      for (var i = 0, length = generatedMappings.length; i < length; i++) {
        var srcMapping = generatedMappings[i];
        var destMapping = new Mapping();
        destMapping.generatedLine = srcMapping.generatedLine;
        destMapping.generatedColumn = srcMapping.generatedColumn;
        if (srcMapping.source) {
          destMapping.source = sources.indexOf(srcMapping.source);
          destMapping.originalLine = srcMapping.originalLine;
          destMapping.originalColumn = srcMapping.originalColumn;
          if (srcMapping.name) {
            destMapping.name = names.indexOf(srcMapping.name);
          }
          destOriginalMappings.push(destMapping);
        }
        destGeneratedMappings.push(destMapping);
      }
      quickSort(smc.__originalMappings, util.compareByOriginalPositions);
      return smc;
    };
    BasicSourceMapConsumer.prototype._version = 3;
    Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
      get: function() {
        return this._absoluteSources.slice();
      }
    });
    function Mapping() {
      this.generatedLine = 0;
      this.generatedColumn = 0;
      this.source = null;
      this.originalLine = null;
      this.originalColumn = null;
      this.name = null;
    }
    BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
      var generatedLine = 1;
      var previousGeneratedColumn = 0;
      var previousOriginalLine = 0;
      var previousOriginalColumn = 0;
      var previousSource = 0;
      var previousName = 0;
      var length = aStr.length;
      var index = 0;
      var cachedSegments = {};
      var temp = {};
      var originalMappings = [];
      var generatedMappings = [];
      var mapping, str, segment, end, value;
      while (index < length) {
        if (aStr.charAt(index) === ";") {
          generatedLine++;
          index++;
          previousGeneratedColumn = 0;
        } else if (aStr.charAt(index) === ",") {
          index++;
        } else {
          mapping = new Mapping();
          mapping.generatedLine = generatedLine;
          for (end = index; end < length; end++) {
            if (this._charIsMappingSeparator(aStr, end)) {
              break;
            }
          }
          str = aStr.slice(index, end);
          segment = cachedSegments[str];
          if (segment) {
            index += str.length;
          } else {
            segment = [];
            while (index < end) {
              base64VLQ.decode(aStr, index, temp);
              value = temp.value;
              index = temp.rest;
              segment.push(value);
            }
            if (segment.length === 2) {
              throw new Error("Found a source, but no line and column");
            }
            if (segment.length === 3) {
              throw new Error("Found a source and line, but no column");
            }
            cachedSegments[str] = segment;
          }
          mapping.generatedColumn = previousGeneratedColumn + segment[0];
          previousGeneratedColumn = mapping.generatedColumn;
          if (segment.length > 1) {
            mapping.source = previousSource + segment[1];
            previousSource += segment[1];
            mapping.originalLine = previousOriginalLine + segment[2];
            previousOriginalLine = mapping.originalLine;
            mapping.originalLine += 1;
            mapping.originalColumn = previousOriginalColumn + segment[3];
            previousOriginalColumn = mapping.originalColumn;
            if (segment.length > 4) {
              mapping.name = previousName + segment[4];
              previousName += segment[4];
            }
          }
          generatedMappings.push(mapping);
          if (typeof mapping.originalLine === "number") {
            originalMappings.push(mapping);
          }
        }
      }
      quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
      this.__generatedMappings = generatedMappings;
      quickSort(originalMappings, util.compareByOriginalPositions);
      this.__originalMappings = originalMappings;
    };
    BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
      if (aNeedle[aLineName] <= 0) {
        throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
      }
      if (aNeedle[aColumnName] < 0) {
        throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
      }
      return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
    };
    BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
      for (var index = 0; index < this._generatedMappings.length; ++index) {
        var mapping = this._generatedMappings[index];
        if (index + 1 < this._generatedMappings.length) {
          var nextMapping = this._generatedMappings[index + 1];
          if (mapping.generatedLine === nextMapping.generatedLine) {
            mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
            continue;
          }
        }
        mapping.lastGeneratedColumn = Infinity;
      }
    };
    BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
      var needle = {
        generatedLine: util.getArg(aArgs, "line"),
        generatedColumn: util.getArg(aArgs, "column")
      };
      var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
      if (index >= 0) {
        var mapping = this._generatedMappings[index];
        if (mapping.generatedLine === needle.generatedLine) {
          var source = util.getArg(mapping, "source", null);
          if (source !== null) {
            source = this._sources.at(source);
            source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
          }
          var name = util.getArg(mapping, "name", null);
          if (name !== null) {
            name = this._names.at(name);
          }
          return {
            source,
            line: util.getArg(mapping, "originalLine", null),
            column: util.getArg(mapping, "originalColumn", null),
            name
          };
        }
      }
      return {
        source: null,
        line: null,
        column: null,
        name: null
      };
    };
    BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
      if (!this.sourcesContent) {
        return false;
      }
      return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
        return sc == null;
      });
    };
    BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
      if (!this.sourcesContent) {
        return null;
      }
      var index = this._findSourceIndex(aSource);
      if (index >= 0) {
        return this.sourcesContent[index];
      }
      var relativeSource = aSource;
      if (this.sourceRoot != null) {
        relativeSource = util.relative(this.sourceRoot, relativeSource);
      }
      var url;
      if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
        var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
        if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
          return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
        }
        if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
          return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
        }
      }
      if (nullOnMissing) {
        return null;
      } else {
        throw new Error('"' + relativeSource + '" is not in the SourceMap.');
      }
    };
    BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
      var source = util.getArg(aArgs, "source");
      source = this._findSourceIndex(source);
      if (source < 0) {
        return {
          line: null,
          column: null,
          lastColumn: null
        };
      }
      var needle = {
        source,
        originalLine: util.getArg(aArgs, "line"),
        originalColumn: util.getArg(aArgs, "column")
      };
      var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND));
      if (index >= 0) {
        var mapping = this._originalMappings[index];
        if (mapping.source === needle.source) {
          return {
            line: util.getArg(mapping, "generatedLine", null),
            column: util.getArg(mapping, "generatedColumn", null),
            lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
          };
        }
      }
      return {
        line: null,
        column: null,
        lastColumn: null
      };
    };
    exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
    function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
      var sourceMap = aSourceMap;
      if (typeof aSourceMap === "string") {
        sourceMap = util.parseSourceMapInput(aSourceMap);
      }
      var version = util.getArg(sourceMap, "version");
      var sections = util.getArg(sourceMap, "sections");
      if (version != this._version) {
        throw new Error("Unsupported version: " + version);
      }
      this._sources = new ArraySet();
      this._names = new ArraySet();
      var lastOffset = {
        line: -1,
        column: 0
      };
      this._sections = sections.map(function(s) {
        if (s.url) {
          throw new Error("Support for url field in sections not implemented.");
        }
        var offset = util.getArg(s, "offset");
        var offsetLine = util.getArg(offset, "line");
        var offsetColumn = util.getArg(offset, "column");
        if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
          throw new Error("Section offsets must be ordered and non-overlapping.");
        }
        lastOffset = offset;
        return {
          generatedOffset: {
            generatedLine: offsetLine + 1,
            generatedColumn: offsetColumn + 1
          },
          consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
        };
      });
    }
    IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
    IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
    IndexedSourceMapConsumer.prototype._version = 3;
    Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
      get: function() {
        var sources = [];
        for (var i = 0; i < this._sections.length; i++) {
          for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
            sources.push(this._sections[i].consumer.sources[j]);
          }
        }
        return sources;
      }
    });
    IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
      var needle = {
        generatedLine: util.getArg(aArgs, "line"),
        generatedColumn: util.getArg(aArgs, "column")
      };
      var sectionIndex = binarySearch.search(needle, this._sections, function(needle2, section2) {
        var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
        if (cmp) {
          return cmp;
        }
        return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
      });
      var section = this._sections[sectionIndex];
      if (!section) {
        return {
          source: null,
          line: null,
          column: null,
          name: null
        };
      }
      return section.consumer.originalPositionFor({
        line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
        column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
        bias: aArgs.bias
      });
    };
    IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
      return this._sections.every(function(s) {
        return s.consumer.hasContentsOfAllSources();
      });
    };
    IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
      for (var i = 0; i < this._sections.length; i++) {
        var section = this._sections[i];
        var content = section.consumer.sourceContentFor(aSource, true);
        if (content) {
          return content;
        }
      }
      if (nullOnMissing) {
        return null;
      } else {
        throw new Error('"' + aSource + '" is not in the SourceMap.');
      }
    };
    IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
      for (var i = 0; i < this._sections.length; i++) {
        var section = this._sections[i];
        if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) {
          continue;
        }
        var generatedPosition = section.consumer.generatedPositionFor(aArgs);
        if (generatedPosition) {
          var ret = {
            line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
            column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
          };
          return ret;
        }
      }
      return {
        line: null,
        column: null
      };
    };
    IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
      this.__generatedMappings = [];
      this.__originalMappings = [];
      for (var i = 0; i < this._sections.length; i++) {
        var section = this._sections[i];
        var sectionMappings = section.consumer._generatedMappings;
        for (var j = 0; j < sectionMappings.length; j++) {
          var mapping = sectionMappings[j];
          var source = section.consumer._sources.at(mapping.source);
          source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
          this._sources.add(source);
          source = this._sources.indexOf(source);
          var name = null;
          if (mapping.name) {
            name = section.consumer._names.at(mapping.name);
            this._names.add(name);
            name = this._names.indexOf(name);
          }
          var adjustedMapping = {
            source,
            generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
            generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
            originalLine: mapping.originalLine,
            originalColumn: mapping.originalColumn,
            name
          };
          this.__generatedMappings.push(adjustedMapping);
          if (typeof adjustedMapping.originalLine === "number") {
            this.__originalMappings.push(adjustedMapping);
          }
        }
      }
      quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
      quickSort(this.__originalMappings, util.compareByOriginalPositions);
    };
    exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
  }
});

// node_modules/source-map/lib/source-node.js
var require_source_node = __commonJS({
  "node_modules/source-map/lib/source-node.js"(exports) {
    var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
    var util = require_util();
    var REGEX_NEWLINE = /(\r?\n)/;
    var NEWLINE_CODE = 10;
    var isSourceNode = "$$$isSourceNode$$$";
    function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
      this.children = [];
      this.sourceContents = {};
      this.line = aLine == null ? null : aLine;
      this.column = aColumn == null ? null : aColumn;
      this.source = aSource == null ? null : aSource;
      this.name = aName == null ? null : aName;
      this[isSourceNode] = true;
      if (aChunks != null)
        this.add(aChunks);
    }
    SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
      var node = new SourceNode();
      var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
      var remainingLinesIndex = 0;
      var shiftNextLine = function() {
        var lineContents = getNextLine();
        var newLine = getNextLine() || "";
        return lineContents + newLine;
        function getNextLine() {
          return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
        }
      };
      var lastGeneratedLine = 1, lastGeneratedColumn = 0;
      var lastMapping = null;
      aSourceMapConsumer.eachMapping(function(mapping) {
        if (lastMapping !== null) {
          if (lastGeneratedLine < mapping.generatedLine) {
            addMappingWithCode(lastMapping, shiftNextLine());
            lastGeneratedLine++;
            lastGeneratedColumn = 0;
          } else {
            var nextLine = remainingLines[remainingLinesIndex] || "";
            var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
            remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
            lastGeneratedColumn = mapping.generatedColumn;
            addMappingWithCode(lastMapping, code);
            lastMapping = mapping;
            return;
          }
        }
        while (lastGeneratedLine < mapping.generatedLine) {
          node.add(shiftNextLine());
          lastGeneratedLine++;
        }
        if (lastGeneratedColumn < mapping.generatedColumn) {
          var nextLine = remainingLines[remainingLinesIndex] || "";
          node.add(nextLine.substr(0, mapping.generatedColumn));
          remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
          lastGeneratedColumn = mapping.generatedColumn;
        }
        lastMapping = mapping;
      }, this);
      if (remainingLinesIndex < remainingLines.length) {
        if (lastMapping) {
          addMappingWithCode(lastMapping, shiftNextLine());
        }
        node.add(remainingLines.splice(remainingLinesIndex).join(""));
      }
      aSourceMapConsumer.sources.forEach(function(sourceFile) {
        var content = aSourceMapConsumer.sourceContentFor(sourceFile);
        if (content != null) {
          if (aRelativePath != null) {
            sourceFile = util.join(aRelativePath, sourceFile);
          }
          node.setSourceContent(sourceFile, content);
        }
      });
      return node;
      function addMappingWithCode(mapping, code) {
        if (mapping === null || mapping.source === void 0) {
          node.add(code);
        } else {
          var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
          node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
        }
      }
    };
    SourceNode.prototype.add = function SourceNode_add(aChunk) {
      if (Array.isArray(aChunk)) {
        aChunk.forEach(function(chunk) {
          this.add(chunk);
        }, this);
      } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
        if (aChunk) {
          this.children.push(aChunk);
        }
      } else {
        throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
      }
      return this;
    };
    SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
      if (Array.isArray(aChunk)) {
        for (var i = aChunk.length - 1; i >= 0; i--) {
          this.prepend(aChunk[i]);
        }
      } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
        this.children.unshift(aChunk);
      } else {
        throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
      }
      return this;
    };
    SourceNode.prototype.walk = function SourceNode_walk(aFn) {
      var chunk;
      for (var i = 0, len = this.children.length; i < len; i++) {
        chunk = this.children[i];
        if (chunk[isSourceNode]) {
          chunk.walk(aFn);
        } else {
          if (chunk !== "") {
            aFn(chunk, {
              source: this.source,
              line: this.line,
              column: this.column,
              name: this.name
            });
          }
        }
      }
    };
    SourceNode.prototype.join = function SourceNode_join(aSep) {
      var newChildren;
      var i;
      var len = this.children.length;
      if (len > 0) {
        newChildren = [];
        for (i = 0; i < len - 1; i++) {
          newChildren.push(this.children[i]);
          newChildren.push(aSep);
        }
        newChildren.push(this.children[i]);
        this.children = newChildren;
      }
      return this;
    };
    SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
      var lastChild = this.children[this.children.length - 1];
      if (lastChild[isSourceNode]) {
        lastChild.replaceRight(aPattern, aReplacement);
      } else if (typeof lastChild === "string") {
        this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
      } else {
        this.children.push("".replace(aPattern, aReplacement));
      }
      return this;
    };
    SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
      this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
    };
    SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
      for (var i = 0, len = this.children.length; i < len; i++) {
        if (this.children[i][isSourceNode]) {
          this.children[i].walkSourceContents(aFn);
        }
      }
      var sources = Object.keys(this.sourceContents);
      for (var i = 0, len = sources.length; i < len; i++) {
        aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
      }
    };
    SourceNode.prototype.toString = function SourceNode_toString() {
      var str = "";
      this.walk(function(chunk) {
        str += chunk;
      });
      return str;
    };
    SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
      var generated = {
        code: "",
        line: 1,
        column: 0
      };
      var map = new SourceMapGenerator(aArgs);
      var sourceMappingActive = false;
      var lastOriginalSource = null;
      var lastOriginalLine = null;
      var lastOriginalColumn = null;
      var lastOriginalName = null;
      this.walk(function(chunk, original) {
        generated.code += chunk;
        if (original.source !== null && original.line !== null && original.column !== null) {
          if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
            map.addMapping({
              source: original.source,
              original: {
                line: original.line,
                column: original.column
              },
              generated: {
                line: generated.line,
                column: generated.column
              },
              name: original.name
            });
          }
          lastOriginalSource = original.source;
          lastOriginalLine = original.line;
          lastOriginalColumn = original.column;
          lastOriginalName = original.name;
          sourceMappingActive = true;
        } else if (sourceMappingActive) {
          map.addMapping({
            generated: {
              line: generated.line,
              column: generated.column
            }
          });
          lastOriginalSource = null;
          sourceMappingActive = false;
        }
        for (var idx = 0, length = chunk.length; idx < length; idx++) {
          if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
            generated.line++;
            generated.column = 0;
            if (idx + 1 === length) {
              lastOriginalSource = null;
              sourceMappingActive = false;
            } else if (sourceMappingActive) {
              map.addMapping({
                source: original.source,
                original: {
                  line: original.line,
                  column: original.column
                },
                generated: {
                  line: generated.line,
                  column: generated.column
                },
                name: original.name
              });
            }
          } else {
            generated.column++;
          }
        }
      });
      this.walkSourceContents(function(sourceFile, sourceContent) {
        map.setSourceContent(sourceFile, sourceContent);
      });
      return { code: generated.code, map };
    };
    exports.SourceNode = SourceNode;
  }
});

// node_modules/source-map/source-map.js
var require_source_map = __commonJS({
  "node_modules/source-map/source-map.js"(exports) {
    exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
    exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
    exports.SourceNode = require_source_node().SourceNode;
  }
});

// node_modules/clean-css/lib/reader/input-source-map-tracker.js
var require_input_source_map_tracker = __commonJS({
  "node_modules/clean-css/lib/reader/input-source-map-tracker.js"(exports, module2) {
    var SourceMapConsumer = require_source_map().SourceMapConsumer;
    function inputSourceMapTracker() {
      var maps = {};
      return {
        all: all.bind(null, maps),
        isTracking: isTracking.bind(null, maps),
        originalPositionFor: originalPositionFor.bind(null, maps),
        track: track.bind(null, maps)
      };
    }
    function all(maps) {
      return maps;
    }
    function isTracking(maps, source) {
      return source in maps;
    }
    function originalPositionFor(maps, metadata, range, selectorFallbacks) {
      var line = metadata[0];
      var column = metadata[1];
      var source = metadata[2];
      var position = {
        line,
        column: column + range
      };
      var originalPosition;
      while (!originalPosition && position.column > column) {
        position.column--;
        originalPosition = maps[source].originalPositionFor(position);
      }
      if (!originalPosition || originalPosition.column < 0) {
        return metadata;
      }
      if (originalPosition.line === null && line > 1 && selectorFallbacks > 0) {
        return originalPositionFor(maps, [line - 1, column, source], range, selectorFallbacks - 1);
      }
      return originalPosition.line !== null ? toMetadata(originalPosition) : metadata;
    }
    function toMetadata(asHash) {
      return [asHash.line, asHash.column, asHash.source];
    }
    function track(maps, source, data) {
      maps[source] = new SourceMapConsumer(data);
    }
    module2.exports = inputSourceMapTracker;
  }
});

// node_modules/clean-css/lib/utils/is-remote-resource.js
var require_is_remote_resource = __commonJS({
  "node_modules/clean-css/lib/utils/is-remote-resource.js"(exports, module2) {
    var REMOTE_RESOURCE_PATTERN = /^(\w+:\/\/|\/\/)/;
    var FILE_RESOURCE_PATTERN = /^file:\/\//;
    function isRemoteResource(uri) {
      return REMOTE_RESOURCE_PATTERN.test(uri) && !FILE_RESOURCE_PATTERN.test(uri);
    }
    module2.exports = isRemoteResource;
  }
});

// node_modules/clean-css/lib/utils/has-protocol.js
var require_has_protocol = __commonJS({
  "node_modules/clean-css/lib/utils/has-protocol.js"(exports, module2) {
    var NO_PROTOCOL_RESOURCE_PATTERN = /^\/\//;
    function hasProtocol(uri) {
      return !NO_PROTOCOL_RESOURCE_PATTERN.test(uri);
    }
    module2.exports = hasProtocol;
  }
});

// node_modules/clean-css/lib/reader/is-allowed-resource.js
var require_is_allowed_resource = __commonJS({
  "node_modules/clean-css/lib/reader/is-allowed-resource.js"(exports, module2) {
    var path = require("path");
    var url = require("url");
    var isRemoteResource = require_is_remote_resource();
    var hasProtocol = require_has_protocol();
    var HTTP_PROTOCOL = "http:";
    function isAllowedResource(uri, isRemote, rules) {
      var match;
      var absoluteUri;
      var allowed = !isRemote;
      var rule;
      var isNegated;
      var normalizedRule;
      var i;
      if (rules.length === 0) {
        return false;
      }
      if (isRemote && !hasProtocol(uri)) {
        uri = HTTP_PROTOCOL + uri;
      }
      match = isRemote ? url.parse(uri).host : uri;
      absoluteUri = isRemote ? uri : path.resolve(uri);
      for (i = 0; i < rules.length; i++) {
        rule = rules[i];
        isNegated = rule[0] == "!";
        normalizedRule = rule.substring(1);
        if (isNegated && isRemote && isRemoteRule(normalizedRule)) {
          allowed = allowed && !isAllowedResource(uri, true, [normalizedRule]);
        } else if (isNegated && !isRemote && !isRemoteRule(normalizedRule)) {
          allowed = allowed && !isAllowedResource(uri, false, [normalizedRule]);
        } else if (isNegated) {
          allowed = allowed && true;
        } else if (rule == "all") {
          allowed = true;
        } else if (isRemote && rule == "local") {
          allowed = allowed || false;
        } else if (isRemote && rule == "remote") {
          allowed = true;
        } else if (!isRemote && rule == "remote") {
          allowed = false;
        } else if (!isRemote && rule == "local") {
          allowed = true;
        } else if (rule === match) {
          allowed = true;
        } else if (rule === uri) {
          allowed = true;
        } else if (isRemote && absoluteUri.indexOf(rule) === 0) {
          allowed = true;
        } else if (!isRemote && absoluteUri.indexOf(path.resolve(rule)) === 0) {
          allowed = true;
        } else if (isRemote != isRemoteRule(normalizedRule)) {
          allowed = allowed && true;
        } else {
          allowed = false;
        }
      }
      return allowed;
    }
    function isRemoteRule(rule) {
      return isRemoteResource(rule) || url.parse(HTTP_PROTOCOL + "//" + rule).host == rule;
    }
    module2.exports = isAllowedResource;
  }
});

// node_modules/clean-css/lib/reader/match-data-uri.js
var require_match_data_uri = __commonJS({
  "node_modules/clean-css/lib/reader/match-data-uri.js"(exports, module2) {
    var DATA_URI_PATTERN = /^data:(\S*?)?(;charset=(?:(?!;charset=)[^;])+)?(;[^,]+?)?,(.+)/;
    function matchDataUri(uri) {
      return DATA_URI_PATTERN.exec(uri);
    }
    module2.exports = matchDataUri;
  }
});

// node_modules/clean-css/lib/reader/rebase-local-map.js
var require_rebase_local_map = __commonJS({
  "node_modules/clean-css/lib/reader/rebase-local-map.js"(exports, module2) {
    var path = require("path");
    function rebaseLocalMap(sourceMap, sourceUri, rebaseTo) {
      var currentPath = path.resolve("");
      var absoluteUri = path.resolve(currentPath, sourceUri);
      var absoluteUriDirectory = path.dirname(absoluteUri);
      sourceMap.sources = sourceMap.sources.map(function(source) {
        return path.relative(rebaseTo, path.resolve(absoluteUriDirectory, source));
      });
      return sourceMap;
    }
    module2.exports = rebaseLocalMap;
  }
});

// node_modules/clean-css/lib/reader/rebase-remote-map.js
var require_rebase_remote_map = __commonJS({
  "node_modules/clean-css/lib/reader/rebase-remote-map.js"(exports, module2) {
    var path = require("path");
    var url = require("url");
    function rebaseRemoteMap(sourceMap, sourceUri) {
      var sourceDirectory = path.dirname(sourceUri);
      sourceMap.sources = sourceMap.sources.map(function(source) {
        return url.resolve(sourceDirectory, source);
      });
      return sourceMap;
    }
    module2.exports = rebaseRemoteMap;
  }
});

// node_modules/clean-css/lib/utils/is-data-uri-resource.js
var require_is_data_uri_resource = __commonJS({
  "node_modules/clean-css/lib/utils/is-data-uri-resource.js"(exports, module2) {
    var DATA_URI_PATTERN = /^data:(\S{0,31}?)?(;charset=(?:(?!;charset=)[^;])+)?(;[^,]+?)?,(.+)/;
    function isDataUriResource(uri) {
      return DATA_URI_PATTERN.test(uri);
    }
    module2.exports = isDataUriResource;
  }
});

// node_modules/clean-css/lib/reader/apply-source-maps.js
var require_apply_source_maps = __commonJS({
  "node_modules/clean-css/lib/reader/apply-source-maps.js"(exports, module2) {
    var fs2 = require("fs");
    var path = require("path");
    var isAllowedResource = require_is_allowed_resource();
    var matchDataUri = require_match_data_uri();
    var rebaseLocalMap = require_rebase_local_map();
    var rebaseRemoteMap = require_rebase_remote_map();
    var Token = require_token();
    var hasProtocol = require_has_protocol();
    var isDataUriResource = require_is_data_uri_resource();
    var isRemoteResource = require_is_remote_resource();
    var MAP_MARKER_PATTERN = /^\/\*# sourceMappingURL=(\S+) \*\/$/;
    function applySourceMaps(tokens, context, callback) {
      var applyContext = {
        callback,
        fetch: context.options.fetch,
        index: 0,
        inline: context.options.inline,
        inlineRequest: context.options.inlineRequest,
        inlineTimeout: context.options.inlineTimeout,
        inputSourceMapTracker: context.inputSourceMapTracker,
        localOnly: context.localOnly,
        processedTokens: [],
        rebaseTo: context.options.rebaseTo,
        sourceTokens: tokens,
        warnings: context.warnings
      };
      return context.options.sourceMap && tokens.length > 0 ? doApplySourceMaps(applyContext) : callback(tokens);
    }
    function doApplySourceMaps(applyContext) {
      var singleSourceTokens = [];
      var lastSource = findTokenSource(applyContext.sourceTokens[0]);
      var source;
      var token;
      var l;
      for (l = applyContext.sourceTokens.length; applyContext.index < l; applyContext.index++) {
        token = applyContext.sourceTokens[applyContext.index];
        source = findTokenSource(token);
        if (source != lastSource) {
          singleSourceTokens = [];
          lastSource = source;
        }
        singleSourceTokens.push(token);
        applyContext.processedTokens.push(token);
        if (token[0] == Token.COMMENT && MAP_MARKER_PATTERN.test(token[1])) {
          return fetchAndApplySourceMap(token[1], source, singleSourceTokens, applyContext);
        }
      }
      return applyContext.callback(applyContext.processedTokens);
    }
    function findTokenSource(token) {
      var scope;
      var metadata;
      if (token[0] == Token.AT_RULE || token[0] == Token.COMMENT || token[0] == Token.RAW) {
        metadata = token[2][0];
      } else {
        scope = token[1][0];
        metadata = scope[2][0];
      }
      return metadata[2];
    }
    function fetchAndApplySourceMap(sourceMapComment, source, singleSourceTokens, applyContext) {
      return extractInputSourceMapFrom(sourceMapComment, applyContext, function(inputSourceMap) {
        if (inputSourceMap) {
          applyContext.inputSourceMapTracker.track(source, inputSourceMap);
          applySourceMapRecursively(singleSourceTokens, applyContext.inputSourceMapTracker);
        }
        applyContext.index++;
        return doApplySourceMaps(applyContext);
      });
    }
    function extractInputSourceMapFrom(sourceMapComment, applyContext, whenSourceMapReady) {
      var uri = MAP_MARKER_PATTERN.exec(sourceMapComment)[1];
      var absoluteUri;
      var sourceMap;
      var rebasedMap;
      if (isDataUriResource(uri)) {
        sourceMap = extractInputSourceMapFromDataUri(uri);
        return whenSourceMapReady(sourceMap);
      }
      if (isRemoteResource(uri)) {
        return loadInputSourceMapFromRemoteUri(uri, applyContext, function(sourceMap2) {
          var parsedMap;
          if (sourceMap2) {
            parsedMap = JSON.parse(sourceMap2);
            rebasedMap = rebaseRemoteMap(parsedMap, uri);
            whenSourceMapReady(rebasedMap);
          } else {
            whenSourceMapReady(null);
          }
        });
      }
      absoluteUri = path.resolve(applyContext.rebaseTo, uri);
      sourceMap = loadInputSourceMapFromLocalUri(absoluteUri, applyContext);
      if (sourceMap) {
        rebasedMap = rebaseLocalMap(sourceMap, absoluteUri, applyContext.rebaseTo);
        return whenSourceMapReady(rebasedMap);
      }
      return whenSourceMapReady(null);
    }
    function extractInputSourceMapFromDataUri(uri) {
      var dataUriMatch = matchDataUri(uri);
      var charset = dataUriMatch[2] ? dataUriMatch[2].split(/[=;]/)[2] : "us-ascii";
      var encoding = dataUriMatch[3] ? dataUriMatch[3].split(";")[1] : "utf8";
      var data = encoding == "utf8" ? global.unescape(dataUriMatch[4]) : dataUriMatch[4];
      var buffer = Buffer.from(data, encoding);
      buffer.charset = charset;
      return JSON.parse(buffer.toString());
    }
    function loadInputSourceMapFromRemoteUri(uri, applyContext, whenLoaded) {
      var isAllowed = isAllowedResource(uri, true, applyContext.inline);
      var isRuntimeResource = !hasProtocol(uri);
      if (applyContext.localOnly) {
        applyContext.warnings.push('Cannot fetch remote resource from "' + uri + '" as no callback given.');
        return whenLoaded(null);
      }
      if (isRuntimeResource) {
        applyContext.warnings.push('Cannot fetch "' + uri + '" as no protocol given.');
        return whenLoaded(null);
      }
      if (!isAllowed) {
        applyContext.warnings.push('Cannot fetch "' + uri + '" as resource is not allowed.');
        return whenLoaded(null);
      }
      applyContext.fetch(uri, applyContext.inlineRequest, applyContext.inlineTimeout, function(error, body) {
        if (error) {
          applyContext.warnings.push('Missing source map at "' + uri + '" - ' + error);
          return whenLoaded(null);
        }
        whenLoaded(body);
      });
    }
    function loadInputSourceMapFromLocalUri(uri, applyContext) {
      var isAllowed = isAllowedResource(uri, false, applyContext.inline);
      var sourceMap;
      if (!fs2.existsSync(uri) || !fs2.statSync(uri).isFile()) {
        applyContext.warnings.push('Ignoring local source map at "' + uri + '" as resource is missing.');
        return null;
      }
      if (!isAllowed) {
        applyContext.warnings.push('Cannot fetch "' + uri + '" as resource is not allowed.');
        return null;
      }
      if (!fs2.statSync(uri).size) {
        applyContext.warnings.push('Cannot fetch "' + uri + '" as resource is empty.');
        return null;
      }
      sourceMap = fs2.readFileSync(uri, "utf-8");
      return JSON.parse(sourceMap);
    }
    function applySourceMapRecursively(tokens, inputSourceMapTracker) {
      var token;
      var i, l;
      for (i = 0, l = tokens.length; i < l; i++) {
        token = tokens[i];
        switch (token[0]) {
          case Token.AT_RULE:
            applySourceMapTo(token, inputSourceMapTracker);
            break;
          case Token.AT_RULE_BLOCK:
            applySourceMapRecursively(token[1], inputSourceMapTracker);
            applySourceMapRecursively(token[2], inputSourceMapTracker);
            break;
          case Token.AT_RULE_BLOCK_SCOPE:
            applySourceMapTo(token, inputSourceMapTracker);
            break;
          case Token.NESTED_BLOCK:
            applySourceMapRecursively(token[1], inputSourceMapTracker);
            applySourceMapRecursively(token[2], inputSourceMapTracker);
            break;
          case Token.NESTED_BLOCK_SCOPE:
            applySourceMapTo(token, inputSourceMapTracker);
            break;
          case Token.COMMENT:
            applySourceMapTo(token, inputSourceMapTracker);
            break;
          case Token.PROPERTY:
            applySourceMapRecursively(token, inputSourceMapTracker);
            break;
          case Token.PROPERTY_BLOCK:
            applySourceMapRecursively(token[1], inputSourceMapTracker);
            break;
          case Token.PROPERTY_NAME:
            applySourceMapTo(token, inputSourceMapTracker);
            break;
          case Token.PROPERTY_VALUE:
            applySourceMapTo(token, inputSourceMapTracker);
            break;
          case Token.RULE:
            applySourceMapRecursively(token[1], inputSourceMapTracker);
            applySourceMapRecursively(token[2], inputSourceMapTracker);
            break;
          case Token.RULE_SCOPE:
            applySourceMapTo(token, inputSourceMapTracker);
        }
      }
      return tokens;
    }
    function applySourceMapTo(token, inputSourceMapTracker) {
      var value = token[1];
      var metadata = token[2];
      var newMetadata = [];
      var i, l;
      for (i = 0, l = metadata.length; i < l; i++) {
        newMetadata.push(inputSourceMapTracker.originalPositionFor(metadata[i], value.length));
      }
      token[2] = newMetadata;
    }
    module2.exports = applySourceMaps;
  }
});

// node_modules/clean-css/lib/reader/extract-import-url-and-media.js
var require_extract_import_url_and_media = __commonJS({
  "node_modules/clean-css/lib/reader/extract-import-url-and-media.js"(exports, module2) {
    var split = require_split();
    var BRACE_PREFIX = /^\(/;
    var BRACE_SUFFIX = /\)$/;
    var IMPORT_PREFIX_PATTERN = /^@import/i;
    var QUOTE_PREFIX_PATTERN = /['"]\s{0,31}/;
    var QUOTE_SUFFIX_PATTERN = /\s{0,31}['"]/;
    var URL_PREFIX_PATTERN = /^url\(\s{0,31}/i;
    var URL_SUFFIX_PATTERN = /\s{0,31}\)/i;
    function extractImportUrlAndMedia(atRuleValue) {
      var uri;
      var mediaQuery;
      var normalized;
      var parts;
      normalized = atRuleValue.replace(IMPORT_PREFIX_PATTERN, "").trim().replace(URL_PREFIX_PATTERN, "(").replace(URL_SUFFIX_PATTERN, ") ").replace(QUOTE_PREFIX_PATTERN, "").replace(QUOTE_SUFFIX_PATTERN, "");
      parts = split(normalized, " ");
      uri = parts[0].replace(BRACE_PREFIX, "").replace(BRACE_SUFFIX, "");
      mediaQuery = parts.slice(1).join(" ");
      return [uri, mediaQuery];
    }
    module2.exports = extractImportUrlAndMedia;
  }
});

// node_modules/clean-css/lib/reader/load-original-sources.js
var require_load_original_sources = __commonJS({
  "node_modules/clean-css/lib/reader/load-original-sources.js"(exports, module2) {
    var fs2 = require("fs");
    var path = require("path");
    var isAllowedResource = require_is_allowed_resource();
    var hasProtocol = require_has_protocol();
    var isRemoteResource = require_is_remote_resource();
    function loadOriginalSources(context, callback) {
      var loadContext = {
        callback,
        fetch: context.options.fetch,
        index: 0,
        inline: context.options.inline,
        inlineRequest: context.options.inlineRequest,
        inlineTimeout: context.options.inlineTimeout,
        localOnly: context.localOnly,
        rebaseTo: context.options.rebaseTo,
        sourcesContent: context.sourcesContent,
        uriToSource: uriToSourceMapping(context.inputSourceMapTracker.all()),
        warnings: context.warnings
      };
      return context.options.sourceMap && context.options.sourceMapInlineSources ? doLoadOriginalSources(loadContext) : callback();
    }
    function uriToSourceMapping(allSourceMapConsumers) {
      var mapping = {};
      var consumer;
      var uri;
      var source;
      var i, l;
      for (source in allSourceMapConsumers) {
        consumer = allSourceMapConsumers[source];
        for (i = 0, l = consumer.sources.length; i < l; i++) {
          uri = consumer.sources[i];
          source = consumer.sourceContentFor(uri, true);
          mapping[uri] = source;
        }
      }
      return mapping;
    }
    function doLoadOriginalSources(loadContext) {
      var uris = Object.keys(loadContext.uriToSource);
      var uri;
      var source;
      var total;
      for (total = uris.length; loadContext.index < total; loadContext.index++) {
        uri = uris[loadContext.index];
        source = loadContext.uriToSource[uri];
        if (source) {
          loadContext.sourcesContent[uri] = source;
        } else {
          return loadOriginalSource(uri, loadContext);
        }
      }
      return loadContext.callback();
    }
    function loadOriginalSource(uri, loadContext) {
      var content;
      if (isRemoteResource(uri)) {
        return loadOriginalSourceFromRemoteUri(uri, loadContext, function(content2) {
          loadContext.index++;
          loadContext.sourcesContent[uri] = content2;
          return doLoadOriginalSources(loadContext);
        });
      }
      content = loadOriginalSourceFromLocalUri(uri, loadContext);
      loadContext.index++;
      loadContext.sourcesContent[uri] = content;
      return doLoadOriginalSources(loadContext);
    }
    function loadOriginalSourceFromRemoteUri(uri, loadContext, whenLoaded) {
      var isAllowed = isAllowedResource(uri, true, loadContext.inline);
      var isRuntimeResource = !hasProtocol(uri);
      if (loadContext.localOnly) {
        loadContext.warnings.push('Cannot fetch remote resource from "' + uri + '" as no callback given.');
        return whenLoaded(null);
      }
      if (isRuntimeResource) {
        loadContext.warnings.push('Cannot fetch "' + uri + '" as no protocol given.');
        return whenLoaded(null);
      }
      if (!isAllowed) {
        loadContext.warnings.push('Cannot fetch "' + uri + '" as resource is not allowed.');
        return whenLoaded(null);
      }
      loadContext.fetch(uri, loadContext.inlineRequest, loadContext.inlineTimeout, function(error, content) {
        if (error) {
          loadContext.warnings.push('Missing original source at "' + uri + '" - ' + error);
        }
        whenLoaded(content);
      });
    }
    function loadOriginalSourceFromLocalUri(relativeUri, loadContext) {
      var isAllowed = isAllowedResource(relativeUri, false, loadContext.inline);
      var absoluteUri = path.resolve(loadContext.rebaseTo, relativeUri);
      if (!fs2.existsSync(absoluteUri) || !fs2.statSync(absoluteUri).isFile()) {
        loadContext.warnings.push('Ignoring local source map at "' + absoluteUri + '" as resource is missing.');
        return null;
      }
      if (!isAllowed) {
        loadContext.warnings.push('Cannot fetch "' + absoluteUri + '" as resource is not allowed.');
        return null;
      }
      var result = fs2.readFileSync(absoluteUri, "utf8");
      if (result.charCodeAt(0) === 65279) {
        result = result.substring(1);
      }
      return result;
    }
    module2.exports = loadOriginalSources;
  }
});

// node_modules/clean-css/lib/reader/normalize-path.js
var require_normalize_path = __commonJS({
  "node_modules/clean-css/lib/reader/normalize-path.js"(exports, module2) {
    var UNIX_SEPARATOR = "/";
    var WINDOWS_SEPARATOR_PATTERN = /\\/g;
    function normalizePath(path) {
      return path.replace(WINDOWS_SEPARATOR_PATTERN, UNIX_SEPARATOR);
    }
    module2.exports = normalizePath;
  }
});

// node_modules/clean-css/lib/reader/restore-import.js
var require_restore_import = __commonJS({
  "node_modules/clean-css/lib/reader/restore-import.js"(exports, module2) {
    function restoreImport(uri, mediaQuery) {
      return ("@import " + uri + " " + mediaQuery).trim();
    }
    module2.exports = restoreImport;
  }
});

// node_modules/clean-css/lib/reader/rewrite-url.js
var require_rewrite_url = __commonJS({
  "node_modules/clean-css/lib/reader/rewrite-url.js"(exports, module2) {
    var path = require("path");
    var url = require("url");
    var isDataUriResource = require_is_data_uri_resource();
    var DOUBLE_QUOTE = '"';
    var SINGLE_QUOTE = "'";
    var URL_PREFIX = "url(";
    var URL_SUFFIX = ")";
    var PROTOCOL_LESS_PREFIX_PATTERN = /^[^\w\d]*\/\//;
    var QUOTE_PREFIX_PATTERN = /^["']/;
    var QUOTE_SUFFIX_PATTERN = /["']$/;
    var ROUND_BRACKETS_PATTERN = /[()]/;
    var URL_PREFIX_PATTERN = /^url\(/i;
    var URL_SUFFIX_PATTERN = /\)$/;
    var WHITESPACE_PATTERN = /\s/;
    var isWindows = process.platform == "win32";
    function rebase(uri, rebaseConfig) {
      if (!rebaseConfig) {
        return uri;
      }
      if (isAbsolute(uri) && !isRemote(rebaseConfig.toBase)) {
        return uri;
      }
      if (isRemote(uri) || isSVGMarker(uri) || isInternal(uri) || isDataUriResource(uri)) {
        return uri;
      }
      if (isRemote(rebaseConfig.toBase)) {
        return url.resolve(rebaseConfig.toBase, uri);
      }
      return rebaseConfig.absolute ? normalize(absolute(uri, rebaseConfig)) : normalize(relative(uri, rebaseConfig));
    }
    function isAbsolute(uri) {
      return path.isAbsolute(uri);
    }
    function isSVGMarker(uri) {
      return uri[0] == "#";
    }
    function isInternal(uri) {
      return /^\w+:\w+/.test(uri);
    }
    function isRemote(uri) {
      return /^[^:]+?:\/\//.test(uri) || PROTOCOL_LESS_PREFIX_PATTERN.test(uri);
    }
    function absolute(uri, rebaseConfig) {
      return path.resolve(path.join(rebaseConfig.fromBase || "", uri)).replace(rebaseConfig.toBase, "");
    }
    function relative(uri, rebaseConfig) {
      return path.relative(rebaseConfig.toBase, path.join(rebaseConfig.fromBase || "", uri));
    }
    function normalize(uri) {
      return isWindows ? uri.replace(/\\/g, "/") : uri;
    }
    function quoteFor(unquotedUrl) {
      if (unquotedUrl.indexOf(SINGLE_QUOTE) > -1) {
        return DOUBLE_QUOTE;
      }
      if (unquotedUrl.indexOf(DOUBLE_QUOTE) > -1) {
        return SINGLE_QUOTE;
      }
      if (hasWhitespace(unquotedUrl) || hasRoundBrackets(unquotedUrl)) {
        return SINGLE_QUOTE;
      }
      return "";
    }
    function hasWhitespace(url2) {
      return WHITESPACE_PATTERN.test(url2);
    }
    function hasRoundBrackets(url2) {
      return ROUND_BRACKETS_PATTERN.test(url2);
    }
    function rewriteUrl(originalUrl, rebaseConfig, pathOnly) {
      var strippedUrl = originalUrl.replace(URL_PREFIX_PATTERN, "").replace(URL_SUFFIX_PATTERN, "").trim();
      var unquotedUrl = strippedUrl.replace(QUOTE_PREFIX_PATTERN, "").replace(QUOTE_SUFFIX_PATTERN, "").trim();
      var quote = strippedUrl[0] == SINGLE_QUOTE || strippedUrl[0] == DOUBLE_QUOTE ? strippedUrl[0] : quoteFor(unquotedUrl);
      return pathOnly ? rebase(unquotedUrl, rebaseConfig) : URL_PREFIX + quote + rebase(unquotedUrl, rebaseConfig) + quote + URL_SUFFIX;
    }
    module2.exports = rewriteUrl;
  }
});

// node_modules/clean-css/lib/utils/is-import.js
var require_is_import = __commonJS({
  "node_modules/clean-css/lib/utils/is-import.js"(exports, module2) {
    var IMPORT_PREFIX_PATTERN = /^@import/i;
    function isImport(value) {
      return IMPORT_PREFIX_PATTERN.test(value);
    }
    module2.exports = isImport;
  }
});

// node_modules/clean-css/lib/reader/rebase.js
var require_rebase2 = __commonJS({
  "node_modules/clean-css/lib/reader/rebase.js"(exports, module2) {
    var extractImportUrlAndMedia = require_extract_import_url_and_media();
    var restoreImport = require_restore_import();
    var rewriteUrl = require_rewrite_url();
    var Token = require_token();
    var isImport = require_is_import();
    var SOURCE_MAP_COMMENT_PATTERN = /^\/\*# sourceMappingURL=(\S+) \*\/$/;
    function rebase(tokens, rebaseAll, validator, rebaseConfig) {
      return rebaseAll ? rebaseEverything(tokens, validator, rebaseConfig) : rebaseAtRules(tokens, validator, rebaseConfig);
    }
    function rebaseEverything(tokens, validator, rebaseConfig) {
      var token;
      var i, l;
      for (i = 0, l = tokens.length; i < l; i++) {
        token = tokens[i];
        switch (token[0]) {
          case Token.AT_RULE:
            rebaseAtRule(token, validator, rebaseConfig);
            break;
          case Token.AT_RULE_BLOCK:
            rebaseProperties(token[2], validator, rebaseConfig);
            break;
          case Token.COMMENT:
            rebaseSourceMapComment(token, rebaseConfig);
            break;
          case Token.NESTED_BLOCK:
            rebaseEverything(token[2], validator, rebaseConfig);
            break;
          case Token.RULE:
            rebaseProperties(token[2], validator, rebaseConfig);
            break;
        }
      }
      return tokens;
    }
    function rebaseAtRules(tokens, validator, rebaseConfig) {
      var token;
      var i, l;
      for (i = 0, l = tokens.length; i < l; i++) {
        token = tokens[i];
        switch (token[0]) {
          case Token.AT_RULE:
            rebaseAtRule(token, validator, rebaseConfig);
            break;
        }
      }
      return tokens;
    }
    function rebaseAtRule(token, validator, rebaseConfig) {
      if (!isImport(token[1])) {
        return;
      }
      var uriAndMediaQuery = extractImportUrlAndMedia(token[1]);
      var newUrl = rewriteUrl(uriAndMediaQuery[0], rebaseConfig);
      var mediaQuery = uriAndMediaQuery[1];
      token[1] = restoreImport(newUrl, mediaQuery);
    }
    function rebaseSourceMapComment(token, rebaseConfig) {
      var matches = SOURCE_MAP_COMMENT_PATTERN.exec(token[1]);
      if (matches && matches[1].indexOf("data:") === -1) {
        token[1] = token[1].replace(matches[1], rewriteUrl(matches[1], rebaseConfig, true));
      }
    }
    function rebaseProperties(properties, validator, rebaseConfig) {
      var property;
      var value;
      var i, l;
      var j, m;
      for (i = 0, l = properties.length; i < l; i++) {
        property = properties[i];
        for (j = 2, m = property.length; j < m; j++) {
          value = property[j][1];
          if (validator.isUrl(value)) {
            property[j][1] = rewriteUrl(value, rebaseConfig);
          }
        }
      }
    }
    module2.exports = rebase;
  }
});

// node_modules/clean-css/lib/tokenizer/tokenize.js
var require_tokenize = __commonJS({
  "node_modules/clean-css/lib/tokenizer/tokenize.js"(exports, module2) {
    var Marker = require_marker();
    var Token = require_token();
    var formatPosition = require_format_position();
    var Level = {
      BLOCK: "block",
      COMMENT: "comment",
      DOUBLE_QUOTE: "double-quote",
      RULE: "rule",
      SINGLE_QUOTE: "single-quote"
    };
    var AT_RULES = [
      "@charset",
      "@import"
    ];
    var BLOCK_RULES = [
      "@-moz-document",
      "@document",
      "@-moz-keyframes",
      "@-ms-keyframes",
      "@-o-keyframes",
      "@-webkit-keyframes",
      "@keyframes",
      "@media",
      "@supports",
      "@container",
      "@layer"
    ];
    var IGNORE_END_COMMENT_PATTERN = /\/\* clean-css ignore:end \*\/$/;
    var IGNORE_START_COMMENT_PATTERN = /^\/\* clean-css ignore:start \*\//;
    var PAGE_MARGIN_BOXES = [
      "@bottom-center",
      "@bottom-left",
      "@bottom-left-corner",
      "@bottom-right",
      "@bottom-right-corner",
      "@left-bottom",
      "@left-middle",
      "@left-top",
      "@right-bottom",
      "@right-middle",
      "@right-top",
      "@top-center",
      "@top-left",
      "@top-left-corner",
      "@top-right",
      "@top-right-corner"
    ];
    var EXTRA_PAGE_BOXES = [
      "@footnote",
      "@footnotes",
      "@left",
      "@page-float-bottom",
      "@page-float-top",
      "@right"
    ];
    var REPEAT_PATTERN = /^\[\s{0,31}\d+\s{0,31}\]$/;
    var TAIL_BROKEN_VALUE_PATTERN = /([^}])\}*$/;
    var RULE_WORD_SEPARATOR_PATTERN = /[\s(]/;
    function tokenize(source, externalContext) {
      var internalContext = {
        level: Level.BLOCK,
        position: {
          source: externalContext.source || void 0,
          line: 1,
          column: 0,
          index: 0
        }
      };
      return intoTokens(source, externalContext, internalContext, false);
    }
    function intoTokens(source, externalContext, internalContext, isNested) {
      var allTokens = [];
      var newTokens = allTokens;
      var lastToken;
      var ruleToken;
      var ruleTokens = [];
      var propertyToken;
      var metadata;
      var metadatas = [];
      var level = internalContext.level;
      var levels = [];
      var buffer = [];
      var buffers = [];
      var isBufferEmpty = true;
      var serializedBuffer;
      var serializedBufferPart;
      var roundBracketLevel = 0;
      var isQuoted;
      var isSpace;
      var isNewLineNix;
      var isNewLineWin;
      var isCarriageReturn;
      var isCommentStart;
      var wasCommentStart = false;
      var isCommentEnd;
      var wasCommentEnd = false;
      var isCommentEndMarker;
      var isEscaped;
      var wasEscaped = false;
      var characterWithNoSpecialMeaning;
      var isPreviousDash = false;
      var isVariable = false;
      var isRaw = false;
      var seekingValue = false;
      var seekingPropertyBlockClosing = false;
      var position = internalContext.position;
      var lastCommentStartAt;
      for (; position.index < source.length; position.index++) {
        var character = source[position.index];
        isQuoted = level == Level.SINGLE_QUOTE || level == Level.DOUBLE_QUOTE;
        isSpace = character == Marker.SPACE || character == Marker.TAB;
        isNewLineNix = character == Marker.NEW_LINE_NIX;
        isNewLineWin = character == Marker.NEW_LINE_NIX && source[position.index - 1] == Marker.CARRIAGE_RETURN;
        isCarriageReturn = character == Marker.CARRIAGE_RETURN && source[position.index + 1] && source[position.index + 1] != Marker.NEW_LINE_NIX;
        isCommentStart = !wasCommentEnd && level != Level.COMMENT && !isQuoted && character == Marker.ASTERISK && source[position.index - 1] == Marker.FORWARD_SLASH;
        isCommentEndMarker = !wasCommentStart && !isQuoted && character == Marker.FORWARD_SLASH && source[position.index - 1] == Marker.ASTERISK;
        isCommentEnd = level == Level.COMMENT && isCommentEndMarker;
        characterWithNoSpecialMeaning = !isSpace && !isCarriageReturn && (character >= "A" && character <= "Z" || character >= "a" && character <= "z" || character >= "0" && character <= "9" || character == "-");
        isVariable = isVariable || level != Level.COMMENT && !seekingValue && isPreviousDash && character === "-" && buffer.length === 1;
        isPreviousDash = character === "-";
        roundBracketLevel = Math.max(roundBracketLevel, 0);
        metadata = isBufferEmpty ? [position.line, position.column, position.source] : metadata;
        if (isEscaped) {
          buffer.push(character);
          isBufferEmpty = false;
        } else if (characterWithNoSpecialMeaning) {
          buffer.push(character);
          isBufferEmpty = false;
        } else if ((isSpace || isNewLineNix && !isNewLineWin) && (isQuoted || level == Level.COMMENT)) {
          buffer.push(character);
          isBufferEmpty = false;
        } else if ((isSpace || isNewLineNix && !isNewLineWin) && isBufferEmpty) {
        } else if (!isCommentEnd && level == Level.COMMENT) {
          buffer.push(character);
          isBufferEmpty = false;
        } else if (!isCommentStart && !isCommentEnd && isRaw) {
          buffer.push(character);
          isBufferEmpty = false;
        } else if (isCommentStart && isVariable && (level == Level.BLOCK || level == Level.RULE) && buffer.length > 1) {
          buffer.push(character);
          isBufferEmpty = false;
          levels.push(level);
          level = Level.COMMENT;
        } else if (isCommentStart && (level == Level.BLOCK || level == Level.RULE) && buffer.length > 1) {
          metadatas.push(metadata);
          buffer.push(character);
          buffers.push(buffer.slice(0, -2));
          isBufferEmpty = false;
          buffer = buffer.slice(-2);
          metadata = [position.line, position.column - 1, position.source];
          levels.push(level);
          level = Level.COMMENT;
        } else if (isCommentStart) {
          levels.push(level);
          level = Level.COMMENT;
          buffer.push(character);
          isBufferEmpty = false;
        } else if (isCommentEnd && isVariable) {
          buffer.push(character);
          level = levels.pop();
        } else if (isCommentEnd && isIgnoreStartComment(buffer)) {
          serializedBuffer = buffer.join("").trim() + character;
          lastToken = [
            Token.COMMENT,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ];
          newTokens.push(lastToken);
          isRaw = true;
          metadata = metadatas.pop() || null;
          buffer = buffers.pop() || [];
          isBufferEmpty = buffer.length === 0;
        } else if (isCommentEnd && isIgnoreEndComment(buffer)) {
          serializedBuffer = buffer.join("") + character;
          lastCommentStartAt = serializedBuffer.lastIndexOf(Marker.FORWARD_SLASH + Marker.ASTERISK);
          serializedBufferPart = serializedBuffer.substring(0, lastCommentStartAt);
          lastToken = [
            Token.RAW,
            serializedBufferPart,
            [originalMetadata(metadata, serializedBufferPart, externalContext)]
          ];
          newTokens.push(lastToken);
          serializedBufferPart = serializedBuffer.substring(lastCommentStartAt);
          metadata = [position.line, position.column - serializedBufferPart.length + 1, position.source];
          lastToken = [
            Token.COMMENT,
            serializedBufferPart,
            [originalMetadata(metadata, serializedBufferPart, externalContext)]
          ];
          newTokens.push(lastToken);
          isRaw = false;
          level = levels.pop();
          metadata = metadatas.pop() || null;
          buffer = buffers.pop() || [];
          isBufferEmpty = buffer.length === 0;
        } else if (isCommentEnd) {
          serializedBuffer = buffer.join("").trim() + character;
          lastToken = [
            Token.COMMENT,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ];
          newTokens.push(lastToken);
          level = levels.pop();
          metadata = metadatas.pop() || null;
          buffer = buffers.pop() || [];
          isBufferEmpty = buffer.length === 0;
        } else if (isCommentEndMarker && source[position.index + 1] != Marker.ASTERISK) {
          externalContext.warnings.push("Unexpected '*/' at " + formatPosition([position.line, position.column, position.source]) + ".");
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.SINGLE_QUOTE && !isQuoted) {
          levels.push(level);
          level = Level.SINGLE_QUOTE;
          buffer.push(character);
          isBufferEmpty = false;
        } else if (character == Marker.SINGLE_QUOTE && level == Level.SINGLE_QUOTE) {
          level = levels.pop();
          buffer.push(character);
          isBufferEmpty = false;
        } else if (character == Marker.DOUBLE_QUOTE && !isQuoted) {
          levels.push(level);
          level = Level.DOUBLE_QUOTE;
          buffer.push(character);
          isBufferEmpty = false;
        } else if (character == Marker.DOUBLE_QUOTE && level == Level.DOUBLE_QUOTE) {
          level = levels.pop();
          buffer.push(character);
          isBufferEmpty = false;
        } else if (character != Marker.CLOSE_ROUND_BRACKET && character != Marker.OPEN_ROUND_BRACKET && level != Level.COMMENT && !isQuoted && roundBracketLevel > 0) {
          buffer.push(character);
          isBufferEmpty = false;
        } else if (character == Marker.OPEN_ROUND_BRACKET && !isQuoted && level != Level.COMMENT && !seekingValue) {
          buffer.push(character);
          isBufferEmpty = false;
          roundBracketLevel++;
        } else if (character == Marker.CLOSE_ROUND_BRACKET && !isQuoted && level != Level.COMMENT && !seekingValue) {
          buffer.push(character);
          isBufferEmpty = false;
          roundBracketLevel--;
        } else if (character == Marker.SEMICOLON && level == Level.BLOCK && buffer[0] == Marker.AT) {
          serializedBuffer = buffer.join("").trim();
          allTokens.push([
            Token.AT_RULE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.COMMA && level == Level.BLOCK && ruleToken) {
          serializedBuffer = buffer.join("").trim();
          ruleToken[1].push([
            tokenScopeFrom(ruleToken[0]),
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext, ruleToken[1].length)]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.COMMA && level == Level.BLOCK && tokenTypeFrom(buffer) == Token.AT_RULE) {
          buffer.push(character);
          isBufferEmpty = false;
        } else if (character == Marker.COMMA && level == Level.BLOCK) {
          ruleToken = [tokenTypeFrom(buffer), [], []];
          serializedBuffer = buffer.join("").trim();
          ruleToken[1].push([
            tokenScopeFrom(ruleToken[0]),
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext, 0)]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.BLOCK && ruleToken && ruleToken[0] == Token.NESTED_BLOCK) {
          serializedBuffer = buffer.join("").trim();
          ruleToken[1].push([
            Token.NESTED_BLOCK_SCOPE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          allTokens.push(ruleToken);
          levels.push(level);
          position.column++;
          position.index++;
          buffer = [];
          isBufferEmpty = true;
          ruleToken[2] = intoTokens(source, externalContext, internalContext, true);
          ruleToken = null;
        } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.BLOCK && tokenTypeFrom(buffer) == Token.NESTED_BLOCK) {
          serializedBuffer = buffer.join("").trim();
          ruleToken = ruleToken || [Token.NESTED_BLOCK, [], []];
          ruleToken[1].push([
            Token.NESTED_BLOCK_SCOPE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          allTokens.push(ruleToken);
          levels.push(level);
          position.column++;
          position.index++;
          buffer = [];
          isBufferEmpty = true;
          isVariable = false;
          ruleToken[2] = intoTokens(source, externalContext, internalContext, true);
          ruleToken = null;
        } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.BLOCK) {
          serializedBuffer = buffer.join("").trim();
          ruleToken = ruleToken || [tokenTypeFrom(buffer), [], []];
          ruleToken[1].push([
            tokenScopeFrom(ruleToken[0]),
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext, ruleToken[1].length)]
          ]);
          newTokens = ruleToken[2];
          allTokens.push(ruleToken);
          levels.push(level);
          level = Level.RULE;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.RULE && seekingValue) {
          ruleTokens.push(ruleToken);
          ruleToken = [Token.PROPERTY_BLOCK, []];
          propertyToken.push(ruleToken);
          newTokens = ruleToken[1];
          levels.push(level);
          level = Level.RULE;
          seekingValue = false;
        } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.RULE && isPageMarginBox(buffer)) {
          serializedBuffer = buffer.join("").trim();
          ruleTokens.push(ruleToken);
          ruleToken = [Token.AT_RULE_BLOCK, [], []];
          ruleToken[1].push([
            Token.AT_RULE_BLOCK_SCOPE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          newTokens.push(ruleToken);
          newTokens = ruleToken[2];
          levels.push(level);
          level = Level.RULE;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.COLON && level == Level.RULE && !seekingValue) {
          serializedBuffer = buffer.join("").trim();
          propertyToken = [
            Token.PROPERTY,
            [
              Token.PROPERTY_NAME,
              serializedBuffer,
              [originalMetadata(metadata, serializedBuffer, externalContext)]
            ]
          ];
          newTokens.push(propertyToken);
          seekingValue = true;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && ruleTokens.length > 0 && !isBufferEmpty && buffer[0] == Marker.AT) {
          serializedBuffer = buffer.join("").trim();
          ruleToken[1].push([
            Token.AT_RULE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && !isBufferEmpty) {
          serializedBuffer = buffer.join("").trim();
          propertyToken.push([
            Token.PROPERTY_VALUE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          propertyToken = null;
          seekingValue = false;
          buffer = [];
          isBufferEmpty = true;
          isVariable = false;
        } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && isBufferEmpty && isVariable && !propertyToken[2]) {
          propertyToken.push([Token.PROPERTY_VALUE, " ", [originalMetadata(metadata, " ", externalContext)]]);
          isVariable = false;
          propertyToken = null;
          seekingValue = false;
        } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && isBufferEmpty) {
          propertyToken = null;
          seekingValue = false;
        } else if (character == Marker.SEMICOLON && level == Level.RULE && !isBufferEmpty && buffer[0] == Marker.AT) {
          serializedBuffer = buffer.join("");
          newTokens.push([
            Token.AT_RULE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          seekingValue = false;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.SEMICOLON && level == Level.RULE && seekingPropertyBlockClosing) {
          seekingPropertyBlockClosing = false;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.SEMICOLON && level == Level.RULE && isBufferEmpty) {
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && seekingValue && !isBufferEmpty && ruleTokens.length > 0) {
          serializedBuffer = buffer.join("");
          propertyToken.push([
            Token.PROPERTY_VALUE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          propertyToken = null;
          ruleToken = ruleTokens.pop();
          newTokens = ruleToken[2];
          level = levels.pop();
          seekingValue = false;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && !isBufferEmpty && buffer[0] == Marker.AT && ruleTokens.length > 0) {
          serializedBuffer = buffer.join("");
          ruleToken[1].push([
            Token.AT_RULE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          propertyToken = null;
          ruleToken = ruleTokens.pop();
          newTokens = ruleToken[2];
          level = levels.pop();
          seekingValue = false;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && ruleTokens.length > 0) {
          propertyToken = null;
          ruleToken = ruleTokens.pop();
          newTokens = ruleToken[2];
          level = levels.pop();
          seekingValue = false;
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && !isBufferEmpty) {
          serializedBuffer = buffer.join("");
          propertyToken.push([
            Token.PROPERTY_VALUE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          propertyToken = null;
          ruleToken = ruleTokens.pop();
          newTokens = allTokens;
          level = levels.pop();
          seekingValue = false;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && !isBufferEmpty && buffer[0] == Marker.AT) {
          propertyToken = null;
          ruleToken = null;
          serializedBuffer = buffer.join("").trim();
          newTokens.push([
            Token.AT_RULE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          newTokens = allTokens;
          level = levels.pop();
          seekingValue = false;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && levels[levels.length - 1] == Level.RULE) {
          propertyToken = null;
          ruleToken = ruleTokens.pop();
          newTokens = ruleToken[2];
          level = levels.pop();
          seekingValue = false;
          seekingPropertyBlockClosing = true;
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && isVariable && propertyToken && !propertyToken[2]) {
          propertyToken.push([Token.PROPERTY_VALUE, " ", [originalMetadata(metadata, " ", externalContext)]]);
          isVariable = false;
          propertyToken = null;
          ruleToken = null;
          newTokens = allTokens;
          level = levels.pop();
          seekingValue = false;
          isVariable = false;
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE) {
          propertyToken = null;
          ruleToken = null;
          newTokens = allTokens;
          level = levels.pop();
          seekingValue = false;
          isVariable = false;
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.BLOCK && !isNested && position.index <= source.length - 1) {
          externalContext.warnings.push("Unexpected '}' at " + formatPosition([position.line, position.column, position.source]) + ".");
          buffer.push(character);
          isBufferEmpty = false;
        } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.BLOCK) {
          break;
        } else if (character == Marker.OPEN_ROUND_BRACKET && level == Level.RULE && seekingValue) {
          buffer.push(character);
          isBufferEmpty = false;
          roundBracketLevel++;
        } else if (character == Marker.CLOSE_ROUND_BRACKET && level == Level.RULE && seekingValue && roundBracketLevel == 1) {
          buffer.push(character);
          isBufferEmpty = false;
          serializedBuffer = buffer.join("").trim();
          propertyToken.push([
            Token.PROPERTY_VALUE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          roundBracketLevel--;
          buffer = [];
          isBufferEmpty = true;
          isVariable = false;
        } else if (character == Marker.CLOSE_ROUND_BRACKET && level == Level.RULE && seekingValue) {
          buffer.push(character);
          isBufferEmpty = false;
          isVariable = false;
          roundBracketLevel--;
        } else if (character == Marker.FORWARD_SLASH && source[position.index + 1] != Marker.ASTERISK && level == Level.RULE && seekingValue && !isBufferEmpty) {
          serializedBuffer = buffer.join("").trim();
          propertyToken.push([
            Token.PROPERTY_VALUE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          propertyToken.push([
            Token.PROPERTY_VALUE,
            character,
            [[position.line, position.column, position.source]]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.FORWARD_SLASH && source[position.index + 1] != Marker.ASTERISK && level == Level.RULE && seekingValue) {
          propertyToken.push([
            Token.PROPERTY_VALUE,
            character,
            [[position.line, position.column, position.source]]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.COMMA && level == Level.RULE && seekingValue && !isBufferEmpty) {
          serializedBuffer = buffer.join("").trim();
          propertyToken.push([
            Token.PROPERTY_VALUE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          propertyToken.push([
            Token.PROPERTY_VALUE,
            character,
            [[position.line, position.column, position.source]]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.COMMA && level == Level.RULE && seekingValue) {
          propertyToken.push([
            Token.PROPERTY_VALUE,
            character,
            [[position.line, position.column, position.source]]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (character == Marker.CLOSE_SQUARE_BRACKET && propertyToken && propertyToken.length > 1 && !isBufferEmpty && isRepeatToken(buffer)) {
          buffer.push(character);
          serializedBuffer = buffer.join("").trim();
          propertyToken[propertyToken.length - 1][1] += serializedBuffer;
          buffer = [];
          isBufferEmpty = true;
        } else if ((isSpace || isNewLineNix && !isNewLineWin) && level == Level.RULE && seekingValue && propertyToken && !isBufferEmpty) {
          serializedBuffer = buffer.join("").trim();
          propertyToken.push([
            Token.PROPERTY_VALUE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (isNewLineWin && level == Level.RULE && seekingValue && propertyToken && buffer.length > 1) {
          serializedBuffer = buffer.join("").trim();
          propertyToken.push([
            Token.PROPERTY_VALUE,
            serializedBuffer,
            [originalMetadata(metadata, serializedBuffer, externalContext)]
          ]);
          buffer = [];
          isBufferEmpty = true;
        } else if (isNewLineWin && level == Level.RULE && seekingValue) {
          buffer = [];
          isBufferEmpty = true;
        } else if (isNewLineWin && buffer.length == 1) {
          buffer.pop();
          isBufferEmpty = buffer.length === 0;
        } else if (!isBufferEmpty || !isSpace && !isNewLineNix && !isNewLineWin && !isCarriageReturn) {
          buffer.push(character);
          isBufferEmpty = false;
        }
        wasEscaped = isEscaped;
        isEscaped = !wasEscaped && character == Marker.BACK_SLASH;
        wasCommentStart = isCommentStart;
        wasCommentEnd = isCommentEnd;
        position.line = isNewLineWin || isNewLineNix || isCarriageReturn ? position.line + 1 : position.line;
        position.column = isNewLineWin || isNewLineNix || isCarriageReturn ? 0 : position.column + 1;
      }
      if (seekingValue) {
        externalContext.warnings.push("Missing '}' at " + formatPosition([position.line, position.column, position.source]) + ".");
      }
      if (seekingValue && buffer.length > 0) {
        serializedBuffer = buffer.join("").trimRight().replace(TAIL_BROKEN_VALUE_PATTERN, "$1").trimRight();
        propertyToken.push([
          Token.PROPERTY_VALUE,
          serializedBuffer,
          [originalMetadata(metadata, serializedBuffer, externalContext)]
        ]);
        buffer = [];
      }
      if (buffer.length > 0) {
        externalContext.warnings.push("Invalid character(s) '" + buffer.join("") + "' at " + formatPosition(metadata) + ". Ignoring.");
      }
      return allTokens;
    }
    function isIgnoreStartComment(buffer) {
      return IGNORE_START_COMMENT_PATTERN.test(buffer.join("") + Marker.FORWARD_SLASH);
    }
    function isIgnoreEndComment(buffer) {
      return IGNORE_END_COMMENT_PATTERN.test(buffer.join("") + Marker.FORWARD_SLASH);
    }
    function originalMetadata(metadata, value, externalContext, selectorFallbacks) {
      var source = metadata[2];
      return externalContext.inputSourceMapTracker.isTracking(source) ? externalContext.inputSourceMapTracker.originalPositionFor(metadata, value.length, selectorFallbacks) : metadata;
    }
    function tokenTypeFrom(buffer) {
      var isAtRule = buffer[0] == Marker.AT || buffer[0] == Marker.UNDERSCORE;
      var ruleWord = buffer.join("").split(RULE_WORD_SEPARATOR_PATTERN)[0];
      if (isAtRule && BLOCK_RULES.indexOf(ruleWord) > -1) {
        return Token.NESTED_BLOCK;
      }
      if (isAtRule && AT_RULES.indexOf(ruleWord) > -1) {
        return Token.AT_RULE;
      }
      if (isAtRule) {
        return Token.AT_RULE_BLOCK;
      }
      return Token.RULE;
    }
    function tokenScopeFrom(tokenType) {
      if (tokenType == Token.RULE) {
        return Token.RULE_SCOPE;
      }
      if (tokenType == Token.NESTED_BLOCK) {
        return Token.NESTED_BLOCK_SCOPE;
      }
      if (tokenType == Token.AT_RULE_BLOCK) {
        return Token.AT_RULE_BLOCK_SCOPE;
      }
    }
    function isPageMarginBox(buffer) {
      var serializedBuffer = buffer.join("").trim();
      return PAGE_MARGIN_BOXES.indexOf(serializedBuffer) > -1 || EXTRA_PAGE_BOXES.indexOf(serializedBuffer) > -1;
    }
    function isRepeatToken(buffer) {
      return REPEAT_PATTERN.test(buffer.join("") + Marker.CLOSE_SQUARE_BRACKET);
    }
    module2.exports = tokenize;
  }
});

// node_modules/clean-css/lib/reader/read-sources.js
var require_read_sources = __commonJS({
  "node_modules/clean-css/lib/reader/read-sources.js"(exports, module2) {
    var fs2 = require("fs");
    var path = require("path");
    var applySourceMaps = require_apply_source_maps();
    var extractImportUrlAndMedia = require_extract_import_url_and_media();
    var isAllowedResource = require_is_allowed_resource();
    var loadOriginalSources = require_load_original_sources();
    var normalizePath = require_normalize_path();
    var rebase = require_rebase2();
    var rebaseLocalMap = require_rebase_local_map();
    var rebaseRemoteMap = require_rebase_remote_map();
    var restoreImport = require_restore_import();
    var tokenize = require_tokenize();
    var Token = require_token();
    var Marker = require_marker();
    var hasProtocol = require_has_protocol();
    var isImport = require_is_import();
    var isRemoteResource = require_is_remote_resource();
    var UNKNOWN_URI = "uri:unknown";
    var FILE_RESOURCE_PROTOCOL = "file://";
    function readSources(input, context, callback) {
      return doReadSources(input, context, function(tokens) {
        return applySourceMaps(tokens, context, function() {
          return loadOriginalSources(context, function() {
            return callback(tokens);
          });
        });
      });
    }
    function doReadSources(input, context, callback) {
      if (typeof input == "string") {
        return fromString(input, context, callback);
      }
      if (Buffer.isBuffer(input)) {
        return fromString(input.toString(), context, callback);
      }
      if (Array.isArray(input)) {
        return fromArray(input, context, callback);
      }
      if (typeof input == "object") {
        return fromHash(input, context, callback);
      }
    }
    function fromString(input, context, callback) {
      context.source = void 0;
      context.sourcesContent[void 0] = input;
      context.stats.originalSize += input.length;
      return fromStyles(input, context, { inline: context.options.inline }, callback);
    }
    function fromArray(input, context, callback) {
      var inputAsImports = input.reduce(function(accumulator, uriOrHash) {
        if (typeof uriOrHash === "string") {
          return addStringSource(uriOrHash, accumulator);
        }
        return addHashSource(uriOrHash, context, accumulator);
      }, []);
      return fromStyles(inputAsImports.join(""), context, { inline: ["all"] }, callback);
    }
    function fromHash(input, context, callback) {
      var inputAsImports = addHashSource(input, context, []);
      return fromStyles(inputAsImports.join(""), context, { inline: ["all"] }, callback);
    }
    function addStringSource(input, imports) {
      imports.push(restoreAsImport(normalizeUri(input)));
      return imports;
    }
    function addHashSource(input, context, imports) {
      var uri;
      var normalizedUri;
      var source;
      for (uri in input) {
        source = input[uri];
        normalizedUri = normalizeUri(uri);
        imports.push(restoreAsImport(normalizedUri));
        context.sourcesContent[normalizedUri] = source.styles;
        if (source.sourceMap) {
          trackSourceMap(source.sourceMap, normalizedUri, context);
        }
      }
      return imports;
    }
    function normalizeUri(uri) {
      var currentPath = path.resolve("");
      var absoluteUri;
      var relativeToCurrentPath;
      var normalizedUri;
      if (isRemoteResource(uri)) {
        return uri;
      }
      absoluteUri = path.isAbsolute(uri) ? uri : path.resolve(uri);
      relativeToCurrentPath = path.relative(currentPath, absoluteUri);
      normalizedUri = normalizePath(relativeToCurrentPath);
      return normalizedUri;
    }
    function trackSourceMap(sourceMap, uri, context) {
      var parsedMap = typeof sourceMap == "string" ? JSON.parse(sourceMap) : sourceMap;
      var rebasedMap = isRemoteResource(uri) ? rebaseRemoteMap(parsedMap, uri) : rebaseLocalMap(parsedMap, uri || UNKNOWN_URI, context.options.rebaseTo);
      context.inputSourceMapTracker.track(uri, rebasedMap);
    }
    function restoreAsImport(uri) {
      return restoreImport("url(" + uri + ")", "") + Marker.SEMICOLON;
    }
    function fromStyles(styles, context, parentInlinerContext, callback) {
      var tokens;
      var rebaseConfig = {};
      if (!context.source) {
        rebaseConfig.fromBase = path.resolve("");
        rebaseConfig.toBase = context.options.rebaseTo;
      } else if (isRemoteResource(context.source)) {
        rebaseConfig.fromBase = context.source;
        rebaseConfig.toBase = context.source;
      } else if (path.isAbsolute(context.source)) {
        rebaseConfig.fromBase = path.dirname(context.source);
        rebaseConfig.toBase = context.options.rebaseTo;
      } else {
        rebaseConfig.fromBase = path.dirname(path.resolve(context.source));
        rebaseConfig.toBase = context.options.rebaseTo;
      }
      tokens = tokenize(styles, context);
      tokens = rebase(tokens, context.options.rebase, context.validator, rebaseConfig);
      return allowsAnyImports(parentInlinerContext.inline) ? inline(tokens, context, parentInlinerContext, callback) : callback(tokens);
    }
    function allowsAnyImports(inline2) {
      return !(inline2.length == 1 && inline2[0] == "none");
    }
    function inline(tokens, externalContext, parentInlinerContext, callback) {
      var inlinerContext = {
        afterContent: false,
        callback,
        errors: externalContext.errors,
        externalContext,
        fetch: externalContext.options.fetch,
        inlinedStylesheets: parentInlinerContext.inlinedStylesheets || externalContext.inlinedStylesheets,
        inline: parentInlinerContext.inline,
        inlineRequest: externalContext.options.inlineRequest,
        inlineTimeout: externalContext.options.inlineTimeout,
        isRemote: parentInlinerContext.isRemote || false,
        localOnly: externalContext.localOnly,
        outputTokens: [],
        rebaseTo: externalContext.options.rebaseTo,
        sourceTokens: tokens,
        warnings: externalContext.warnings
      };
      return doInlineImports(inlinerContext);
    }
    function doInlineImports(inlinerContext) {
      var token;
      var i, l;
      for (i = 0, l = inlinerContext.sourceTokens.length; i < l; i++) {
        token = inlinerContext.sourceTokens[i];
        if (token[0] == Token.AT_RULE && isImport(token[1])) {
          inlinerContext.sourceTokens.splice(0, i);
          return inlineStylesheet(token, inlinerContext);
        }
        if (token[0] == Token.AT_RULE || token[0] == Token.COMMENT) {
          inlinerContext.outputTokens.push(token);
        } else {
          inlinerContext.outputTokens.push(token);
          inlinerContext.afterContent = true;
        }
      }
      inlinerContext.sourceTokens = [];
      return inlinerContext.callback(inlinerContext.outputTokens);
    }
    function inlineStylesheet(token, inlinerContext) {
      var uriAndMediaQuery = extractImportUrlAndMedia(token[1]);
      var uri = uriAndMediaQuery[0];
      var mediaQuery = uriAndMediaQuery[1];
      var metadata = token[2];
      return isRemoteResource(uri) ? inlineRemoteStylesheet(uri, mediaQuery, metadata, inlinerContext) : inlineLocalStylesheet(uri, mediaQuery, metadata, inlinerContext);
    }
    function inlineRemoteStylesheet(uri, mediaQuery, metadata, inlinerContext) {
      var isAllowed = isAllowedResource(uri, true, inlinerContext.inline);
      var originalUri = uri;
      var isLoaded = uri in inlinerContext.externalContext.sourcesContent;
      var isRuntimeResource = !hasProtocol(uri);
      if (inlinerContext.inlinedStylesheets.indexOf(uri) > -1) {
        inlinerContext.warnings.push('Ignoring remote @import of "' + uri + '" as it has already been imported.');
        inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
        return doInlineImports(inlinerContext);
      }
      if (inlinerContext.localOnly && inlinerContext.afterContent) {
        inlinerContext.warnings.push('Ignoring remote @import of "' + uri + '" as no callback given and after other content.');
        inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
        return doInlineImports(inlinerContext);
      }
      if (isRuntimeResource) {
        inlinerContext.warnings.push('Skipping remote @import of "' + uri + '" as no protocol given.');
        inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
        inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
        return doInlineImports(inlinerContext);
      }
      if (inlinerContext.localOnly && !isLoaded) {
        inlinerContext.warnings.push('Skipping remote @import of "' + uri + '" as no callback given.');
        inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
        inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
        return doInlineImports(inlinerContext);
      }
      if (!isAllowed && inlinerContext.afterContent) {
        inlinerContext.warnings.push('Ignoring remote @import of "' + uri + '" as resource is not allowed and after other content.');
        inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
        return doInlineImports(inlinerContext);
      }
      if (!isAllowed) {
        inlinerContext.warnings.push('Skipping remote @import of "' + uri + '" as resource is not allowed.');
        inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
        inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
        return doInlineImports(inlinerContext);
      }
      inlinerContext.inlinedStylesheets.push(uri);
      function whenLoaded(error, importedStyles) {
        if (error) {
          inlinerContext.errors.push('Broken @import declaration of "' + uri + '" - ' + error);
          return process.nextTick(function() {
            inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
            inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
            doInlineImports(inlinerContext);
          });
        }
        inlinerContext.inline = inlinerContext.externalContext.options.inline;
        inlinerContext.isRemote = true;
        inlinerContext.externalContext.source = originalUri;
        inlinerContext.externalContext.sourcesContent[uri] = importedStyles;
        inlinerContext.externalContext.stats.originalSize += importedStyles.length;
        return fromStyles(importedStyles, inlinerContext.externalContext, inlinerContext, function(importedTokens) {
          importedTokens = wrapInMedia(importedTokens, mediaQuery, metadata);
          inlinerContext.outputTokens = inlinerContext.outputTokens.concat(importedTokens);
          inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
          return doInlineImports(inlinerContext);
        });
      }
      return isLoaded ? whenLoaded(null, inlinerContext.externalContext.sourcesContent[uri]) : inlinerContext.fetch(uri, inlinerContext.inlineRequest, inlinerContext.inlineTimeout, whenLoaded);
    }
    function inlineLocalStylesheet(uri, mediaQuery, metadata, inlinerContext) {
      var protocolLessUri = uri.replace(FILE_RESOURCE_PROTOCOL, "");
      var currentPath = path.resolve("");
      var absoluteUri = path.isAbsolute(protocolLessUri) ? path.resolve(currentPath, protocolLessUri[0] == "/" ? protocolLessUri.substring(1) : protocolLessUri) : path.resolve(inlinerContext.rebaseTo, protocolLessUri);
      var relativeToCurrentPath = path.relative(currentPath, absoluteUri);
      var importedStyles;
      var isAllowed = isAllowedResource(protocolLessUri, false, inlinerContext.inline);
      var normalizedPath = normalizePath(relativeToCurrentPath);
      var isLoaded = normalizedPath in inlinerContext.externalContext.sourcesContent;
      if (inlinerContext.inlinedStylesheets.indexOf(absoluteUri) > -1) {
        inlinerContext.warnings.push('Ignoring local @import of "' + protocolLessUri + '" as it has already been imported.');
      } else if (isAllowed && !isLoaded && (!fs2.existsSync(absoluteUri) || !fs2.statSync(absoluteUri).isFile())) {
        inlinerContext.errors.push('Ignoring local @import of "' + protocolLessUri + '" as resource is missing.');
      } else if (!isAllowed && inlinerContext.afterContent) {
        inlinerContext.warnings.push('Ignoring local @import of "' + protocolLessUri + '" as resource is not allowed and after other content.');
      } else if (inlinerContext.afterContent) {
        inlinerContext.warnings.push('Ignoring local @import of "' + protocolLessUri + '" as after other content.');
      } else if (!isAllowed) {
        inlinerContext.warnings.push('Skipping local @import of "' + protocolLessUri + '" as resource is not allowed.');
        inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
      } else {
        importedStyles = isLoaded ? inlinerContext.externalContext.sourcesContent[normalizedPath] : fs2.readFileSync(absoluteUri, "utf-8");
        if (importedStyles.charCodeAt(0) === 65279) {
          importedStyles = importedStyles.substring(1);
        }
        inlinerContext.inlinedStylesheets.push(absoluteUri);
        inlinerContext.inline = inlinerContext.externalContext.options.inline;
        inlinerContext.externalContext.source = normalizedPath;
        inlinerContext.externalContext.sourcesContent[normalizedPath] = importedStyles;
        inlinerContext.externalContext.stats.originalSize += importedStyles.length;
        return fromStyles(importedStyles, inlinerContext.externalContext, inlinerContext, function(importedTokens) {
          importedTokens = wrapInMedia(importedTokens, mediaQuery, metadata);
          inlinerContext.outputTokens = inlinerContext.outputTokens.concat(importedTokens);
          inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
          return doInlineImports(inlinerContext);
        });
      }
      inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
      return doInlineImports(inlinerContext);
    }
    function wrapInMedia(tokens, mediaQuery, metadata) {
      if (mediaQuery) {
        return [[Token.NESTED_BLOCK, [[Token.NESTED_BLOCK_SCOPE, "@media " + mediaQuery, metadata]], tokens]];
      }
      return tokens;
    }
    module2.exports = readSources;
  }
});

// node_modules/clean-css/lib/writer/simple.js
var require_simple = __commonJS({
  "node_modules/clean-css/lib/writer/simple.js"(exports, module2) {
    var all = require_helpers().all;
    function store(serializeContext, token) {
      var value = typeof token == "string" ? token : token[1];
      var wrap2 = serializeContext.wrap;
      wrap2(serializeContext, value);
      track(serializeContext, value);
      serializeContext.output.push(value);
    }
    function wrap(serializeContext, value) {
      if (serializeContext.column + value.length > serializeContext.format.wrapAt) {
        track(serializeContext, serializeContext.format.breakWith);
        serializeContext.output.push(serializeContext.format.breakWith);
      }
    }
    function track(serializeContext, value) {
      var parts = value.split("\n");
      serializeContext.line += parts.length - 1;
      serializeContext.column = parts.length > 1 ? 0 : serializeContext.column + parts.pop().length;
    }
    function serializeStyles(tokens, context) {
      var serializeContext = {
        column: 0,
        format: context.options.format,
        indentBy: 0,
        indentWith: "",
        line: 1,
        output: [],
        spaceAfterClosingBrace: context.options.compatibility.properties.spaceAfterClosingBrace,
        store,
        wrap: context.options.format.wrapAt ? wrap : function() {
        }
      };
      all(serializeContext, tokens);
      return { styles: serializeContext.output.join("") };
    }
    module2.exports = serializeStyles;
  }
});

// node_modules/clean-css/lib/writer/source-maps.js
var require_source_maps = __commonJS({
  "node_modules/clean-css/lib/writer/source-maps.js"(exports, module2) {
    var SourceMapGenerator = require_source_map().SourceMapGenerator;
    var all = require_helpers().all;
    var isRemoteResource = require_is_remote_resource();
    var isWindows = process.platform == "win32";
    var NIX_SEPARATOR_PATTERN = /\//g;
    var UNKNOWN_SOURCE = "$stdin";
    var WINDOWS_SEPARATOR = "\\";
    function store(serializeContext, element) {
      var fromString = typeof element == "string";
      var value = fromString ? element : element[1];
      var mappings = fromString ? null : element[2];
      var wrap2 = serializeContext.wrap;
      wrap2(serializeContext, value);
      track(serializeContext, value, mappings);
      serializeContext.output.push(value);
    }
    function wrap(serializeContext, value) {
      if (serializeContext.column + value.length > serializeContext.format.wrapAt) {
        track(serializeContext, serializeContext.format.breakWith, false);
        serializeContext.output.push(serializeContext.format.breakWith);
      }
    }
    function track(serializeContext, value, mappings) {
      var parts = value.split("\n");
      if (mappings) {
        trackAllMappings(serializeContext, mappings);
      }
      serializeContext.line += parts.length - 1;
      serializeContext.column = parts.length > 1 ? 0 : serializeContext.column + parts.pop().length;
    }
    function trackAllMappings(serializeContext, mappings) {
      for (var i = 0, l = mappings.length; i < l; i++) {
        trackMapping(serializeContext, mappings[i]);
      }
    }
    function trackMapping(serializeContext, mapping) {
      var line = mapping[0];
      var column = mapping[1];
      var originalSource = mapping[2];
      var source = originalSource;
      var storedSource = source || UNKNOWN_SOURCE;
      if (isWindows && source && !isRemoteResource(source)) {
        storedSource = source.replace(NIX_SEPARATOR_PATTERN, WINDOWS_SEPARATOR);
      }
      serializeContext.outputMap.addMapping({
        generated: {
          line: serializeContext.line,
          column: serializeContext.column
        },
        source: storedSource,
        original: {
          line,
          column
        }
      });
      if (serializeContext.inlineSources && originalSource in serializeContext.sourcesContent) {
        serializeContext.outputMap.setSourceContent(storedSource, serializeContext.sourcesContent[originalSource]);
      }
    }
    function serializeStylesAndSourceMap(tokens, context) {
      var serializeContext = {
        column: 0,
        format: context.options.format,
        indentBy: 0,
        indentWith: "",
        inlineSources: context.options.sourceMapInlineSources,
        line: 1,
        output: [],
        outputMap: new SourceMapGenerator(),
        sourcesContent: context.sourcesContent,
        spaceAfterClosingBrace: context.options.compatibility.properties.spaceAfterClosingBrace,
        store,
        wrap: context.options.format.wrapAt ? wrap : function() {
        }
      };
      all(serializeContext, tokens);
      return {
        sourceMap: serializeContext.outputMap,
        styles: serializeContext.output.join("")
      };
    }
    module2.exports = serializeStylesAndSourceMap;
  }
});

// node_modules/clean-css/lib/clean.js
var require_clean = __commonJS({
  "node_modules/clean-css/lib/clean.js"(exports, module2) {
    var level0Optimize = require_optimize();
    var level1Optimize = require_optimize2();
    var level2Optimize = require_optimize4();
    var validator = require_validator();
    var compatibilityFrom = require_compatibility();
    var fetchFrom = require_fetch();
    var formatFrom = require_format().formatFrom;
    var inlineFrom = require_inline();
    var inlineRequestFrom = require_inline_request();
    var inlineTimeoutFrom = require_inline_timeout();
    var OptimizationLevel = require_optimization_level().OptimizationLevel;
    var optimizationLevelFrom = require_optimization_level().optimizationLevelFrom;
    var pluginsFrom = require_plugins();
    var rebaseFrom = require_rebase();
    var rebaseToFrom = require_rebase_to();
    var inputSourceMapTracker = require_input_source_map_tracker();
    var readSources = require_read_sources();
    var serializeStyles = require_simple();
    var serializeStylesAndSourceMap = require_source_maps();
    var CleanCSS = module2.exports = function CleanCSS2(options) {
      options = options || {};
      this.options = {
        batch: !!options.batch,
        compatibility: compatibilityFrom(options.compatibility),
        explicitRebaseTo: "rebaseTo" in options,
        fetch: fetchFrom(options.fetch),
        format: formatFrom(options.format),
        inline: inlineFrom(options.inline),
        inlineRequest: inlineRequestFrom(options.inlineRequest),
        inlineTimeout: inlineTimeoutFrom(options.inlineTimeout),
        level: optimizationLevelFrom(options.level),
        plugins: pluginsFrom(options.plugins),
        rebase: rebaseFrom(options.rebase, options.rebaseTo),
        rebaseTo: rebaseToFrom(options.rebaseTo),
        returnPromise: !!options.returnPromise,
        sourceMap: !!options.sourceMap,
        sourceMapInlineSources: !!options.sourceMapInlineSources
      };
    };
    CleanCSS.process = function(input, opts) {
      var cleanCss;
      var optsTo = opts.to;
      delete opts.to;
      cleanCss = new CleanCSS(Object.assign({
        returnPromise: true,
        rebaseTo: optsTo
      }, opts));
      return cleanCss.minify(input).then(function(output) {
        return { css: output.styles };
      });
    };
    CleanCSS.prototype.minify = function(input, maybeSourceMap, maybeCallback) {
      var options = this.options;
      if (options.returnPromise) {
        return new Promise(function(resolve, reject) {
          minifyAll(input, options, maybeSourceMap, function(errors, output) {
            return errors ? reject(errors) : resolve(output);
          });
        });
      }
      return minifyAll(input, options, maybeSourceMap, maybeCallback);
    };
    function minifyAll(input, options, maybeSourceMap, maybeCallback) {
      if (options.batch && Array.isArray(input)) {
        return minifyInBatchesFromArray(input, options, maybeSourceMap, maybeCallback);
      }
      if (options.batch && typeof input == "object") {
        return minifyInBatchesFromHash(input, options, maybeSourceMap, maybeCallback);
      }
      return minify2(input, options, maybeSourceMap, maybeCallback);
    }
    function minifyInBatchesFromArray(input, options, maybeSourceMap, maybeCallback) {
      var callback = typeof maybeCallback == "function" ? maybeCallback : typeof maybeSourceMap == "function" ? maybeSourceMap : null;
      var errors = [];
      var outputAsHash = {};
      var inputValue;
      var i, l;
      function whenHashBatchDone(innerErrors, output) {
        outputAsHash = Object.assign(outputAsHash, output);
        if (innerErrors !== null) {
          errors = errors.concat(innerErrors);
        }
      }
      for (i = 0, l = input.length; i < l; i++) {
        if (typeof input[i] == "object") {
          minifyInBatchesFromHash(input[i], options, whenHashBatchDone);
        } else {
          inputValue = input[i];
          outputAsHash[inputValue] = minify2([inputValue], options);
          errors = errors.concat(outputAsHash[inputValue].errors);
        }
      }
      return callback ? callback(errors.length > 0 ? errors : null, outputAsHash) : outputAsHash;
    }
    function minifyInBatchesFromHash(input, options, maybeSourceMap, maybeCallback) {
      var callback = typeof maybeCallback == "function" ? maybeCallback : typeof maybeSourceMap == "function" ? maybeSourceMap : null;
      var errors = [];
      var outputAsHash = {};
      var inputKey;
      var inputValue;
      for (inputKey in input) {
        inputValue = input[inputKey];
        outputAsHash[inputKey] = minify2(inputValue.styles, options, inputValue.sourceMap);
        errors = errors.concat(outputAsHash[inputKey].errors);
      }
      return callback ? callback(errors.length > 0 ? errors : null, outputAsHash) : outputAsHash;
    }
    function minify2(input, options, maybeSourceMap, maybeCallback) {
      var sourceMap = typeof maybeSourceMap != "function" ? maybeSourceMap : null;
      var callback = typeof maybeCallback == "function" ? maybeCallback : typeof maybeSourceMap == "function" ? maybeSourceMap : null;
      var context = {
        stats: {
          efficiency: 0,
          minifiedSize: 0,
          originalSize: 0,
          startedAt: Date.now(),
          timeSpent: 0
        },
        cache: { specificity: {} },
        errors: [],
        inlinedStylesheets: [],
        inputSourceMapTracker: inputSourceMapTracker(),
        localOnly: !callback,
        options,
        source: null,
        sourcesContent: {},
        validator: validator(options.compatibility),
        warnings: []
      };
      var implicitRebaseToWarning;
      if (sourceMap) {
        context.inputSourceMapTracker.track(void 0, sourceMap);
      }
      if (options.rebase && !options.explicitRebaseTo) {
        implicitRebaseToWarning = "You have set `rebase: true` without giving `rebaseTo` option, which, in this case, defaults to the current working directory. You are then warned this can lead to unexpected URL rebasing (aka here be dragons)! If you are OK with the clean-css output, then you can get rid of this warning by giving clean-css a `rebaseTo: process.cwd()` option.";
        context.warnings.push(implicitRebaseToWarning);
      }
      return runner(context.localOnly)(function() {
        return readSources(input, context, function(tokens) {
          var serialize = context.options.sourceMap ? serializeStylesAndSourceMap : serializeStyles;
          var optimizedTokens = optimize(tokens, context);
          var optimizedStyles = serialize(optimizedTokens, context);
          var output = withMetadata(optimizedStyles, context);
          return callback ? callback(context.errors.length > 0 ? context.errors : null, output) : output;
        });
      });
    }
    function runner(localOnly) {
      return localOnly ? function(callback) {
        return callback();
      } : process.nextTick;
    }
    function optimize(tokens, context) {
      var optimized = level0Optimize(tokens, context);
      optimized = OptimizationLevel.One in context.options.level ? level1Optimize(tokens, context) : tokens;
      optimized = OptimizationLevel.Two in context.options.level ? level2Optimize(tokens, context, true) : optimized;
      return optimized;
    }
    function withMetadata(output, context) {
      output.stats = calculateStatsFrom(output.styles, context);
      output.errors = context.errors;
      output.inlinedStylesheets = context.inlinedStylesheets;
      output.warnings = context.warnings;
      return output;
    }
    function calculateStatsFrom(styles, context) {
      var finishedAt = Date.now();
      var timeSpent = finishedAt - context.stats.startedAt;
      delete context.stats.startedAt;
      context.stats.timeSpent = timeSpent;
      context.stats.efficiency = 1 - styles.length / context.stats.originalSize;
      context.stats.minifiedSize = styles.length;
      return context.stats;
    }
  }
});

// node_modules/clean-css/index.js
var require_clean_css = __commonJS({
  "node_modules/clean-css/index.js"(exports, module2) {
    module2.exports = require_clean();
  }
});

// node_modules/entities/lib/generated/decode-data-html.js
var require_decode_data_html = __commonJS({
  "node_modules/entities/lib/generated/decode-data-html.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.default = new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(function(c) {
      return c.charCodeAt(0);
    }));
  }
});

// node_modules/entities/lib/generated/decode-data-xml.js
var require_decode_data_xml = __commonJS({
  "node_modules/entities/lib/generated/decode-data-xml.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.default = new Uint16Array("\u0200aglq	\x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(function(c) {
      return c.charCodeAt(0);
    }));
  }
});

// node_modules/entities/lib/decode_codepoint.js
var require_decode_codepoint = __commonJS({
  "node_modules/entities/lib/decode_codepoint.js"(exports) {
    "use strict";
    var _a2;
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.replaceCodePoint = exports.fromCodePoint = void 0;
    var decodeMap = /* @__PURE__ */ new Map([
      [0, 65533],
      [128, 8364],
      [130, 8218],
      [131, 402],
      [132, 8222],
      [133, 8230],
      [134, 8224],
      [135, 8225],
      [136, 710],
      [137, 8240],
      [138, 352],
      [139, 8249],
      [140, 338],
      [142, 381],
      [145, 8216],
      [146, 8217],
      [147, 8220],
      [148, 8221],
      [149, 8226],
      [150, 8211],
      [151, 8212],
      [152, 732],
      [153, 8482],
      [154, 353],
      [155, 8250],
      [156, 339],
      [158, 382],
      [159, 376]
    ]);
    exports.fromCodePoint = (_a2 = String.fromCodePoint) !== null && _a2 !== void 0 ? _a2 : function(codePoint) {
      var output = "";
      if (codePoint > 65535) {
        codePoint -= 65536;
        output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
        codePoint = 56320 | codePoint & 1023;
      }
      output += String.fromCharCode(codePoint);
      return output;
    };
    function replaceCodePoint(codePoint) {
      var _a3;
      if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
        return 65533;
      }
      return (_a3 = decodeMap.get(codePoint)) !== null && _a3 !== void 0 ? _a3 : codePoint;
    }
    exports.replaceCodePoint = replaceCodePoint;
    function decodeCodePoint(codePoint) {
      return (0, exports.fromCodePoint)(replaceCodePoint(codePoint));
    }
    exports.default = decodeCodePoint;
  }
});

// node_modules/entities/lib/decode.js
var require_decode = __commonJS({
  "node_modules/entities/lib/decode.js"(exports) {
    "use strict";
    var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
      if (k2 === void 0)
        k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0)
        k2 = k;
      o[k2] = m[k];
    });
    var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
    } : function(o, v) {
      o["default"] = v;
    });
    var __importStar = exports && exports.__importStar || function(mod) {
      if (mod && mod.__esModule)
        return mod;
      var result = {};
      if (mod != null) {
        for (var k in mod)
          if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
            __createBinding(result, mod, k);
      }
      __setModuleDefault(result, mod);
      return result;
    };
    var __importDefault = exports && exports.__importDefault || function(mod) {
      return mod && mod.__esModule ? mod : { "default": mod };
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0;
    var decode_data_html_js_1 = __importDefault(require_decode_data_html());
    exports.htmlDecodeTree = decode_data_html_js_1.default;
    var decode_data_xml_js_1 = __importDefault(require_decode_data_xml());
    exports.xmlDecodeTree = decode_data_xml_js_1.default;
    var decode_codepoint_js_1 = __importStar(require_decode_codepoint());
    exports.decodeCodePoint = decode_codepoint_js_1.default;
    var decode_codepoint_js_2 = require_decode_codepoint();
    Object.defineProperty(exports, "replaceCodePoint", { enumerable: true, get: function() {
      return decode_codepoint_js_2.replaceCodePoint;
    } });
    Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function() {
      return decode_codepoint_js_2.fromCodePoint;
    } });
    var CharCodes;
    (function(CharCodes2) {
      CharCodes2[CharCodes2["NUM"] = 35] = "NUM";
      CharCodes2[CharCodes2["SEMI"] = 59] = "SEMI";
      CharCodes2[CharCodes2["EQUALS"] = 61] = "EQUALS";
      CharCodes2[CharCodes2["ZERO"] = 48] = "ZERO";
      CharCodes2[CharCodes2["NINE"] = 57] = "NINE";
      CharCodes2[CharCodes2["LOWER_A"] = 97] = "LOWER_A";
      CharCodes2[CharCodes2["LOWER_F"] = 102] = "LOWER_F";
      CharCodes2[CharCodes2["LOWER_X"] = 120] = "LOWER_X";
      CharCodes2[CharCodes2["LOWER_Z"] = 122] = "LOWER_Z";
      CharCodes2[CharCodes2["UPPER_A"] = 65] = "UPPER_A";
      CharCodes2[CharCodes2["UPPER_F"] = 70] = "UPPER_F";
      CharCodes2[CharCodes2["UPPER_Z"] = 90] = "UPPER_Z";
    })(CharCodes || (CharCodes = {}));
    var TO_LOWER_BIT = 32;
    var BinTrieFlags;
    (function(BinTrieFlags2) {
      BinTrieFlags2[BinTrieFlags2["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
      BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
      BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE";
    })(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {}));
    function isNumber(code) {
      return code >= CharCodes.ZERO && code <= CharCodes.NINE;
    }
    function isHexadecimalCharacter(code) {
      return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;
    }
    function isAsciiAlphaNumeric(code) {
      return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code);
    }
    function isEntityInAttributeInvalidEnd(code) {
      return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
    }
    var EntityDecoderState;
    (function(EntityDecoderState2) {
      EntityDecoderState2[EntityDecoderState2["EntityStart"] = 0] = "EntityStart";
      EntityDecoderState2[EntityDecoderState2["NumericStart"] = 1] = "NumericStart";
      EntityDecoderState2[EntityDecoderState2["NumericDecimal"] = 2] = "NumericDecimal";
      EntityDecoderState2[EntityDecoderState2["NumericHex"] = 3] = "NumericHex";
      EntityDecoderState2[EntityDecoderState2["NamedEntity"] = 4] = "NamedEntity";
    })(EntityDecoderState || (EntityDecoderState = {}));
    var DecodingMode;
    (function(DecodingMode2) {
      DecodingMode2[DecodingMode2["Legacy"] = 0] = "Legacy";
      DecodingMode2[DecodingMode2["Strict"] = 1] = "Strict";
      DecodingMode2[DecodingMode2["Attribute"] = 2] = "Attribute";
    })(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {}));
    var EntityDecoder = function() {
      function EntityDecoder2(decodeTree, emitCodePoint, errors) {
        this.decodeTree = decodeTree;
        this.emitCodePoint = emitCodePoint;
        this.errors = errors;
        this.state = EntityDecoderState.EntityStart;
        this.consumed = 1;
        this.result = 0;
        this.treeIndex = 0;
        this.excess = 1;
        this.decodeMode = DecodingMode.Strict;
      }
      EntityDecoder2.prototype.startEntity = function(decodeMode) {
        this.decodeMode = decodeMode;
        this.state = EntityDecoderState.EntityStart;
        this.result = 0;
        this.treeIndex = 0;
        this.excess = 1;
        this.consumed = 1;
      };
      EntityDecoder2.prototype.write = function(str, offset) {
        switch (this.state) {
          case EntityDecoderState.EntityStart: {
            if (str.charCodeAt(offset) === CharCodes.NUM) {
              this.state = EntityDecoderState.NumericStart;
              this.consumed += 1;
              return this.stateNumericStart(str, offset + 1);
            }
            this.state = EntityDecoderState.NamedEntity;
            return this.stateNamedEntity(str, offset);
          }
          case EntityDecoderState.NumericStart: {
            return this.stateNumericStart(str, offset);
          }
          case EntityDecoderState.NumericDecimal: {
            return this.stateNumericDecimal(str, offset);
          }
          case EntityDecoderState.NumericHex: {
            return this.stateNumericHex(str, offset);
          }
          case EntityDecoderState.NamedEntity: {
            return this.stateNamedEntity(str, offset);
          }
        }
      };
      EntityDecoder2.prototype.stateNumericStart = function(str, offset) {
        if (offset >= str.length) {
          return -1;
        }
        if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
          this.state = EntityDecoderState.NumericHex;
          this.consumed += 1;
          return this.stateNumericHex(str, offset + 1);
        }
        this.state = EntityDecoderState.NumericDecimal;
        return this.stateNumericDecimal(str, offset);
      };
      EntityDecoder2.prototype.addToNumericResult = function(str, start, end, base) {
        if (start !== end) {
          var digitCount = end - start;
          this.result = this.result * Math.pow(base, digitCount) + parseInt(str.substr(start, digitCount), base);
          this.consumed += digitCount;
        }
      };
      EntityDecoder2.prototype.stateNumericHex = function(str, offset) {
        var startIdx = offset;
        while (offset < str.length) {
          var char = str.charCodeAt(offset);
          if (isNumber(char) || isHexadecimalCharacter(char)) {
            offset += 1;
          } else {
            this.addToNumericResult(str, startIdx, offset, 16);
            return this.emitNumericEntity(char, 3);
          }
        }
        this.addToNumericResult(str, startIdx, offset, 16);
        return -1;
      };
      EntityDecoder2.prototype.stateNumericDecimal = function(str, offset) {
        var startIdx = offset;
        while (offset < str.length) {
          var char = str.charCodeAt(offset);
          if (isNumber(char)) {
            offset += 1;
          } else {
            this.addToNumericResult(str, startIdx, offset, 10);
            return this.emitNumericEntity(char, 2);
          }
        }
        this.addToNumericResult(str, startIdx, offset, 10);
        return -1;
      };
      EntityDecoder2.prototype.emitNumericEntity = function(lastCp, expectedLength) {
        var _a2;
        if (this.consumed <= expectedLength) {
          (_a2 = this.errors) === null || _a2 === void 0 ? void 0 : _a2.absenceOfDigitsInNumericCharacterReference(this.consumed);
          return 0;
        }
        if (lastCp === CharCodes.SEMI) {
          this.consumed += 1;
        } else if (this.decodeMode === DecodingMode.Strict) {
          return 0;
        }
        this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed);
        if (this.errors) {
          if (lastCp !== CharCodes.SEMI) {
            this.errors.missingSemicolonAfterCharacterReference();
          }
          this.errors.validateNumericCharacterReference(this.result);
        }
        return this.consumed;
      };
      EntityDecoder2.prototype.stateNamedEntity = function(str, offset) {
        var decodeTree = this.decodeTree;
        var current = decodeTree[this.treeIndex];
        var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
        for (; offset < str.length; offset++, this.excess++) {
          var char = str.charCodeAt(offset);
          this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
          if (this.treeIndex < 0) {
            return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
          }
          current = decodeTree[this.treeIndex];
          valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
          if (valueLength !== 0) {
            if (char === CharCodes.SEMI) {
              return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
            }
            if (this.decodeMode !== DecodingMode.Strict) {
              this.result = this.treeIndex;
              this.consumed += this.excess;
              this.excess = 0;
            }
          }
        }
        return -1;
      };
      EntityDecoder2.prototype.emitNotTerminatedNamedEntity = function() {
        var _a2;
        var _b = this, result = _b.result, decodeTree = _b.decodeTree;
        var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
        this.emitNamedEntityData(result, valueLength, this.consumed);
        (_a2 = this.errors) === null || _a2 === void 0 ? void 0 : _a2.missingSemicolonAfterCharacterReference();
        return this.consumed;
      };
      EntityDecoder2.prototype.emitNamedEntityData = function(result, valueLength, consumed) {
        var decodeTree = this.decodeTree;
        this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
        if (valueLength === 3) {
          this.emitCodePoint(decodeTree[result + 2], consumed);
        }
        return consumed;
      };
      EntityDecoder2.prototype.end = function() {
        var _a2;
        switch (this.state) {
          case EntityDecoderState.NamedEntity: {
            return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
          }
          case EntityDecoderState.NumericDecimal: {
            return this.emitNumericEntity(0, 2);
          }
          case EntityDecoderState.NumericHex: {
            return this.emitNumericEntity(0, 3);
          }
          case EntityDecoderState.NumericStart: {
            (_a2 = this.errors) === null || _a2 === void 0 ? void 0 : _a2.absenceOfDigitsInNumericCharacterReference(this.consumed);
            return 0;
          }
          case EntityDecoderState.EntityStart: {
            return 0;
          }
        }
      };
      return EntityDecoder2;
    }();
    exports.EntityDecoder = EntityDecoder;
    function getDecoder(decodeTree) {
      var ret = "";
      var decoder = new EntityDecoder(decodeTree, function(str) {
        return ret += (0, decode_codepoint_js_1.fromCodePoint)(str);
      });
      return function decodeWithTrie(str, decodeMode) {
        var lastIndex = 0;
        var offset = 0;
        while ((offset = str.indexOf("&", offset)) >= 0) {
          ret += str.slice(lastIndex, offset);
          decoder.startEntity(decodeMode);
          var len = decoder.write(str, offset + 1);
          if (len < 0) {
            lastIndex = offset + decoder.end();
            break;
          }
          lastIndex = offset + len;
          offset = len === 0 ? lastIndex + 1 : lastIndex;
        }
        var result = ret + str.slice(lastIndex);
        ret = "";
        return result;
      };
    }
    function determineBranch(decodeTree, current, nodeIdx, char) {
      var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
      var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
      if (branchCount === 0) {
        return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;
      }
      if (jumpOffset) {
        var value = char - jumpOffset;
        return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
      }
      var lo = nodeIdx;
      var hi = lo + branchCount - 1;
      while (lo <= hi) {
        var mid = lo + hi >>> 1;
        var midVal = decodeTree[mid];
        if (midVal < char) {
          lo = mid + 1;
        } else if (midVal > char) {
          hi = mid - 1;
        } else {
          return decodeTree[mid + branchCount];
        }
      }
      return -1;
    }
    exports.determineBranch = determineBranch;
    var htmlDecoder = getDecoder(decode_data_html_js_1.default);
    var xmlDecoder = getDecoder(decode_data_xml_js_1.default);
    function decodeHTML(str, mode) {
      if (mode === void 0) {
        mode = DecodingMode.Legacy;
      }
      return htmlDecoder(str, mode);
    }
    exports.decodeHTML = decodeHTML;
    function decodeHTMLAttribute(str) {
      return htmlDecoder(str, DecodingMode.Attribute);
    }
    exports.decodeHTMLAttribute = decodeHTMLAttribute;
    function decodeHTMLStrict(str) {
      return htmlDecoder(str, DecodingMode.Strict);
    }
    exports.decodeHTMLStrict = decodeHTMLStrict;
    function decodeXML(str) {
      return xmlDecoder(str, DecodingMode.Strict);
    }
    exports.decodeXML = decodeXML;
  }
});

// node_modules/entities/lib/generated/encode-html.js
var require_encode_html = __commonJS({
  "node_modules/entities/lib/generated/encode-html.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    function restoreDiff(arr) {
      for (var i = 1; i < arr.length; i++) {
        arr[i][0] += arr[i - 1][0] + 1;
      }
      return arr;
    }
    exports.default = new Map(/* @__PURE__ */ restoreDiff([[9, "&Tab;"], [0, "&NewLine;"], [22, "&excl;"], [0, "&quot;"], [0, "&num;"], [0, "&dollar;"], [0, "&percnt;"], [0, "&amp;"], [0, "&apos;"], [0, "&lpar;"], [0, "&rpar;"], [0, "&ast;"], [0, "&plus;"], [0, "&comma;"], [1, "&period;"], [0, "&sol;"], [10, "&colon;"], [0, "&semi;"], [0, { v: "&lt;", n: 8402, o: "&nvlt;" }], [0, { v: "&equals;", n: 8421, o: "&bne;" }], [0, { v: "&gt;", n: 8402, o: "&nvgt;" }], [0, "&quest;"], [0, "&commat;"], [26, "&lbrack;"], [0, "&bsol;"], [0, "&rbrack;"], [0, "&Hat;"], [0, "&lowbar;"], [0, "&DiacriticalGrave;"], [5, { n: 106, o: "&fjlig;" }], [20, "&lbrace;"], [0, "&verbar;"], [0, "&rbrace;"], [34, "&nbsp;"], [0, "&iexcl;"], [0, "&cent;"], [0, "&pound;"], [0, "&curren;"], [0, "&yen;"], [0, "&brvbar;"], [0, "&sect;"], [0, "&die;"], [0, "&copy;"], [0, "&ordf;"], [0, "&laquo;"], [0, "&not;"], [0, "&shy;"], [0, "&circledR;"], [0, "&macr;"], [0, "&deg;"], [0, "&PlusMinus;"], [0, "&sup2;"], [0, "&sup3;"], [0, "&acute;"], [0, "&micro;"], [0, "&para;"], [0, "&centerdot;"], [0, "&cedil;"], [0, "&sup1;"], [0, "&ordm;"], [0, "&raquo;"], [0, "&frac14;"], [0, "&frac12;"], [0, "&frac34;"], [0, "&iquest;"], [0, "&Agrave;"], [0, "&Aacute;"], [0, "&Acirc;"], [0, "&Atilde;"], [0, "&Auml;"], [0, "&angst;"], [0, "&AElig;"], [0, "&Ccedil;"], [0, "&Egrave;"], [0, "&Eacute;"], [0, "&Ecirc;"], [0, "&Euml;"], [0, "&Igrave;"], [0, "&Iacute;"], [0, "&Icirc;"], [0, "&Iuml;"], [0, "&ETH;"], [0, "&Ntilde;"], [0, "&Ograve;"], [0, "&Oacute;"], [0, "&Ocirc;"], [0, "&Otilde;"], [0, "&Ouml;"], [0, "&times;"], [0, "&Oslash;"], [0, "&Ugrave;"], [0, "&Uacute;"], [0, "&Ucirc;"], [0, "&Uuml;"], [0, "&Yacute;"], [0, "&THORN;"], [0, "&szlig;"], [0, "&agrave;"], [0, "&aacute;"], [0, "&acirc;"], [0, "&atilde;"], [0, "&auml;"], [0, "&aring;"], [0, "&aelig;"], [0, "&ccedil;"], [0, "&egrave;"], [0, "&eacute;"], [0, "&ecirc;"], [0, "&euml;"], [0, "&igrave;"], [0, "&iacute;"], [0, "&icirc;"], [0, "&iuml;"], [0, "&eth;"], [0, "&ntilde;"], [0, "&ograve;"], [0, "&oacute;"], [0, "&ocirc;"], [0, "&otilde;"], [0, "&ouml;"], [0, "&div;"], [0, "&oslash;"], [0, "&ugrave;"], [0, "&uacute;"], [0, "&ucirc;"], [0, "&uuml;"], [0, "&yacute;"], [0, "&thorn;"], [0, "&yuml;"], [0, "&Amacr;"], [0, "&amacr;"], [0, "&Abreve;"], [0, "&abreve;"], [0, "&Aogon;"], [0, "&aogon;"], [0, "&Cacute;"], [0, "&cacute;"], [0, "&Ccirc;"], [0, "&ccirc;"], [0, "&Cdot;"], [0, "&cdot;"], [0, "&Ccaron;"], [0, "&ccaron;"], [0, "&Dcaron;"], [0, "&dcaron;"], [0, "&Dstrok;"], [0, "&dstrok;"], [0, "&Emacr;"], [0, "&emacr;"], [2, "&Edot;"], [0, "&edot;"], [0, "&Eogon;"], [0, "&eogon;"], [0, "&Ecaron;"], [0, "&ecaron;"], [0, "&Gcirc;"], [0, "&gcirc;"], [0, "&Gbreve;"], [0, "&gbreve;"], [0, "&Gdot;"], [0, "&gdot;"], [0, "&Gcedil;"], [1, "&Hcirc;"], [0, "&hcirc;"], [0, "&Hstrok;"], [0, "&hstrok;"], [0, "&Itilde;"], [0, "&itilde;"], [0, "&Imacr;"], [0, "&imacr;"], [2, "&Iogon;"], [0, "&iogon;"], [0, "&Idot;"], [0, "&imath;"], [0, "&IJlig;"], [0, "&ijlig;"], [0, "&Jcirc;"], [0, "&jcirc;"], [0, "&Kcedil;"], [0, "&kcedil;"], [0, "&kgreen;"], [0, "&Lacute;"], [0, "&lacute;"], [0, "&Lcedil;"], [0, "&lcedil;"], [0, "&Lcaron;"], [0, "&lcaron;"], [0, "&Lmidot;"], [0, "&lmidot;"], [0, "&Lstrok;"], [0, "&lstrok;"], [0, "&Nacute;"], [0, "&nacute;"], [0, "&Ncedil;"], [0, "&ncedil;"], [0, "&Ncaron;"], [0, "&ncaron;"], [0, "&napos;"], [0, "&ENG;"], [0, "&eng;"], [0, "&Omacr;"], [0, "&omacr;"], [2, "&Odblac;"], [0, "&odblac;"], [0, "&OElig;"], [0, "&oelig;"], [0, "&Racute;"], [0, "&racute;"], [0, "&Rcedil;"], [0, "&rcedil;"], [0, "&Rcaron;"], [0, "&rcaron;"], [0, "&Sacute;"], [0, "&sacute;"], [0, "&Scirc;"], [0, "&scirc;"], [0, "&Scedil;"], [0, "&scedil;"], [0, "&Scaron;"], [0, "&scaron;"], [0, "&Tcedil;"], [0, "&tcedil;"], [0, "&Tcaron;"], [0, "&tcaron;"], [0, "&Tstrok;"], [0, "&tstrok;"], [0, "&Utilde;"], [0, "&utilde;"], [0, "&Umacr;"], [0, "&umacr;"], [0, "&Ubreve;"], [0, "&ubreve;"], [0, "&Uring;"], [0, "&uring;"], [0, "&Udblac;"], [0, "&udblac;"], [0, "&Uogon;"], [0, "&uogon;"], [0, "&Wcirc;"], [0, "&wcirc;"], [0, "&Ycirc;"], [0, "&ycirc;"], [0, "&Yuml;"], [0, "&Zacute;"], [0, "&zacute;"], [0, "&Zdot;"], [0, "&zdot;"], [0, "&Zcaron;"], [0, "&zcaron;"], [19, "&fnof;"], [34, "&imped;"], [63, "&gacute;"], [65, "&jmath;"], [142, "&circ;"], [0, "&caron;"], [16, "&breve;"], [0, "&DiacriticalDot;"], [0, "&ring;"], [0, "&ogon;"], [0, "&DiacriticalTilde;"], [0, "&dblac;"], [51, "&DownBreve;"], [127, "&Alpha;"], [0, "&Beta;"], [0, "&Gamma;"], [0, "&Delta;"], [0, "&Epsilon;"], [0, "&Zeta;"], [0, "&Eta;"], [0, "&Theta;"], [0, "&Iota;"], [0, "&Kappa;"], [0, "&Lambda;"], [0, "&Mu;"], [0, "&Nu;"], [0, "&Xi;"], [0, "&Omicron;"], [0, "&Pi;"], [0, "&Rho;"], [1, "&Sigma;"], [0, "&Tau;"], [0, "&Upsilon;"], [0, "&Phi;"], [0, "&Chi;"], [0, "&Psi;"], [0, "&ohm;"], [7, "&alpha;"], [0, "&beta;"], [0, "&gamma;"], [0, "&delta;"], [0, "&epsi;"], [0, "&zeta;"], [0, "&eta;"], [0, "&theta;"], [0, "&iota;"], [0, "&kappa;"], [0, "&lambda;"], [0, "&mu;"], [0, "&nu;"], [0, "&xi;"], [0, "&omicron;"], [0, "&pi;"], [0, "&rho;"], [0, "&sigmaf;"], [0, "&sigma;"], [0, "&tau;"], [0, "&upsi;"], [0, "&phi;"], [0, "&chi;"], [0, "&psi;"], [0, "&omega;"], [7, "&thetasym;"], [0, "&Upsi;"], [2, "&phiv;"], [0, "&piv;"], [5, "&Gammad;"], [0, "&digamma;"], [18, "&kappav;"], [0, "&rhov;"], [3, "&epsiv;"], [0, "&backepsilon;"], [10, "&IOcy;"], [0, "&DJcy;"], [0, "&GJcy;"], [0, "&Jukcy;"], [0, "&DScy;"], [0, "&Iukcy;"], [0, "&YIcy;"], [0, "&Jsercy;"], [0, "&LJcy;"], [0, "&NJcy;"], [0, "&TSHcy;"], [0, "&KJcy;"], [1, "&Ubrcy;"], [0, "&DZcy;"], [0, "&Acy;"], [0, "&Bcy;"], [0, "&Vcy;"], [0, "&Gcy;"], [0, "&Dcy;"], [0, "&IEcy;"], [0, "&ZHcy;"], [0, "&Zcy;"], [0, "&Icy;"], [0, "&Jcy;"], [0, "&Kcy;"], [0, "&Lcy;"], [0, "&Mcy;"], [0, "&Ncy;"], [0, "&Ocy;"], [0, "&Pcy;"], [0, "&Rcy;"], [0, "&Scy;"], [0, "&Tcy;"], [0, "&Ucy;"], [0, "&Fcy;"], [0, "&KHcy;"], [0, "&TScy;"], [0, "&CHcy;"], [0, "&SHcy;"], [0, "&SHCHcy;"], [0, "&HARDcy;"], [0, "&Ycy;"], [0, "&SOFTcy;"], [0, "&Ecy;"], [0, "&YUcy;"], [0, "&YAcy;"], [0, "&acy;"], [0, "&bcy;"], [0, "&vcy;"], [0, "&gcy;"], [0, "&dcy;"], [0, "&iecy;"], [0, "&zhcy;"], [0, "&zcy;"], [0, "&icy;"], [0, "&jcy;"], [0, "&kcy;"], [0, "&lcy;"], [0, "&mcy;"], [0, "&ncy;"], [0, "&ocy;"], [0, "&pcy;"], [0, "&rcy;"], [0, "&scy;"], [0, "&tcy;"], [0, "&ucy;"], [0, "&fcy;"], [0, "&khcy;"], [0, "&tscy;"], [0, "&chcy;"], [0, "&shcy;"], [0, "&shchcy;"], [0, "&hardcy;"], [0, "&ycy;"], [0, "&softcy;"], [0, "&ecy;"], [0, "&yucy;"], [0, "&yacy;"], [1, "&iocy;"], [0, "&djcy;"], [0, "&gjcy;"], [0, "&jukcy;"], [0, "&dscy;"], [0, "&iukcy;"], [0, "&yicy;"], [0, "&jsercy;"], [0, "&ljcy;"], [0, "&njcy;"], [0, "&tshcy;"], [0, "&kjcy;"], [1, "&ubrcy;"], [0, "&dzcy;"], [7074, "&ensp;"], [0, "&emsp;"], [0, "&emsp13;"], [0, "&emsp14;"], [1, "&numsp;"], [0, "&puncsp;"], [0, "&ThinSpace;"], [0, "&hairsp;"], [0, "&NegativeMediumSpace;"], [0, "&zwnj;"], [0, "&zwj;"], [0, "&lrm;"], [0, "&rlm;"], [0, "&dash;"], [2, "&ndash;"], [0, "&mdash;"], [0, "&horbar;"], [0, "&Verbar;"], [1, "&lsquo;"], [0, "&CloseCurlyQuote;"], [0, "&lsquor;"], [1, "&ldquo;"], [0, "&CloseCurlyDoubleQuote;"], [0, "&bdquo;"], [1, "&dagger;"], [0, "&Dagger;"], [0, "&bull;"], [2, "&nldr;"], [0, "&hellip;"], [9, "&permil;"], [0, "&pertenk;"], [0, "&prime;"], [0, "&Prime;"], [0, "&tprime;"], [0, "&backprime;"], [3, "&lsaquo;"], [0, "&rsaquo;"], [3, "&oline;"], [2, "&caret;"], [1, "&hybull;"], [0, "&frasl;"], [10, "&bsemi;"], [7, "&qprime;"], [7, { v: "&MediumSpace;", n: 8202, o: "&ThickSpace;" }], [0, "&NoBreak;"], [0, "&af;"], [0, "&InvisibleTimes;"], [0, "&ic;"], [72, "&euro;"], [46, "&tdot;"], [0, "&DotDot;"], [37, "&complexes;"], [2, "&incare;"], [4, "&gscr;"], [0, "&hamilt;"], [0, "&Hfr;"], [0, "&Hopf;"], [0, "&planckh;"], [0, "&hbar;"], [0, "&imagline;"], [0, "&Ifr;"], [0, "&lagran;"], [0, "&ell;"], [1, "&naturals;"], [0, "&numero;"], [0, "&copysr;"], [0, "&weierp;"], [0, "&Popf;"], [0, "&Qopf;"], [0, "&realine;"], [0, "&real;"], [0, "&reals;"], [0, "&rx;"], [3, "&trade;"], [1, "&integers;"], [2, "&mho;"], [0, "&zeetrf;"], [0, "&iiota;"], [2, "&bernou;"], [0, "&Cayleys;"], [1, "&escr;"], [0, "&Escr;"], [0, "&Fouriertrf;"], [1, "&Mellintrf;"], [0, "&order;"], [0, "&alefsym;"], [0, "&beth;"], [0, "&gimel;"], [0, "&daleth;"], [12, "&CapitalDifferentialD;"], [0, "&dd;"], [0, "&ee;"], [0, "&ii;"], [10, "&frac13;"], [0, "&frac23;"], [0, "&frac15;"], [0, "&frac25;"], [0, "&frac35;"], [0, "&frac45;"], [0, "&frac16;"], [0, "&frac56;"], [0, "&frac18;"], [0, "&frac38;"], [0, "&frac58;"], [0, "&frac78;"], [49, "&larr;"], [0, "&ShortUpArrow;"], [0, "&rarr;"], [0, "&darr;"], [0, "&harr;"], [0, "&updownarrow;"], [0, "&nwarr;"], [0, "&nearr;"], [0, "&LowerRightArrow;"], [0, "&LowerLeftArrow;"], [0, "&nlarr;"], [0, "&nrarr;"], [1, { v: "&rarrw;", n: 824, o: "&nrarrw;" }], [0, "&Larr;"], [0, "&Uarr;"], [0, "&Rarr;"], [0, "&Darr;"], [0, "&larrtl;"], [0, "&rarrtl;"], [0, "&LeftTeeArrow;"], [0, "&mapstoup;"], [0, "&map;"], [0, "&DownTeeArrow;"], [1, "&hookleftarrow;"], [0, "&hookrightarrow;"], [0, "&larrlp;"], [0, "&looparrowright;"], [0, "&harrw;"], [0, "&nharr;"], [1, "&lsh;"], [0, "&rsh;"], [0, "&ldsh;"], [0, "&rdsh;"], [1, "&crarr;"], [0, "&cularr;"], [0, "&curarr;"], [2, "&circlearrowleft;"], [0, "&circlearrowright;"], [0, "&leftharpoonup;"], [0, "&DownLeftVector;"], [0, "&RightUpVector;"], [0, "&LeftUpVector;"], [0, "&rharu;"], [0, "&DownRightVector;"], [0, "&dharr;"], [0, "&dharl;"], [0, "&RightArrowLeftArrow;"], [0, "&udarr;"], [0, "&LeftArrowRightArrow;"], [0, "&leftleftarrows;"], [0, "&upuparrows;"], [0, "&rightrightarrows;"], [0, "&ddarr;"], [0, "&leftrightharpoons;"], [0, "&Equilibrium;"], [0, "&nlArr;"], [0, "&nhArr;"], [0, "&nrArr;"], [0, "&DoubleLeftArrow;"], [0, "&DoubleUpArrow;"], [0, "&DoubleRightArrow;"], [0, "&dArr;"], [0, "&DoubleLeftRightArrow;"], [0, "&DoubleUpDownArrow;"], [0, "&nwArr;"], [0, "&neArr;"], [0, "&seArr;"], [0, "&swArr;"], [0, "&lAarr;"], [0, "&rAarr;"], [1, "&zigrarr;"], [6, "&larrb;"], [0, "&rarrb;"], [15, "&DownArrowUpArrow;"], [7, "&loarr;"], [0, "&roarr;"], [0, "&hoarr;"], [0, "&forall;"], [0, "&comp;"], [0, { v: "&part;", n: 824, o: "&npart;" }], [0, "&exist;"], [0, "&nexist;"], [0, "&empty;"], [1, "&Del;"], [0, "&Element;"], [0, "&NotElement;"], [1, "&ni;"], [0, "&notni;"], [2, "&prod;"], [0, "&coprod;"], [0, "&sum;"], [0, "&minus;"], [0, "&MinusPlus;"], [0, "&dotplus;"], [1, "&Backslash;"], [0, "&lowast;"], [0, "&compfn;"], [1, "&radic;"], [2, "&prop;"], [0, "&infin;"], [0, "&angrt;"], [0, { v: "&ang;", n: 8402, o: "&nang;" }], [0, "&angmsd;"], [0, "&angsph;"], [0, "&mid;"], [0, "&nmid;"], [0, "&DoubleVerticalBar;"], [0, "&NotDoubleVerticalBar;"], [0, "&and;"], [0, "&or;"], [0, { v: "&cap;", n: 65024, o: "&caps;" }], [0, { v: "&cup;", n: 65024, o: "&cups;" }], [0, "&int;"], [0, "&Int;"], [0, "&iiint;"], [0, "&conint;"], [0, "&Conint;"], [0, "&Cconint;"], [0, "&cwint;"], [0, "&ClockwiseContourIntegral;"], [0, "&awconint;"], [0, "&there4;"], [0, "&becaus;"], [0, "&ratio;"], [0, "&Colon;"], [0, "&dotminus;"], [1, "&mDDot;"], [0, "&homtht;"], [0, { v: "&sim;", n: 8402, o: "&nvsim;" }], [0, { v: "&backsim;", n: 817, o: "&race;" }], [0, { v: "&ac;", n: 819, o: "&acE;" }], [0, "&acd;"], [0, "&VerticalTilde;"], [0, "&NotTilde;"], [0, { v: "&eqsim;", n: 824, o: "&nesim;" }], [0, "&sime;"], [0, "&NotTildeEqual;"], [0, "&cong;"], [0, "&simne;"], [0, "&ncong;"], [0, "&ap;"], [0, "&nap;"], [0, "&ape;"], [0, { v: "&apid;", n: 824, o: "&napid;" }], [0, "&backcong;"], [0, { v: "&asympeq;", n: 8402, o: "&nvap;" }], [0, { v: "&bump;", n: 824, o: "&nbump;" }], [0, { v: "&bumpe;", n: 824, o: "&nbumpe;" }], [0, { v: "&doteq;", n: 824, o: "&nedot;" }], [0, "&doteqdot;"], [0, "&efDot;"], [0, "&erDot;"], [0, "&Assign;"], [0, "&ecolon;"], [0, "&ecir;"], [0, "&circeq;"], [1, "&wedgeq;"], [0, "&veeeq;"], [1, "&triangleq;"], [2, "&equest;"], [0, "&ne;"], [0, { v: "&Congruent;", n: 8421, o: "&bnequiv;" }], [0, "&nequiv;"], [1, { v: "&le;", n: 8402, o: "&nvle;" }], [0, { v: "&ge;", n: 8402, o: "&nvge;" }], [0, { v: "&lE;", n: 824, o: "&nlE;" }], [0, { v: "&gE;", n: 824, o: "&ngE;" }], [0, { v: "&lnE;", n: 65024, o: "&lvertneqq;" }], [0, { v: "&gnE;", n: 65024, o: "&gvertneqq;" }], [0, { v: "&ll;", n: new Map(/* @__PURE__ */ restoreDiff([[824, "&nLtv;"], [7577, "&nLt;"]])) }], [0, { v: "&gg;", n: new Map(/* @__PURE__ */ restoreDiff([[824, "&nGtv;"], [7577, "&nGt;"]])) }], [0, "&between;"], [0, "&NotCupCap;"], [0, "&nless;"], [0, "&ngt;"], [0, "&nle;"], [0, "&nge;"], [0, "&lesssim;"], [0, "&GreaterTilde;"], [0, "&nlsim;"], [0, "&ngsim;"], [0, "&LessGreater;"], [0, "&gl;"], [0, "&NotLessGreater;"], [0, "&NotGreaterLess;"], [0, "&pr;"], [0, "&sc;"], [0, "&prcue;"], [0, "&sccue;"], [0, "&PrecedesTilde;"], [0, { v: "&scsim;", n: 824, o: "&NotSucceedsTilde;" }], [0, "&NotPrecedes;"], [0, "&NotSucceeds;"], [0, { v: "&sub;", n: 8402, o: "&NotSubset;" }], [0, { v: "&sup;", n: 8402, o: "&NotSuperset;" }], [0, "&nsub;"], [0, "&nsup;"], [0, "&sube;"], [0, "&supe;"], [0, "&NotSubsetEqual;"], [0, "&NotSupersetEqual;"], [0, { v: "&subne;", n: 65024, o: "&varsubsetneq;" }], [0, { v: "&supne;", n: 65024, o: "&varsupsetneq;" }], [1, "&cupdot;"], [0, "&UnionPlus;"], [0, { v: "&sqsub;", n: 824, o: "&NotSquareSubset;" }], [0, { v: "&sqsup;", n: 824, o: "&NotSquareSuperset;" }], [0, "&sqsube;"], [0, "&sqsupe;"], [0, { v: "&sqcap;", n: 65024, o: "&sqcaps;" }], [0, { v: "&sqcup;", n: 65024, o: "&sqcups;" }], [0, "&CirclePlus;"], [0, "&CircleMinus;"], [0, "&CircleTimes;"], [0, "&osol;"], [0, "&CircleDot;"], [0, "&circledcirc;"], [0, "&circledast;"], [1, "&circleddash;"], [0, "&boxplus;"], [0, "&boxminus;"], [0, "&boxtimes;"], [0, "&dotsquare;"], [0, "&RightTee;"], [0, "&dashv;"], [0, "&DownTee;"], [0, "&bot;"], [1, "&models;"], [0, "&DoubleRightTee;"], [0, "&Vdash;"], [0, "&Vvdash;"], [0, "&VDash;"], [0, "&nvdash;"], [0, "&nvDash;"], [0, "&nVdash;"], [0, "&nVDash;"], [0, "&prurel;"], [1, "&LeftTriangle;"], [0, "&RightTriangle;"], [0, { v: "&LeftTriangleEqual;", n: 8402, o: "&nvltrie;" }], [0, { v: "&RightTriangleEqual;", n: 8402, o: "&nvrtrie;" }], [0, "&origof;"], [0, "&imof;"], [0, "&multimap;"], [0, "&hercon;"], [0, "&intcal;"], [0, "&veebar;"], [1, "&barvee;"], [0, "&angrtvb;"], [0, "&lrtri;"], [0, "&bigwedge;"], [0, "&bigvee;"], [0, "&bigcap;"], [0, "&bigcup;"], [0, "&diam;"], [0, "&sdot;"], [0, "&sstarf;"], [0, "&divideontimes;"], [0, "&bowtie;"], [0, "&ltimes;"], [0, "&rtimes;"], [0, "&leftthreetimes;"], [0, "&rightthreetimes;"], [0, "&backsimeq;"], [0, "&curlyvee;"], [0, "&curlywedge;"], [0, "&Sub;"], [0, "&Sup;"], [0, "&Cap;"], [0, "&Cup;"], [0, "&fork;"], [0, "&epar;"], [0, "&lessdot;"], [0, "&gtdot;"], [0, { v: "&Ll;", n: 824, o: "&nLl;" }], [0, { v: "&Gg;", n: 824, o: "&nGg;" }], [0, { v: "&leg;", n: 65024, o: "&lesg;" }], [0, { v: "&gel;", n: 65024, o: "&gesl;" }], [2, "&cuepr;"], [0, "&cuesc;"], [0, "&NotPrecedesSlantEqual;"], [0, "&NotSucceedsSlantEqual;"], [0, "&NotSquareSubsetEqual;"], [0, "&NotSquareSupersetEqual;"], [2, "&lnsim;"], [0, "&gnsim;"], [0, "&precnsim;"], [0, "&scnsim;"], [0, "&nltri;"], [0, "&NotRightTriangle;"], [0, "&nltrie;"], [0, "&NotRightTriangleEqual;"], [0, "&vellip;"], [0, "&ctdot;"], [0, "&utdot;"], [0, "&dtdot;"], [0, "&disin;"], [0, "&isinsv;"], [0, "&isins;"], [0, { v: "&isindot;", n: 824, o: "&notindot;" }], [0, "&notinvc;"], [0, "&notinvb;"], [1, { v: "&isinE;", n: 824, o: "&notinE;" }], [0, "&nisd;"], [0, "&xnis;"], [0, "&nis;"], [0, "&notnivc;"], [0, "&notnivb;"], [6, "&barwed;"], [0, "&Barwed;"], [1, "&lceil;"], [0, "&rceil;"], [0, "&LeftFloor;"], [0, "&rfloor;"], [0, "&drcrop;"], [0, "&dlcrop;"], [0, "&urcrop;"], [0, "&ulcrop;"], [0, "&bnot;"], [1, "&profline;"], [0, "&profsurf;"], [1, "&telrec;"], [0, "&target;"], [5, "&ulcorn;"], [0, "&urcorn;"], [0, "&dlcorn;"], [0, "&drcorn;"], [2, "&frown;"], [0, "&smile;"], [9, "&cylcty;"], [0, "&profalar;"], [7, "&topbot;"], [6, "&ovbar;"], [1, "&solbar;"], [60, "&angzarr;"], [51, "&lmoustache;"], [0, "&rmoustache;"], [2, "&OverBracket;"], [0, "&bbrk;"], [0, "&bbrktbrk;"], [37, "&OverParenthesis;"], [0, "&UnderParenthesis;"], [0, "&OverBrace;"], [0, "&UnderBrace;"], [2, "&trpezium;"], [4, "&elinters;"], [59, "&blank;"], [164, "&circledS;"], [55, "&boxh;"], [1, "&boxv;"], [9, "&boxdr;"], [3, "&boxdl;"], [3, "&boxur;"], [3, "&boxul;"], [3, "&boxvr;"], [7, "&boxvl;"], [7, "&boxhd;"], [7, "&boxhu;"], [7, "&boxvh;"], [19, "&boxH;"], [0, "&boxV;"], [0, "&boxdR;"], [0, "&boxDr;"], [0, "&boxDR;"], [0, "&boxdL;"], [0, "&boxDl;"], [0, "&boxDL;"], [0, "&boxuR;"], [0, "&boxUr;"], [0, "&boxUR;"], [0, "&boxuL;"], [0, "&boxUl;"], [0, "&boxUL;"], [0, "&boxvR;"], [0, "&boxVr;"], [0, "&boxVR;"], [0, "&boxvL;"], [0, "&boxVl;"], [0, "&boxVL;"], [0, "&boxHd;"], [0, "&boxhD;"], [0, "&boxHD;"], [0, "&boxHu;"], [0, "&boxhU;"], [0, "&boxHU;"], [0, "&boxvH;"], [0, "&boxVh;"], [0, "&boxVH;"], [19, "&uhblk;"], [3, "&lhblk;"], [3, "&block;"], [8, "&blk14;"], [0, "&blk12;"], [0, "&blk34;"], [13, "&square;"], [8, "&blacksquare;"], [0, "&EmptyVerySmallSquare;"], [1, "&rect;"], [0, "&marker;"], [2, "&fltns;"], [1, "&bigtriangleup;"], [0, "&blacktriangle;"], [0, "&triangle;"], [2, "&blacktriangleright;"], [0, "&rtri;"], [3, "&bigtriangledown;"], [0, "&blacktriangledown;"], [0, "&dtri;"], [2, "&blacktriangleleft;"], [0, "&ltri;"], [6, "&loz;"], [0, "&cir;"], [32, "&tridot;"], [2, "&bigcirc;"], [8, "&ultri;"], [0, "&urtri;"], [0, "&lltri;"], [0, "&EmptySmallSquare;"], [0, "&FilledSmallSquare;"], [8, "&bigstar;"], [0, "&star;"], [7, "&phone;"], [49, "&female;"], [1, "&male;"], [29, "&spades;"], [2, "&clubs;"], [1, "&hearts;"], [0, "&diamondsuit;"], [3, "&sung;"], [2, "&flat;"], [0, "&natural;"], [0, "&sharp;"], [163, "&check;"], [3, "&cross;"], [8, "&malt;"], [21, "&sext;"], [33, "&VerticalSeparator;"], [25, "&lbbrk;"], [0, "&rbbrk;"], [84, "&bsolhsub;"], [0, "&suphsol;"], [28, "&LeftDoubleBracket;"], [0, "&RightDoubleBracket;"], [0, "&lang;"], [0, "&rang;"], [0, "&Lang;"], [0, "&Rang;"], [0, "&loang;"], [0, "&roang;"], [7, "&longleftarrow;"], [0, "&longrightarrow;"], [0, "&longleftrightarrow;"], [0, "&DoubleLongLeftArrow;"], [0, "&DoubleLongRightArrow;"], [0, "&DoubleLongLeftRightArrow;"], [1, "&longmapsto;"], [2, "&dzigrarr;"], [258, "&nvlArr;"], [0, "&nvrArr;"], [0, "&nvHarr;"], [0, "&Map;"], [6, "&lbarr;"], [0, "&bkarow;"], [0, "&lBarr;"], [0, "&dbkarow;"], [0, "&drbkarow;"], [0, "&DDotrahd;"], [0, "&UpArrowBar;"], [0, "&DownArrowBar;"], [2, "&Rarrtl;"], [2, "&latail;"], [0, "&ratail;"], [0, "&lAtail;"], [0, "&rAtail;"], [0, "&larrfs;"], [0, "&rarrfs;"], [0, "&larrbfs;"], [0, "&rarrbfs;"], [2, "&nwarhk;"], [0, "&nearhk;"], [0, "&hksearow;"], [0, "&hkswarow;"], [0, "&nwnear;"], [0, "&nesear;"], [0, "&seswar;"], [0, "&swnwar;"], [8, { v: "&rarrc;", n: 824, o: "&nrarrc;" }], [1, "&cudarrr;"], [0, "&ldca;"], [0, "&rdca;"], [0, "&cudarrl;"], [0, "&larrpl;"], [2, "&curarrm;"], [0, "&cularrp;"], [7, "&rarrpl;"], [2, "&harrcir;"], [0, "&Uarrocir;"], [0, "&lurdshar;"], [0, "&ldrushar;"], [2, "&LeftRightVector;"], [0, "&RightUpDownVector;"], [0, "&DownLeftRightVector;"], [0, "&LeftUpDownVector;"], [0, "&LeftVectorBar;"], [0, "&RightVectorBar;"], [0, "&RightUpVectorBar;"], [0, "&RightDownVectorBar;"], [0, "&DownLeftVectorBar;"], [0, "&DownRightVectorBar;"], [0, "&LeftUpVectorBar;"], [0, "&LeftDownVectorBar;"], [0, "&LeftTeeVector;"], [0, "&RightTeeVector;"], [0, "&RightUpTeeVector;"], [0, "&RightDownTeeVector;"], [0, "&DownLeftTeeVector;"], [0, "&DownRightTeeVector;"], [0, "&LeftUpTeeVector;"], [0, "&LeftDownTeeVector;"], [0, "&lHar;"], [0, "&uHar;"], [0, "&rHar;"], [0, "&dHar;"], [0, "&luruhar;"], [0, "&ldrdhar;"], [0, "&ruluhar;"], [0, "&rdldhar;"], [0, "&lharul;"], [0, "&llhard;"], [0, "&rharul;"], [0, "&lrhard;"], [0, "&udhar;"], [0, "&duhar;"], [0, "&RoundImplies;"], [0, "&erarr;"], [0, "&simrarr;"], [0, "&larrsim;"], [0, "&rarrsim;"], [0, "&rarrap;"], [0, "&ltlarr;"], [1, "&gtrarr;"], [0, "&subrarr;"], [1, "&suplarr;"], [0, "&lfisht;"], [0, "&rfisht;"], [0, "&ufisht;"], [0, "&dfisht;"], [5, "&lopar;"], [0, "&ropar;"], [4, "&lbrke;"], [0, "&rbrke;"], [0, "&lbrkslu;"], [0, "&rbrksld;"], [0, "&lbrksld;"], [0, "&rbrkslu;"], [0, "&langd;"], [0, "&rangd;"], [0, "&lparlt;"], [0, "&rpargt;"], [0, "&gtlPar;"], [0, "&ltrPar;"], [3, "&vzigzag;"], [1, "&vangrt;"], [0, "&angrtvbd;"], [6, "&ange;"], [0, "&range;"], [0, "&dwangle;"], [0, "&uwangle;"], [0, "&angmsdaa;"], [0, "&angmsdab;"], [0, "&angmsdac;"], [0, "&angmsdad;"], [0, "&angmsdae;"], [0, "&angmsdaf;"], [0, "&angmsdag;"], [0, "&angmsdah;"], [0, "&bemptyv;"], [0, "&demptyv;"], [0, "&cemptyv;"], [0, "&raemptyv;"], [0, "&laemptyv;"], [0, "&ohbar;"], [0, "&omid;"], [0, "&opar;"], [1, "&operp;"], [1, "&olcross;"], [0, "&odsold;"], [1, "&olcir;"], [0, "&ofcir;"], [0, "&olt;"], [0, "&ogt;"], [0, "&cirscir;"], [0, "&cirE;"], [0, "&solb;"], [0, "&bsolb;"], [3, "&boxbox;"], [3, "&trisb;"], [0, "&rtriltri;"], [0, { v: "&LeftTriangleBar;", n: 824, o: "&NotLeftTriangleBar;" }], [0, { v: "&RightTriangleBar;", n: 824, o: "&NotRightTriangleBar;" }], [11, "&iinfin;"], [0, "&infintie;"], [0, "&nvinfin;"], [4, "&eparsl;"], [0, "&smeparsl;"], [0, "&eqvparsl;"], [5, "&blacklozenge;"], [8, "&RuleDelayed;"], [1, "&dsol;"], [9, "&bigodot;"], [0, "&bigoplus;"], [0, "&bigotimes;"], [1, "&biguplus;"], [1, "&bigsqcup;"], [5, "&iiiint;"], [0, "&fpartint;"], [2, "&cirfnint;"], [0, "&awint;"], [0, "&rppolint;"], [0, "&scpolint;"], [0, "&npolint;"], [0, "&pointint;"], [0, "&quatint;"], [0, "&intlarhk;"], [10, "&pluscir;"], [0, "&plusacir;"], [0, "&simplus;"], [0, "&plusdu;"], [0, "&plussim;"], [0, "&plustwo;"], [1, "&mcomma;"], [0, "&minusdu;"], [2, "&loplus;"], [0, "&roplus;"], [0, "&Cross;"], [0, "&timesd;"], [0, "&timesbar;"], [1, "&smashp;"], [0, "&lotimes;"], [0, "&rotimes;"], [0, "&otimesas;"], [0, "&Otimes;"], [0, "&odiv;"], [0, "&triplus;"], [0, "&triminus;"], [0, "&tritime;"], [0, "&intprod;"], [2, "&amalg;"], [0, "&capdot;"], [1, "&ncup;"], [0, "&ncap;"], [0, "&capand;"], [0, "&cupor;"], [0, "&cupcap;"], [0, "&capcup;"], [0, "&cupbrcap;"], [0, "&capbrcup;"], [0, "&cupcup;"], [0, "&capcap;"], [0, "&ccups;"], [0, "&ccaps;"], [2, "&ccupssm;"], [2, "&And;"], [0, "&Or;"], [0, "&andand;"], [0, "&oror;"], [0, "&orslope;"], [0, "&andslope;"], [1, "&andv;"], [0, "&orv;"], [0, "&andd;"], [0, "&ord;"], [1, "&wedbar;"], [6, "&sdote;"], [3, "&simdot;"], [2, { v: "&congdot;", n: 824, o: "&ncongdot;" }], [0, "&easter;"], [0, "&apacir;"], [0, { v: "&apE;", n: 824, o: "&napE;" }], [0, "&eplus;"], [0, "&pluse;"], [0, "&Esim;"], [0, "&Colone;"], [0, "&Equal;"], [1, "&ddotseq;"], [0, "&equivDD;"], [0, "&ltcir;"], [0, "&gtcir;"], [0, "&ltquest;"], [0, "&gtquest;"], [0, { v: "&leqslant;", n: 824, o: "&nleqslant;" }], [0, { v: "&geqslant;", n: 824, o: "&ngeqslant;" }], [0, "&lesdot;"], [0, "&gesdot;"], [0, "&lesdoto;"], [0, "&gesdoto;"], [0, "&lesdotor;"], [0, "&gesdotol;"], [0, "&lap;"], [0, "&gap;"], [0, "&lne;"], [0, "&gne;"], [0, "&lnap;"], [0, "&gnap;"], [0, "&lEg;"], [0, "&gEl;"], [0, "&lsime;"], [0, "&gsime;"], [0, "&lsimg;"], [0, "&gsiml;"], [0, "&lgE;"], [0, "&glE;"], [0, "&lesges;"], [0, "&gesles;"], [0, "&els;"], [0, "&egs;"], [0, "&elsdot;"], [0, "&egsdot;"], [0, "&el;"], [0, "&eg;"], [2, "&siml;"], [0, "&simg;"], [0, "&simlE;"], [0, "&simgE;"], [0, { v: "&LessLess;", n: 824, o: "&NotNestedLessLess;" }], [0, { v: "&GreaterGreater;", n: 824, o: "&NotNestedGreaterGreater;" }], [1, "&glj;"], [0, "&gla;"], [0, "&ltcc;"], [0, "&gtcc;"], [0, "&lescc;"], [0, "&gescc;"], [0, "&smt;"], [0, "&lat;"], [0, { v: "&smte;", n: 65024, o: "&smtes;" }], [0, { v: "&late;", n: 65024, o: "&lates;" }], [0, "&bumpE;"], [0, { v: "&PrecedesEqual;", n: 824, o: "&NotPrecedesEqual;" }], [0, { v: "&sce;", n: 824, o: "&NotSucceedsEqual;" }], [2, "&prE;"], [0, "&scE;"], [0, "&precneqq;"], [0, "&scnE;"], [0, "&prap;"], [0, "&scap;"], [0, "&precnapprox;"], [0, "&scnap;"], [0, "&Pr;"], [0, "&Sc;"], [0, "&subdot;"], [0, "&supdot;"], [0, "&subplus;"], [0, "&supplus;"], [0, "&submult;"], [0, "&supmult;"], [0, "&subedot;"], [0, "&supedot;"], [0, { v: "&subE;", n: 824, o: "&nsubE;" }], [0, { v: "&supE;", n: 824, o: "&nsupE;" }], [0, "&subsim;"], [0, "&supsim;"], [2, { v: "&subnE;", n: 65024, o: "&varsubsetneqq;" }], [0, { v: "&supnE;", n: 65024, o: "&varsupsetneqq;" }], [2, "&csub;"], [0, "&csup;"], [0, "&csube;"], [0, "&csupe;"], [0, "&subsup;"], [0, "&supsub;"], [0, "&subsub;"], [0, "&supsup;"], [0, "&suphsub;"], [0, "&supdsub;"], [0, "&forkv;"], [0, "&topfork;"], [0, "&mlcp;"], [8, "&Dashv;"], [1, "&Vdashl;"], [0, "&Barv;"], [0, "&vBar;"], [0, "&vBarv;"], [1, "&Vbar;"], [0, "&Not;"], [0, "&bNot;"], [0, "&rnmid;"], [0, "&cirmid;"], [0, "&midcir;"], [0, "&topcir;"], [0, "&nhpar;"], [0, "&parsim;"], [9, { v: "&parsl;", n: 8421, o: "&nparsl;" }], [44343, { n: new Map(/* @__PURE__ */ restoreDiff([[56476, "&Ascr;"], [1, "&Cscr;"], [0, "&Dscr;"], [2, "&Gscr;"], [2, "&Jscr;"], [0, "&Kscr;"], [2, "&Nscr;"], [0, "&Oscr;"], [0, "&Pscr;"], [0, "&Qscr;"], [1, "&Sscr;"], [0, "&Tscr;"], [0, "&Uscr;"], [0, "&Vscr;"], [0, "&Wscr;"], [0, "&Xscr;"], [0, "&Yscr;"], [0, "&Zscr;"], [0, "&ascr;"], [0, "&bscr;"], [0, "&cscr;"], [0, "&dscr;"], [1, "&fscr;"], [1, "&hscr;"], [0, "&iscr;"], [0, "&jscr;"], [0, "&kscr;"], [0, "&lscr;"], [0, "&mscr;"], [0, "&nscr;"], [1, "&pscr;"], [0, "&qscr;"], [0, "&rscr;"], [0, "&sscr;"], [0, "&tscr;"], [0, "&uscr;"], [0, "&vscr;"], [0, "&wscr;"], [0, "&xscr;"], [0, "&yscr;"], [0, "&zscr;"], [52, "&Afr;"], [0, "&Bfr;"], [1, "&Dfr;"], [0, "&Efr;"], [0, "&Ffr;"], [0, "&Gfr;"], [2, "&Jfr;"], [0, "&Kfr;"], [0, "&Lfr;"], [0, "&Mfr;"], [0, "&Nfr;"], [0, "&Ofr;"], [0, "&Pfr;"], [0, "&Qfr;"], [1, "&Sfr;"], [0, "&Tfr;"], [0, "&Ufr;"], [0, "&Vfr;"], [0, "&Wfr;"], [0, "&Xfr;"], [0, "&Yfr;"], [1, "&afr;"], [0, "&bfr;"], [0, "&cfr;"], [0, "&dfr;"], [0, "&efr;"], [0, "&ffr;"], [0, "&gfr;"], [0, "&hfr;"], [0, "&ifr;"], [0, "&jfr;"], [0, "&kfr;"], [0, "&lfr;"], [0, "&mfr;"], [0, "&nfr;"], [0, "&ofr;"], [0, "&pfr;"], [0, "&qfr;"], [0, "&rfr;"], [0, "&sfr;"], [0, "&tfr;"], [0, "&ufr;"], [0, "&vfr;"], [0, "&wfr;"], [0, "&xfr;"], [0, "&yfr;"], [0, "&zfr;"], [0, "&Aopf;"], [0, "&Bopf;"], [1, "&Dopf;"], [0, "&Eopf;"], [0, "&Fopf;"], [0, "&Gopf;"], [1, "&Iopf;"], [0, "&Jopf;"], [0, "&Kopf;"], [0, "&Lopf;"], [0, "&Mopf;"], [1, "&Oopf;"], [3, "&Sopf;"], [0, "&Topf;"], [0, "&Uopf;"], [0, "&Vopf;"], [0, "&Wopf;"], [0, "&Xopf;"], [0, "&Yopf;"], [1, "&aopf;"], [0, "&bopf;"], [0, "&copf;"], [0, "&dopf;"], [0, "&eopf;"], [0, "&fopf;"], [0, "&gopf;"], [0, "&hopf;"], [0, "&iopf;"], [0, "&jopf;"], [0, "&kopf;"], [0, "&lopf;"], [0, "&mopf;"], [0, "&nopf;"], [0, "&oopf;"], [0, "&popf;"], [0, "&qopf;"], [0, "&ropf;"], [0, "&sopf;"], [0, "&topf;"], [0, "&uopf;"], [0, "&vopf;"], [0, "&wopf;"], [0, "&xopf;"], [0, "&yopf;"], [0, "&zopf;"]])) }], [8906, "&fflig;"], [0, "&filig;"], [0, "&fllig;"], [0, "&ffilig;"], [0, "&ffllig;"]]));
  }
});

// node_modules/entities/lib/escape.js
var require_escape = __commonJS({
  "node_modules/entities/lib/escape.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0;
    exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
    var xmlCodeMap = /* @__PURE__ */ new Map([
      [34, "&quot;"],
      [38, "&amp;"],
      [39, "&apos;"],
      [60, "&lt;"],
      [62, "&gt;"]
    ]);
    exports.getCodePoint = String.prototype.codePointAt != null ? function(str, index) {
      return str.codePointAt(index);
    } : function(c, index) {
      return (c.charCodeAt(index) & 64512) === 55296 ? (c.charCodeAt(index) - 55296) * 1024 + c.charCodeAt(index + 1) - 56320 + 65536 : c.charCodeAt(index);
    };
    function encodeXML(str) {
      var ret = "";
      var lastIdx = 0;
      var match;
      while ((match = exports.xmlReplacer.exec(str)) !== null) {
        var i = match.index;
        var char = str.charCodeAt(i);
        var next = xmlCodeMap.get(char);
        if (next !== void 0) {
          ret += str.substring(lastIdx, i) + next;
          lastIdx = i + 1;
        } else {
          ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";");
          lastIdx = exports.xmlReplacer.lastIndex += Number((char & 64512) === 55296);
        }
      }
      return ret + str.substr(lastIdx);
    }
    exports.encodeXML = encodeXML;
    exports.escape = encodeXML;
    function getEscaper(regex, map) {
      return function escape2(data) {
        var match;
        var lastIdx = 0;
        var result = "";
        while (match = regex.exec(data)) {
          if (lastIdx !== match.index) {
            result += data.substring(lastIdx, match.index);
          }
          result += map.get(match[0].charCodeAt(0));
          lastIdx = match.index + 1;
        }
        return result + data.substring(lastIdx);
      };
    }
    exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
    exports.escapeAttribute = getEscaper(/["&\u00A0]/g, /* @__PURE__ */ new Map([
      [34, "&quot;"],
      [38, "&amp;"],
      [160, "&nbsp;"]
    ]));
    exports.escapeText = getEscaper(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
      [38, "&amp;"],
      [60, "&lt;"],
      [62, "&gt;"],
      [160, "&nbsp;"]
    ]));
  }
});

// node_modules/entities/lib/encode.js
var require_encode = __commonJS({
  "node_modules/entities/lib/encode.js"(exports) {
    "use strict";
    var __importDefault = exports && exports.__importDefault || function(mod) {
      return mod && mod.__esModule ? mod : { "default": mod };
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.encodeNonAsciiHTML = exports.encodeHTML = void 0;
    var encode_html_js_1 = __importDefault(require_encode_html());
    var escape_js_1 = require_escape();
    var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
    function encodeHTML(data) {
      return encodeHTMLTrieRe(htmlReplacer, data);
    }
    exports.encodeHTML = encodeHTML;
    function encodeNonAsciiHTML(data) {
      return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);
    }
    exports.encodeNonAsciiHTML = encodeNonAsciiHTML;
    function encodeHTMLTrieRe(regExp, str) {
      var ret = "";
      var lastIdx = 0;
      var match;
      while ((match = regExp.exec(str)) !== null) {
        var i = match.index;
        ret += str.substring(lastIdx, i);
        var char = str.charCodeAt(i);
        var next = encode_html_js_1.default.get(char);
        if (typeof next === "object") {
          if (i + 1 < str.length) {
            var nextChar = str.charCodeAt(i + 1);
            var value = typeof next.n === "number" ? next.n === nextChar ? next.o : void 0 : next.n.get(nextChar);
            if (value !== void 0) {
              ret += value;
              lastIdx = regExp.lastIndex += 1;
              continue;
            }
          }
          next = next.v;
        }
        if (next !== void 0) {
          ret += next;
          lastIdx = i + 1;
        } else {
          var cp = (0, escape_js_1.getCodePoint)(str, i);
          ret += "&#x".concat(cp.toString(16), ";");
          lastIdx = regExp.lastIndex += Number(cp !== char);
        }
      }
      return ret + str.substr(lastIdx);
    }
  }
});

// node_modules/entities/lib/index.js
var require_lib = __commonJS({
  "node_modules/entities/lib/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0;
    var decode_js_1 = require_decode();
    var encode_js_1 = require_encode();
    var escape_js_1 = require_escape();
    var EntityLevel;
    (function(EntityLevel2) {
      EntityLevel2[EntityLevel2["XML"] = 0] = "XML";
      EntityLevel2[EntityLevel2["HTML"] = 1] = "HTML";
    })(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {}));
    var EncodingMode;
    (function(EncodingMode2) {
      EncodingMode2[EncodingMode2["UTF8"] = 0] = "UTF8";
      EncodingMode2[EncodingMode2["ASCII"] = 1] = "ASCII";
      EncodingMode2[EncodingMode2["Extensive"] = 2] = "Extensive";
      EncodingMode2[EncodingMode2["Attribute"] = 3] = "Attribute";
      EncodingMode2[EncodingMode2["Text"] = 4] = "Text";
    })(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {}));
    function decode(data, options) {
      if (options === void 0) {
        options = EntityLevel.XML;
      }
      var level = typeof options === "number" ? options : options.level;
      if (level === EntityLevel.HTML) {
        var mode = typeof options === "object" ? options.mode : void 0;
        return (0, decode_js_1.decodeHTML)(data, mode);
      }
      return (0, decode_js_1.decodeXML)(data);
    }
    exports.decode = decode;
    function decodeStrict(data, options) {
      var _a2;
      if (options === void 0) {
        options = EntityLevel.XML;
      }
      var opts = typeof options === "number" ? { level: options } : options;
      (_a2 = opts.mode) !== null && _a2 !== void 0 ? _a2 : opts.mode = decode_js_1.DecodingMode.Strict;
      return decode(data, opts);
    }
    exports.decodeStrict = decodeStrict;
    function encode(data, options) {
      if (options === void 0) {
        options = EntityLevel.XML;
      }
      var opts = typeof options === "number" ? { level: options } : options;
      if (opts.mode === EncodingMode.UTF8)
        return (0, escape_js_1.escapeUTF8)(data);
      if (opts.mode === EncodingMode.Attribute)
        return (0, escape_js_1.escapeAttribute)(data);
      if (opts.mode === EncodingMode.Text)
        return (0, escape_js_1.escapeText)(data);
      if (opts.level === EntityLevel.HTML) {
        if (opts.mode === EncodingMode.ASCII) {
          return (0, encode_js_1.encodeNonAsciiHTML)(data);
        }
        return (0, encode_js_1.encodeHTML)(data);
      }
      return (0, escape_js_1.encodeXML)(data);
    }
    exports.encode = encode;
    var escape_js_2 = require_escape();
    Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function() {
      return escape_js_2.encodeXML;
    } });
    Object.defineProperty(exports, "escape", { enumerable: true, get: function() {
      return escape_js_2.escape;
    } });
    Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function() {
      return escape_js_2.escapeUTF8;
    } });
    Object.defineProperty(exports, "escapeAttribute", { enumerable: true, get: function() {
      return escape_js_2.escapeAttribute;
    } });
    Object.defineProperty(exports, "escapeText", { enumerable: true, get: function() {
      return escape_js_2.escapeText;
    } });
    var encode_js_2 = require_encode();
    Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function() {
      return encode_js_2.encodeHTML;
    } });
    Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function() {
      return encode_js_2.encodeNonAsciiHTML;
    } });
    Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function() {
      return encode_js_2.encodeHTML;
    } });
    Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function() {
      return encode_js_2.encodeHTML;
    } });
    var decode_js_2 = require_decode();
    Object.defineProperty(exports, "EntityDecoder", { enumerable: true, get: function() {
      return decode_js_2.EntityDecoder;
    } });
    Object.defineProperty(exports, "DecodingMode", { enumerable: true, get: function() {
      return decode_js_2.DecodingMode;
    } });
    Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function() {
      return decode_js_2.decodeXML;
    } });
    Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function() {
      return decode_js_2.decodeHTML;
    } });
    Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function() {
      return decode_js_2.decodeHTMLStrict;
    } });
    Object.defineProperty(exports, "decodeHTMLAttribute", { enumerable: true, get: function() {
      return decode_js_2.decodeHTMLAttribute;
    } });
    Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function() {
      return decode_js_2.decodeHTML;
    } });
    Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function() {
      return decode_js_2.decodeHTML;
    } });
    Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function() {
      return decode_js_2.decodeHTMLStrict;
    } });
    Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function() {
      return decode_js_2.decodeHTMLStrict;
    } });
    Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function() {
      return decode_js_2.decodeXML;
    } });
  }
});

// node_modules/relateurl/lib/constants.js
var require_constants = __commonJS({
  "node_modules/relateurl/lib/constants.js"(exports, module2) {
    "use strict";
    module2.exports = {
      ABSOLUTE: "absolute",
      PATH_RELATIVE: "pathRelative",
      ROOT_RELATIVE: "rootRelative",
      SHORTEST: "shortest"
    };
  }
});

// node_modules/relateurl/lib/format.js
var require_format2 = __commonJS({
  "node_modules/relateurl/lib/format.js"(exports, module2) {
    "use strict";
    var constants = require_constants();
    function formatAuth(urlObj, options) {
      if (urlObj.auth && !options.removeAuth && (urlObj.extra.relation.maximumHost || options.output === constants.ABSOLUTE)) {
        return urlObj.auth + "@";
      }
      return "";
    }
    function formatHash(urlObj, options) {
      return urlObj.hash ? urlObj.hash : "";
    }
    function formatHost(urlObj, options) {
      if (urlObj.host.full && (urlObj.extra.relation.maximumAuth || options.output === constants.ABSOLUTE)) {
        return urlObj.host.full;
      }
      return "";
    }
    function formatPath(urlObj, options) {
      var str = "";
      var absolutePath = urlObj.path.absolute.string;
      var relativePath = urlObj.path.relative.string;
      var resource = showResource(urlObj, options);
      if (urlObj.extra.relation.maximumHost || options.output === constants.ABSOLUTE || options.output === constants.ROOT_RELATIVE) {
        str = absolutePath;
      } else if (relativePath.length <= absolutePath.length && options.output === constants.SHORTEST || options.output === constants.PATH_RELATIVE) {
        str = relativePath;
        if (str === "") {
          var query = showQuery(urlObj, options) && !!getQuery(urlObj, options);
          if (urlObj.extra.relation.maximumPath && !resource) {
            str = "./";
          } else if (urlObj.extra.relation.overridesQuery && !resource && !query) {
            str = "./";
          }
        }
      } else {
        str = absolutePath;
      }
      if (str === "/" && !resource && options.removeRootTrailingSlash && (!urlObj.extra.relation.minimumPort || options.output === constants.ABSOLUTE)) {
        str = "";
      }
      return str;
    }
    function formatPort(urlObj, options) {
      if (urlObj.port && !urlObj.extra.portIsDefault && urlObj.extra.relation.maximumHost) {
        return ":" + urlObj.port;
      }
      return "";
    }
    function formatQuery(urlObj, options) {
      return showQuery(urlObj, options) ? getQuery(urlObj, options) : "";
    }
    function formatResource(urlObj, options) {
      return showResource(urlObj, options) ? urlObj.resource : "";
    }
    function formatScheme(urlObj, options) {
      var str = "";
      if (urlObj.extra.relation.maximumHost || options.output === constants.ABSOLUTE) {
        if (!urlObj.extra.relation.minimumScheme || !options.schemeRelative || options.output === constants.ABSOLUTE) {
          str += urlObj.scheme + "://";
        } else {
          str += "//";
        }
      }
      return str;
    }
    function formatUrl(urlObj, options) {
      var url = "";
      url += formatScheme(urlObj, options);
      url += formatAuth(urlObj, options);
      url += formatHost(urlObj, options);
      url += formatPort(urlObj, options);
      url += formatPath(urlObj, options);
      url += formatResource(urlObj, options);
      url += formatQuery(urlObj, options);
      url += formatHash(urlObj, options);
      return url;
    }
    function getQuery(urlObj, options) {
      var stripQuery = options.removeEmptyQueries && urlObj.extra.relation.minimumPort;
      return urlObj.query.string[stripQuery ? "stripped" : "full"];
    }
    function showQuery(urlObj, options) {
      return !urlObj.extra.relation.minimumQuery || options.output === constants.ABSOLUTE || options.output === constants.ROOT_RELATIVE;
    }
    function showResource(urlObj, options) {
      var removeIndex = options.removeDirectoryIndexes && urlObj.extra.resourceIsIndex;
      var removeMatchingResource = urlObj.extra.relation.minimumResource && options.output !== constants.ABSOLUTE && options.output !== constants.ROOT_RELATIVE;
      return !!urlObj.resource && !removeMatchingResource && !removeIndex;
    }
    module2.exports = formatUrl;
  }
});

// node_modules/relateurl/lib/util/object.js
var require_object = __commonJS({
  "node_modules/relateurl/lib/util/object.js"(exports, module2) {
    "use strict";
    function clone(obj) {
      if (obj instanceof Object) {
        var clonedObj = obj instanceof Array ? [] : {};
        for (var i in obj) {
          if (obj.hasOwnProperty(i)) {
            clonedObj[i] = clone(obj[i]);
          }
        }
        return clonedObj;
      }
      return obj;
    }
    function isPlainObject(obj) {
      return !!obj && typeof obj === "object" && obj.constructor === Object;
    }
    function shallowMerge(target, source) {
      if (target instanceof Object && source instanceof Object) {
        for (var i in source) {
          if (source.hasOwnProperty(i)) {
            target[i] = source[i];
          }
        }
      }
      return target;
    }
    module2.exports = {
      clone,
      isPlainObject,
      shallowMerge
    };
  }
});

// node_modules/relateurl/lib/options.js
var require_options = __commonJS({
  "node_modules/relateurl/lib/options.js"(exports, module2) {
    "use strict";
    var objUtils = require_object();
    function getOptions(options, defaults) {
      if (objUtils.isPlainObject(options)) {
        var newOptions = {};
        for (var i in defaults) {
          if (defaults.hasOwnProperty(i)) {
            if (options[i] !== void 0) {
              newOptions[i] = mergeOption(options[i], defaults[i]);
            } else {
              newOptions[i] = defaults[i];
            }
          }
        }
        return newOptions;
      } else {
        return defaults;
      }
    }
    function mergeOption(newValues, defaultValues) {
      if (defaultValues instanceof Object && newValues instanceof Object) {
        if (defaultValues instanceof Array && newValues instanceof Array) {
          return defaultValues.concat(newValues);
        } else {
          return objUtils.shallowMerge(newValues, defaultValues);
        }
      }
      return newValues;
    }
    module2.exports = getOptions;
  }
});

// node_modules/relateurl/lib/parse/hrefInfo.js
var require_hrefInfo = __commonJS({
  "node_modules/relateurl/lib/parse/hrefInfo.js"(exports, module2) {
    "use strict";
    function hrefInfo(urlObj) {
      var minimumPathOnly = !urlObj.scheme && !urlObj.auth && !urlObj.host.full && !urlObj.port;
      var minimumResourceOnly = minimumPathOnly && !urlObj.path.absolute.string;
      var minimumQueryOnly = minimumResourceOnly && !urlObj.resource;
      var minimumHashOnly = minimumQueryOnly && !urlObj.query.string.full.length;
      var empty = minimumHashOnly && !urlObj.hash;
      urlObj.extra.hrefInfo.minimumPathOnly = minimumPathOnly;
      urlObj.extra.hrefInfo.minimumResourceOnly = minimumResourceOnly;
      urlObj.extra.hrefInfo.minimumQueryOnly = minimumQueryOnly;
      urlObj.extra.hrefInfo.minimumHashOnly = minimumHashOnly;
      urlObj.extra.hrefInfo.empty = empty;
    }
    module2.exports = hrefInfo;
  }
});

// node_modules/relateurl/lib/parse/host.js
var require_host = __commonJS({
  "node_modules/relateurl/lib/parse/host.js"(exports, module2) {
    "use strict";
    function parseHost(urlObj, options) {
      if (options.ignore_www) {
        var host = urlObj.host.full;
        if (host) {
          var stripped = host;
          if (host.indexOf("www.") === 0) {
            stripped = host.substr(4);
          }
          urlObj.host.stripped = stripped;
        }
      }
    }
    module2.exports = parseHost;
  }
});

// node_modules/relateurl/lib/parse/path.js
var require_path = __commonJS({
  "node_modules/relateurl/lib/parse/path.js"(exports, module2) {
    "use strict";
    function isDirectoryIndex(resource, options) {
      var verdict = false;
      options.directoryIndexes.every(function(index) {
        if (index === resource) {
          verdict = true;
          return false;
        }
        return true;
      });
      return verdict;
    }
    function parsePath(urlObj, options) {
      var path = urlObj.path.absolute.string;
      if (path) {
        var lastSlash = path.lastIndexOf("/");
        if (lastSlash > -1) {
          if (++lastSlash < path.length) {
            var resource = path.substr(lastSlash);
            if (resource !== "." && resource !== "..") {
              urlObj.resource = resource;
              path = path.substr(0, lastSlash);
            } else {
              path += "/";
            }
          }
          urlObj.path.absolute.string = path;
          urlObj.path.absolute.array = splitPath(path);
        } else if (path === "." || path === "..") {
          path += "/";
          urlObj.path.absolute.string = path;
          urlObj.path.absolute.array = splitPath(path);
        } else {
          urlObj.resource = path;
          urlObj.path.absolute.string = null;
        }
        urlObj.extra.resourceIsIndex = isDirectoryIndex(urlObj.resource, options);
      }
    }
    function splitPath(path) {
      if (path !== "/") {
        var cleaned = [];
        path.split("/").forEach(function(dir) {
          if (dir !== "") {
            cleaned.push(dir);
          }
        });
        return cleaned;
      } else {
        return [];
      }
    }
    module2.exports = parsePath;
  }
});

// node_modules/relateurl/lib/parse/port.js
var require_port = __commonJS({
  "node_modules/relateurl/lib/parse/port.js"(exports, module2) {
    "use strict";
    function parsePort(urlObj, options) {
      var defaultPort = -1;
      for (var i in options.defaultPorts) {
        if (i === urlObj.scheme && options.defaultPorts.hasOwnProperty(i)) {
          defaultPort = options.defaultPorts[i];
          break;
        }
      }
      if (defaultPort > -1) {
        defaultPort = defaultPort.toString();
        if (urlObj.port === null) {
          urlObj.port = defaultPort;
        }
        urlObj.extra.portIsDefault = urlObj.port === defaultPort;
      }
    }
    module2.exports = parsePort;
  }
});

// node_modules/relateurl/lib/parse/query.js
var require_query = __commonJS({
  "node_modules/relateurl/lib/parse/query.js"(exports, module2) {
    "use strict";
    var hasOwnProperty = Object.prototype.hasOwnProperty;
    function parseQuery(urlObj, options) {
      urlObj.query.string.full = stringify(urlObj.query.object, false);
      if (options.removeEmptyQueries) {
        urlObj.query.string.stripped = stringify(urlObj.query.object, true);
      }
    }
    function stringify(queryObj, removeEmptyQueries) {
      var count = 0;
      var str = "";
      for (var i in queryObj) {
        if (i !== "" && hasOwnProperty.call(queryObj, i) === true) {
          var value = queryObj[i];
          if (value !== "" || !removeEmptyQueries) {
            str += ++count === 1 ? "?" : "&";
            i = encodeURIComponent(i);
            if (value !== "") {
              str += i + "=" + encodeURIComponent(value).replace(/%20/g, "+");
            } else {
              str += i;
            }
          }
        }
      }
      return str;
    }
    module2.exports = parseQuery;
  }
});

// node_modules/relateurl/lib/parse/urlstring.js
var require_urlstring = __commonJS({
  "node_modules/relateurl/lib/parse/urlstring.js"(exports, module2) {
    "use strict";
    var _parseUrl = require("url").parse;
    function clean(urlObj) {
      var scheme = urlObj.protocol;
      if (scheme) {
        if (scheme.indexOf(":") === scheme.length - 1) {
          scheme = scheme.substr(0, scheme.length - 1);
        }
      }
      urlObj.host = {
        full: urlObj.hostname,
        stripped: null
      };
      urlObj.path = {
        absolute: {
          array: null,
          string: urlObj.pathname
        },
        relative: {
          array: null,
          string: null
        }
      };
      urlObj.query = {
        object: urlObj.query,
        string: {
          full: null,
          stripped: null
        }
      };
      urlObj.extra = {
        hrefInfo: {
          minimumPathOnly: null,
          minimumResourceOnly: null,
          minimumQueryOnly: null,
          minimumHashOnly: null,
          empty: null,
          separatorOnlyQuery: urlObj.search === "?"
        },
        portIsDefault: null,
        relation: {
          maximumScheme: null,
          maximumAuth: null,
          maximumHost: null,
          maximumPort: null,
          maximumPath: null,
          maximumResource: null,
          maximumQuery: null,
          maximumHash: null,
          minimumScheme: null,
          minimumAuth: null,
          minimumHost: null,
          minimumPort: null,
          minimumPath: null,
          minimumResource: null,
          minimumQuery: null,
          minimumHash: null,
          overridesQuery: null
        },
        resourceIsIndex: null,
        slashes: urlObj.slashes
      };
      urlObj.resource = null;
      urlObj.scheme = scheme;
      delete urlObj.hostname;
      delete urlObj.pathname;
      delete urlObj.protocol;
      delete urlObj.search;
      delete urlObj.slashes;
      return urlObj;
    }
    function validScheme(url, options) {
      var valid = true;
      options.rejectedSchemes.every(function(rejectedScheme) {
        valid = !(url.indexOf(rejectedScheme + ":") === 0);
        return valid;
      });
      return valid;
    }
    function parseUrlString(url, options) {
      if (validScheme(url, options)) {
        return clean(_parseUrl(url, true, options.slashesDenoteHost));
      } else {
        return { href: url, valid: false };
      }
    }
    module2.exports = parseUrlString;
  }
});

// node_modules/relateurl/lib/util/path.js
var require_path2 = __commonJS({
  "node_modules/relateurl/lib/util/path.js"(exports, module2) {
    "use strict";
    function joinPath(pathArray) {
      if (pathArray.length > 0) {
        return pathArray.join("/") + "/";
      } else {
        return "";
      }
    }
    function resolveDotSegments(pathArray) {
      var pathAbsolute = [];
      pathArray.forEach(function(dir) {
        if (dir !== "..") {
          if (dir !== ".") {
            pathAbsolute.push(dir);
          }
        } else {
          if (pathAbsolute.length > 0) {
            pathAbsolute.splice(pathAbsolute.length - 1, 1);
          }
        }
      });
      return pathAbsolute;
    }
    module2.exports = {
      join: joinPath,
      resolveDotSegments
    };
  }
});

// node_modules/relateurl/lib/parse/index.js
var require_parse = __commonJS({
  "node_modules/relateurl/lib/parse/index.js"(exports, module2) {
    "use strict";
    var hrefInfo = require_hrefInfo();
    var parseHost = require_host();
    var parsePath = require_path();
    var parsePort = require_port();
    var parseQuery = require_query();
    var parseUrlString = require_urlstring();
    var pathUtils = require_path2();
    function parseFromUrl(url, options, fallback) {
      if (url) {
        var urlObj = parseUrl(url, options);
        var pathArray = pathUtils.resolveDotSegments(urlObj.path.absolute.array);
        urlObj.path.absolute.array = pathArray;
        urlObj.path.absolute.string = "/" + pathUtils.join(pathArray);
        return urlObj;
      } else {
        return fallback;
      }
    }
    function parseUrl(url, options) {
      var urlObj = parseUrlString(url, options);
      if (urlObj.valid === false)
        return urlObj;
      parseHost(urlObj, options);
      parsePort(urlObj, options);
      parsePath(urlObj, options);
      parseQuery(urlObj, options);
      hrefInfo(urlObj);
      return urlObj;
    }
    module2.exports = {
      from: parseFromUrl,
      to: parseUrl
    };
  }
});

// node_modules/relateurl/lib/relate/findRelation.js
var require_findRelation = __commonJS({
  "node_modules/relateurl/lib/relate/findRelation.js"(exports, module2) {
    "use strict";
    function findRelation_upToPath(urlObj, siteUrlObj, options) {
      var pathOnly = urlObj.extra.hrefInfo.minimumPathOnly;
      var minimumScheme = urlObj.scheme === siteUrlObj.scheme || !urlObj.scheme;
      var minimumAuth = minimumScheme && (urlObj.auth === siteUrlObj.auth || options.removeAuth || pathOnly);
      var www = options.ignore_www ? "stripped" : "full";
      var minimumHost = minimumAuth && (urlObj.host[www] === siteUrlObj.host[www] || pathOnly);
      var minimumPort = minimumHost && (urlObj.port === siteUrlObj.port || pathOnly);
      urlObj.extra.relation.minimumScheme = minimumScheme;
      urlObj.extra.relation.minimumAuth = minimumAuth;
      urlObj.extra.relation.minimumHost = minimumHost;
      urlObj.extra.relation.minimumPort = minimumPort;
      urlObj.extra.relation.maximumScheme = !minimumScheme || minimumScheme && !minimumAuth;
      urlObj.extra.relation.maximumAuth = !minimumScheme || minimumScheme && !minimumHost;
      urlObj.extra.relation.maximumHost = !minimumScheme || minimumScheme && !minimumPort;
    }
    function findRelation_pathOn(urlObj, siteUrlObj, options) {
      var queryOnly = urlObj.extra.hrefInfo.minimumQueryOnly;
      var hashOnly = urlObj.extra.hrefInfo.minimumHashOnly;
      var empty = urlObj.extra.hrefInfo.empty;
      var minimumPort = urlObj.extra.relation.minimumPort;
      var minimumScheme = urlObj.extra.relation.minimumScheme;
      var minimumPath = minimumPort && urlObj.path.absolute.string === siteUrlObj.path.absolute.string;
      var matchingResource = urlObj.resource === siteUrlObj.resource || !urlObj.resource && siteUrlObj.extra.resourceIsIndex || options.removeDirectoryIndexes && urlObj.extra.resourceIsIndex && !siteUrlObj.resource;
      var minimumResource = minimumPath && (matchingResource || queryOnly || hashOnly || empty);
      var query = options.removeEmptyQueries ? "stripped" : "full";
      var urlQuery = urlObj.query.string[query];
      var siteUrlQuery = siteUrlObj.query.string[query];
      var minimumQuery = minimumResource && !!urlQuery && urlQuery === siteUrlQuery || (hashOnly || empty) && !urlObj.extra.hrefInfo.separatorOnlyQuery;
      var minimumHash = minimumQuery && urlObj.hash === siteUrlObj.hash;
      urlObj.extra.relation.minimumPath = minimumPath;
      urlObj.extra.relation.minimumResource = minimumResource;
      urlObj.extra.relation.minimumQuery = minimumQuery;
      urlObj.extra.relation.minimumHash = minimumHash;
      urlObj.extra.relation.maximumPort = !minimumScheme || minimumScheme && !minimumPath;
      urlObj.extra.relation.maximumPath = !minimumScheme || minimumScheme && !minimumResource;
      urlObj.extra.relation.maximumResource = !minimumScheme || minimumScheme && !minimumQuery;
      urlObj.extra.relation.maximumQuery = !minimumScheme || minimumScheme && !minimumHash;
      urlObj.extra.relation.maximumHash = !minimumScheme || minimumScheme && !minimumHash;
      urlObj.extra.relation.overridesQuery = minimumPath && urlObj.extra.relation.maximumResource && !minimumQuery && !!siteUrlQuery;
    }
    module2.exports = {
      pathOn: findRelation_pathOn,
      upToPath: findRelation_upToPath
    };
  }
});

// node_modules/relateurl/lib/relate/absolutize.js
var require_absolutize = __commonJS({
  "node_modules/relateurl/lib/relate/absolutize.js"(exports, module2) {
    "use strict";
    var findRelation = require_findRelation();
    var objUtils = require_object();
    var pathUtils = require_path2();
    function absolutize(urlObj, siteUrlObj, options) {
      findRelation.upToPath(urlObj, siteUrlObj, options);
      if (urlObj.extra.relation.minimumScheme)
        urlObj.scheme = siteUrlObj.scheme;
      if (urlObj.extra.relation.minimumAuth)
        urlObj.auth = siteUrlObj.auth;
      if (urlObj.extra.relation.minimumHost)
        urlObj.host = objUtils.clone(siteUrlObj.host);
      if (urlObj.extra.relation.minimumPort)
        copyPort(urlObj, siteUrlObj);
      if (urlObj.extra.relation.minimumScheme)
        copyPath(urlObj, siteUrlObj);
      findRelation.pathOn(urlObj, siteUrlObj, options);
      if (urlObj.extra.relation.minimumResource)
        copyResource(urlObj, siteUrlObj);
      if (urlObj.extra.relation.minimumQuery)
        urlObj.query = objUtils.clone(siteUrlObj.query);
      if (urlObj.extra.relation.minimumHash)
        urlObj.hash = siteUrlObj.hash;
    }
    function copyPath(urlObj, siteUrlObj) {
      if (urlObj.extra.relation.maximumHost || !urlObj.extra.hrefInfo.minimumResourceOnly) {
        var pathArray = urlObj.path.absolute.array;
        var pathString = "/";
        if (pathArray) {
          if (urlObj.extra.hrefInfo.minimumPathOnly && urlObj.path.absolute.string.indexOf("/") !== 0) {
            pathArray = siteUrlObj.path.absolute.array.concat(pathArray);
          }
          pathArray = pathUtils.resolveDotSegments(pathArray);
          pathString += pathUtils.join(pathArray);
        } else {
          pathArray = [];
        }
        urlObj.path.absolute.array = pathArray;
        urlObj.path.absolute.string = pathString;
      } else {
        urlObj.path = objUtils.clone(siteUrlObj.path);
      }
    }
    function copyPort(urlObj, siteUrlObj) {
      urlObj.port = siteUrlObj.port;
      urlObj.extra.portIsDefault = siteUrlObj.extra.portIsDefault;
    }
    function copyResource(urlObj, siteUrlObj) {
      urlObj.resource = siteUrlObj.resource;
      urlObj.extra.resourceIsIndex = siteUrlObj.extra.resourceIsIndex;
    }
    module2.exports = absolutize;
  }
});

// node_modules/relateurl/lib/relate/relativize.js
var require_relativize = __commonJS({
  "node_modules/relateurl/lib/relate/relativize.js"(exports, module2) {
    "use strict";
    var pathUtils = require_path2();
    function relatePath(absolutePath, siteAbsolutePath) {
      var relativePath = [];
      var related = true;
      var parentIndex = -1;
      siteAbsolutePath.forEach(function(siteAbsoluteDir, i) {
        if (related) {
          if (absolutePath[i] !== siteAbsoluteDir) {
            related = false;
          } else {
            parentIndex = i;
          }
        }
        if (!related) {
          relativePath.push("..");
        }
      });
      absolutePath.forEach(function(dir, i) {
        if (i > parentIndex) {
          relativePath.push(dir);
        }
      });
      return relativePath;
    }
    function relativize(urlObj, siteUrlObj, options) {
      if (urlObj.extra.relation.minimumScheme) {
        var pathArray = relatePath(urlObj.path.absolute.array, siteUrlObj.path.absolute.array);
        urlObj.path.relative.array = pathArray;
        urlObj.path.relative.string = pathUtils.join(pathArray);
      }
    }
    module2.exports = relativize;
  }
});

// node_modules/relateurl/lib/relate/index.js
var require_relate = __commonJS({
  "node_modules/relateurl/lib/relate/index.js"(exports, module2) {
    "use strict";
    var absolutize = require_absolutize();
    var relativize = require_relativize();
    function relateUrl(siteUrlObj, urlObj, options) {
      absolutize(urlObj, siteUrlObj, options);
      relativize(urlObj, siteUrlObj, options);
      return urlObj;
    }
    module2.exports = relateUrl;
  }
});

// node_modules/relateurl/lib/index.js
var require_lib2 = __commonJS({
  "node_modules/relateurl/lib/index.js"(exports, module2) {
    "use strict";
    var constants = require_constants();
    var formatUrl = require_format2();
    var getOptions = require_options();
    var objUtils = require_object();
    var parseUrl = require_parse();
    var relateUrl = require_relate();
    function RelateUrl(from, options) {
      this.options = getOptions(options, {
        defaultPorts: { ftp: 21, http: 80, https: 443 },
        directoryIndexes: ["index.html"],
        ignore_www: false,
        output: RelateUrl.SHORTEST,
        rejectedSchemes: ["data", "javascript", "mailto"],
        removeAuth: false,
        removeDirectoryIndexes: true,
        removeEmptyQueries: false,
        removeRootTrailingSlash: true,
        schemeRelative: true,
        site: void 0,
        slashesDenoteHost: true
      });
      this.from = parseUrl.from(from, this.options, null);
    }
    RelateUrl.prototype.relate = function(from, to, options) {
      if (objUtils.isPlainObject(to)) {
        options = to;
        to = from;
        from = null;
      } else if (!to) {
        to = from;
        from = null;
      }
      options = getOptions(options, this.options);
      from = from || options.site;
      from = parseUrl.from(from, options, this.from);
      if (!from || !from.href) {
        throw new Error("from value not defined.");
      } else if (from.extra.hrefInfo.minimumPathOnly) {
        throw new Error("from value supplied is not absolute: " + from.href);
      }
      to = parseUrl.to(to, options);
      if (to.valid === false)
        return to.href;
      to = relateUrl(from, to, options);
      to = formatUrl(to, options);
      return to;
    };
    RelateUrl.relate = function(from, to, options) {
      return new RelateUrl().relate(from, to, options);
    };
    objUtils.shallowMerge(RelateUrl, constants);
    module2.exports = RelateUrl;
  }
});

// node_modules/@jridgewell/source-map/dist/source-map.umd.js
var require_source_map_umd = __commonJS({
  "node_modules/@jridgewell/source-map/dist/source-map.umd.js"(exports, module2) {
    (function(global2, factory) {
      typeof exports === "object" && typeof module2 !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.sourceMap = {}));
    })(exports, function(exports2) {
      "use strict";
      const comma = ",".charCodeAt(0);
      const semicolon = ";".charCodeAt(0);
      const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
      const intToChar = new Uint8Array(64);
      const charToInteger = new Uint8Array(128);
      for (let i = 0; i < chars.length; i++) {
        const c = chars.charCodeAt(i);
        charToInteger[c] = i;
        intToChar[i] = c;
      }
      const td = typeof TextDecoder !== "undefined" ? new TextDecoder() : typeof Buffer !== "undefined" ? {
        decode(buf) {
          const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
          return out.toString();
        }
      } : {
        decode(buf) {
          let out = "";
          for (let i = 0; i < buf.length; i++) {
            out += String.fromCharCode(buf[i]);
          }
          return out;
        }
      };
      function decode(mappings) {
        const state = new Int32Array(5);
        const decoded = [];
        let line = [];
        let sorted = true;
        let lastCol = 0;
        for (let i = 0; i < mappings.length; ) {
          const c = mappings.charCodeAt(i);
          if (c === comma) {
            i++;
          } else if (c === semicolon) {
            state[0] = lastCol = 0;
            if (!sorted)
              sort(line);
            sorted = true;
            decoded.push(line);
            line = [];
            i++;
          } else {
            i = decodeInteger(mappings, i, state, 0);
            const col = state[0];
            if (col < lastCol)
              sorted = false;
            lastCol = col;
            if (!hasMoreSegments(mappings, i)) {
              line.push([col]);
              continue;
            }
            i = decodeInteger(mappings, i, state, 1);
            i = decodeInteger(mappings, i, state, 2);
            i = decodeInteger(mappings, i, state, 3);
            if (!hasMoreSegments(mappings, i)) {
              line.push([col, state[1], state[2], state[3]]);
              continue;
            }
            i = decodeInteger(mappings, i, state, 4);
            line.push([col, state[1], state[2], state[3], state[4]]);
          }
        }
        if (!sorted)
          sort(line);
        decoded.push(line);
        return decoded;
      }
      function decodeInteger(mappings, pos, state, j) {
        let value = 0;
        let shift = 0;
        let integer = 0;
        do {
          const c = mappings.charCodeAt(pos++);
          integer = charToInteger[c];
          value |= (integer & 31) << shift;
          shift += 5;
        } while (integer & 32);
        const shouldNegate = value & 1;
        value >>>= 1;
        if (shouldNegate) {
          value = -2147483648 | -value;
        }
        state[j] += value;
        return pos;
      }
      function hasMoreSegments(mappings, i) {
        if (i >= mappings.length)
          return false;
        const c = mappings.charCodeAt(i);
        if (c === comma || c === semicolon)
          return false;
        return true;
      }
      function sort(line) {
        line.sort(sortComparator$1);
      }
      function sortComparator$1(a, b) {
        return a[0] - b[0];
      }
      function encode(decoded) {
        const state = new Int32Array(5);
        let buf = new Uint8Array(1024);
        let pos = 0;
        for (let i = 0; i < decoded.length; i++) {
          const line = decoded[i];
          if (i > 0) {
            buf = reserve(buf, pos, 1);
            buf[pos++] = semicolon;
          }
          if (line.length === 0)
            continue;
          state[0] = 0;
          for (let j = 0; j < line.length; j++) {
            const segment = line[j];
            buf = reserve(buf, pos, 36);
            if (j > 0)
              buf[pos++] = comma;
            pos = encodeInteger(buf, pos, state, segment, 0);
            if (segment.length === 1)
              continue;
            pos = encodeInteger(buf, pos, state, segment, 1);
            pos = encodeInteger(buf, pos, state, segment, 2);
            pos = encodeInteger(buf, pos, state, segment, 3);
            if (segment.length === 4)
              continue;
            pos = encodeInteger(buf, pos, state, segment, 4);
          }
        }
        return td.decode(buf.subarray(0, pos));
      }
      function reserve(buf, pos, count) {
        if (buf.length > pos + count)
          return buf;
        const swap = new Uint8Array(buf.length * 2);
        swap.set(buf);
        return swap;
      }
      function encodeInteger(buf, pos, state, segment, j) {
        const next = segment[j];
        let num = next - state[j];
        state[j] = next;
        num = num < 0 ? -num << 1 | 1 : num << 1;
        do {
          let clamped = num & 31;
          num >>>= 5;
          if (num > 0)
            clamped |= 32;
          buf[pos++] = intToChar[clamped];
        } while (num > 0);
        return pos;
      }
      const schemeRegex = /^[\w+.-]+:\/\//;
      const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?/;
      const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/]*)?)?(\/?.*)/i;
      function isAbsoluteUrl(input) {
        return schemeRegex.test(input);
      }
      function isSchemeRelativeUrl(input) {
        return input.startsWith("//");
      }
      function isAbsolutePath(input) {
        return input.startsWith("/");
      }
      function isFileUrl(input) {
        return input.startsWith("file:");
      }
      function parseAbsoluteUrl(input) {
        const match = urlRegex.exec(input);
        return makeUrl(match[1], match[2] || "", match[3], match[4] || "", match[5] || "/");
      }
      function parseFileUrl(input) {
        const match = fileRegex.exec(input);
        const path = match[2];
        return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path) ? path : "/" + path);
      }
      function makeUrl(scheme, user, host, port, path) {
        return {
          scheme,
          user,
          host,
          port,
          path,
          relativePath: false
        };
      }
      function parseUrl(input) {
        if (isSchemeRelativeUrl(input)) {
          const url2 = parseAbsoluteUrl("http:" + input);
          url2.scheme = "";
          return url2;
        }
        if (isAbsolutePath(input)) {
          const url2 = parseAbsoluteUrl("http://foo.com" + input);
          url2.scheme = "";
          url2.host = "";
          return url2;
        }
        if (isFileUrl(input))
          return parseFileUrl(input);
        if (isAbsoluteUrl(input))
          return parseAbsoluteUrl(input);
        const url = parseAbsoluteUrl("http://foo.com/" + input);
        url.scheme = "";
        url.host = "";
        url.relativePath = true;
        return url;
      }
      function stripPathFilename(path) {
        if (path.endsWith("/.."))
          return path;
        const index = path.lastIndexOf("/");
        return path.slice(0, index + 1);
      }
      function mergePaths(url, base) {
        if (!url.relativePath)
          return;
        normalizePath(base);
        if (url.path === "/") {
          url.path = base.path;
        } else {
          url.path = stripPathFilename(base.path) + url.path;
        }
        url.relativePath = base.relativePath;
      }
      function normalizePath(url) {
        const { relativePath } = url;
        const pieces = url.path.split("/");
        let pointer = 1;
        let positive = 0;
        let addTrailingSlash = false;
        for (let i = 1; i < pieces.length; i++) {
          const piece = pieces[i];
          if (!piece) {
            addTrailingSlash = true;
            continue;
          }
          addTrailingSlash = false;
          if (piece === ".")
            continue;
          if (piece === "..") {
            if (positive) {
              addTrailingSlash = true;
              positive--;
              pointer--;
            } else if (relativePath) {
              pieces[pointer++] = piece;
            }
            continue;
          }
          pieces[pointer++] = piece;
          positive++;
        }
        let path = "";
        for (let i = 1; i < pointer; i++) {
          path += "/" + pieces[i];
        }
        if (!path || addTrailingSlash && !path.endsWith("/..")) {
          path += "/";
        }
        url.path = path;
      }
      function resolve$1(input, base) {
        if (!input && !base)
          return "";
        const url = parseUrl(input);
        if (base && !url.scheme) {
          const baseUrl = parseUrl(base);
          url.scheme = baseUrl.scheme;
          if (!url.host) {
            url.user = baseUrl.user;
            url.host = baseUrl.host;
            url.port = baseUrl.port;
          }
          mergePaths(url, baseUrl);
        }
        normalizePath(url);
        if (url.relativePath) {
          const path = url.path.slice(1);
          if (!path)
            return ".";
          const keepRelative = (base || input).startsWith(".");
          return !keepRelative || path.startsWith(".") ? path : "./" + path;
        }
        if (!url.scheme && !url.host)
          return url.path;
        return `${url.scheme}//${url.user}${url.host}${url.port}${url.path}`;
      }
      function resolve(input, base) {
        if (base && !base.endsWith("/"))
          base += "/";
        return resolve$1(input, base);
      }
      function stripFilename(path) {
        if (!path)
          return "";
        const index = path.lastIndexOf("/");
        return path.slice(0, index + 1);
      }
      const COLUMN$1 = 0;
      const SOURCES_INDEX$1 = 1;
      const SOURCE_LINE$1 = 2;
      const SOURCE_COLUMN$1 = 3;
      const NAMES_INDEX$1 = 4;
      function maybeSort(mappings, owned) {
        const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
        if (unsortedIndex === mappings.length)
          return mappings;
        if (!owned)
          mappings = mappings.slice();
        for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
          mappings[i] = sortSegments(mappings[i], owned);
        }
        return mappings;
      }
      function nextUnsortedSegmentLine(mappings, start) {
        for (let i = start; i < mappings.length; i++) {
          if (!isSorted(mappings[i]))
            return i;
        }
        return mappings.length;
      }
      function isSorted(line) {
        for (let j = 1; j < line.length; j++) {
          if (line[j][COLUMN$1] < line[j - 1][COLUMN$1]) {
            return false;
          }
        }
        return true;
      }
      function sortSegments(line, owned) {
        if (!owned)
          line = line.slice();
        return line.sort(sortComparator);
      }
      function sortComparator(a, b) {
        return a[COLUMN$1] - b[COLUMN$1];
      }
      let found = false;
      function binarySearch(haystack, needle, low, high) {
        while (low <= high) {
          const mid = low + (high - low >> 1);
          const cmp = haystack[mid][COLUMN$1] - needle;
          if (cmp === 0) {
            found = true;
            return mid;
          }
          if (cmp < 0) {
            low = mid + 1;
          } else {
            high = mid - 1;
          }
        }
        found = false;
        return low - 1;
      }
      function upperBound(haystack, needle, index) {
        for (let i = index + 1; i < haystack.length; i++, index++) {
          if (haystack[i][COLUMN$1] !== needle)
            break;
        }
        return index;
      }
      function lowerBound(haystack, needle, index) {
        for (let i = index - 1; i >= 0; i--, index--) {
          if (haystack[i][COLUMN$1] !== needle)
            break;
        }
        return index;
      }
      function memoizedState() {
        return {
          lastKey: -1,
          lastNeedle: -1,
          lastIndex: -1
        };
      }
      function memoizedBinarySearch(haystack, needle, state, key) {
        const { lastKey, lastNeedle, lastIndex } = state;
        let low = 0;
        let high = haystack.length - 1;
        if (key === lastKey) {
          if (needle === lastNeedle) {
            found = lastIndex !== -1 && haystack[lastIndex][COLUMN$1] === needle;
            return lastIndex;
          }
          if (needle >= lastNeedle) {
            low = lastIndex === -1 ? 0 : lastIndex;
          } else {
            high = lastIndex;
          }
        }
        state.lastKey = key;
        state.lastNeedle = needle;
        return state.lastIndex = binarySearch(haystack, needle, low, high);
      }
      const AnyMap = function(map, mapUrl) {
        const parsed = typeof map === "string" ? JSON.parse(map) : map;
        if (!("sections" in parsed))
          return new TraceMap(parsed, mapUrl);
        const mappings = [];
        const sources = [];
        const sourcesContent = [];
        const names = [];
        const { sections } = parsed;
        let i = 0;
        for (; i < sections.length - 1; i++) {
          const no = sections[i + 1].offset;
          addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column);
        }
        if (sections.length > 0) {
          addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity);
        }
        const joined = {
          version: 3,
          file: parsed.file,
          names,
          sources,
          sourcesContent,
          mappings
        };
        return presortedDecodedMap(joined);
      };
      function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) {
        const map = AnyMap(section.map, mapUrl);
        const { line: lineOffset, column: columnOffset } = section.offset;
        const sourcesOffset = sources.length;
        const namesOffset = names.length;
        const decoded = decodedMappings(map);
        const { resolvedSources } = map;
        append(sources, resolvedSources);
        append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length));
        append(names, map.names);
        for (let i = mappings.length; i <= lineOffset; i++)
          mappings.push([]);
        const stopI = stopLine - lineOffset;
        const len = Math.min(decoded.length, stopI + 1);
        for (let i = 0; i < len; i++) {
          const line = decoded[i];
          const out = i === 0 ? mappings[lineOffset] : mappings[lineOffset + i] = [];
          const cOffset = i === 0 ? columnOffset : 0;
          for (let j = 0; j < line.length; j++) {
            const seg = line[j];
            const column = cOffset + seg[COLUMN$1];
            if (i === stopI && column >= stopColumn)
              break;
            if (seg.length === 1) {
              out.push([column]);
              continue;
            }
            const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX$1];
            const sourceLine = seg[SOURCE_LINE$1];
            const sourceColumn = seg[SOURCE_COLUMN$1];
            if (seg.length === 4) {
              out.push([column, sourcesIndex, sourceLine, sourceColumn]);
              continue;
            }
            out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX$1]]);
          }
        }
      }
      function append(arr, other) {
        for (let i = 0; i < other.length; i++)
          arr.push(other[i]);
      }
      function fillSourcesContent(len) {
        const sourcesContent = [];
        for (let i = 0; i < len; i++)
          sourcesContent[i] = null;
        return sourcesContent;
      }
      const INVALID_ORIGINAL_MAPPING = Object.freeze({
        source: null,
        line: null,
        column: null,
        name: null
      });
      Object.freeze({
        line: null,
        column: null
      });
      const LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
      const COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
      const LEAST_UPPER_BOUND = -1;
      const GREATEST_LOWER_BOUND = 1;
      let decodedMappings;
      let originalPositionFor;
      let presortedDecodedMap;
      class TraceMap {
        constructor(map, mapUrl) {
          this._decodedMemo = memoizedState();
          this._bySources = void 0;
          this._bySourceMemos = void 0;
          const isString = typeof map === "string";
          if (!isString && map.constructor === TraceMap)
            return map;
          const parsed = isString ? JSON.parse(map) : map;
          const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
          this.version = version;
          this.file = file;
          this.names = names;
          this.sourceRoot = sourceRoot;
          this.sources = sources;
          this.sourcesContent = sourcesContent;
          if (sourceRoot || mapUrl) {
            const from = resolve(sourceRoot || "", stripFilename(mapUrl));
            this.resolvedSources = sources.map((s) => resolve(s || "", from));
          } else {
            this.resolvedSources = sources.map((s) => s || "");
          }
          const { mappings } = parsed;
          if (typeof mappings === "string") {
            this._encoded = mappings;
            this._decoded = void 0;
          } else {
            this._encoded = void 0;
            this._decoded = maybeSort(mappings, isString);
          }
        }
      }
      (() => {
        decodedMappings = (map) => {
          return map._decoded || (map._decoded = decode(map._encoded));
        };
        originalPositionFor = (map, { line, column, bias }) => {
          line--;
          if (line < 0)
            throw new Error(LINE_GTR_ZERO);
          if (column < 0)
            throw new Error(COL_GTR_EQ_ZERO);
          const decoded = decodedMappings(map);
          if (line >= decoded.length)
            return INVALID_ORIGINAL_MAPPING;
          const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
          if (segment == null)
            return INVALID_ORIGINAL_MAPPING;
          if (segment.length == 1)
            return INVALID_ORIGINAL_MAPPING;
          const { names, resolvedSources } = map;
          return {
            source: resolvedSources[segment[SOURCES_INDEX$1]],
            line: segment[SOURCE_LINE$1] + 1,
            column: segment[SOURCE_COLUMN$1],
            name: segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null
          };
        };
        presortedDecodedMap = (map, mapUrl) => {
          const clone = Object.assign({}, map);
          clone.mappings = [];
          const tracer = new TraceMap(clone, mapUrl);
          tracer._decoded = map.mappings;
          return tracer;
        };
      })();
      function traceSegmentInternal(segments, memo, line, column, bias) {
        let index = memoizedBinarySearch(segments, column, memo, line);
        if (found) {
          index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
        } else if (bias === LEAST_UPPER_BOUND)
          index++;
        if (index === -1 || index === segments.length)
          return null;
        return segments[index];
      }
      let get;
      let put;
      class SetArray {
        constructor() {
          this._indexes = { __proto__: null };
          this.array = [];
        }
      }
      (() => {
        get = (strarr, key) => strarr._indexes[key];
        put = (strarr, key) => {
          const index = get(strarr, key);
          if (index !== void 0)
            return index;
          const { array, _indexes: indexes } = strarr;
          return indexes[key] = array.push(key) - 1;
        };
      })();
      const COLUMN = 0;
      const SOURCES_INDEX = 1;
      const SOURCE_LINE = 2;
      const SOURCE_COLUMN = 3;
      const NAMES_INDEX = 4;
      const NO_NAME = -1;
      let maybeAddMapping;
      let setSourceContent;
      let toDecodedMap;
      let toEncodedMap;
      let addSegmentInternal;
      class GenMapping {
        constructor({ file, sourceRoot } = {}) {
          this._names = new SetArray();
          this._sources = new SetArray();
          this._sourcesContent = [];
          this._mappings = [];
          this.file = file;
          this.sourceRoot = sourceRoot;
        }
      }
      (() => {
        maybeAddMapping = (map, mapping) => {
          return addMappingInternal(true, map, mapping);
        };
        setSourceContent = (map, source, content) => {
          const { _sources: sources, _sourcesContent: sourcesContent } = map;
          sourcesContent[put(sources, source)] = content;
        };
        toDecodedMap = (map) => {
          const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = map;
          removeEmptyFinalLines(mappings);
          return {
            version: 3,
            file: file || void 0,
            names: names.array,
            sourceRoot: sourceRoot || void 0,
            sources: sources.array,
            sourcesContent,
            mappings
          };
        };
        toEncodedMap = (map) => {
          const decoded = toDecodedMap(map);
          return Object.assign(Object.assign({}, decoded), { mappings: encode(decoded.mappings) });
        };
        addSegmentInternal = (skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name) => {
          const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = map;
          const line = getLine(mappings, genLine);
          const index = getColumnIndex(line, genColumn);
          if (!source) {
            if (skipable && skipSourceless(line, index))
              return;
            return insert(line, index, [genColumn]);
          }
          const sourcesIndex = put(sources, source);
          const namesIndex = name ? put(names, name) : NO_NAME;
          if (sourcesIndex === sourcesContent.length)
            sourcesContent[sourcesIndex] = null;
          if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
            return;
          }
          return insert(line, index, name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn]);
        };
      })();
      function getLine(mappings, index) {
        for (let i = mappings.length; i <= index; i++) {
          mappings[i] = [];
        }
        return mappings[index];
      }
      function getColumnIndex(line, genColumn) {
        let index = line.length;
        for (let i = index - 1; i >= 0; index = i--) {
          const current = line[i];
          if (genColumn >= current[COLUMN])
            break;
        }
        return index;
      }
      function insert(array, index, value) {
        for (let i = array.length; i > index; i--) {
          array[i] = array[i - 1];
        }
        array[index] = value;
      }
      function removeEmptyFinalLines(mappings) {
        const { length } = mappings;
        let len = length;
        for (let i = len - 1; i >= 0; len = i, i--) {
          if (mappings[i].length > 0)
            break;
        }
        if (len < length)
          mappings.length = len;
      }
      function skipSourceless(line, index) {
        if (index === 0)
          return true;
        const prev = line[index - 1];
        return prev.length === 1;
      }
      function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
        if (index === 0)
          return false;
        const prev = line[index - 1];
        if (prev.length === 1)
          return false;
        return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
      }
      function addMappingInternal(skipable, map, mapping) {
        const { generated, source, original, name } = mapping;
        if (!source) {
          return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null);
        }
        const s = source;
        return addSegmentInternal(skipable, map, generated.line - 1, generated.column, s, original.line - 1, original.column, name);
      }
      class SourceMapConsumer {
        constructor(map, mapUrl) {
          const trace = this._map = new AnyMap(map, mapUrl);
          this.file = trace.file;
          this.names = trace.names;
          this.sourceRoot = trace.sourceRoot;
          this.sources = trace.resolvedSources;
          this.sourcesContent = trace.sourcesContent;
        }
        originalPositionFor(needle) {
          return originalPositionFor(this._map, needle);
        }
        destroy() {
        }
      }
      class SourceMapGenerator {
        constructor(opts) {
          this._map = new GenMapping(opts);
        }
        addMapping(mapping) {
          maybeAddMapping(this._map, mapping);
        }
        setSourceContent(source, content) {
          setSourceContent(this._map, source, content);
        }
        toJSON() {
          return toEncodedMap(this._map);
        }
        toDecodedMap() {
          return toDecodedMap(this._map);
        }
      }
      exports2.SourceMapConsumer = SourceMapConsumer;
      exports2.SourceMapGenerator = SourceMapGenerator;
      Object.defineProperty(exports2, "__esModule", { value: true });
    });
  }
});

// node_modules/acorn/dist/acorn.js
var require_acorn = __commonJS({
  "node_modules/acorn/dist/acorn.js"(exports, module2) {
    (function(global2, factory) {
      typeof exports === "object" && typeof module2 !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.acorn = {}));
    })(exports, function(exports2) {
      "use strict";
      var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
      var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191];
      var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
      var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
      var reservedWords = {
        3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
        5: "class enum extends super const export import",
        6: "enum",
        strict: "implements interface let package private protected public static yield",
        strictBind: "eval arguments"
      };
      var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
      var keywords$1 = {
        5: ecma5AndLessKeywords,
        "5module": ecma5AndLessKeywords + " export import",
        6: ecma5AndLessKeywords + " const class extends export import super"
      };
      var keywordRelationalOperator = /^in(stanceof)?$/;
      var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
      var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
      function isInAstralSet(code, set) {
        var pos = 65536;
        for (var i2 = 0; i2 < set.length; i2 += 2) {
          pos += set[i2];
          if (pos > code) {
            return false;
          }
          pos += set[i2 + 1];
          if (pos >= code) {
            return true;
          }
        }
        return false;
      }
      function isIdentifierStart(code, astral) {
        if (code < 65) {
          return code === 36;
        }
        if (code < 91) {
          return true;
        }
        if (code < 97) {
          return code === 95;
        }
        if (code < 123) {
          return true;
        }
        if (code <= 65535) {
          return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
        }
        if (astral === false) {
          return false;
        }
        return isInAstralSet(code, astralIdentifierStartCodes);
      }
      function isIdentifierChar(code, astral) {
        if (code < 48) {
          return code === 36;
        }
        if (code < 58) {
          return true;
        }
        if (code < 65) {
          return false;
        }
        if (code < 91) {
          return true;
        }
        if (code < 97) {
          return code === 95;
        }
        if (code < 123) {
          return true;
        }
        if (code <= 65535) {
          return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code));
        }
        if (astral === false) {
          return false;
        }
        return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
      }
      var TokenType = function TokenType2(label, conf) {
        if (conf === void 0)
          conf = {};
        this.label = label;
        this.keyword = conf.keyword;
        this.beforeExpr = !!conf.beforeExpr;
        this.startsExpr = !!conf.startsExpr;
        this.isLoop = !!conf.isLoop;
        this.isAssign = !!conf.isAssign;
        this.prefix = !!conf.prefix;
        this.postfix = !!conf.postfix;
        this.binop = conf.binop || null;
        this.updateContext = null;
      };
      function binop(name, prec) {
        return new TokenType(name, { beforeExpr: true, binop: prec });
      }
      var beforeExpr = { beforeExpr: true }, startsExpr = { startsExpr: true };
      var keywords = {};
      function kw(name, options) {
        if (options === void 0)
          options = {};
        options.keyword = name;
        return keywords[name] = new TokenType(name, options);
      }
      var types$1 = {
        num: new TokenType("num", startsExpr),
        regexp: new TokenType("regexp", startsExpr),
        string: new TokenType("string", startsExpr),
        name: new TokenType("name", startsExpr),
        privateId: new TokenType("privateId", startsExpr),
        eof: new TokenType("eof"),
        bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }),
        bracketR: new TokenType("]"),
        braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }),
        braceR: new TokenType("}"),
        parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }),
        parenR: new TokenType(")"),
        comma: new TokenType(",", beforeExpr),
        semi: new TokenType(";", beforeExpr),
        colon: new TokenType(":", beforeExpr),
        dot: new TokenType("."),
        question: new TokenType("?", beforeExpr),
        questionDot: new TokenType("?."),
        arrow: new TokenType("=>", beforeExpr),
        template: new TokenType("template"),
        invalidTemplate: new TokenType("invalidTemplate"),
        ellipsis: new TokenType("...", beforeExpr),
        backQuote: new TokenType("`", startsExpr),
        dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }),
        eq: new TokenType("=", { beforeExpr: true, isAssign: true }),
        assign: new TokenType("_=", { beforeExpr: true, isAssign: true }),
        incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }),
        prefix: new TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }),
        logicalOR: binop("||", 1),
        logicalAND: binop("&&", 2),
        bitwiseOR: binop("|", 3),
        bitwiseXOR: binop("^", 4),
        bitwiseAND: binop("&", 5),
        equality: binop("==/!=/===/!==", 6),
        relational: binop("</>/<=/>=", 7),
        bitShift: binop("<</>>/>>>", 8),
        plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
        modulo: binop("%", 10),
        star: binop("*", 10),
        slash: binop("/", 10),
        starstar: new TokenType("**", { beforeExpr: true }),
        coalesce: binop("??", 1),
        _break: kw("break"),
        _case: kw("case", beforeExpr),
        _catch: kw("catch"),
        _continue: kw("continue"),
        _debugger: kw("debugger"),
        _default: kw("default", beforeExpr),
        _do: kw("do", { isLoop: true, beforeExpr: true }),
        _else: kw("else", beforeExpr),
        _finally: kw("finally"),
        _for: kw("for", { isLoop: true }),
        _function: kw("function", startsExpr),
        _if: kw("if"),
        _return: kw("return", beforeExpr),
        _switch: kw("switch"),
        _throw: kw("throw", beforeExpr),
        _try: kw("try"),
        _var: kw("var"),
        _const: kw("const"),
        _while: kw("while", { isLoop: true }),
        _with: kw("with"),
        _new: kw("new", { beforeExpr: true, startsExpr: true }),
        _this: kw("this", startsExpr),
        _super: kw("super", startsExpr),
        _class: kw("class", startsExpr),
        _extends: kw("extends", beforeExpr),
        _export: kw("export"),
        _import: kw("import", startsExpr),
        _null: kw("null", startsExpr),
        _true: kw("true", startsExpr),
        _false: kw("false", startsExpr),
        _in: kw("in", { beforeExpr: true, binop: 7 }),
        _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }),
        _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }),
        _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }),
        _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true })
      };
      var lineBreak = /\r\n?|\n|\u2028|\u2029/;
      var lineBreakG = new RegExp(lineBreak.source, "g");
      function isNewLine(code) {
        return code === 10 || code === 13 || code === 8232 || code === 8233;
      }
      function nextLineBreak(code, from, end) {
        if (end === void 0)
          end = code.length;
        for (var i2 = from; i2 < end; i2++) {
          var next = code.charCodeAt(i2);
          if (isNewLine(next)) {
            return i2 < end - 1 && next === 13 && code.charCodeAt(i2 + 1) === 10 ? i2 + 2 : i2 + 1;
          }
        }
        return -1;
      }
      var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
      var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
      var ref = Object.prototype;
      var hasOwnProperty = ref.hasOwnProperty;
      var toString = ref.toString;
      var hasOwn = Object.hasOwn || function(obj, propName) {
        return hasOwnProperty.call(obj, propName);
      };
      var isArray = Array.isArray || function(obj) {
        return toString.call(obj) === "[object Array]";
      };
      function wordsRegexp(words) {
        return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
      }
      function codePointToString(code) {
        if (code <= 65535) {
          return String.fromCharCode(code);
        }
        code -= 65536;
        return String.fromCharCode((code >> 10) + 55296, (code & 1023) + 56320);
      }
      var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
      var Position = function Position2(line, col) {
        this.line = line;
        this.column = col;
      };
      Position.prototype.offset = function offset(n) {
        return new Position(this.line, this.column + n);
      };
      var SourceLocation = function SourceLocation2(p, start, end) {
        this.start = start;
        this.end = end;
        if (p.sourceFile !== null) {
          this.source = p.sourceFile;
        }
      };
      function getLineInfo(input, offset) {
        for (var line = 1, cur = 0; ; ) {
          var nextBreak = nextLineBreak(input, cur, offset);
          if (nextBreak < 0) {
            return new Position(line, offset - cur);
          }
          ++line;
          cur = nextBreak;
        }
      }
      var defaultOptions2 = {
        ecmaVersion: null,
        sourceType: "script",
        onInsertedSemicolon: null,
        onTrailingComma: null,
        allowReserved: null,
        allowReturnOutsideFunction: false,
        allowImportExportEverywhere: false,
        allowAwaitOutsideFunction: null,
        allowSuperOutsideMethod: null,
        allowHashBang: false,
        checkPrivateFields: true,
        locations: false,
        onToken: null,
        onComment: null,
        ranges: false,
        program: null,
        sourceFile: null,
        directSourceFile: null,
        preserveParens: false
      };
      var warnedAboutEcmaVersion = false;
      function getOptions(opts) {
        var options = {};
        for (var opt in defaultOptions2) {
          options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions2[opt];
        }
        if (options.ecmaVersion === "latest") {
          options.ecmaVersion = 1e8;
        } else if (options.ecmaVersion == null) {
          if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) {
            warnedAboutEcmaVersion = true;
            console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.");
          }
          options.ecmaVersion = 11;
        } else if (options.ecmaVersion >= 2015) {
          options.ecmaVersion -= 2009;
        }
        if (options.allowReserved == null) {
          options.allowReserved = options.ecmaVersion < 5;
        }
        if (!opts || opts.allowHashBang == null) {
          options.allowHashBang = options.ecmaVersion >= 14;
        }
        if (isArray(options.onToken)) {
          var tokens = options.onToken;
          options.onToken = function(token) {
            return tokens.push(token);
          };
        }
        if (isArray(options.onComment)) {
          options.onComment = pushComment(options, options.onComment);
        }
        return options;
      }
      function pushComment(options, array) {
        return function(block, text, start, end, startLoc, endLoc) {
          var comment = {
            type: block ? "Block" : "Line",
            value: text,
            start,
            end
          };
          if (options.locations) {
            comment.loc = new SourceLocation(this, startLoc, endLoc);
          }
          if (options.ranges) {
            comment.range = [start, end];
          }
          array.push(comment);
        };
      }
      var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
      function functionFlags(async, generator) {
        return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
      }
      var BIND_NONE = 0, BIND_VAR = 1, BIND_LEXICAL = 2, BIND_FUNCTION = 3, BIND_SIMPLE_CATCH = 4, BIND_OUTSIDE = 5;
      var Parser = function Parser2(options, input, startPos) {
        this.options = options = getOptions(options);
        this.sourceFile = options.sourceFile;
        this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
        var reserved = "";
        if (options.allowReserved !== true) {
          reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3];
          if (options.sourceType === "module") {
            reserved += " await";
          }
        }
        this.reservedWords = wordsRegexp(reserved);
        var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
        this.reservedWordsStrict = wordsRegexp(reservedStrict);
        this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
        this.input = String(input);
        this.containsEsc = false;
        if (startPos) {
          this.pos = startPos;
          this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
          this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
        } else {
          this.pos = this.lineStart = 0;
          this.curLine = 1;
        }
        this.type = types$1.eof;
        this.value = null;
        this.start = this.end = this.pos;
        this.startLoc = this.endLoc = this.curPosition();
        this.lastTokEndLoc = this.lastTokStartLoc = null;
        this.lastTokStart = this.lastTokEnd = this.pos;
        this.context = this.initialContext();
        this.exprAllowed = true;
        this.inModule = options.sourceType === "module";
        this.strict = this.inModule || this.strictDirective(this.pos);
        this.potentialArrowAt = -1;
        this.potentialArrowInForAwait = false;
        this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
        this.labels = [];
        this.undefinedExports = /* @__PURE__ */ Object.create(null);
        if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") {
          this.skipLineComment(2);
        }
        this.scopeStack = [];
        this.enterScope(SCOPE_TOP);
        this.regexpState = null;
        this.privateNameStack = [];
      };
      var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
      Parser.prototype.parse = function parse2() {
        var node = this.options.program || this.startNode();
        this.nextToken();
        return this.parseTopLevel(node);
      };
      prototypeAccessors.inFunction.get = function() {
        return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
      };
      prototypeAccessors.inGenerator.get = function() {
        return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit;
      };
      prototypeAccessors.inAsync.get = function() {
        return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit;
      };
      prototypeAccessors.canAwait.get = function() {
        for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
          var scope = this.scopeStack[i2];
          if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) {
            return false;
          }
          if (scope.flags & SCOPE_FUNCTION) {
            return (scope.flags & SCOPE_ASYNC) > 0;
          }
        }
        return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
      };
      prototypeAccessors.allowSuper.get = function() {
        var ref2 = this.currentThisScope();
        var flags = ref2.flags;
        var inClassFieldInit = ref2.inClassFieldInit;
        return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod;
      };
      prototypeAccessors.allowDirectSuper.get = function() {
        return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
      };
      prototypeAccessors.treatFunctionsAsVar.get = function() {
        return this.treatFunctionsAsVarInScope(this.currentScope());
      };
      prototypeAccessors.allowNewDotTarget.get = function() {
        var ref2 = this.currentThisScope();
        var flags = ref2.flags;
        var inClassFieldInit = ref2.inClassFieldInit;
        return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit;
      };
      prototypeAccessors.inClassStaticBlock.get = function() {
        return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
      };
      Parser.extend = function extend() {
        var plugins = [], len = arguments.length;
        while (len--)
          plugins[len] = arguments[len];
        var cls = this;
        for (var i2 = 0; i2 < plugins.length; i2++) {
          cls = plugins[i2](cls);
        }
        return cls;
      };
      Parser.parse = function parse2(input, options) {
        return new this(options, input).parse();
      };
      Parser.parseExpressionAt = function parseExpressionAt2(input, pos, options) {
        var parser = new this(options, input, pos);
        parser.nextToken();
        return parser.parseExpression();
      };
      Parser.tokenizer = function tokenizer2(input, options) {
        return new this(options, input);
      };
      Object.defineProperties(Parser.prototype, prototypeAccessors);
      var pp$9 = Parser.prototype;
      var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
      pp$9.strictDirective = function(start) {
        if (this.options.ecmaVersion < 5) {
          return false;
        }
        for (; ; ) {
          skipWhiteSpace.lastIndex = start;
          start += skipWhiteSpace.exec(this.input)[0].length;
          var match = literal.exec(this.input.slice(start));
          if (!match) {
            return false;
          }
          if ((match[1] || match[2]) === "use strict") {
            skipWhiteSpace.lastIndex = start + match[0].length;
            var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
            var next = this.input.charAt(end);
            return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
          }
          start += match[0].length;
          skipWhiteSpace.lastIndex = start;
          start += skipWhiteSpace.exec(this.input)[0].length;
          if (this.input[start] === ";") {
            start++;
          }
        }
      };
      pp$9.eat = function(type) {
        if (this.type === type) {
          this.next();
          return true;
        } else {
          return false;
        }
      };
      pp$9.isContextual = function(name) {
        return this.type === types$1.name && this.value === name && !this.containsEsc;
      };
      pp$9.eatContextual = function(name) {
        if (!this.isContextual(name)) {
          return false;
        }
        this.next();
        return true;
      };
      pp$9.expectContextual = function(name) {
        if (!this.eatContextual(name)) {
          this.unexpected();
        }
      };
      pp$9.canInsertSemicolon = function() {
        return this.type === types$1.eof || this.type === types$1.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
      };
      pp$9.insertSemicolon = function() {
        if (this.canInsertSemicolon()) {
          if (this.options.onInsertedSemicolon) {
            this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
          }
          return true;
        }
      };
      pp$9.semicolon = function() {
        if (!this.eat(types$1.semi) && !this.insertSemicolon()) {
          this.unexpected();
        }
      };
      pp$9.afterTrailingComma = function(tokType, notNext) {
        if (this.type === tokType) {
          if (this.options.onTrailingComma) {
            this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
          }
          if (!notNext) {
            this.next();
          }
          return true;
        }
      };
      pp$9.expect = function(type) {
        this.eat(type) || this.unexpected();
      };
      pp$9.unexpected = function(pos) {
        this.raise(pos != null ? pos : this.start, "Unexpected token");
      };
      var DestructuringErrors = function DestructuringErrors2() {
        this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
      };
      pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {
        if (!refDestructuringErrors) {
          return;
        }
        if (refDestructuringErrors.trailingComma > -1) {
          this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
        }
        var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
        if (parens > -1) {
          this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern");
        }
      };
      pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
        if (!refDestructuringErrors) {
          return false;
        }
        var shorthandAssign = refDestructuringErrors.shorthandAssign;
        var doubleProto = refDestructuringErrors.doubleProto;
        if (!andThrow) {
          return shorthandAssign >= 0 || doubleProto >= 0;
        }
        if (shorthandAssign >= 0) {
          this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns");
        }
        if (doubleProto >= 0) {
          this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
        }
      };
      pp$9.checkYieldAwaitInDefaultParams = function() {
        if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {
          this.raise(this.yieldPos, "Yield expression cannot be a default value");
        }
        if (this.awaitPos) {
          this.raise(this.awaitPos, "Await expression cannot be a default value");
        }
      };
      pp$9.isSimpleAssignTarget = function(expr) {
        if (expr.type === "ParenthesizedExpression") {
          return this.isSimpleAssignTarget(expr.expression);
        }
        return expr.type === "Identifier" || expr.type === "MemberExpression";
      };
      var pp$8 = Parser.prototype;
      pp$8.parseTopLevel = function(node) {
        var exports3 = /* @__PURE__ */ Object.create(null);
        if (!node.body) {
          node.body = [];
        }
        while (this.type !== types$1.eof) {
          var stmt = this.parseStatement(null, true, exports3);
          node.body.push(stmt);
        }
        if (this.inModule) {
          for (var i2 = 0, list2 = Object.keys(this.undefinedExports); i2 < list2.length; i2 += 1) {
            var name = list2[i2];
            this.raiseRecoverable(this.undefinedExports[name].start, "Export '" + name + "' is not defined");
          }
        }
        this.adaptDirectivePrologue(node.body);
        this.next();
        node.sourceType = this.options.sourceType;
        return this.finishNode(node, "Program");
      };
      var loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" };
      pp$8.isLet = function(context) {
        if (this.options.ecmaVersion < 6 || !this.isContextual("let")) {
          return false;
        }
        skipWhiteSpace.lastIndex = this.pos;
        var skip = skipWhiteSpace.exec(this.input);
        var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
        if (nextCh === 91 || nextCh === 92) {
          return true;
        }
        if (context) {
          return false;
        }
        if (nextCh === 123 || nextCh > 55295 && nextCh < 56320) {
          return true;
        }
        if (isIdentifierStart(nextCh, true)) {
          var pos = next + 1;
          while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) {
            ++pos;
          }
          if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) {
            return true;
          }
          var ident = this.input.slice(next, pos);
          if (!keywordRelationalOperator.test(ident)) {
            return true;
          }
        }
        return false;
      };
      pp$8.isAsyncFunction = function() {
        if (this.options.ecmaVersion < 8 || !this.isContextual("async")) {
          return false;
        }
        skipWhiteSpace.lastIndex = this.pos;
        var skip = skipWhiteSpace.exec(this.input);
        var next = this.pos + skip[0].length, after;
        return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
      };
      pp$8.parseStatement = function(context, topLevel, exports3) {
        var starttype = this.type, node = this.startNode(), kind;
        if (this.isLet(context)) {
          starttype = types$1._var;
          kind = "let";
        }
        switch (starttype) {
          case types$1._break:
          case types$1._continue:
            return this.parseBreakContinueStatement(node, starttype.keyword);
          case types$1._debugger:
            return this.parseDebuggerStatement(node);
          case types$1._do:
            return this.parseDoStatement(node);
          case types$1._for:
            return this.parseForStatement(node);
          case types$1._function:
            if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) {
              this.unexpected();
            }
            return this.parseFunctionStatement(node, false, !context);
          case types$1._class:
            if (context) {
              this.unexpected();
            }
            return this.parseClass(node, true);
          case types$1._if:
            return this.parseIfStatement(node);
          case types$1._return:
            return this.parseReturnStatement(node);
          case types$1._switch:
            return this.parseSwitchStatement(node);
          case types$1._throw:
            return this.parseThrowStatement(node);
          case types$1._try:
            return this.parseTryStatement(node);
          case types$1._const:
          case types$1._var:
            kind = kind || this.value;
            if (context && kind !== "var") {
              this.unexpected();
            }
            return this.parseVarStatement(node, kind);
          case types$1._while:
            return this.parseWhileStatement(node);
          case types$1._with:
            return this.parseWithStatement(node);
          case types$1.braceL:
            return this.parseBlock(true, node);
          case types$1.semi:
            return this.parseEmptyStatement(node);
          case types$1._export:
          case types$1._import:
            if (this.options.ecmaVersion > 10 && starttype === types$1._import) {
              skipWhiteSpace.lastIndex = this.pos;
              var skip = skipWhiteSpace.exec(this.input);
              var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
              if (nextCh === 40 || nextCh === 46) {
                return this.parseExpressionStatement(node, this.parseExpression());
              }
            }
            if (!this.options.allowImportExportEverywhere) {
              if (!topLevel) {
                this.raise(this.start, "'import' and 'export' may only appear at the top level");
              }
              if (!this.inModule) {
                this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
              }
            }
            return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports3);
          default:
            if (this.isAsyncFunction()) {
              if (context) {
                this.unexpected();
              }
              this.next();
              return this.parseFunctionStatement(node, true, !context);
            }
            var maybeName = this.value, expr = this.parseExpression();
            if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
              return this.parseLabeledStatement(node, maybeName, expr, context);
            } else {
              return this.parseExpressionStatement(node, expr);
            }
        }
      };
      pp$8.parseBreakContinueStatement = function(node, keyword) {
        var isBreak = keyword === "break";
        this.next();
        if (this.eat(types$1.semi) || this.insertSemicolon()) {
          node.label = null;
        } else if (this.type !== types$1.name) {
          this.unexpected();
        } else {
          node.label = this.parseIdent();
          this.semicolon();
        }
        var i2 = 0;
        for (; i2 < this.labels.length; ++i2) {
          var lab = this.labels[i2];
          if (node.label == null || lab.name === node.label.name) {
            if (lab.kind != null && (isBreak || lab.kind === "loop")) {
              break;
            }
            if (node.label && isBreak) {
              break;
            }
          }
        }
        if (i2 === this.labels.length) {
          this.raise(node.start, "Unsyntactic " + keyword);
        }
        return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
      };
      pp$8.parseDebuggerStatement = function(node) {
        this.next();
        this.semicolon();
        return this.finishNode(node, "DebuggerStatement");
      };
      pp$8.parseDoStatement = function(node) {
        this.next();
        this.labels.push(loopLabel);
        node.body = this.parseStatement("do");
        this.labels.pop();
        this.expect(types$1._while);
        node.test = this.parseParenExpression();
        if (this.options.ecmaVersion >= 6) {
          this.eat(types$1.semi);
        } else {
          this.semicolon();
        }
        return this.finishNode(node, "DoWhileStatement");
      };
      pp$8.parseForStatement = function(node) {
        this.next();
        var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
        this.labels.push(loopLabel);
        this.enterScope(0);
        this.expect(types$1.parenL);
        if (this.type === types$1.semi) {
          if (awaitAt > -1) {
            this.unexpected(awaitAt);
          }
          return this.parseFor(node, null);
        }
        var isLet = this.isLet();
        if (this.type === types$1._var || this.type === types$1._const || isLet) {
          var init$1 = this.startNode(), kind = isLet ? "let" : this.value;
          this.next();
          this.parseVar(init$1, true, kind);
          this.finishNode(init$1, "VariableDeclaration");
          if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
            if (this.options.ecmaVersion >= 9) {
              if (this.type === types$1._in) {
                if (awaitAt > -1) {
                  this.unexpected(awaitAt);
                }
              } else {
                node.await = awaitAt > -1;
              }
            }
            return this.parseForIn(node, init$1);
          }
          if (awaitAt > -1) {
            this.unexpected(awaitAt);
          }
          return this.parseFor(node, init$1);
        }
        var startsWithLet = this.isContextual("let"), isForOf = false;
        var refDestructuringErrors = new DestructuringErrors();
        var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
        if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
          if (this.options.ecmaVersion >= 9) {
            if (this.type === types$1._in) {
              if (awaitAt > -1) {
                this.unexpected(awaitAt);
              }
            } else {
              node.await = awaitAt > -1;
            }
          }
          if (startsWithLet && isForOf) {
            this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'.");
          }
          this.toAssignable(init, false, refDestructuringErrors);
          this.checkLValPattern(init);
          return this.parseForIn(node, init);
        } else {
          this.checkExpressionErrors(refDestructuringErrors, true);
        }
        if (awaitAt > -1) {
          this.unexpected(awaitAt);
        }
        return this.parseFor(node, init);
      };
      pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
        this.next();
        return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);
      };
      pp$8.parseIfStatement = function(node) {
        this.next();
        node.test = this.parseParenExpression();
        node.consequent = this.parseStatement("if");
        node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null;
        return this.finishNode(node, "IfStatement");
      };
      pp$8.parseReturnStatement = function(node) {
        if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
          this.raise(this.start, "'return' outside of function");
        }
        this.next();
        if (this.eat(types$1.semi) || this.insertSemicolon()) {
          node.argument = null;
        } else {
          node.argument = this.parseExpression();
          this.semicolon();
        }
        return this.finishNode(node, "ReturnStatement");
      };
      pp$8.parseSwitchStatement = function(node) {
        this.next();
        node.discriminant = this.parseParenExpression();
        node.cases = [];
        this.expect(types$1.braceL);
        this.labels.push(switchLabel);
        this.enterScope(0);
        var cur;
        for (var sawDefault = false; this.type !== types$1.braceR; ) {
          if (this.type === types$1._case || this.type === types$1._default) {
            var isCase = this.type === types$1._case;
            if (cur) {
              this.finishNode(cur, "SwitchCase");
            }
            node.cases.push(cur = this.startNode());
            cur.consequent = [];
            this.next();
            if (isCase) {
              cur.test = this.parseExpression();
            } else {
              if (sawDefault) {
                this.raiseRecoverable(this.lastTokStart, "Multiple default clauses");
              }
              sawDefault = true;
              cur.test = null;
            }
            this.expect(types$1.colon);
          } else {
            if (!cur) {
              this.unexpected();
            }
            cur.consequent.push(this.parseStatement(null));
          }
        }
        this.exitScope();
        if (cur) {
          this.finishNode(cur, "SwitchCase");
        }
        this.next();
        this.labels.pop();
        return this.finishNode(node, "SwitchStatement");
      };
      pp$8.parseThrowStatement = function(node) {
        this.next();
        if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) {
          this.raise(this.lastTokEnd, "Illegal newline after throw");
        }
        node.argument = this.parseExpression();
        this.semicolon();
        return this.finishNode(node, "ThrowStatement");
      };
      var empty$1 = [];
      pp$8.parseCatchClauseParam = function() {
        var param = this.parseBindingAtom();
        var simple = param.type === "Identifier";
        this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);
        this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);
        this.expect(types$1.parenR);
        return param;
      };
      pp$8.parseTryStatement = function(node) {
        this.next();
        node.block = this.parseBlock();
        node.handler = null;
        if (this.type === types$1._catch) {
          var clause = this.startNode();
          this.next();
          if (this.eat(types$1.parenL)) {
            clause.param = this.parseCatchClauseParam();
          } else {
            if (this.options.ecmaVersion < 10) {
              this.unexpected();
            }
            clause.param = null;
            this.enterScope(0);
          }
          clause.body = this.parseBlock(false);
          this.exitScope();
          node.handler = this.finishNode(clause, "CatchClause");
        }
        node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
        if (!node.handler && !node.finalizer) {
          this.raise(node.start, "Missing catch or finally clause");
        }
        return this.finishNode(node, "TryStatement");
      };
      pp$8.parseVarStatement = function(node, kind, allowMissingInitializer) {
        this.next();
        this.parseVar(node, false, kind, allowMissingInitializer);
        this.semicolon();
        return this.finishNode(node, "VariableDeclaration");
      };
      pp$8.parseWhileStatement = function(node) {
        this.next();
        node.test = this.parseParenExpression();
        this.labels.push(loopLabel);
        node.body = this.parseStatement("while");
        this.labels.pop();
        return this.finishNode(node, "WhileStatement");
      };
      pp$8.parseWithStatement = function(node) {
        if (this.strict) {
          this.raise(this.start, "'with' in strict mode");
        }
        this.next();
        node.object = this.parseParenExpression();
        node.body = this.parseStatement("with");
        return this.finishNode(node, "WithStatement");
      };
      pp$8.parseEmptyStatement = function(node) {
        this.next();
        return this.finishNode(node, "EmptyStatement");
      };
      pp$8.parseLabeledStatement = function(node, maybeName, expr, context) {
        for (var i$1 = 0, list2 = this.labels; i$1 < list2.length; i$1 += 1) {
          var label = list2[i$1];
          if (label.name === maybeName) {
            this.raise(expr.start, "Label '" + maybeName + "' is already declared");
          }
        }
        var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null;
        for (var i2 = this.labels.length - 1; i2 >= 0; i2--) {
          var label$1 = this.labels[i2];
          if (label$1.statementStart === node.start) {
            label$1.statementStart = this.start;
            label$1.kind = kind;
          } else {
            break;
          }
        }
        this.labels.push({ name: maybeName, kind, statementStart: this.start });
        node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
        this.labels.pop();
        node.label = expr;
        return this.finishNode(node, "LabeledStatement");
      };
      pp$8.parseExpressionStatement = function(node, expr) {
        node.expression = expr;
        this.semicolon();
        return this.finishNode(node, "ExpressionStatement");
      };
      pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) {
        if (createNewLexicalScope === void 0)
          createNewLexicalScope = true;
        if (node === void 0)
          node = this.startNode();
        node.body = [];
        this.expect(types$1.braceL);
        if (createNewLexicalScope) {
          this.enterScope(0);
        }
        while (this.type !== types$1.braceR) {
          var stmt = this.parseStatement(null);
          node.body.push(stmt);
        }
        if (exitStrict) {
          this.strict = false;
        }
        this.next();
        if (createNewLexicalScope) {
          this.exitScope();
        }
        return this.finishNode(node, "BlockStatement");
      };
      pp$8.parseFor = function(node, init) {
        node.init = init;
        this.expect(types$1.semi);
        node.test = this.type === types$1.semi ? null : this.parseExpression();
        this.expect(types$1.semi);
        node.update = this.type === types$1.parenR ? null : this.parseExpression();
        this.expect(types$1.parenR);
        node.body = this.parseStatement("for");
        this.exitScope();
        this.labels.pop();
        return this.finishNode(node, "ForStatement");
      };
      pp$8.parseForIn = function(node, init) {
        var isForIn = this.type === types$1._in;
        this.next();
        if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
          this.raise(init.start, (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer");
        }
        node.left = init;
        node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
        this.expect(types$1.parenR);
        node.body = this.parseStatement("for");
        this.exitScope();
        this.labels.pop();
        return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
      };
      pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) {
        node.declarations = [];
        node.kind = kind;
        for (; ; ) {
          var decl = this.startNode();
          this.parseVarId(decl, kind);
          if (this.eat(types$1.eq)) {
            decl.init = this.parseMaybeAssign(isFor);
          } else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
            this.unexpected();
          } else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) {
            this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
          } else {
            decl.init = null;
          }
          node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
          if (!this.eat(types$1.comma)) {
            break;
          }
        }
        return node;
      };
      pp$8.parseVarId = function(decl, kind) {
        decl.id = this.parseBindingAtom();
        this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
      };
      var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;
      pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
        this.initFunction(node);
        if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
          if (this.type === types$1.star && statement & FUNC_HANGING_STATEMENT) {
            this.unexpected();
          }
          node.generator = this.eat(types$1.star);
        }
        if (this.options.ecmaVersion >= 8) {
          node.async = !!isAsync;
        }
        if (statement & FUNC_STATEMENT) {
          node.id = statement & FUNC_NULLABLE_ID && this.type !== types$1.name ? null : this.parseIdent();
          if (node.id && !(statement & FUNC_HANGING_STATEMENT)) {
            this.checkLValSimple(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION);
          }
        }
        var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
        this.yieldPos = 0;
        this.awaitPos = 0;
        this.awaitIdentPos = 0;
        this.enterScope(functionFlags(node.async, node.generator));
        if (!(statement & FUNC_STATEMENT)) {
          node.id = this.type === types$1.name ? this.parseIdent() : null;
        }
        this.parseFunctionParams(node);
        this.parseFunctionBody(node, allowExpressionBody, false, forInit);
        this.yieldPos = oldYieldPos;
        this.awaitPos = oldAwaitPos;
        this.awaitIdentPos = oldAwaitIdentPos;
        return this.finishNode(node, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression");
      };
      pp$8.parseFunctionParams = function(node) {
        this.expect(types$1.parenL);
        node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
        this.checkYieldAwaitInDefaultParams();
      };
      pp$8.parseClass = function(node, isStatement) {
        this.next();
        var oldStrict = this.strict;
        this.strict = true;
        this.parseClassId(node, isStatement);
        this.parseClassSuper(node);
        var privateNameMap = this.enterClassBody();
        var classBody = this.startNode();
        var hadConstructor = false;
        classBody.body = [];
        this.expect(types$1.braceL);
        while (this.type !== types$1.braceR) {
          var element = this.parseClassElement(node.superClass !== null);
          if (element) {
            classBody.body.push(element);
            if (element.type === "MethodDefinition" && element.kind === "constructor") {
              if (hadConstructor) {
                this.raiseRecoverable(element.start, "Duplicate constructor in the same class");
              }
              hadConstructor = true;
            } else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) {
              this.raiseRecoverable(element.key.start, "Identifier '#" + element.key.name + "' has already been declared");
            }
          }
        }
        this.strict = oldStrict;
        this.next();
        node.body = this.finishNode(classBody, "ClassBody");
        this.exitClassBody();
        return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
      };
      pp$8.parseClassElement = function(constructorAllowsSuper) {
        if (this.eat(types$1.semi)) {
          return null;
        }
        var ecmaVersion2 = this.options.ecmaVersion;
        var node = this.startNode();
        var keyName = "";
        var isGenerator = false;
        var isAsync = false;
        var kind = "method";
        var isStatic = false;
        if (this.eatContextual("static")) {
          if (ecmaVersion2 >= 13 && this.eat(types$1.braceL)) {
            this.parseClassStaticBlock(node);
            return node;
          }
          if (this.isClassElementNameStart() || this.type === types$1.star) {
            isStatic = true;
          } else {
            keyName = "static";
          }
        }
        node.static = isStatic;
        if (!keyName && ecmaVersion2 >= 8 && this.eatContextual("async")) {
          if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) {
            isAsync = true;
          } else {
            keyName = "async";
          }
        }
        if (!keyName && (ecmaVersion2 >= 9 || !isAsync) && this.eat(types$1.star)) {
          isGenerator = true;
        }
        if (!keyName && !isAsync && !isGenerator) {
          var lastValue = this.value;
          if (this.eatContextual("get") || this.eatContextual("set")) {
            if (this.isClassElementNameStart()) {
              kind = lastValue;
            } else {
              keyName = lastValue;
            }
          }
        }
        if (keyName) {
          node.computed = false;
          node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc);
          node.key.name = keyName;
          this.finishNode(node.key, "Identifier");
        } else {
          this.parseClassElementName(node);
        }
        if (ecmaVersion2 < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
          var isConstructor = !node.static && checkKeyName(node, "constructor");
          var allowsDirectSuper = isConstructor && constructorAllowsSuper;
          if (isConstructor && kind !== "method") {
            this.raise(node.key.start, "Constructor can't have get/set modifier");
          }
          node.kind = isConstructor ? "constructor" : kind;
          this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper);
        } else {
          this.parseClassField(node);
        }
        return node;
      };
      pp$8.isClassElementNameStart = function() {
        return this.type === types$1.name || this.type === types$1.privateId || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword;
      };
      pp$8.parseClassElementName = function(element) {
        if (this.type === types$1.privateId) {
          if (this.value === "constructor") {
            this.raise(this.start, "Classes can't have an element named '#constructor'");
          }
          element.computed = false;
          element.key = this.parsePrivateIdent();
        } else {
          this.parsePropertyName(element);
        }
      };
      pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) {
        var key = method.key;
        if (method.kind === "constructor") {
          if (isGenerator) {
            this.raise(key.start, "Constructor can't be a generator");
          }
          if (isAsync) {
            this.raise(key.start, "Constructor can't be an async method");
          }
        } else if (method.static && checkKeyName(method, "prototype")) {
          this.raise(key.start, "Classes may not have a static property named prototype");
        }
        var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
        if (method.kind === "get" && value.params.length !== 0) {
          this.raiseRecoverable(value.start, "getter should have no params");
        }
        if (method.kind === "set" && value.params.length !== 1) {
          this.raiseRecoverable(value.start, "setter should have exactly one param");
        }
        if (method.kind === "set" && value.params[0].type === "RestElement") {
          this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params");
        }
        return this.finishNode(method, "MethodDefinition");
      };
      pp$8.parseClassField = function(field) {
        if (checkKeyName(field, "constructor")) {
          this.raise(field.key.start, "Classes can't have a field named 'constructor'");
        } else if (field.static && checkKeyName(field, "prototype")) {
          this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
        }
        if (this.eat(types$1.eq)) {
          var scope = this.currentThisScope();
          var inClassFieldInit = scope.inClassFieldInit;
          scope.inClassFieldInit = true;
          field.value = this.parseMaybeAssign();
          scope.inClassFieldInit = inClassFieldInit;
        } else {
          field.value = null;
        }
        this.semicolon();
        return this.finishNode(field, "PropertyDefinition");
      };
      pp$8.parseClassStaticBlock = function(node) {
        node.body = [];
        var oldLabels = this.labels;
        this.labels = [];
        this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER);
        while (this.type !== types$1.braceR) {
          var stmt = this.parseStatement(null);
          node.body.push(stmt);
        }
        this.next();
        this.exitScope();
        this.labels = oldLabels;
        return this.finishNode(node, "StaticBlock");
      };
      pp$8.parseClassId = function(node, isStatement) {
        if (this.type === types$1.name) {
          node.id = this.parseIdent();
          if (isStatement) {
            this.checkLValSimple(node.id, BIND_LEXICAL, false);
          }
        } else {
          if (isStatement === true) {
            this.unexpected();
          }
          node.id = null;
        }
      };
      pp$8.parseClassSuper = function(node) {
        node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null;
      };
      pp$8.enterClassBody = function() {
        var element = { declared: /* @__PURE__ */ Object.create(null), used: [] };
        this.privateNameStack.push(element);
        return element.declared;
      };
      pp$8.exitClassBody = function() {
        var ref2 = this.privateNameStack.pop();
        var declared = ref2.declared;
        var used = ref2.used;
        if (!this.options.checkPrivateFields) {
          return;
        }
        var len = this.privateNameStack.length;
        var parent = len === 0 ? null : this.privateNameStack[len - 1];
        for (var i2 = 0; i2 < used.length; ++i2) {
          var id = used[i2];
          if (!hasOwn(declared, id.name)) {
            if (parent) {
              parent.used.push(id);
            } else {
              this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class");
            }
          }
        }
      };
      function isPrivateNameConflicted(privateNameMap, element) {
        var name = element.key.name;
        var curr = privateNameMap[name];
        var next = "true";
        if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) {
          next = (element.static ? "s" : "i") + element.kind;
        }
        if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") {
          privateNameMap[name] = "true";
          return false;
        } else if (!curr) {
          privateNameMap[name] = next;
          return false;
        } else {
          return true;
        }
      }
      function checkKeyName(node, name) {
        var computed = node.computed;
        var key = node.key;
        return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name);
      }
      pp$8.parseExportAllDeclaration = function(node, exports3) {
        if (this.options.ecmaVersion >= 11) {
          if (this.eatContextual("as")) {
            node.exported = this.parseModuleExportName();
            this.checkExport(exports3, node.exported, this.lastTokStart);
          } else {
            node.exported = null;
          }
        }
        this.expectContextual("from");
        if (this.type !== types$1.string) {
          this.unexpected();
        }
        node.source = this.parseExprAtom();
        this.semicolon();
        return this.finishNode(node, "ExportAllDeclaration");
      };
      pp$8.parseExport = function(node, exports3) {
        this.next();
        if (this.eat(types$1.star)) {
          return this.parseExportAllDeclaration(node, exports3);
        }
        if (this.eat(types$1._default)) {
          this.checkExport(exports3, "default", this.lastTokStart);
          node.declaration = this.parseExportDefaultDeclaration();
          return this.finishNode(node, "ExportDefaultDeclaration");
        }
        if (this.shouldParseExportStatement()) {
          node.declaration = this.parseExportDeclaration(node);
          if (node.declaration.type === "VariableDeclaration") {
            this.checkVariableExport(exports3, node.declaration.declarations);
          } else {
            this.checkExport(exports3, node.declaration.id, node.declaration.id.start);
          }
          node.specifiers = [];
          node.source = null;
        } else {
          node.declaration = null;
          node.specifiers = this.parseExportSpecifiers(exports3);
          if (this.eatContextual("from")) {
            if (this.type !== types$1.string) {
              this.unexpected();
            }
            node.source = this.parseExprAtom();
          } else {
            for (var i2 = 0, list2 = node.specifiers; i2 < list2.length; i2 += 1) {
              var spec = list2[i2];
              this.checkUnreserved(spec.local);
              this.checkLocalExport(spec.local);
              if (spec.local.type === "Literal") {
                this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`.");
              }
            }
            node.source = null;
          }
          this.semicolon();
        }
        return this.finishNode(node, "ExportNamedDeclaration");
      };
      pp$8.parseExportDeclaration = function(node) {
        return this.parseStatement(null);
      };
      pp$8.parseExportDefaultDeclaration = function() {
        var isAsync;
        if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) {
          var fNode = this.startNode();
          this.next();
          if (isAsync) {
            this.next();
          }
          return this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync);
        } else if (this.type === types$1._class) {
          var cNode = this.startNode();
          return this.parseClass(cNode, "nullableID");
        } else {
          var declaration = this.parseMaybeAssign();
          this.semicolon();
          return declaration;
        }
      };
      pp$8.checkExport = function(exports3, name, pos) {
        if (!exports3) {
          return;
        }
        if (typeof name !== "string") {
          name = name.type === "Identifier" ? name.name : name.value;
        }
        if (hasOwn(exports3, name)) {
          this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
        }
        exports3[name] = true;
      };
      pp$8.checkPatternExport = function(exports3, pat) {
        var type = pat.type;
        if (type === "Identifier") {
          this.checkExport(exports3, pat, pat.start);
        } else if (type === "ObjectPattern") {
          for (var i2 = 0, list2 = pat.properties; i2 < list2.length; i2 += 1) {
            var prop = list2[i2];
            this.checkPatternExport(exports3, prop);
          }
        } else if (type === "ArrayPattern") {
          for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
            var elt = list$1[i$1];
            if (elt) {
              this.checkPatternExport(exports3, elt);
            }
          }
        } else if (type === "Property") {
          this.checkPatternExport(exports3, pat.value);
        } else if (type === "AssignmentPattern") {
          this.checkPatternExport(exports3, pat.left);
        } else if (type === "RestElement") {
          this.checkPatternExport(exports3, pat.argument);
        } else if (type === "ParenthesizedExpression") {
          this.checkPatternExport(exports3, pat.expression);
        }
      };
      pp$8.checkVariableExport = function(exports3, decls) {
        if (!exports3) {
          return;
        }
        for (var i2 = 0, list2 = decls; i2 < list2.length; i2 += 1) {
          var decl = list2[i2];
          this.checkPatternExport(exports3, decl.id);
        }
      };
      pp$8.shouldParseExportStatement = function() {
        return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
      };
      pp$8.parseExportSpecifier = function(exports3) {
        var node = this.startNode();
        node.local = this.parseModuleExportName();
        node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
        this.checkExport(exports3, node.exported, node.exported.start);
        return this.finishNode(node, "ExportSpecifier");
      };
      pp$8.parseExportSpecifiers = function(exports3) {
        var nodes = [], first = true;
        this.expect(types$1.braceL);
        while (!this.eat(types$1.braceR)) {
          if (!first) {
            this.expect(types$1.comma);
            if (this.afterTrailingComma(types$1.braceR)) {
              break;
            }
          } else {
            first = false;
          }
          nodes.push(this.parseExportSpecifier(exports3));
        }
        return nodes;
      };
      pp$8.parseImport = function(node) {
        this.next();
        if (this.type === types$1.string) {
          node.specifiers = empty$1;
          node.source = this.parseExprAtom();
        } else {
          node.specifiers = this.parseImportSpecifiers();
          this.expectContextual("from");
          node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected();
        }
        this.semicolon();
        return this.finishNode(node, "ImportDeclaration");
      };
      pp$8.parseImportSpecifier = function() {
        var node = this.startNode();
        node.imported = this.parseModuleExportName();
        if (this.eatContextual("as")) {
          node.local = this.parseIdent();
        } else {
          this.checkUnreserved(node.imported);
          node.local = node.imported;
        }
        this.checkLValSimple(node.local, BIND_LEXICAL);
        return this.finishNode(node, "ImportSpecifier");
      };
      pp$8.parseImportDefaultSpecifier = function() {
        var node = this.startNode();
        node.local = this.parseIdent();
        this.checkLValSimple(node.local, BIND_LEXICAL);
        return this.finishNode(node, "ImportDefaultSpecifier");
      };
      pp$8.parseImportNamespaceSpecifier = function() {
        var node = this.startNode();
        this.next();
        this.expectContextual("as");
        node.local = this.parseIdent();
        this.checkLValSimple(node.local, BIND_LEXICAL);
        return this.finishNode(node, "ImportNamespaceSpecifier");
      };
      pp$8.parseImportSpecifiers = function() {
        var nodes = [], first = true;
        if (this.type === types$1.name) {
          nodes.push(this.parseImportDefaultSpecifier());
          if (!this.eat(types$1.comma)) {
            return nodes;
          }
        }
        if (this.type === types$1.star) {
          nodes.push(this.parseImportNamespaceSpecifier());
          return nodes;
        }
        this.expect(types$1.braceL);
        while (!this.eat(types$1.braceR)) {
          if (!first) {
            this.expect(types$1.comma);
            if (this.afterTrailingComma(types$1.braceR)) {
              break;
            }
          } else {
            first = false;
          }
          nodes.push(this.parseImportSpecifier());
        }
        return nodes;
      };
      pp$8.parseModuleExportName = function() {
        if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {
          var stringLiteral = this.parseLiteral(this.value);
          if (loneSurrogate.test(stringLiteral.value)) {
            this.raise(stringLiteral.start, "An export name cannot include a lone surrogate.");
          }
          return stringLiteral;
        }
        return this.parseIdent(true);
      };
      pp$8.adaptDirectivePrologue = function(statements) {
        for (var i2 = 0; i2 < statements.length && this.isDirectiveCandidate(statements[i2]); ++i2) {
          statements[i2].directive = statements[i2].expression.raw.slice(1, -1);
        }
      };
      pp$8.isDirectiveCandidate = function(statement) {
        return this.options.ecmaVersion >= 5 && statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && (this.input[statement.start] === '"' || this.input[statement.start] === "'");
      };
      var pp$7 = Parser.prototype;
      pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) {
        if (this.options.ecmaVersion >= 6 && node) {
          switch (node.type) {
            case "Identifier":
              if (this.inAsync && node.name === "await") {
                this.raise(node.start, "Cannot use 'await' as identifier inside an async function");
              }
              break;
            case "ObjectPattern":
            case "ArrayPattern":
            case "AssignmentPattern":
            case "RestElement":
              break;
            case "ObjectExpression":
              node.type = "ObjectPattern";
              if (refDestructuringErrors) {
                this.checkPatternErrors(refDestructuringErrors, true);
              }
              for (var i2 = 0, list2 = node.properties; i2 < list2.length; i2 += 1) {
                var prop = list2[i2];
                this.toAssignable(prop, isBinding);
                if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
                  this.raise(prop.argument.start, "Unexpected token");
                }
              }
              break;
            case "Property":
              if (node.kind !== "init") {
                this.raise(node.key.start, "Object pattern can't contain getter or setter");
              }
              this.toAssignable(node.value, isBinding);
              break;
            case "ArrayExpression":
              node.type = "ArrayPattern";
              if (refDestructuringErrors) {
                this.checkPatternErrors(refDestructuringErrors, true);
              }
              this.toAssignableList(node.elements, isBinding);
              break;
            case "SpreadElement":
              node.type = "RestElement";
              this.toAssignable(node.argument, isBinding);
              if (node.argument.type === "AssignmentPattern") {
                this.raise(node.argument.start, "Rest elements cannot have a default value");
              }
              break;
            case "AssignmentExpression":
              if (node.operator !== "=") {
                this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
              }
              node.type = "AssignmentPattern";
              delete node.operator;
              this.toAssignable(node.left, isBinding);
              break;
            case "ParenthesizedExpression":
              this.toAssignable(node.expression, isBinding, refDestructuringErrors);
              break;
            case "ChainExpression":
              this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side");
              break;
            case "MemberExpression":
              if (!isBinding) {
                break;
              }
            default:
              this.raise(node.start, "Assigning to rvalue");
          }
        } else if (refDestructuringErrors) {
          this.checkPatternErrors(refDestructuringErrors, true);
        }
        return node;
      };
      pp$7.toAssignableList = function(exprList, isBinding) {
        var end = exprList.length;
        for (var i2 = 0; i2 < end; i2++) {
          var elt = exprList[i2];
          if (elt) {
            this.toAssignable(elt, isBinding);
          }
        }
        if (end) {
          var last2 = exprList[end - 1];
          if (this.options.ecmaVersion === 6 && isBinding && last2 && last2.type === "RestElement" && last2.argument.type !== "Identifier") {
            this.unexpected(last2.argument.start);
          }
        }
        return exprList;
      };
      pp$7.parseSpread = function(refDestructuringErrors) {
        var node = this.startNode();
        this.next();
        node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
        return this.finishNode(node, "SpreadElement");
      };
      pp$7.parseRestBinding = function() {
        var node = this.startNode();
        this.next();
        if (this.options.ecmaVersion === 6 && this.type !== types$1.name) {
          this.unexpected();
        }
        node.argument = this.parseBindingAtom();
        return this.finishNode(node, "RestElement");
      };
      pp$7.parseBindingAtom = function() {
        if (this.options.ecmaVersion >= 6) {
          switch (this.type) {
            case types$1.bracketL:
              var node = this.startNode();
              this.next();
              node.elements = this.parseBindingList(types$1.bracketR, true, true);
              return this.finishNode(node, "ArrayPattern");
            case types$1.braceL:
              return this.parseObj(true);
          }
        }
        return this.parseIdent();
      };
      pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) {
        var elts = [], first = true;
        while (!this.eat(close)) {
          if (first) {
            first = false;
          } else {
            this.expect(types$1.comma);
          }
          if (allowEmpty && this.type === types$1.comma) {
            elts.push(null);
          } else if (allowTrailingComma && this.afterTrailingComma(close)) {
            break;
          } else if (this.type === types$1.ellipsis) {
            var rest = this.parseRestBinding();
            this.parseBindingListItem(rest);
            elts.push(rest);
            if (this.type === types$1.comma) {
              this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
            }
            this.expect(close);
            break;
          } else {
            elts.push(this.parseAssignableListItem(allowModifiers));
          }
        }
        return elts;
      };
      pp$7.parseAssignableListItem = function(allowModifiers) {
        var elem = this.parseMaybeDefault(this.start, this.startLoc);
        this.parseBindingListItem(elem);
        return elem;
      };
      pp$7.parseBindingListItem = function(param) {
        return param;
      };
      pp$7.parseMaybeDefault = function(startPos, startLoc, left) {
        left = left || this.parseBindingAtom();
        if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) {
          return left;
        }
        var node = this.startNodeAt(startPos, startLoc);
        node.left = left;
        node.right = this.parseMaybeAssign();
        return this.finishNode(node, "AssignmentPattern");
      };
      pp$7.checkLValSimple = function(expr, bindingType, checkClashes) {
        if (bindingType === void 0)
          bindingType = BIND_NONE;
        var isBind = bindingType !== BIND_NONE;
        switch (expr.type) {
          case "Identifier":
            if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {
              this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
            }
            if (isBind) {
              if (bindingType === BIND_LEXICAL && expr.name === "let") {
                this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name");
              }
              if (checkClashes) {
                if (hasOwn(checkClashes, expr.name)) {
                  this.raiseRecoverable(expr.start, "Argument name clash");
                }
                checkClashes[expr.name] = true;
              }
              if (bindingType !== BIND_OUTSIDE) {
                this.declareName(expr.name, bindingType, expr.start);
              }
            }
            break;
          case "ChainExpression":
            this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side");
            break;
          case "MemberExpression":
            if (isBind) {
              this.raiseRecoverable(expr.start, "Binding member expression");
            }
            break;
          case "ParenthesizedExpression":
            if (isBind) {
              this.raiseRecoverable(expr.start, "Binding parenthesized expression");
            }
            return this.checkLValSimple(expr.expression, bindingType, checkClashes);
          default:
            this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue");
        }
      };
      pp$7.checkLValPattern = function(expr, bindingType, checkClashes) {
        if (bindingType === void 0)
          bindingType = BIND_NONE;
        switch (expr.type) {
          case "ObjectPattern":
            for (var i2 = 0, list2 = expr.properties; i2 < list2.length; i2 += 1) {
              var prop = list2[i2];
              this.checkLValInnerPattern(prop, bindingType, checkClashes);
            }
            break;
          case "ArrayPattern":
            for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
              var elem = list$1[i$1];
              if (elem) {
                this.checkLValInnerPattern(elem, bindingType, checkClashes);
              }
            }
            break;
          default:
            this.checkLValSimple(expr, bindingType, checkClashes);
        }
      };
      pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) {
        if (bindingType === void 0)
          bindingType = BIND_NONE;
        switch (expr.type) {
          case "Property":
            this.checkLValInnerPattern(expr.value, bindingType, checkClashes);
            break;
          case "AssignmentPattern":
            this.checkLValPattern(expr.left, bindingType, checkClashes);
            break;
          case "RestElement":
            this.checkLValPattern(expr.argument, bindingType, checkClashes);
            break;
          default:
            this.checkLValPattern(expr, bindingType, checkClashes);
        }
      };
      var TokContext = function TokContext2(token, isExpr, preserveSpace, override, generator) {
        this.token = token;
        this.isExpr = !!isExpr;
        this.preserveSpace = !!preserveSpace;
        this.override = override;
        this.generator = !!generator;
      };
      var types = {
        b_stat: new TokContext("{", false),
        b_expr: new TokContext("{", true),
        b_tmpl: new TokContext("${", false),
        p_stat: new TokContext("(", false),
        p_expr: new TokContext("(", true),
        q_tmpl: new TokContext("`", true, true, function(p) {
          return p.tryReadTemplateToken();
        }),
        f_stat: new TokContext("function", false),
        f_expr: new TokContext("function", true),
        f_expr_gen: new TokContext("function", true, false, null, true),
        f_gen: new TokContext("function", false, false, null, true)
      };
      var pp$6 = Parser.prototype;
      pp$6.initialContext = function() {
        return [types.b_stat];
      };
      pp$6.curContext = function() {
        return this.context[this.context.length - 1];
      };
      pp$6.braceIsBlock = function(prevType) {
        var parent = this.curContext();
        if (parent === types.f_expr || parent === types.f_stat) {
          return true;
        }
        if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) {
          return !parent.isExpr;
        }
        if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) {
          return lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
        }
        if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) {
          return true;
        }
        if (prevType === types$1.braceL) {
          return parent === types.b_stat;
        }
        if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) {
          return false;
        }
        return !this.exprAllowed;
      };
      pp$6.inGeneratorContext = function() {
        for (var i2 = this.context.length - 1; i2 >= 1; i2--) {
          var context = this.context[i2];
          if (context.token === "function") {
            return context.generator;
          }
        }
        return false;
      };
      pp$6.updateContext = function(prevType) {
        var update, type = this.type;
        if (type.keyword && prevType === types$1.dot) {
          this.exprAllowed = false;
        } else if (update = type.updateContext) {
          update.call(this, prevType);
        } else {
          this.exprAllowed = type.beforeExpr;
        }
      };
      pp$6.overrideContext = function(tokenCtx) {
        if (this.curContext() !== tokenCtx) {
          this.context[this.context.length - 1] = tokenCtx;
        }
      };
      types$1.parenR.updateContext = types$1.braceR.updateContext = function() {
        if (this.context.length === 1) {
          this.exprAllowed = true;
          return;
        }
        var out = this.context.pop();
        if (out === types.b_stat && this.curContext().token === "function") {
          out = this.context.pop();
        }
        this.exprAllowed = !out.isExpr;
      };
      types$1.braceL.updateContext = function(prevType) {
        this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
        this.exprAllowed = true;
      };
      types$1.dollarBraceL.updateContext = function() {
        this.context.push(types.b_tmpl);
        this.exprAllowed = true;
      };
      types$1.parenL.updateContext = function(prevType) {
        var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while;
        this.context.push(statementParens ? types.p_stat : types.p_expr);
        this.exprAllowed = true;
      };
      types$1.incDec.updateContext = function() {
      };
      types$1._function.updateContext = types$1._class.updateContext = function(prevType) {
        if (prevType.beforeExpr && prevType !== types$1._else && !(prevType === types$1.semi && this.curContext() !== types.p_stat) && !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) {
          this.context.push(types.f_expr);
        } else {
          this.context.push(types.f_stat);
        }
        this.exprAllowed = false;
      };
      types$1.backQuote.updateContext = function() {
        if (this.curContext() === types.q_tmpl) {
          this.context.pop();
        } else {
          this.context.push(types.q_tmpl);
        }
        this.exprAllowed = false;
      };
      types$1.star.updateContext = function(prevType) {
        if (prevType === types$1._function) {
          var index = this.context.length - 1;
          if (this.context[index] === types.f_expr) {
            this.context[index] = types.f_expr_gen;
          } else {
            this.context[index] = types.f_gen;
          }
        }
        this.exprAllowed = true;
      };
      types$1.name.updateContext = function(prevType) {
        var allowed = false;
        if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) {
          if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) {
            allowed = true;
          }
        }
        this.exprAllowed = allowed;
      };
      var pp$5 = Parser.prototype;
      pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
        if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") {
          return;
        }
        if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {
          return;
        }
        var key = prop.key;
        var name;
        switch (key.type) {
          case "Identifier":
            name = key.name;
            break;
          case "Literal":
            name = String(key.value);
            break;
          default:
            return;
        }
        var kind = prop.kind;
        if (this.options.ecmaVersion >= 6) {
          if (name === "__proto__" && kind === "init") {
            if (propHash.proto) {
              if (refDestructuringErrors) {
                if (refDestructuringErrors.doubleProto < 0) {
                  refDestructuringErrors.doubleProto = key.start;
                }
              } else {
                this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
              }
            }
            propHash.proto = true;
          }
          return;
        }
        name = "$" + name;
        var other = propHash[name];
        if (other) {
          var redefinition;
          if (kind === "init") {
            redefinition = this.strict && other.init || other.get || other.set;
          } else {
            redefinition = other.init || other[kind];
          }
          if (redefinition) {
            this.raiseRecoverable(key.start, "Redefinition of property");
          }
        } else {
          other = propHash[name] = {
            init: false,
            get: false,
            set: false
          };
        }
        other[kind] = true;
      };
      pp$5.parseExpression = function(forInit, refDestructuringErrors) {
        var startPos = this.start, startLoc = this.startLoc;
        var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
        if (this.type === types$1.comma) {
          var node = this.startNodeAt(startPos, startLoc);
          node.expressions = [expr];
          while (this.eat(types$1.comma)) {
            node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
          }
          return this.finishNode(node, "SequenceExpression");
        }
        return expr;
      };
      pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
        if (this.isContextual("yield")) {
          if (this.inGenerator) {
            return this.parseYield(forInit);
          } else {
            this.exprAllowed = false;
          }
        }
        var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1;
        if (refDestructuringErrors) {
          oldParenAssign = refDestructuringErrors.parenthesizedAssign;
          oldTrailingComma = refDestructuringErrors.trailingComma;
          oldDoubleProto = refDestructuringErrors.doubleProto;
          refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
        } else {
          refDestructuringErrors = new DestructuringErrors();
          ownDestructuringErrors = true;
        }
        var startPos = this.start, startLoc = this.startLoc;
        if (this.type === types$1.parenL || this.type === types$1.name) {
          this.potentialArrowAt = this.start;
          this.potentialArrowInForAwait = forInit === "await";
        }
        var left = this.parseMaybeConditional(forInit, refDestructuringErrors);
        if (afterLeftParse) {
          left = afterLeftParse.call(this, left, startPos, startLoc);
        }
        if (this.type.isAssign) {
          var node = this.startNodeAt(startPos, startLoc);
          node.operator = this.value;
          if (this.type === types$1.eq) {
            left = this.toAssignable(left, false, refDestructuringErrors);
          }
          if (!ownDestructuringErrors) {
            refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1;
          }
          if (refDestructuringErrors.shorthandAssign >= left.start) {
            refDestructuringErrors.shorthandAssign = -1;
          }
          if (this.type === types$1.eq) {
            this.checkLValPattern(left);
          } else {
            this.checkLValSimple(left);
          }
          node.left = left;
          this.next();
          node.right = this.parseMaybeAssign(forInit);
          if (oldDoubleProto > -1) {
            refDestructuringErrors.doubleProto = oldDoubleProto;
          }
          return this.finishNode(node, "AssignmentExpression");
        } else {
          if (ownDestructuringErrors) {
            this.checkExpressionErrors(refDestructuringErrors, true);
          }
        }
        if (oldParenAssign > -1) {
          refDestructuringErrors.parenthesizedAssign = oldParenAssign;
        }
        if (oldTrailingComma > -1) {
          refDestructuringErrors.trailingComma = oldTrailingComma;
        }
        return left;
      };
      pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
        var startPos = this.start, startLoc = this.startLoc;
        var expr = this.parseExprOps(forInit, refDestructuringErrors);
        if (this.checkExpressionErrors(refDestructuringErrors)) {
          return expr;
        }
        if (this.eat(types$1.question)) {
          var node = this.startNodeAt(startPos, startLoc);
          node.test = expr;
          node.consequent = this.parseMaybeAssign();
          this.expect(types$1.colon);
          node.alternate = this.parseMaybeAssign(forInit);
          return this.finishNode(node, "ConditionalExpression");
        }
        return expr;
      };
      pp$5.parseExprOps = function(forInit, refDestructuringErrors) {
        var startPos = this.start, startLoc = this.startLoc;
        var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit);
        if (this.checkExpressionErrors(refDestructuringErrors)) {
          return expr;
        }
        return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit);
      };
      pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
        var prec = this.type.binop;
        if (prec != null && (!forInit || this.type !== types$1._in)) {
          if (prec > minPrec) {
            var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND;
            var coalesce = this.type === types$1.coalesce;
            if (coalesce) {
              prec = types$1.logicalAND.binop;
            }
            var op = this.value;
            this.next();
            var startPos = this.start, startLoc = this.startLoc;
            var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit);
            var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce);
            if (logical && this.type === types$1.coalesce || coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND)) {
              this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");
            }
            return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit);
          }
        }
        return left;
      };
      pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) {
        if (right.type === "PrivateIdentifier") {
          this.raise(right.start, "Private identifier can only be left side of binary expression");
        }
        var node = this.startNodeAt(startPos, startLoc);
        node.left = left;
        node.operator = op;
        node.right = right;
        return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");
      };
      pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
        var startPos = this.start, startLoc = this.startLoc, expr;
        if (this.isContextual("await") && this.canAwait) {
          expr = this.parseAwait(forInit);
          sawUnary = true;
        } else if (this.type.prefix) {
          var node = this.startNode(), update = this.type === types$1.incDec;
          node.operator = this.value;
          node.prefix = true;
          this.next();
          node.argument = this.parseMaybeUnary(null, true, update, forInit);
          this.checkExpressionErrors(refDestructuringErrors, true);
          if (update) {
            this.checkLValSimple(node.argument);
          } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
            this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
          } else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) {
            this.raiseRecoverable(node.start, "Private fields can not be deleted");
          } else {
            sawUnary = true;
          }
          expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
        } else if (!sawUnary && this.type === types$1.privateId) {
          if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) {
            this.unexpected();
          }
          expr = this.parsePrivateIdent();
          if (this.type !== types$1._in) {
            this.unexpected();
          }
        } else {
          expr = this.parseExprSubscripts(refDestructuringErrors, forInit);
          if (this.checkExpressionErrors(refDestructuringErrors)) {
            return expr;
          }
          while (this.type.postfix && !this.canInsertSemicolon()) {
            var node$1 = this.startNodeAt(startPos, startLoc);
            node$1.operator = this.value;
            node$1.prefix = false;
            node$1.argument = expr;
            this.checkLValSimple(expr);
            this.next();
            expr = this.finishNode(node$1, "UpdateExpression");
          }
        }
        if (!incDec && this.eat(types$1.starstar)) {
          if (sawUnary) {
            this.unexpected(this.lastTokStart);
          } else {
            return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false);
          }
        } else {
          return expr;
        }
      };
      function isPrivateFieldAccess(node) {
        return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression);
      }
      pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
        var startPos = this.start, startLoc = this.startLoc;
        var expr = this.parseExprAtom(refDestructuringErrors, forInit);
        if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
          return expr;
        }
        var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
        if (refDestructuringErrors && result.type === "MemberExpression") {
          if (refDestructuringErrors.parenthesizedAssign >= result.start) {
            refDestructuringErrors.parenthesizedAssign = -1;
          }
          if (refDestructuringErrors.parenthesizedBind >= result.start) {
            refDestructuringErrors.parenthesizedBind = -1;
          }
          if (refDestructuringErrors.trailingComma >= result.start) {
            refDestructuringErrors.trailingComma = -1;
          }
        }
        return result;
      };
      pp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) {
        var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.potentialArrowAt === base.start;
        var optionalChained = false;
        while (true) {
          var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit);
          if (element.optional) {
            optionalChained = true;
          }
          if (element === base || element.type === "ArrowFunctionExpression") {
            if (optionalChained) {
              var chainNode = this.startNodeAt(startPos, startLoc);
              chainNode.expression = element;
              element = this.finishNode(chainNode, "ChainExpression");
            }
            return element;
          }
          base = element;
        }
      };
      pp$5.shouldParseAsyncArrow = function() {
        return !this.canInsertSemicolon() && this.eat(types$1.arrow);
      };
      pp$5.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) {
        return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit);
      };
      pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
        var optionalSupported = this.options.ecmaVersion >= 11;
        var optional = optionalSupported && this.eat(types$1.questionDot);
        if (noCalls && optional) {
          this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
        }
        var computed = this.eat(types$1.bracketL);
        if (computed || optional && this.type !== types$1.parenL && this.type !== types$1.backQuote || this.eat(types$1.dot)) {
          var node = this.startNodeAt(startPos, startLoc);
          node.object = base;
          if (computed) {
            node.property = this.parseExpression();
            this.expect(types$1.bracketR);
          } else if (this.type === types$1.privateId && base.type !== "Super") {
            node.property = this.parsePrivateIdent();
          } else {
            node.property = this.parseIdent(this.options.allowReserved !== "never");
          }
          node.computed = !!computed;
          if (optionalSupported) {
            node.optional = optional;
          }
          base = this.finishNode(node, "MemberExpression");
        } else if (!noCalls && this.eat(types$1.parenL)) {
          var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
          this.yieldPos = 0;
          this.awaitPos = 0;
          this.awaitIdentPos = 0;
          var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);
          if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) {
            this.checkPatternErrors(refDestructuringErrors, false);
            this.checkYieldAwaitInDefaultParams();
            if (this.awaitIdentPos > 0) {
              this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function");
            }
            this.yieldPos = oldYieldPos;
            this.awaitPos = oldAwaitPos;
            this.awaitIdentPos = oldAwaitIdentPos;
            return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit);
          }
          this.checkExpressionErrors(refDestructuringErrors, true);
          this.yieldPos = oldYieldPos || this.yieldPos;
          this.awaitPos = oldAwaitPos || this.awaitPos;
          this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;
          var node$1 = this.startNodeAt(startPos, startLoc);
          node$1.callee = base;
          node$1.arguments = exprList;
          if (optionalSupported) {
            node$1.optional = optional;
          }
          base = this.finishNode(node$1, "CallExpression");
        } else if (this.type === types$1.backQuote) {
          if (optional || optionalChained) {
            this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
          }
          var node$2 = this.startNodeAt(startPos, startLoc);
          node$2.tag = base;
          node$2.quasi = this.parseTemplate({ isTagged: true });
          base = this.finishNode(node$2, "TaggedTemplateExpression");
        }
        return base;
      };
      pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {
        if (this.type === types$1.slash) {
          this.readRegexp();
        }
        var node, canBeArrow = this.potentialArrowAt === this.start;
        switch (this.type) {
          case types$1._super:
            if (!this.allowSuper) {
              this.raise(this.start, "'super' keyword outside a method");
            }
            node = this.startNode();
            this.next();
            if (this.type === types$1.parenL && !this.allowDirectSuper) {
              this.raise(node.start, "super() call outside constructor of a subclass");
            }
            if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) {
              this.unexpected();
            }
            return this.finishNode(node, "Super");
          case types$1._this:
            node = this.startNode();
            this.next();
            return this.finishNode(node, "ThisExpression");
          case types$1.name:
            var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc;
            var id = this.parseIdent(false);
            if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) {
              this.overrideContext(types.f_expr);
              return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit);
            }
            if (canBeArrow && !this.canInsertSemicolon()) {
              if (this.eat(types$1.arrow)) {
                return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit);
              }
              if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) {
                id = this.parseIdent(false);
                if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) {
                  this.unexpected();
                }
                return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit);
              }
            }
            return id;
          case types$1.regexp:
            var value = this.value;
            node = this.parseLiteral(value.value);
            node.regex = { pattern: value.pattern, flags: value.flags };
            return node;
          case types$1.num:
          case types$1.string:
            return this.parseLiteral(this.value);
          case types$1._null:
          case types$1._true:
          case types$1._false:
            node = this.startNode();
            node.value = this.type === types$1._null ? null : this.type === types$1._true;
            node.raw = this.type.keyword;
            this.next();
            return this.finishNode(node, "Literal");
          case types$1.parenL:
            var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit);
            if (refDestructuringErrors) {
              if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {
                refDestructuringErrors.parenthesizedAssign = start;
              }
              if (refDestructuringErrors.parenthesizedBind < 0) {
                refDestructuringErrors.parenthesizedBind = start;
              }
            }
            return expr;
          case types$1.bracketL:
            node = this.startNode();
            this.next();
            node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors);
            return this.finishNode(node, "ArrayExpression");
          case types$1.braceL:
            this.overrideContext(types.b_expr);
            return this.parseObj(false, refDestructuringErrors);
          case types$1._function:
            node = this.startNode();
            this.next();
            return this.parseFunction(node, 0);
          case types$1._class:
            return this.parseClass(this.startNode(), false);
          case types$1._new:
            return this.parseNew();
          case types$1.backQuote:
            return this.parseTemplate();
          case types$1._import:
            if (this.options.ecmaVersion >= 11) {
              return this.parseExprImport(forNew);
            } else {
              return this.unexpected();
            }
          default:
            return this.parseExprAtomDefault();
        }
      };
      pp$5.parseExprAtomDefault = function() {
        this.unexpected();
      };
      pp$5.parseExprImport = function(forNew) {
        var node = this.startNode();
        if (this.containsEsc) {
          this.raiseRecoverable(this.start, "Escape sequence in keyword import");
        }
        var meta = this.parseIdent(true);
        if (this.type === types$1.parenL && !forNew) {
          return this.parseDynamicImport(node);
        } else if (this.type === types$1.dot) {
          node.meta = meta;
          return this.parseImportMeta(node);
        } else {
          this.unexpected();
        }
      };
      pp$5.parseDynamicImport = function(node) {
        this.next();
        node.source = this.parseMaybeAssign();
        if (!this.eat(types$1.parenR)) {
          var errorPos = this.start;
          if (this.eat(types$1.comma) && this.eat(types$1.parenR)) {
            this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
          } else {
            this.unexpected(errorPos);
          }
        }
        return this.finishNode(node, "ImportExpression");
      };
      pp$5.parseImportMeta = function(node) {
        this.next();
        var containsEsc = this.containsEsc;
        node.property = this.parseIdent(true);
        if (node.property.name !== "meta") {
          this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'");
        }
        if (containsEsc) {
          this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters");
        }
        if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) {
          this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module");
        }
        return this.finishNode(node, "MetaProperty");
      };
      pp$5.parseLiteral = function(value) {
        var node = this.startNode();
        node.value = value;
        node.raw = this.input.slice(this.start, this.end);
        if (node.raw.charCodeAt(node.raw.length - 1) === 110) {
          node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
        }
        this.next();
        return this.finishNode(node, "Literal");
      };
      pp$5.parseParenExpression = function() {
        this.expect(types$1.parenL);
        var val = this.parseExpression();
        this.expect(types$1.parenR);
        return val;
      };
      pp$5.shouldParseArrow = function(exprList) {
        return !this.canInsertSemicolon();
      };
      pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
        var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8;
        if (this.options.ecmaVersion >= 6) {
          this.next();
          var innerStartPos = this.start, innerStartLoc = this.startLoc;
          var exprList = [], first = true, lastIsComma = false;
          var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart;
          this.yieldPos = 0;
          this.awaitPos = 0;
          while (this.type !== types$1.parenR) {
            first ? first = false : this.expect(types$1.comma);
            if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) {
              lastIsComma = true;
              break;
            } else if (this.type === types$1.ellipsis) {
              spreadStart = this.start;
              exprList.push(this.parseParenItem(this.parseRestBinding()));
              if (this.type === types$1.comma) {
                this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
              }
              break;
            } else {
              exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem));
            }
          }
          var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc;
          this.expect(types$1.parenR);
          if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) {
            this.checkPatternErrors(refDestructuringErrors, false);
            this.checkYieldAwaitInDefaultParams();
            this.yieldPos = oldYieldPos;
            this.awaitPos = oldAwaitPos;
            return this.parseParenArrowList(startPos, startLoc, exprList, forInit);
          }
          if (!exprList.length || lastIsComma) {
            this.unexpected(this.lastTokStart);
          }
          if (spreadStart) {
            this.unexpected(spreadStart);
          }
          this.checkExpressionErrors(refDestructuringErrors, true);
          this.yieldPos = oldYieldPos || this.yieldPos;
          this.awaitPos = oldAwaitPos || this.awaitPos;
          if (exprList.length > 1) {
            val = this.startNodeAt(innerStartPos, innerStartLoc);
            val.expressions = exprList;
            this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
          } else {
            val = exprList[0];
          }
        } else {
          val = this.parseParenExpression();
        }
        if (this.options.preserveParens) {
          var par = this.startNodeAt(startPos, startLoc);
          par.expression = val;
          return this.finishNode(par, "ParenthesizedExpression");
        } else {
          return val;
        }
      };
      pp$5.parseParenItem = function(item) {
        return item;
      };
      pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
        return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit);
      };
      var empty = [];
      pp$5.parseNew = function() {
        if (this.containsEsc) {
          this.raiseRecoverable(this.start, "Escape sequence in keyword new");
        }
        var node = this.startNode();
        var meta = this.parseIdent(true);
        if (this.options.ecmaVersion >= 6 && this.eat(types$1.dot)) {
          node.meta = meta;
          var containsEsc = this.containsEsc;
          node.property = this.parseIdent(true);
          if (node.property.name !== "target") {
            this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'");
          }
          if (containsEsc) {
            this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters");
          }
          if (!this.allowNewDotTarget) {
            this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block");
          }
          return this.finishNode(node, "MetaProperty");
        }
        var startPos = this.start, startLoc = this.startLoc;
        node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false);
        if (this.eat(types$1.parenL)) {
          node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false);
        } else {
          node.arguments = empty;
        }
        return this.finishNode(node, "NewExpression");
      };
      pp$5.parseTemplateElement = function(ref2) {
        var isTagged = ref2.isTagged;
        var elem = this.startNode();
        if (this.type === types$1.invalidTemplate) {
          if (!isTagged) {
            this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
          }
          elem.value = {
            raw: this.value,
            cooked: null
          };
        } else {
          elem.value = {
            raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
            cooked: this.value
          };
        }
        this.next();
        elem.tail = this.type === types$1.backQuote;
        return this.finishNode(elem, "TemplateElement");
      };
      pp$5.parseTemplate = function(ref2) {
        if (ref2 === void 0)
          ref2 = {};
        var isTagged = ref2.isTagged;
        if (isTagged === void 0)
          isTagged = false;
        var node = this.startNode();
        this.next();
        node.expressions = [];
        var curElt = this.parseTemplateElement({ isTagged });
        node.quasis = [curElt];
        while (!curElt.tail) {
          if (this.type === types$1.eof) {
            this.raise(this.pos, "Unterminated template literal");
          }
          this.expect(types$1.dollarBraceL);
          node.expressions.push(this.parseExpression());
          this.expect(types$1.braceR);
          node.quasis.push(curElt = this.parseTemplateElement({ isTagged }));
        }
        this.next();
        return this.finishNode(node, "TemplateLiteral");
      };
      pp$5.isAsyncProp = function(prop) {
        return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$1.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
      };
      pp$5.parseObj = function(isPattern, refDestructuringErrors) {
        var node = this.startNode(), first = true, propHash = {};
        node.properties = [];
        this.next();
        while (!this.eat(types$1.braceR)) {
          if (!first) {
            this.expect(types$1.comma);
            if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) {
              break;
            }
          } else {
            first = false;
          }
          var prop = this.parseProperty(isPattern, refDestructuringErrors);
          if (!isPattern) {
            this.checkPropClash(prop, propHash, refDestructuringErrors);
          }
          node.properties.push(prop);
        }
        return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
      };
      pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
        var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc;
        if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {
          if (isPattern) {
            prop.argument = this.parseIdent(false);
            if (this.type === types$1.comma) {
              this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
            }
            return this.finishNode(prop, "RestElement");
          }
          prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
          if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
            refDestructuringErrors.trailingComma = this.start;
          }
          return this.finishNode(prop, "SpreadElement");
        }
        if (this.options.ecmaVersion >= 6) {
          prop.method = false;
          prop.shorthand = false;
          if (isPattern || refDestructuringErrors) {
            startPos = this.start;
            startLoc = this.startLoc;
          }
          if (!isPattern) {
            isGenerator = this.eat(types$1.star);
          }
        }
        var containsEsc = this.containsEsc;
        this.parsePropertyName(prop);
        if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
          isAsync = true;
          isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
          this.parsePropertyName(prop);
        } else {
          isAsync = false;
        }
        this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
        return this.finishNode(prop, "Property");
      };
      pp$5.parseGetterSetter = function(prop) {
        prop.kind = prop.key.name;
        this.parsePropertyName(prop);
        prop.value = this.parseMethod(false);
        var paramCount = prop.kind === "get" ? 0 : 1;
        if (prop.value.params.length !== paramCount) {
          var start = prop.value.start;
          if (prop.kind === "get") {
            this.raiseRecoverable(start, "getter should have no params");
          } else {
            this.raiseRecoverable(start, "setter should have exactly one param");
          }
        } else {
          if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
            this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
          }
        }
      };
      pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
        if ((isGenerator || isAsync) && this.type === types$1.colon) {
          this.unexpected();
        }
        if (this.eat(types$1.colon)) {
          prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
          prop.kind = "init";
        } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) {
          if (isPattern) {
            this.unexpected();
          }
          prop.kind = "init";
          prop.method = true;
          prop.value = this.parseMethod(isGenerator, isAsync);
        } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) {
          if (isGenerator || isAsync) {
            this.unexpected();
          }
          this.parseGetterSetter(prop);
        } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
          if (isGenerator || isAsync) {
            this.unexpected();
          }
          this.checkUnreserved(prop.key);
          if (prop.key.name === "await" && !this.awaitIdentPos) {
            this.awaitIdentPos = startPos;
          }
          prop.kind = "init";
          if (isPattern) {
            prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
          } else if (this.type === types$1.eq && refDestructuringErrors) {
            if (refDestructuringErrors.shorthandAssign < 0) {
              refDestructuringErrors.shorthandAssign = this.start;
            }
            prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
          } else {
            prop.value = this.copyNode(prop.key);
          }
          prop.shorthand = true;
        } else {
          this.unexpected();
        }
      };
      pp$5.parsePropertyName = function(prop) {
        if (this.options.ecmaVersion >= 6) {
          if (this.eat(types$1.bracketL)) {
            prop.computed = true;
            prop.key = this.parseMaybeAssign();
            this.expect(types$1.bracketR);
            return prop.key;
          } else {
            prop.computed = false;
          }
        }
        return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
      };
      pp$5.initFunction = function(node) {
        node.id = null;
        if (this.options.ecmaVersion >= 6) {
          node.generator = node.expression = false;
        }
        if (this.options.ecmaVersion >= 8) {
          node.async = false;
        }
      };
      pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
        var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
        this.initFunction(node);
        if (this.options.ecmaVersion >= 6) {
          node.generator = isGenerator;
        }
        if (this.options.ecmaVersion >= 8) {
          node.async = !!isAsync;
        }
        this.yieldPos = 0;
        this.awaitPos = 0;
        this.awaitIdentPos = 0;
        this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
        this.expect(types$1.parenL);
        node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8);
        this.checkYieldAwaitInDefaultParams();
        this.parseFunctionBody(node, false, true, false);
        this.yieldPos = oldYieldPos;
        this.awaitPos = oldAwaitPos;
        this.awaitIdentPos = oldAwaitIdentPos;
        return this.finishNode(node, "FunctionExpression");
      };
      pp$5.parseArrowExpression = function(node, params, isAsync, forInit) {
        var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos;
        this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
        this.initFunction(node);
        if (this.options.ecmaVersion >= 8) {
          node.async = !!isAsync;
        }
        this.yieldPos = 0;
        this.awaitPos = 0;
        this.awaitIdentPos = 0;
        node.params = this.toAssignableList(params, true);
        this.parseFunctionBody(node, true, false, forInit);
        this.yieldPos = oldYieldPos;
        this.awaitPos = oldAwaitPos;
        this.awaitIdentPos = oldAwaitIdentPos;
        return this.finishNode(node, "ArrowFunctionExpression");
      };
      pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
        var isExpression = isArrowFunction && this.type !== types$1.braceL;
        var oldStrict = this.strict, useStrict = false;
        if (isExpression) {
          node.body = this.parseMaybeAssign(forInit);
          node.expression = true;
          this.checkParams(node, false);
        } else {
          var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
          if (!oldStrict || nonSimple) {
            useStrict = this.strictDirective(this.end);
            if (useStrict && nonSimple) {
              this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list");
            }
          }
          var oldLabels = this.labels;
          this.labels = [];
          if (useStrict) {
            this.strict = true;
          }
          this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));
          if (this.strict && node.id) {
            this.checkLValSimple(node.id, BIND_OUTSIDE);
          }
          node.body = this.parseBlock(false, void 0, useStrict && !oldStrict);
          node.expression = false;
          this.adaptDirectivePrologue(node.body.body);
          this.labels = oldLabels;
        }
        this.exitScope();
      };
      pp$5.isSimpleParamList = function(params) {
        for (var i2 = 0, list2 = params; i2 < list2.length; i2 += 1) {
          var param = list2[i2];
          if (param.type !== "Identifier") {
            return false;
          }
        }
        return true;
      };
      pp$5.checkParams = function(node, allowDuplicates) {
        var nameHash = /* @__PURE__ */ Object.create(null);
        for (var i2 = 0, list2 = node.params; i2 < list2.length; i2 += 1) {
          var param = list2[i2];
          this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash);
        }
      };
      pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
        var elts = [], first = true;
        while (!this.eat(close)) {
          if (!first) {
            this.expect(types$1.comma);
            if (allowTrailingComma && this.afterTrailingComma(close)) {
              break;
            }
          } else {
            first = false;
          }
          var elt = void 0;
          if (allowEmpty && this.type === types$1.comma) {
            elt = null;
          } else if (this.type === types$1.ellipsis) {
            elt = this.parseSpread(refDestructuringErrors);
            if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) {
              refDestructuringErrors.trailingComma = this.start;
            }
          } else {
            elt = this.parseMaybeAssign(false, refDestructuringErrors);
          }
          elts.push(elt);
        }
        return elts;
      };
      pp$5.checkUnreserved = function(ref2) {
        var start = ref2.start;
        var end = ref2.end;
        var name = ref2.name;
        if (this.inGenerator && name === "yield") {
          this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator");
        }
        if (this.inAsync && name === "await") {
          this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function");
        }
        if (this.currentThisScope().inClassFieldInit && name === "arguments") {
          this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer");
        }
        if (this.inClassStaticBlock && (name === "arguments" || name === "await")) {
          this.raise(start, "Cannot use " + name + " in class static initialization block");
        }
        if (this.keywords.test(name)) {
          this.raise(start, "Unexpected keyword '" + name + "'");
        }
        if (this.options.ecmaVersion < 6 && this.input.slice(start, end).indexOf("\\") !== -1) {
          return;
        }
        var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
        if (re.test(name)) {
          if (!this.inAsync && name === "await") {
            this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function");
          }
          this.raiseRecoverable(start, "The keyword '" + name + "' is reserved");
        }
      };
      pp$5.parseIdent = function(liberal) {
        var node = this.parseIdentNode();
        this.next(!!liberal);
        this.finishNode(node, "Identifier");
        if (!liberal) {
          this.checkUnreserved(node);
          if (node.name === "await" && !this.awaitIdentPos) {
            this.awaitIdentPos = node.start;
          }
        }
        return node;
      };
      pp$5.parseIdentNode = function() {
        var node = this.startNode();
        if (this.type === types$1.name) {
          node.name = this.value;
        } else if (this.type.keyword) {
          node.name = this.type.keyword;
          if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
            this.context.pop();
          }
        } else {
          this.unexpected();
        }
        return node;
      };
      pp$5.parsePrivateIdent = function() {
        var node = this.startNode();
        if (this.type === types$1.privateId) {
          node.name = this.value;
        } else {
          this.unexpected();
        }
        this.next();
        this.finishNode(node, "PrivateIdentifier");
        if (this.options.checkPrivateFields) {
          if (this.privateNameStack.length === 0) {
            this.raise(node.start, "Private field '#" + node.name + "' must be declared in an enclosing class");
          } else {
            this.privateNameStack[this.privateNameStack.length - 1].used.push(node);
          }
        }
        return node;
      };
      pp$5.parseYield = function(forInit) {
        if (!this.yieldPos) {
          this.yieldPos = this.start;
        }
        var node = this.startNode();
        this.next();
        if (this.type === types$1.semi || this.canInsertSemicolon() || this.type !== types$1.star && !this.type.startsExpr) {
          node.delegate = false;
          node.argument = null;
        } else {
          node.delegate = this.eat(types$1.star);
          node.argument = this.parseMaybeAssign(forInit);
        }
        return this.finishNode(node, "YieldExpression");
      };
      pp$5.parseAwait = function(forInit) {
        if (!this.awaitPos) {
          this.awaitPos = this.start;
        }
        var node = this.startNode();
        this.next();
        node.argument = this.parseMaybeUnary(null, true, false, forInit);
        return this.finishNode(node, "AwaitExpression");
      };
      var pp$4 = Parser.prototype;
      pp$4.raise = function(pos, message) {
        var loc = getLineInfo(this.input, pos);
        message += " (" + loc.line + ":" + loc.column + ")";
        var err = new SyntaxError(message);
        err.pos = pos;
        err.loc = loc;
        err.raisedAt = this.pos;
        throw err;
      };
      pp$4.raiseRecoverable = pp$4.raise;
      pp$4.curPosition = function() {
        if (this.options.locations) {
          return new Position(this.curLine, this.pos - this.lineStart);
        }
      };
      var pp$3 = Parser.prototype;
      var Scope = function Scope2(flags) {
        this.flags = flags;
        this.var = [];
        this.lexical = [];
        this.functions = [];
        this.inClassFieldInit = false;
      };
      pp$3.enterScope = function(flags) {
        this.scopeStack.push(new Scope(flags));
      };
      pp$3.exitScope = function() {
        this.scopeStack.pop();
      };
      pp$3.treatFunctionsAsVarInScope = function(scope) {
        return scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_TOP;
      };
      pp$3.declareName = function(name, bindingType, pos) {
        var redeclared = false;
        if (bindingType === BIND_LEXICAL) {
          var scope = this.currentScope();
          redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
          scope.lexical.push(name);
          if (this.inModule && scope.flags & SCOPE_TOP) {
            delete this.undefinedExports[name];
          }
        } else if (bindingType === BIND_SIMPLE_CATCH) {
          var scope$1 = this.currentScope();
          scope$1.lexical.push(name);
        } else if (bindingType === BIND_FUNCTION) {
          var scope$2 = this.currentScope();
          if (this.treatFunctionsAsVar) {
            redeclared = scope$2.lexical.indexOf(name) > -1;
          } else {
            redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1;
          }
          scope$2.functions.push(name);
        } else {
          for (var i2 = this.scopeStack.length - 1; i2 >= 0; --i2) {
            var scope$3 = this.scopeStack[i2];
            if (scope$3.lexical.indexOf(name) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {
              redeclared = true;
              break;
            }
            scope$3.var.push(name);
            if (this.inModule && scope$3.flags & SCOPE_TOP) {
              delete this.undefinedExports[name];
            }
            if (scope$3.flags & SCOPE_VAR) {
              break;
            }
          }
        }
        if (redeclared) {
          this.raiseRecoverable(pos, "Identifier '" + name + "' has already been declared");
        }
      };
      pp$3.checkLocalExport = function(id) {
        if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) {
          this.undefinedExports[id.name] = id;
        }
      };
      pp$3.currentScope = function() {
        return this.scopeStack[this.scopeStack.length - 1];
      };
      pp$3.currentVarScope = function() {
        for (var i2 = this.scopeStack.length - 1; ; i2--) {
          var scope = this.scopeStack[i2];
          if (scope.flags & SCOPE_VAR) {
            return scope;
          }
        }
      };
      pp$3.currentThisScope = function() {
        for (var i2 = this.scopeStack.length - 1; ; i2--) {
          var scope = this.scopeStack[i2];
          if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) {
            return scope;
          }
        }
      };
      var Node2 = function Node3(parser, pos, loc) {
        this.type = "";
        this.start = pos;
        this.end = 0;
        if (parser.options.locations) {
          this.loc = new SourceLocation(parser, loc);
        }
        if (parser.options.directSourceFile) {
          this.sourceFile = parser.options.directSourceFile;
        }
        if (parser.options.ranges) {
          this.range = [pos, 0];
        }
      };
      var pp$2 = Parser.prototype;
      pp$2.startNode = function() {
        return new Node2(this, this.start, this.startLoc);
      };
      pp$2.startNodeAt = function(pos, loc) {
        return new Node2(this, pos, loc);
      };
      function finishNodeAt(node, type, pos, loc) {
        node.type = type;
        node.end = pos;
        if (this.options.locations) {
          node.loc.end = loc;
        }
        if (this.options.ranges) {
          node.range[1] = pos;
        }
        return node;
      }
      pp$2.finishNode = function(node, type) {
        return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);
      };
      pp$2.finishNodeAt = function(node, type, pos, loc) {
        return finishNodeAt.call(this, node, type, pos, loc);
      };
      pp$2.copyNode = function(node) {
        var newNode = new Node2(this, node.start, this.startLoc);
        for (var prop in node) {
          newNode[prop] = node[prop];
        }
        return newNode;
      };
      var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
      var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
      var ecma11BinaryProperties = ecma10BinaryProperties;
      var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict";
      var ecma13BinaryProperties = ecma12BinaryProperties;
      var ecma14BinaryProperties = ecma13BinaryProperties;
      var unicodeBinaryProperties = {
        9: ecma9BinaryProperties,
        10: ecma10BinaryProperties,
        11: ecma11BinaryProperties,
        12: ecma12BinaryProperties,
        13: ecma13BinaryProperties,
        14: ecma14BinaryProperties
      };
      var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji";
      var unicodeBinaryPropertiesOfStrings = {
        9: "",
        10: "",
        11: "",
        12: "",
        13: "",
        14: ecma14BinaryPropertiesOfStrings
      };
      var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";
      var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
      var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
      var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
      var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
      var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
      var ecma14ScriptValues = ecma13ScriptValues + " Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz";
      var unicodeScriptValues = {
        9: ecma9ScriptValues,
        10: ecma10ScriptValues,
        11: ecma11ScriptValues,
        12: ecma12ScriptValues,
        13: ecma13ScriptValues,
        14: ecma14ScriptValues
      };
      var data = {};
      function buildUnicodeData(ecmaVersion2) {
        var d = data[ecmaVersion2] = {
          binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion2] + " " + unicodeGeneralCategoryValues),
          binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion2]),
          nonBinary: {
            General_Category: wordsRegexp(unicodeGeneralCategoryValues),
            Script: wordsRegexp(unicodeScriptValues[ecmaVersion2])
          }
        };
        d.nonBinary.Script_Extensions = d.nonBinary.Script;
        d.nonBinary.gc = d.nonBinary.General_Category;
        d.nonBinary.sc = d.nonBinary.Script;
        d.nonBinary.scx = d.nonBinary.Script_Extensions;
      }
      for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) {
        var ecmaVersion = list[i];
        buildUnicodeData(ecmaVersion);
      }
      var pp$1 = Parser.prototype;
      var RegExpValidationState = function RegExpValidationState2(parser) {
        this.parser = parser;
        this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : "");
        this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion];
        this.source = "";
        this.flags = "";
        this.start = 0;
        this.switchU = false;
        this.switchV = false;
        this.switchN = false;
        this.pos = 0;
        this.lastIntValue = 0;
        this.lastStringValue = "";
        this.lastAssertionIsQuantifiable = false;
        this.numCapturingParens = 0;
        this.maxBackReference = 0;
        this.groupNames = [];
        this.backReferenceNames = [];
      };
      RegExpValidationState.prototype.reset = function reset(start, pattern, flags) {
        var unicodeSets = flags.indexOf("v") !== -1;
        var unicode = flags.indexOf("u") !== -1;
        this.start = start | 0;
        this.source = pattern + "";
        this.flags = flags;
        if (unicodeSets && this.parser.options.ecmaVersion >= 15) {
          this.switchU = true;
          this.switchV = true;
          this.switchN = true;
        } else {
          this.switchU = unicode && this.parser.options.ecmaVersion >= 6;
          this.switchV = false;
          this.switchN = unicode && this.parser.options.ecmaVersion >= 9;
        }
      };
      RegExpValidationState.prototype.raise = function raise(message) {
        this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
      };
      RegExpValidationState.prototype.at = function at(i2, forceU) {
        if (forceU === void 0)
          forceU = false;
        var s = this.source;
        var l = s.length;
        if (i2 >= l) {
          return -1;
        }
        var c = s.charCodeAt(i2);
        if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l) {
          return c;
        }
        var next = s.charCodeAt(i2 + 1);
        return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c;
      };
      RegExpValidationState.prototype.nextIndex = function nextIndex(i2, forceU) {
        if (forceU === void 0)
          forceU = false;
        var s = this.source;
        var l = s.length;
        if (i2 >= l) {
          return l;
        }
        var c = s.charCodeAt(i2), next;
        if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l || (next = s.charCodeAt(i2 + 1)) < 56320 || next > 57343) {
          return i2 + 1;
        }
        return i2 + 2;
      };
      RegExpValidationState.prototype.current = function current(forceU) {
        if (forceU === void 0)
          forceU = false;
        return this.at(this.pos, forceU);
      };
      RegExpValidationState.prototype.lookahead = function lookahead(forceU) {
        if (forceU === void 0)
          forceU = false;
        return this.at(this.nextIndex(this.pos, forceU), forceU);
      };
      RegExpValidationState.prototype.advance = function advance(forceU) {
        if (forceU === void 0)
          forceU = false;
        this.pos = this.nextIndex(this.pos, forceU);
      };
      RegExpValidationState.prototype.eat = function eat(ch, forceU) {
        if (forceU === void 0)
          forceU = false;
        if (this.current(forceU) === ch) {
          this.advance(forceU);
          return true;
        }
        return false;
      };
      RegExpValidationState.prototype.eatChars = function eatChars(chs, forceU) {
        if (forceU === void 0)
          forceU = false;
        var pos = this.pos;
        for (var i2 = 0, list2 = chs; i2 < list2.length; i2 += 1) {
          var ch = list2[i2];
          var current = this.at(pos, forceU);
          if (current === -1 || current !== ch) {
            return false;
          }
          pos = this.nextIndex(pos, forceU);
        }
        this.pos = pos;
        return true;
      };
      pp$1.validateRegExpFlags = function(state) {
        var validFlags = state.validFlags;
        var flags = state.flags;
        var u = false;
        var v = false;
        for (var i2 = 0; i2 < flags.length; i2++) {
          var flag = flags.charAt(i2);
          if (validFlags.indexOf(flag) === -1) {
            this.raise(state.start, "Invalid regular expression flag");
          }
          if (flags.indexOf(flag, i2 + 1) > -1) {
            this.raise(state.start, "Duplicate regular expression flag");
          }
          if (flag === "u") {
            u = true;
          }
          if (flag === "v") {
            v = true;
          }
        }
        if (this.options.ecmaVersion >= 15 && u && v) {
          this.raise(state.start, "Invalid regular expression flag");
        }
      };
      pp$1.validateRegExpPattern = function(state) {
        this.regexp_pattern(state);
        if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
          state.switchN = true;
          this.regexp_pattern(state);
        }
      };
      pp$1.regexp_pattern = function(state) {
        state.pos = 0;
        state.lastIntValue = 0;
        state.lastStringValue = "";
        state.lastAssertionIsQuantifiable = false;
        state.numCapturingParens = 0;
        state.maxBackReference = 0;
        state.groupNames.length = 0;
        state.backReferenceNames.length = 0;
        this.regexp_disjunction(state);
        if (state.pos !== state.source.length) {
          if (state.eat(41)) {
            state.raise("Unmatched ')'");
          }
          if (state.eat(93) || state.eat(125)) {
            state.raise("Lone quantifier brackets");
          }
        }
        if (state.maxBackReference > state.numCapturingParens) {
          state.raise("Invalid escape");
        }
        for (var i2 = 0, list2 = state.backReferenceNames; i2 < list2.length; i2 += 1) {
          var name = list2[i2];
          if (state.groupNames.indexOf(name) === -1) {
            state.raise("Invalid named capture referenced");
          }
        }
      };
      pp$1.regexp_disjunction = function(state) {
        this.regexp_alternative(state);
        while (state.eat(124)) {
          this.regexp_alternative(state);
        }
        if (this.regexp_eatQuantifier(state, true)) {
          state.raise("Nothing to repeat");
        }
        if (state.eat(123)) {
          state.raise("Lone quantifier brackets");
        }
      };
      pp$1.regexp_alternative = function(state) {
        while (state.pos < state.source.length && this.regexp_eatTerm(state)) {
        }
      };
      pp$1.regexp_eatTerm = function(state) {
        if (this.regexp_eatAssertion(state)) {
          if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
            if (state.switchU) {
              state.raise("Invalid quantifier");
            }
          }
          return true;
        }
        if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
          this.regexp_eatQuantifier(state);
          return true;
        }
        return false;
      };
      pp$1.regexp_eatAssertion = function(state) {
        var start = state.pos;
        state.lastAssertionIsQuantifiable = false;
        if (state.eat(94) || state.eat(36)) {
          return true;
        }
        if (state.eat(92)) {
          if (state.eat(66) || state.eat(98)) {
            return true;
          }
          state.pos = start;
        }
        if (state.eat(40) && state.eat(63)) {
          var lookbehind = false;
          if (this.options.ecmaVersion >= 9) {
            lookbehind = state.eat(60);
          }
          if (state.eat(61) || state.eat(33)) {
            this.regexp_disjunction(state);
            if (!state.eat(41)) {
              state.raise("Unterminated group");
            }
            state.lastAssertionIsQuantifiable = !lookbehind;
            return true;
          }
        }
        state.pos = start;
        return false;
      };
      pp$1.regexp_eatQuantifier = function(state, noError) {
        if (noError === void 0)
          noError = false;
        if (this.regexp_eatQuantifierPrefix(state, noError)) {
          state.eat(63);
          return true;
        }
        return false;
      };
      pp$1.regexp_eatQuantifierPrefix = function(state, noError) {
        return state.eat(42) || state.eat(43) || state.eat(63) || this.regexp_eatBracedQuantifier(state, noError);
      };
      pp$1.regexp_eatBracedQuantifier = function(state, noError) {
        var start = state.pos;
        if (state.eat(123)) {
          var min = 0, max = -1;
          if (this.regexp_eatDecimalDigits(state)) {
            min = state.lastIntValue;
            if (state.eat(44) && this.regexp_eatDecimalDigits(state)) {
              max = state.lastIntValue;
            }
            if (state.eat(125)) {
              if (max !== -1 && max < min && !noError) {
                state.raise("numbers out of order in {} quantifier");
              }
              return true;
            }
          }
          if (state.switchU && !noError) {
            state.raise("Incomplete quantifier");
          }
          state.pos = start;
        }
        return false;
      };
      pp$1.regexp_eatAtom = function(state) {
        return this.regexp_eatPatternCharacters(state) || state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
      };
      pp$1.regexp_eatReverseSolidusAtomEscape = function(state) {
        var start = state.pos;
        if (state.eat(92)) {
          if (this.regexp_eatAtomEscape(state)) {
            return true;
          }
          state.pos = start;
        }
        return false;
      };
      pp$1.regexp_eatUncapturingGroup = function(state) {
        var start = state.pos;
        if (state.eat(40)) {
          if (state.eat(63) && state.eat(58)) {
            this.regexp_disjunction(state);
            if (state.eat(41)) {
              return true;
            }
            state.raise("Unterminated group");
          }
          state.pos = start;
        }
        return false;
      };
      pp$1.regexp_eatCapturingGroup = function(state) {
        if (state.eat(40)) {
          if (this.options.ecmaVersion >= 9) {
            this.regexp_groupSpecifier(state);
          } else if (state.current() === 63) {
            state.raise("Invalid group");
          }
          this.regexp_disjunction(state);
          if (state.eat(41)) {
            state.numCapturingParens += 1;
            return true;
          }
          state.raise("Unterminated group");
        }
        return false;
      };
      pp$1.regexp_eatExtendedAtom = function(state) {
        return state.eat(46) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
      };
      pp$1.regexp_eatInvalidBracedQuantifier = function(state) {
        if (this.regexp_eatBracedQuantifier(state, true)) {
          state.raise("Nothing to repeat");
        }
        return false;
      };
      pp$1.regexp_eatSyntaxCharacter = function(state) {
        var ch = state.current();
        if (isSyntaxCharacter(ch)) {
          state.lastIntValue = ch;
          state.advance();
          return true;
        }
        return false;
      };
      function isSyntaxCharacter(ch) {
        return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
      }
      pp$1.regexp_eatPatternCharacters = function(state) {
        var start = state.pos;
        var ch = 0;
        while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {
          state.advance();
        }
        return state.pos !== start;
      };
      pp$1.regexp_eatExtendedPatternCharacter = function(state) {
        var ch = state.current();
        if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) {
          state.advance();
          return true;
        }
        return false;
      };
      pp$1.regexp_groupSpecifier = function(state) {
        if (state.eat(63)) {
          if (this.regexp_eatGroupName(state)) {
            if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
              state.raise("Duplicate capture group name");
            }
            state.groupNames.push(state.lastStringValue);
            return;
          }
          state.raise("Invalid group");
        }
      };
      pp$1.regexp_eatGroupName = function(state) {
        state.lastStringValue = "";
        if (state.eat(60)) {
          if (this.regexp_eatRegExpIdentifierName(state) && state.eat(62)) {
            return true;
          }
          state.raise("Invalid capture group name");
        }
        return false;
      };
      pp$1.regexp_eatRegExpIdentifierName = function(state) {
        state.lastStringValue = "";
        if (this.regexp_eatRegExpIdentifierStart(state)) {
          state.lastStringValue += codePointToString(state.lastIntValue);
          while (this.regexp_eatRegExpIdentifierPart(state)) {
            state.lastStringValue += codePointToString(state.lastIntValue);
          }
          return true;
        }
        return false;
      };
      pp$1.regexp_eatRegExpIdentifierStart = function(state) {
        var start = state.pos;
        var forceU = this.options.ecmaVersion >= 11;
        var ch = state.current(forceU);
        state.advance(forceU);
        if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
          ch = state.lastIntValue;
        }
        if (isRegExpIdentifierStart(ch)) {
          state.lastIntValue = ch;
          return true;
        }
        state.pos = start;
        return false;
      };
      function isRegExpIdentifierStart(ch) {
        return isIdentifierStart(ch, true) || ch === 36 || ch === 95;
      }
      pp$1.regexp_eatRegExpIdentifierPart = function(state) {
        var start = state.pos;
        var forceU = this.options.ecmaVersion >= 11;
        var ch = state.current(forceU);
        state.advance(forceU);
        if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
          ch = state.lastIntValue;
        }
        if (isRegExpIdentifierPart(ch)) {
          state.lastIntValue = ch;
          return true;
        }
        state.pos = start;
        return false;
      };
      function isRegExpIdentifierPart(ch) {
        return isIdentifierChar(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
      }
      pp$1.regexp_eatAtomEscape = function(state) {
        if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {
          return true;
        }
        if (state.switchU) {
          if (state.current() === 99) {
            state.raise("Invalid unicode escape");
          }
          state.raise("Invalid escape");
        }
        return false;
      };
      pp$1.regexp_eatBackReference = function(state) {
        var start = state.pos;
        if (this.regexp_eatDecimalEscape(state)) {
          var n = state.lastIntValue;
          if (state.switchU) {
            if (n > state.maxBackReference) {
              state.maxBackReference = n;
            }
            return true;
          }
          if (n <= state.numCapturingParens) {
            return true;
          }
          state.pos = start;
        }
        return false;
      };
      pp$1.regexp_eatKGroupName = function(state) {
        if (state.eat(107)) {
          if (this.regexp_eatGroupName(state)) {
            state.backReferenceNames.push(state.lastStringValue);
            return true;
          }
          state.raise("Invalid named reference");
        }
        return false;
      };
      pp$1.regexp_eatCharacterEscape = function(state) {
        return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
      };
      pp$1.regexp_eatCControlLetter = function(state) {
        var start = state.pos;
        if (state.eat(99)) {
          if (this.regexp_eatControlLetter(state)) {
            return true;
          }
          state.pos = start;
        }
        return false;
      };
      pp$1.regexp_eatZero = function(state) {
        if (state.current() === 48 && !isDecimalDigit(state.lookahead())) {
          state.lastIntValue = 0;
          state.advance();
          return true;
        }
        return false;
      };
      pp$1.regexp_eatControlEscape = function(state) {
        var ch = state.current();
        if (ch === 116) {
          state.lastIntValue = 9;
          state.advance();
          return true;
        }
        if (ch === 110) {
          state.lastIntValue = 10;
          state.advance();
          return true;
        }
        if (ch === 118) {
          state.lastIntValue = 11;
          state.advance();
          return true;
        }
        if (ch === 102) {
          state.lastIntValue = 12;
          state.advance();
          return true;
        }
        if (ch === 114) {
          state.lastIntValue = 13;
          state.advance();
          return true;
        }
        return false;
      };
      pp$1.regexp_eatControlLetter = function(state) {
        var ch = state.current();
        if (isControlLetter(ch)) {
          state.lastIntValue = ch % 32;
          state.advance();
          return true;
        }
        return false;
      };
      function isControlLetter(ch) {
        return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
      }
      pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) {
        if (forceU === void 0)
          forceU = false;
        var start = state.pos;
        var switchU = forceU || state.switchU;
        if (state.eat(117)) {
          if (this.regexp_eatFixedHexDigits(state, 4)) {
            var lead = state.lastIntValue;
            if (switchU && lead >= 55296 && lead <= 56319) {
              var leadSurrogateEnd = state.pos;
              if (state.eat(92) && state.eat(117) && this.regexp_eatFixedHexDigits(state, 4)) {
                var trail = state.lastIntValue;
                if (trail >= 56320 && trail <= 57343) {
                  state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536;
                  return true;
                }
              }
              state.pos = leadSurrogateEnd;
              state.lastIntValue = lead;
            }
            return true;
          }
          if (switchU && state.eat(123) && this.regexp_eatHexDigits(state) && state.eat(125) && isValidUnicode(state.lastIntValue)) {
            return true;
          }
          if (switchU) {
            state.raise("Invalid unicode escape");
          }
          state.pos = start;
        }
        return false;
      };
      function isValidUnicode(ch) {
        return ch >= 0 && ch <= 1114111;
      }
      pp$1.regexp_eatIdentityEscape = function(state) {
        if (state.switchU) {
          if (this.regexp_eatSyntaxCharacter(state)) {
            return true;
          }
          if (state.eat(47)) {
            state.lastIntValue = 47;
            return true;
          }
          return false;
        }
        var ch = state.current();
        if (ch !== 99 && (!state.switchN || ch !== 107)) {
          state.lastIntValue = ch;
          state.advance();
          return true;
        }
        return false;
      };
      pp$1.regexp_eatDecimalEscape = function(state) {
        state.lastIntValue = 0;
        var ch = state.current();
        if (ch >= 49 && ch <= 57) {
          do {
            state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
            state.advance();
          } while ((ch = state.current()) >= 48 && ch <= 57);
          return true;
        }
        return false;
      };
      var CharSetNone = 0;
      var CharSetOk = 1;
      var CharSetString = 2;
      pp$1.regexp_eatCharacterClassEscape = function(state) {
        var ch = state.current();
        if (isCharacterClassEscape(ch)) {
          state.lastIntValue = -1;
          state.advance();
          return CharSetOk;
        }
        var negate = false;
        if (state.switchU && this.options.ecmaVersion >= 9 && ((negate = ch === 80) || ch === 112)) {
          state.lastIntValue = -1;
          state.advance();
          var result;
          if (state.eat(123) && (result = this.regexp_eatUnicodePropertyValueExpression(state)) && state.eat(125)) {
            if (negate && result === CharSetString) {
              state.raise("Invalid property name");
            }
            return result;
          }
          state.raise("Invalid property name");
        }
        return CharSetNone;
      };
      function isCharacterClassEscape(ch) {
        return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
      }
      pp$1.regexp_eatUnicodePropertyValueExpression = function(state) {
        var start = state.pos;
        if (this.regexp_eatUnicodePropertyName(state) && state.eat(61)) {
          var name = state.lastStringValue;
          if (this.regexp_eatUnicodePropertyValue(state)) {
            var value = state.lastStringValue;
            this.regexp_validateUnicodePropertyNameAndValue(state, name, value);
            return CharSetOk;
          }
        }
        state.pos = start;
        if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
          var nameOrValue = state.lastStringValue;
          return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
        }
        return CharSetNone;
      };
      pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {
        if (!hasOwn(state.unicodeProperties.nonBinary, name)) {
          state.raise("Invalid property name");
        }
        if (!state.unicodeProperties.nonBinary[name].test(value)) {
          state.raise("Invalid property value");
        }
      };
      pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
        if (state.unicodeProperties.binary.test(nameOrValue)) {
          return CharSetOk;
        }
        if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) {
          return CharSetString;
        }
        state.raise("Invalid property name");
      };
      pp$1.regexp_eatUnicodePropertyName = function(state) {
        var ch = 0;
        state.lastStringValue = "";
        while (isUnicodePropertyNameCharacter(ch = state.current())) {
          state.lastStringValue += codePointToString(ch);
          state.advance();
        }
        return state.lastStringValue !== "";
      };
      function isUnicodePropertyNameCharacter(ch) {
        return isControlLetter(ch) || ch === 95;
      }
      pp$1.regexp_eatUnicodePropertyValue = function(state) {
        var ch = 0;
        state.lastStringValue = "";
        while (isUnicodePropertyValueCharacter(ch = state.current())) {
          state.lastStringValue += codePointToString(ch);
          state.advance();
        }
        return state.lastStringValue !== "";
      };
      function isUnicodePropertyValueCharacter(ch) {
        return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch);
      }
      pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
        return this.regexp_eatUnicodePropertyValue(state);
      };
      pp$1.regexp_eatCharacterClass = function(state) {
        if (state.eat(91)) {
          var negate = state.eat(94);
          var result = this.regexp_classContents(state);
          if (!state.eat(93)) {
            state.raise("Unterminated character class");
          }
          if (negate && result === CharSetString) {
            state.raise("Negated character class may contain strings");
          }
          return true;
        }
        return false;
      };
      pp$1.regexp_classContents = function(state) {
        if (state.current() === 93) {
          return CharSetOk;
        }
        if (state.switchV) {
          return this.regexp_classSetExpression(state);
        }
        this.regexp_nonEmptyClassRanges(state);
        return CharSetOk;
      };
      pp$1.regexp_nonEmptyClassRanges = function(state) {
        while (this.regexp_eatClassAtom(state)) {
          var left = state.lastIntValue;
          if (state.eat(45) && this.regexp_eatClassAtom(state)) {
            var right = state.lastIntValue;
            if (state.switchU && (left === -1 || right === -1)) {
              state.raise("Invalid character class");
            }
            if (left !== -1 && right !== -1 && left > right) {
              state.raise("Range out of order in character class");
            }
          }
        }
      };
      pp$1.regexp_eatClassAtom = function(state) {
        var start = state.pos;
        if (state.eat(92)) {
          if (this.regexp_eatClassEscape(state)) {
            return true;
          }
          if (state.switchU) {
            var ch$1 = state.current();
            if (ch$1 === 99 || isOctalDigit(ch$1)) {
              state.raise("Invalid class escape");
            }
            state.raise("Invalid escape");
          }
          state.pos = start;
        }
        var ch = state.current();
        if (ch !== 93) {
          state.lastIntValue = ch;
          state.advance();
          return true;
        }
        return false;
      };
      pp$1.regexp_eatClassEscape = function(state) {
        var start = state.pos;
        if (state.eat(98)) {
          state.lastIntValue = 8;
          return true;
        }
        if (state.switchU && state.eat(45)) {
          state.lastIntValue = 45;
          return true;
        }
        if (!state.switchU && state.eat(99)) {
          if (this.regexp_eatClassControlLetter(state)) {
            return true;
          }
          state.pos = start;
        }
        return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
      };
      pp$1.regexp_classSetExpression = function(state) {
        var result = CharSetOk, subResult;
        if (this.regexp_eatClassSetRange(state))
          ;
        else if (subResult = this.regexp_eatClassSetOperand(state)) {
          if (subResult === CharSetString) {
            result = CharSetString;
          }
          var start = state.pos;
          while (state.eatChars([38, 38])) {
            if (state.current() !== 38 && (subResult = this.regexp_eatClassSetOperand(state))) {
              if (subResult !== CharSetString) {
                result = CharSetOk;
              }
              continue;
            }
            state.raise("Invalid character in character class");
          }
          if (start !== state.pos) {
            return result;
          }
          while (state.eatChars([45, 45])) {
            if (this.regexp_eatClassSetOperand(state)) {
              continue;
            }
            state.raise("Invalid character in character class");
          }
          if (start !== state.pos) {
            return result;
          }
        } else {
          state.raise("Invalid character in character class");
        }
        for (; ; ) {
          if (this.regexp_eatClassSetRange(state)) {
            continue;
          }
          subResult = this.regexp_eatClassSetOperand(state);
          if (!subResult) {
            return result;
          }
          if (subResult === CharSetString) {
            result = CharSetString;
          }
        }
      };
      pp$1.regexp_eatClassSetRange = function(state) {
        var start = state.pos;
        if (this.regexp_eatClassSetCharacter(state)) {
          var left = state.lastIntValue;
          if (state.eat(45) && this.regexp_eatClassSetCharacter(state)) {
            var right = state.lastIntValue;
            if (left !== -1 && right !== -1 && left > right) {
              state.raise("Range out of order in character class");
            }
            return true;
          }
          state.pos = start;
        }
        return false;
      };
      pp$1.regexp_eatClassSetOperand = function(state) {
        if (this.regexp_eatClassSetCharacter(state)) {
          return CharSetOk;
        }
        return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state);
      };
      pp$1.regexp_eatNestedClass = function(state) {
        var start = state.pos;
        if (state.eat(91)) {
          var negate = state.eat(94);
          var result = this.regexp_classContents(state);
          if (state.eat(93)) {
            if (negate && result === CharSetString) {
              state.raise("Negated character class may contain strings");
            }
            return result;
          }
          state.pos = start;
        }
        if (state.eat(92)) {
          var result$1 = this.regexp_eatCharacterClassEscape(state);
          if (result$1) {
            return result$1;
          }
          state.pos = start;
        }
        return null;
      };
      pp$1.regexp_eatClassStringDisjunction = function(state) {
        var start = state.pos;
        if (state.eatChars([92, 113])) {
          if (state.eat(123)) {
            var result = this.regexp_classStringDisjunctionContents(state);
            if (state.eat(125)) {
              return result;
            }
          } else {
            state.raise("Invalid escape");
          }
          state.pos = start;
        }
        return null;
      };
      pp$1.regexp_classStringDisjunctionContents = function(state) {
        var result = this.regexp_classString(state);
        while (state.eat(124)) {
          if (this.regexp_classString(state) === CharSetString) {
            result = CharSetString;
          }
        }
        return result;
      };
      pp$1.regexp_classString = function(state) {
        var count = 0;
        while (this.regexp_eatClassSetCharacter(state)) {
          count++;
        }
        return count === 1 ? CharSetOk : CharSetString;
      };
      pp$1.regexp_eatClassSetCharacter = function(state) {
        var start = state.pos;
        if (state.eat(92)) {
          if (this.regexp_eatCharacterEscape(state) || this.regexp_eatClassSetReservedPunctuator(state)) {
            return true;
          }
          if (state.eat(98)) {
            state.lastIntValue = 8;
            return true;
          }
          state.pos = start;
          return false;
        }
        var ch = state.current();
        if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) {
          return false;
        }
        if (isClassSetSyntaxCharacter(ch)) {
          return false;
        }
        state.advance();
        state.lastIntValue = ch;
        return true;
      };
      function isClassSetReservedDoublePunctuatorCharacter(ch) {
        return ch === 33 || ch >= 35 && ch <= 38 || ch >= 42 && ch <= 44 || ch === 46 || ch >= 58 && ch <= 64 || ch === 94 || ch === 96 || ch === 126;
      }
      function isClassSetSyntaxCharacter(ch) {
        return ch === 40 || ch === 41 || ch === 45 || ch === 47 || ch >= 91 && ch <= 93 || ch >= 123 && ch <= 125;
      }
      pp$1.regexp_eatClassSetReservedPunctuator = function(state) {
        var ch = state.current();
        if (isClassSetReservedPunctuator(ch)) {
          state.lastIntValue = ch;
          state.advance();
          return true;
        }
        return false;
      };
      function isClassSetReservedPunctuator(ch) {
        return ch === 33 || ch === 35 || ch === 37 || ch === 38 || ch === 44 || ch === 45 || ch >= 58 && ch <= 62 || ch === 64 || ch === 96 || ch === 126;
      }
      pp$1.regexp_eatClassControlLetter = function(state) {
        var ch = state.current();
        if (isDecimalDigit(ch) || ch === 95) {
          state.lastIntValue = ch % 32;
          state.advance();
          return true;
        }
        return false;
      };
      pp$1.regexp_eatHexEscapeSequence = function(state) {
        var start = state.pos;
        if (state.eat(120)) {
          if (this.regexp_eatFixedHexDigits(state, 2)) {
            return true;
          }
          if (state.switchU) {
            state.raise("Invalid escape");
          }
          state.pos = start;
        }
        return false;
      };
      pp$1.regexp_eatDecimalDigits = function(state) {
        var start = state.pos;
        var ch = 0;
        state.lastIntValue = 0;
        while (isDecimalDigit(ch = state.current())) {
          state.lastIntValue = 10 * state.lastIntValue + (ch - 48);
          state.advance();
        }
        return state.pos !== start;
      };
      function isDecimalDigit(ch) {
        return ch >= 48 && ch <= 57;
      }
      pp$1.regexp_eatHexDigits = function(state) {
        var start = state.pos;
        var ch = 0;
        state.lastIntValue = 0;
        while (isHexDigit(ch = state.current())) {
          state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
          state.advance();
        }
        return state.pos !== start;
      };
      function isHexDigit(ch) {
        return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
      }
      function hexToInt(ch) {
        if (ch >= 65 && ch <= 70) {
          return 10 + (ch - 65);
        }
        if (ch >= 97 && ch <= 102) {
          return 10 + (ch - 97);
        }
        return ch - 48;
      }
      pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) {
        if (this.regexp_eatOctalDigit(state)) {
          var n1 = state.lastIntValue;
          if (this.regexp_eatOctalDigit(state)) {
            var n2 = state.lastIntValue;
            if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
              state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
            } else {
              state.lastIntValue = n1 * 8 + n2;
            }
          } else {
            state.lastIntValue = n1;
          }
          return true;
        }
        return false;
      };
      pp$1.regexp_eatOctalDigit = function(state) {
        var ch = state.current();
        if (isOctalDigit(ch)) {
          state.lastIntValue = ch - 48;
          state.advance();
          return true;
        }
        state.lastIntValue = 0;
        return false;
      };
      function isOctalDigit(ch) {
        return ch >= 48 && ch <= 55;
      }
      pp$1.regexp_eatFixedHexDigits = function(state, length) {
        var start = state.pos;
        state.lastIntValue = 0;
        for (var i2 = 0; i2 < length; ++i2) {
          var ch = state.current();
          if (!isHexDigit(ch)) {
            state.pos = start;
            return false;
          }
          state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
          state.advance();
        }
        return true;
      };
      var Token = function Token2(p) {
        this.type = p.type;
        this.value = p.value;
        this.start = p.start;
        this.end = p.end;
        if (p.options.locations) {
          this.loc = new SourceLocation(p, p.startLoc, p.endLoc);
        }
        if (p.options.ranges) {
          this.range = [p.start, p.end];
        }
      };
      var pp = Parser.prototype;
      pp.next = function(ignoreEscapeSequenceInKeyword) {
        if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) {
          this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword);
        }
        if (this.options.onToken) {
          this.options.onToken(new Token(this));
        }
        this.lastTokEnd = this.end;
        this.lastTokStart = this.start;
        this.lastTokEndLoc = this.endLoc;
        this.lastTokStartLoc = this.startLoc;
        this.nextToken();
      };
      pp.getToken = function() {
        this.next();
        return new Token(this);
      };
      if (typeof Symbol !== "undefined") {
        pp[Symbol.iterator] = function() {
          var this$1$1 = this;
          return {
            next: function() {
              var token = this$1$1.getToken();
              return {
                done: token.type === types$1.eof,
                value: token
              };
            }
          };
        };
      }
      pp.nextToken = function() {
        var curContext = this.curContext();
        if (!curContext || !curContext.preserveSpace) {
          this.skipSpace();
        }
        this.start = this.pos;
        if (this.options.locations) {
          this.startLoc = this.curPosition();
        }
        if (this.pos >= this.input.length) {
          return this.finishToken(types$1.eof);
        }
        if (curContext.override) {
          return curContext.override(this);
        } else {
          this.readToken(this.fullCharCodeAtPos());
        }
      };
      pp.readToken = function(code) {
        if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92) {
          return this.readWord();
        }
        return this.getTokenFromCode(code);
      };
      pp.fullCharCodeAtPos = function() {
        var code = this.input.charCodeAt(this.pos);
        if (code <= 55295 || code >= 56320) {
          return code;
        }
        var next = this.input.charCodeAt(this.pos + 1);
        return next <= 56319 || next >= 57344 ? code : (code << 10) + next - 56613888;
      };
      pp.skipBlockComment = function() {
        var startLoc = this.options.onComment && this.curPosition();
        var start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
        if (end === -1) {
          this.raise(this.pos - 2, "Unterminated comment");
        }
        this.pos = end + 2;
        if (this.options.locations) {
          for (var nextBreak = void 0, pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1; ) {
            ++this.curLine;
            pos = this.lineStart = nextBreak;
          }
        }
        if (this.options.onComment) {
          this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition());
        }
      };
      pp.skipLineComment = function(startSkip) {
        var start = this.pos;
        var startLoc = this.options.onComment && this.curPosition();
        var ch = this.input.charCodeAt(this.pos += startSkip);
        while (this.pos < this.input.length && !isNewLine(ch)) {
          ch = this.input.charCodeAt(++this.pos);
        }
        if (this.options.onComment) {
          this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition());
        }
      };
      pp.skipSpace = function() {
        loop:
          while (this.pos < this.input.length) {
            var ch = this.input.charCodeAt(this.pos);
            switch (ch) {
              case 32:
              case 160:
                ++this.pos;
                break;
              case 13:
                if (this.input.charCodeAt(this.pos + 1) === 10) {
                  ++this.pos;
                }
              case 10:
              case 8232:
              case 8233:
                ++this.pos;
                if (this.options.locations) {
                  ++this.curLine;
                  this.lineStart = this.pos;
                }
                break;
              case 47:
                switch (this.input.charCodeAt(this.pos + 1)) {
                  case 42:
                    this.skipBlockComment();
                    break;
                  case 47:
                    this.skipLineComment(2);
                    break;
                  default:
                    break loop;
                }
                break;
              default:
                if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
                  ++this.pos;
                } else {
                  break loop;
                }
            }
          }
      };
      pp.finishToken = function(type, val) {
        this.end = this.pos;
        if (this.options.locations) {
          this.endLoc = this.curPosition();
        }
        var prevType = this.type;
        this.type = type;
        this.value = val;
        this.updateContext(prevType);
      };
      pp.readToken_dot = function() {
        var next = this.input.charCodeAt(this.pos + 1);
        if (next >= 48 && next <= 57) {
          return this.readNumber(true);
        }
        var next2 = this.input.charCodeAt(this.pos + 2);
        if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
          this.pos += 3;
          return this.finishToken(types$1.ellipsis);
        } else {
          ++this.pos;
          return this.finishToken(types$1.dot);
        }
      };
      pp.readToken_slash = function() {
        var next = this.input.charCodeAt(this.pos + 1);
        if (this.exprAllowed) {
          ++this.pos;
          return this.readRegexp();
        }
        if (next === 61) {
          return this.finishOp(types$1.assign, 2);
        }
        return this.finishOp(types$1.slash, 1);
      };
      pp.readToken_mult_modulo_exp = function(code) {
        var next = this.input.charCodeAt(this.pos + 1);
        var size = 1;
        var tokentype = code === 42 ? types$1.star : types$1.modulo;
        if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {
          ++size;
          tokentype = types$1.starstar;
          next = this.input.charCodeAt(this.pos + 2);
        }
        if (next === 61) {
          return this.finishOp(types$1.assign, size + 1);
        }
        return this.finishOp(tokentype, size);
      };
      pp.readToken_pipe_amp = function(code) {
        var next = this.input.charCodeAt(this.pos + 1);
        if (next === code) {
          if (this.options.ecmaVersion >= 12) {
            var next2 = this.input.charCodeAt(this.pos + 2);
            if (next2 === 61) {
              return this.finishOp(types$1.assign, 3);
            }
          }
          return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2);
        }
        if (next === 61) {
          return this.finishOp(types$1.assign, 2);
        }
        return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1);
      };
      pp.readToken_caret = function() {
        var next = this.input.charCodeAt(this.pos + 1);
        if (next === 61) {
          return this.finishOp(types$1.assign, 2);
        }
        return this.finishOp(types$1.bitwiseXOR, 1);
      };
      pp.readToken_plus_min = function(code) {
        var next = this.input.charCodeAt(this.pos + 1);
        if (next === code) {
          if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
            this.skipLineComment(3);
            this.skipSpace();
            return this.nextToken();
          }
          return this.finishOp(types$1.incDec, 2);
        }
        if (next === 61) {
          return this.finishOp(types$1.assign, 2);
        }
        return this.finishOp(types$1.plusMin, 1);
      };
      pp.readToken_lt_gt = function(code) {
        var next = this.input.charCodeAt(this.pos + 1);
        var size = 1;
        if (next === code) {
          size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
          if (this.input.charCodeAt(this.pos + size) === 61) {
            return this.finishOp(types$1.assign, size + 1);
          }
          return this.finishOp(types$1.bitShift, size);
        }
        if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
          this.skipLineComment(4);
          this.skipSpace();
          return this.nextToken();
        }
        if (next === 61) {
          size = 2;
        }
        return this.finishOp(types$1.relational, size);
      };
      pp.readToken_eq_excl = function(code) {
        var next = this.input.charCodeAt(this.pos + 1);
        if (next === 61) {
          return this.finishOp(types$1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
        }
        if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) {
          this.pos += 2;
          return this.finishToken(types$1.arrow);
        }
        return this.finishOp(code === 61 ? types$1.eq : types$1.prefix, 1);
      };
      pp.readToken_question = function() {
        var ecmaVersion2 = this.options.ecmaVersion;
        if (ecmaVersion2 >= 11) {
          var next = this.input.charCodeAt(this.pos + 1);
          if (next === 46) {
            var next2 = this.input.charCodeAt(this.pos + 2);
            if (next2 < 48 || next2 > 57) {
              return this.finishOp(types$1.questionDot, 2);
            }
          }
          if (next === 63) {
            if (ecmaVersion2 >= 12) {
              var next2$1 = this.input.charCodeAt(this.pos + 2);
              if (next2$1 === 61) {
                return this.finishOp(types$1.assign, 3);
              }
            }
            return this.finishOp(types$1.coalesce, 2);
          }
        }
        return this.finishOp(types$1.question, 1);
      };
      pp.readToken_numberSign = function() {
        var ecmaVersion2 = this.options.ecmaVersion;
        var code = 35;
        if (ecmaVersion2 >= 13) {
          ++this.pos;
          code = this.fullCharCodeAtPos();
          if (isIdentifierStart(code, true) || code === 92) {
            return this.finishToken(types$1.privateId, this.readWord1());
          }
        }
        this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
      };
      pp.getTokenFromCode = function(code) {
        switch (code) {
          case 46:
            return this.readToken_dot();
          case 40:
            ++this.pos;
            return this.finishToken(types$1.parenL);
          case 41:
            ++this.pos;
            return this.finishToken(types$1.parenR);
          case 59:
            ++this.pos;
            return this.finishToken(types$1.semi);
          case 44:
            ++this.pos;
            return this.finishToken(types$1.comma);
          case 91:
            ++this.pos;
            return this.finishToken(types$1.bracketL);
          case 93:
            ++this.pos;
            return this.finishToken(types$1.bracketR);
          case 123:
            ++this.pos;
            return this.finishToken(types$1.braceL);
          case 125:
            ++this.pos;
            return this.finishToken(types$1.braceR);
          case 58:
            ++this.pos;
            return this.finishToken(types$1.colon);
          case 96:
            if (this.options.ecmaVersion < 6) {
              break;
            }
            ++this.pos;
            return this.finishToken(types$1.backQuote);
          case 48:
            var next = this.input.charCodeAt(this.pos + 1);
            if (next === 120 || next === 88) {
              return this.readRadixNumber(16);
            }
            if (this.options.ecmaVersion >= 6) {
              if (next === 111 || next === 79) {
                return this.readRadixNumber(8);
              }
              if (next === 98 || next === 66) {
                return this.readRadixNumber(2);
              }
            }
          case 49:
          case 50:
          case 51:
          case 52:
          case 53:
          case 54:
          case 55:
          case 56:
          case 57:
            return this.readNumber(false);
          case 34:
          case 39:
            return this.readString(code);
          case 47:
            return this.readToken_slash();
          case 37:
          case 42:
            return this.readToken_mult_modulo_exp(code);
          case 124:
          case 38:
            return this.readToken_pipe_amp(code);
          case 94:
            return this.readToken_caret();
          case 43:
          case 45:
            return this.readToken_plus_min(code);
          case 60:
          case 62:
            return this.readToken_lt_gt(code);
          case 61:
          case 33:
            return this.readToken_eq_excl(code);
          case 63:
            return this.readToken_question();
          case 126:
            return this.finishOp(types$1.prefix, 1);
          case 35:
            return this.readToken_numberSign();
        }
        this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
      };
      pp.finishOp = function(type, size) {
        var str = this.input.slice(this.pos, this.pos + size);
        this.pos += size;
        return this.finishToken(type, str);
      };
      pp.readRegexp = function() {
        var escaped, inClass, start = this.pos;
        for (; ; ) {
          if (this.pos >= this.input.length) {
            this.raise(start, "Unterminated regular expression");
          }
          var ch = this.input.charAt(this.pos);
          if (lineBreak.test(ch)) {
            this.raise(start, "Unterminated regular expression");
          }
          if (!escaped) {
            if (ch === "[") {
              inClass = true;
            } else if (ch === "]" && inClass) {
              inClass = false;
            } else if (ch === "/" && !inClass) {
              break;
            }
            escaped = ch === "\\";
          } else {
            escaped = false;
          }
          ++this.pos;
        }
        var pattern = this.input.slice(start, this.pos);
        ++this.pos;
        var flagsStart = this.pos;
        var flags = this.readWord1();
        if (this.containsEsc) {
          this.unexpected(flagsStart);
        }
        var state = this.regexpState || (this.regexpState = new RegExpValidationState(this));
        state.reset(start, pattern, flags);
        this.validateRegExpFlags(state);
        this.validateRegExpPattern(state);
        var value = null;
        try {
          value = new RegExp(pattern, flags);
        } catch (e) {
        }
        return this.finishToken(types$1.regexp, { pattern, flags, value });
      };
      pp.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) {
        var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0;
        var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48;
        var start = this.pos, total = 0, lastCode = 0;
        for (var i2 = 0, e = len == null ? Infinity : len; i2 < e; ++i2, ++this.pos) {
          var code = this.input.charCodeAt(this.pos), val = void 0;
          if (allowSeparators && code === 95) {
            if (isLegacyOctalNumericLiteral) {
              this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals");
            }
            if (lastCode === 95) {
              this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore");
            }
            if (i2 === 0) {
              this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits");
            }
            lastCode = code;
            continue;
          }
          if (code >= 97) {
            val = code - 97 + 10;
          } else if (code >= 65) {
            val = code - 65 + 10;
          } else if (code >= 48 && code <= 57) {
            val = code - 48;
          } else {
            val = Infinity;
          }
          if (val >= radix) {
            break;
          }
          lastCode = code;
          total = total * radix + val;
        }
        if (allowSeparators && lastCode === 95) {
          this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits");
        }
        if (this.pos === start || len != null && this.pos - start !== len) {
          return null;
        }
        return total;
      };
      function stringToNumber(str, isLegacyOctalNumericLiteral) {
        if (isLegacyOctalNumericLiteral) {
          return parseInt(str, 8);
        }
        return parseFloat(str.replace(/_/g, ""));
      }
      function stringToBigInt(str) {
        if (typeof BigInt !== "function") {
          return null;
        }
        return BigInt(str.replace(/_/g, ""));
      }
      pp.readRadixNumber = function(radix) {
        var start = this.pos;
        this.pos += 2;
        var val = this.readInt(radix);
        if (val == null) {
          this.raise(this.start + 2, "Expected number in radix " + radix);
        }
        if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) {
          val = stringToBigInt(this.input.slice(start, this.pos));
          ++this.pos;
        } else if (isIdentifierStart(this.fullCharCodeAtPos())) {
          this.raise(this.pos, "Identifier directly after number");
        }
        return this.finishToken(types$1.num, val);
      };
      pp.readNumber = function(startsWithDot) {
        var start = this.pos;
        if (!startsWithDot && this.readInt(10, void 0, true) === null) {
          this.raise(start, "Invalid number");
        }
        var octal = this.pos - start >= 2 && this.input.charCodeAt(start) === 48;
        if (octal && this.strict) {
          this.raise(start, "Invalid number");
        }
        var next = this.input.charCodeAt(this.pos);
        if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) {
          var val$1 = stringToBigInt(this.input.slice(start, this.pos));
          ++this.pos;
          if (isIdentifierStart(this.fullCharCodeAtPos())) {
            this.raise(this.pos, "Identifier directly after number");
          }
          return this.finishToken(types$1.num, val$1);
        }
        if (octal && /[89]/.test(this.input.slice(start, this.pos))) {
          octal = false;
        }
        if (next === 46 && !octal) {
          ++this.pos;
          this.readInt(10);
          next = this.input.charCodeAt(this.pos);
        }
        if ((next === 69 || next === 101) && !octal) {
          next = this.input.charCodeAt(++this.pos);
          if (next === 43 || next === 45) {
            ++this.pos;
          }
          if (this.readInt(10) === null) {
            this.raise(start, "Invalid number");
          }
        }
        if (isIdentifierStart(this.fullCharCodeAtPos())) {
          this.raise(this.pos, "Identifier directly after number");
        }
        var val = stringToNumber(this.input.slice(start, this.pos), octal);
        return this.finishToken(types$1.num, val);
      };
      pp.readCodePoint = function() {
        var ch = this.input.charCodeAt(this.pos), code;
        if (ch === 123) {
          if (this.options.ecmaVersion < 6) {
            this.unexpected();
          }
          var codePos = ++this.pos;
          code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
          ++this.pos;
          if (code > 1114111) {
            this.invalidStringToken(codePos, "Code point out of bounds");
          }
        } else {
          code = this.readHexChar(4);
        }
        return code;
      };
      pp.readString = function(quote) {
        var out = "", chunkStart = ++this.pos;
        for (; ; ) {
          if (this.pos >= this.input.length) {
            this.raise(this.start, "Unterminated string constant");
          }
          var ch = this.input.charCodeAt(this.pos);
          if (ch === quote) {
            break;
          }
          if (ch === 92) {
            out += this.input.slice(chunkStart, this.pos);
            out += this.readEscapedChar(false);
            chunkStart = this.pos;
          } else if (ch === 8232 || ch === 8233) {
            if (this.options.ecmaVersion < 10) {
              this.raise(this.start, "Unterminated string constant");
            }
            ++this.pos;
            if (this.options.locations) {
              this.curLine++;
              this.lineStart = this.pos;
            }
          } else {
            if (isNewLine(ch)) {
              this.raise(this.start, "Unterminated string constant");
            }
            ++this.pos;
          }
        }
        out += this.input.slice(chunkStart, this.pos++);
        return this.finishToken(types$1.string, out);
      };
      var INVALID_TEMPLATE_ESCAPE_ERROR = {};
      pp.tryReadTemplateToken = function() {
        this.inTemplateElement = true;
        try {
          this.readTmplToken();
        } catch (err) {
          if (err === INVALID_TEMPLATE_ESCAPE_ERROR) {
            this.readInvalidTemplateToken();
          } else {
            throw err;
          }
        }
        this.inTemplateElement = false;
      };
      pp.invalidStringToken = function(position, message) {
        if (this.inTemplateElement && this.options.ecmaVersion >= 9) {
          throw INVALID_TEMPLATE_ESCAPE_ERROR;
        } else {
          this.raise(position, message);
        }
      };
      pp.readTmplToken = function() {
        var out = "", chunkStart = this.pos;
        for (; ; ) {
          if (this.pos >= this.input.length) {
            this.raise(this.start, "Unterminated template");
          }
          var ch = this.input.charCodeAt(this.pos);
          if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
            if (this.pos === this.start && (this.type === types$1.template || this.type === types$1.invalidTemplate)) {
              if (ch === 36) {
                this.pos += 2;
                return this.finishToken(types$1.dollarBraceL);
              } else {
                ++this.pos;
                return this.finishToken(types$1.backQuote);
              }
            }
            out += this.input.slice(chunkStart, this.pos);
            return this.finishToken(types$1.template, out);
          }
          if (ch === 92) {
            out += this.input.slice(chunkStart, this.pos);
            out += this.readEscapedChar(true);
            chunkStart = this.pos;
          } else if (isNewLine(ch)) {
            out += this.input.slice(chunkStart, this.pos);
            ++this.pos;
            switch (ch) {
              case 13:
                if (this.input.charCodeAt(this.pos) === 10) {
                  ++this.pos;
                }
              case 10:
                out += "\n";
                break;
              default:
                out += String.fromCharCode(ch);
                break;
            }
            if (this.options.locations) {
              ++this.curLine;
              this.lineStart = this.pos;
            }
            chunkStart = this.pos;
          } else {
            ++this.pos;
          }
        }
      };
      pp.readInvalidTemplateToken = function() {
        for (; this.pos < this.input.length; this.pos++) {
          switch (this.input[this.pos]) {
            case "\\":
              ++this.pos;
              break;
            case "$":
              if (this.input[this.pos + 1] !== "{") {
                break;
              }
            case "`":
              return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos));
          }
        }
        this.raise(this.start, "Unterminated template");
      };
      pp.readEscapedChar = function(inTemplate) {
        var ch = this.input.charCodeAt(++this.pos);
        ++this.pos;
        switch (ch) {
          case 110:
            return "\n";
          case 114:
            return "\r";
          case 120:
            return String.fromCharCode(this.readHexChar(2));
          case 117:
            return codePointToString(this.readCodePoint());
          case 116:
            return "	";
          case 98:
            return "\b";
          case 118:
            return "\v";
          case 102:
            return "\f";
          case 13:
            if (this.input.charCodeAt(this.pos) === 10) {
              ++this.pos;
            }
          case 10:
            if (this.options.locations) {
              this.lineStart = this.pos;
              ++this.curLine;
            }
            return "";
          case 56:
          case 57:
            if (this.strict) {
              this.invalidStringToken(this.pos - 1, "Invalid escape sequence");
            }
            if (inTemplate) {
              var codePos = this.pos - 1;
              this.invalidStringToken(codePos, "Invalid escape sequence in template string");
            }
          default:
            if (ch >= 48 && ch <= 55) {
              var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
              var octal = parseInt(octalStr, 8);
              if (octal > 255) {
                octalStr = octalStr.slice(0, -1);
                octal = parseInt(octalStr, 8);
              }
              this.pos += octalStr.length - 1;
              ch = this.input.charCodeAt(this.pos);
              if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
                this.invalidStringToken(this.pos - 1 - octalStr.length, inTemplate ? "Octal literal in template string" : "Octal literal in strict mode");
              }
              return String.fromCharCode(octal);
            }
            if (isNewLine(ch)) {
              return "";
            }
            return String.fromCharCode(ch);
        }
      };
      pp.readHexChar = function(len) {
        var codePos = this.pos;
        var n = this.readInt(16, len);
        if (n === null) {
          this.invalidStringToken(codePos, "Bad character escape sequence");
        }
        return n;
      };
      pp.readWord1 = function() {
        this.containsEsc = false;
        var word = "", first = true, chunkStart = this.pos;
        var astral = this.options.ecmaVersion >= 6;
        while (this.pos < this.input.length) {
          var ch = this.fullCharCodeAtPos();
          if (isIdentifierChar(ch, astral)) {
            this.pos += ch <= 65535 ? 1 : 2;
          } else if (ch === 92) {
            this.containsEsc = true;
            word += this.input.slice(chunkStart, this.pos);
            var escStart = this.pos;
            if (this.input.charCodeAt(++this.pos) !== 117) {
              this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX");
            }
            ++this.pos;
            var esc = this.readCodePoint();
            if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) {
              this.invalidStringToken(escStart, "Invalid Unicode escape");
            }
            word += codePointToString(esc);
            chunkStart = this.pos;
          } else {
            break;
          }
          first = false;
        }
        return word + this.input.slice(chunkStart, this.pos);
      };
      pp.readWord = function() {
        var word = this.readWord1();
        var type = types$1.name;
        if (this.keywords.test(word)) {
          type = keywords[word];
        }
        return this.finishToken(type, word);
      };
      var version = "8.10.0";
      Parser.acorn = {
        Parser,
        version,
        defaultOptions: defaultOptions2,
        Position,
        SourceLocation,
        getLineInfo,
        Node: Node2,
        TokenType,
        tokTypes: types$1,
        keywordTypes: keywords,
        TokContext,
        tokContexts: types,
        isIdentifierChar,
        isIdentifierStart,
        Token,
        isNewLine,
        lineBreak,
        lineBreakG,
        nonASCIIwhitespace
      };
      function parse(input, options) {
        return Parser.parse(input, options);
      }
      function parseExpressionAt(input, pos, options) {
        return Parser.parseExpressionAt(input, pos, options);
      }
      function tokenizer(input, options) {
        return Parser.tokenizer(input, options);
      }
      exports2.Node = Node2;
      exports2.Parser = Parser;
      exports2.Position = Position;
      exports2.SourceLocation = SourceLocation;
      exports2.TokContext = TokContext;
      exports2.Token = Token;
      exports2.TokenType = TokenType;
      exports2.defaultOptions = defaultOptions2;
      exports2.getLineInfo = getLineInfo;
      exports2.isIdentifierChar = isIdentifierChar;
      exports2.isIdentifierStart = isIdentifierStart;
      exports2.isNewLine = isNewLine;
      exports2.keywordTypes = keywords;
      exports2.lineBreak = lineBreak;
      exports2.lineBreakG = lineBreakG;
      exports2.nonASCIIwhitespace = nonASCIIwhitespace;
      exports2.parse = parse;
      exports2.parseExpressionAt = parseExpressionAt;
      exports2.tokContexts = types;
      exports2.tokTypes = types$1;
      exports2.tokenizer = tokenizer;
      exports2.version = version;
    });
  }
});

// node_modules/terser/dist/bundle.min.js
var require_bundle_min = __commonJS({
  "node_modules/terser/dist/bundle.min.js"(exports, module2) {
    (function(global2, factory) {
      typeof exports === "object" && typeof module2 !== "undefined" ? factory(exports, require_source_map_umd()) : typeof define === "function" && define.amd ? define(["exports", "@jridgewell/source-map"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.Terser = {}, global2.sourceMap));
    })(exports, function(exports2, sourceMap) {
      "use strict";
      function characters(str) {
        return str.split("");
      }
      function member(name, array) {
        return array.includes(name);
      }
      class DefaultsError extends Error {
        constructor(msg, defs) {
          super();
          this.name = "DefaultsError";
          this.message = msg;
          this.defs = defs;
        }
      }
      function defaults(args, defs, croak) {
        if (args === true) {
          args = {};
        } else if (args != null && typeof args === "object") {
          args = { ...args };
        }
        const ret = args || {};
        if (croak) {
          for (const i in ret)
            if (HOP(ret, i) && !HOP(defs, i)) {
              throw new DefaultsError("`" + i + "` is not a supported option", defs);
            }
        }
        for (const i in defs)
          if (HOP(defs, i)) {
            if (!args || !HOP(args, i)) {
              ret[i] = defs[i];
            } else if (i === "ecma") {
              let ecma = args[i] | 0;
              if (ecma > 5 && ecma < 2015)
                ecma += 2009;
              ret[i] = ecma;
            } else {
              ret[i] = args && HOP(args, i) ? args[i] : defs[i];
            }
          }
        return ret;
      }
      function noop() {
      }
      function return_false() {
        return false;
      }
      function return_true() {
        return true;
      }
      function return_this() {
        return this;
      }
      function return_null() {
        return null;
      }
      var MAP = function() {
        function MAP2(a, tw, allow_splicing = true) {
          const new_a = [];
          for (let i = 0; i < a.length; ++i) {
            let item = a[i];
            let ret = item.transform(tw, allow_splicing);
            if (ret instanceof AST_Node) {
              new_a.push(ret);
            } else if (ret instanceof Splice) {
              new_a.push(...ret.v);
            }
          }
          return new_a;
        }
        MAP2.splice = function(val) {
          return new Splice(val);
        };
        MAP2.skip = {};
        function Splice(val) {
          this.v = val;
        }
        return MAP2;
      }();
      function make_node(ctor, orig, props) {
        if (!props)
          props = {};
        if (orig) {
          if (!props.start)
            props.start = orig.start;
          if (!props.end)
            props.end = orig.end;
        }
        return new ctor(props);
      }
      function push_uniq(array, el) {
        if (!array.includes(el))
          array.push(el);
      }
      function string_template(text, props) {
        return text.replace(/{(.+?)}/g, function(str, p) {
          return props && props[p];
        });
      }
      function remove2(array, el) {
        for (var i = array.length; --i >= 0; ) {
          if (array[i] === el)
            array.splice(i, 1);
        }
      }
      function mergeSort(array, cmp) {
        if (array.length < 2)
          return array.slice();
        function merge2(a, b) {
          var r = [], ai = 0, bi = 0, i = 0;
          while (ai < a.length && bi < b.length) {
            cmp(a[ai], b[bi]) <= 0 ? r[i++] = a[ai++] : r[i++] = b[bi++];
          }
          if (ai < a.length)
            r.push.apply(r, a.slice(ai));
          if (bi < b.length)
            r.push.apply(r, b.slice(bi));
          return r;
        }
        function _ms(a) {
          if (a.length <= 1)
            return a;
          var m = Math.floor(a.length / 2), left = a.slice(0, m), right = a.slice(m);
          left = _ms(left);
          right = _ms(right);
          return merge2(left, right);
        }
        return _ms(array);
      }
      function makePredicate(words) {
        if (!Array.isArray(words))
          words = words.split(" ");
        return new Set(words.sort());
      }
      function map_add(map, key, value) {
        if (map.has(key)) {
          map.get(key).push(value);
        } else {
          map.set(key, [value]);
        }
      }
      function map_from_object(obj) {
        var map = /* @__PURE__ */ new Map();
        for (var key in obj) {
          if (HOP(obj, key) && key.charAt(0) === "$") {
            map.set(key.substr(1), obj[key]);
          }
        }
        return map;
      }
      function map_to_object(map) {
        var obj = /* @__PURE__ */ Object.create(null);
        map.forEach(function(value, key) {
          obj["$" + key] = value;
        });
        return obj;
      }
      function HOP(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
      }
      function keep_name(keep_setting, name) {
        return keep_setting === true || keep_setting instanceof RegExp && keep_setting.test(name);
      }
      var lineTerminatorEscape = {
        "\0": "0",
        "\n": "n",
        "\r": "r",
        "\u2028": "u2028",
        "\u2029": "u2029"
      };
      function regexp_source_fix(source) {
        return source.replace(/[\0\n\r\u2028\u2029]/g, function(match, offset) {
          var escaped = source[offset - 1] == "\\" && (source[offset - 2] != "\\" || /(?:^|[^\\])(?:\\{2})*$/.test(source.slice(0, offset - 1)));
          return (escaped ? "" : "\\") + lineTerminatorEscape[match];
        });
      }
      const re_safe_regexp = /^[\\/|\0\s\w^$.[\]()]*$/;
      const regexp_is_safe = (source) => re_safe_regexp.test(source);
      const all_flags = "dgimsuyv";
      function sort_regexp_flags(flags) {
        const existing_flags = new Set(flags.split(""));
        let out = "";
        for (const flag of all_flags) {
          if (existing_flags.has(flag)) {
            out += flag;
            existing_flags.delete(flag);
          }
        }
        if (existing_flags.size) {
          existing_flags.forEach((flag) => {
            out += flag;
          });
        }
        return out;
      }
      function has_annotation(node, annotation) {
        return node._annotations & annotation;
      }
      function set_annotation(node, annotation) {
        node._annotations |= annotation;
      }
      function clear_annotation(node, annotation) {
        node._annotations &= ~annotation;
      }
      var LATEST_RAW = "";
      var TEMPLATE_RAWS = /* @__PURE__ */ new Map();
      var KEYWORDS = "break case catch class const continue debugger default delete do else export extends finally for function if in instanceof let new return switch throw try typeof var void while with";
      var KEYWORDS_ATOM = "false null true";
      var RESERVED_WORDS = "enum import super this " + KEYWORDS_ATOM + " " + KEYWORDS;
      var ALL_RESERVED_WORDS = "implements interface package private protected public static " + RESERVED_WORDS;
      var KEYWORDS_BEFORE_EXPRESSION = "return new delete throw else case yield await";
      KEYWORDS = makePredicate(KEYWORDS);
      RESERVED_WORDS = makePredicate(RESERVED_WORDS);
      KEYWORDS_BEFORE_EXPRESSION = makePredicate(KEYWORDS_BEFORE_EXPRESSION);
      KEYWORDS_ATOM = makePredicate(KEYWORDS_ATOM);
      ALL_RESERVED_WORDS = makePredicate(ALL_RESERVED_WORDS);
      var OPERATOR_CHARS = makePredicate(characters("+-*&%=<>!?|~^"));
      var RE_NUM_LITERAL = /[0-9a-f]/i;
      var RE_HEX_NUMBER = /^0x[0-9a-f]+$/i;
      var RE_OCT_NUMBER = /^0[0-7]+$/;
      var RE_ES6_OCT_NUMBER = /^0o[0-7]+$/i;
      var RE_BIN_NUMBER = /^0b[01]+$/i;
      var RE_DEC_NUMBER = /^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i;
      var RE_BIG_INT = /^(0[xob])?[0-9a-f]+n$/i;
      var OPERATORS = makePredicate([
        "in",
        "instanceof",
        "typeof",
        "new",
        "void",
        "delete",
        "++",
        "--",
        "+",
        "-",
        "!",
        "~",
        "&",
        "|",
        "^",
        "*",
        "**",
        "/",
        "%",
        ">>",
        "<<",
        ">>>",
        "<",
        ">",
        "<=",
        ">=",
        "==",
        "===",
        "!=",
        "!==",
        "?",
        "=",
        "+=",
        "-=",
        "||=",
        "&&=",
        "??=",
        "/=",
        "*=",
        "**=",
        "%=",
        ">>=",
        "<<=",
        ">>>=",
        "|=",
        "^=",
        "&=",
        "&&",
        "??",
        "||"
      ]);
      var WHITESPACE_CHARS = makePredicate(characters(" \xA0\n\r	\f\v\u200B\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF"));
      var NEWLINE_CHARS = makePredicate(characters("\n\r\u2028\u2029"));
      var PUNC_AFTER_EXPRESSION = makePredicate(characters(";]),:"));
      var PUNC_BEFORE_EXPRESSION = makePredicate(characters("[{(,;:"));
      var PUNC_CHARS = makePredicate(characters("[]{}(),;:"));
      var UNICODE = {
        ID_Start: /[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
        ID_Continue: /(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])+/
      };
      try {
        UNICODE = {
          ID_Start: new RegExp("[_$\\p{ID_Start}]", "u"),
          ID_Continue: new RegExp("[$\\u200C\\u200D\\p{ID_Continue}]+", "u")
        };
      } catch (e) {
      }
      function get_full_char(str, pos) {
        if (is_surrogate_pair_head(str.charCodeAt(pos))) {
          if (is_surrogate_pair_tail(str.charCodeAt(pos + 1))) {
            return str.charAt(pos) + str.charAt(pos + 1);
          }
        } else if (is_surrogate_pair_tail(str.charCodeAt(pos))) {
          if (is_surrogate_pair_head(str.charCodeAt(pos - 1))) {
            return str.charAt(pos - 1) + str.charAt(pos);
          }
        }
        return str.charAt(pos);
      }
      function get_full_char_code(str, pos) {
        if (is_surrogate_pair_head(str.charCodeAt(pos))) {
          return 65536 + (str.charCodeAt(pos) - 55296 << 10) + str.charCodeAt(pos + 1) - 56320;
        }
        return str.charCodeAt(pos);
      }
      function get_full_char_length(str) {
        var surrogates = 0;
        for (var i = 0; i < str.length; i++) {
          if (is_surrogate_pair_head(str.charCodeAt(i)) && is_surrogate_pair_tail(str.charCodeAt(i + 1))) {
            surrogates++;
            i++;
          }
        }
        return str.length - surrogates;
      }
      function from_char_code(code) {
        if (code > 65535) {
          code -= 65536;
          return String.fromCharCode((code >> 10) + 55296) + String.fromCharCode(code % 1024 + 56320);
        }
        return String.fromCharCode(code);
      }
      function is_surrogate_pair_head(code) {
        return code >= 55296 && code <= 56319;
      }
      function is_surrogate_pair_tail(code) {
        return code >= 56320 && code <= 57343;
      }
      function is_digit(code) {
        return code >= 48 && code <= 57;
      }
      function is_identifier_start(ch) {
        return UNICODE.ID_Start.test(ch);
      }
      function is_identifier_char(ch) {
        return UNICODE.ID_Continue.test(ch);
      }
      const BASIC_IDENT = /^[a-z_$][a-z0-9_$]*$/i;
      function is_basic_identifier_string(str) {
        return BASIC_IDENT.test(str);
      }
      function is_identifier_string(str, allow_surrogates) {
        if (BASIC_IDENT.test(str)) {
          return true;
        }
        if (!allow_surrogates && /[\ud800-\udfff]/.test(str)) {
          return false;
        }
        var match = UNICODE.ID_Start.exec(str);
        if (!match || match.index !== 0) {
          return false;
        }
        str = str.slice(match[0].length);
        if (!str) {
          return true;
        }
        match = UNICODE.ID_Continue.exec(str);
        return !!match && match[0].length === str.length;
      }
      function parse_js_number(num, allow_e = true) {
        if (!allow_e && num.includes("e")) {
          return NaN;
        }
        if (RE_HEX_NUMBER.test(num)) {
          return parseInt(num.substr(2), 16);
        } else if (RE_OCT_NUMBER.test(num)) {
          return parseInt(num.substr(1), 8);
        } else if (RE_ES6_OCT_NUMBER.test(num)) {
          return parseInt(num.substr(2), 8);
        } else if (RE_BIN_NUMBER.test(num)) {
          return parseInt(num.substr(2), 2);
        } else if (RE_DEC_NUMBER.test(num)) {
          return parseFloat(num);
        } else {
          var val = parseFloat(num);
          if (val == num)
            return val;
        }
      }
      class JS_Parse_Error extends Error {
        constructor(message, filename, line, col, pos) {
          super();
          this.name = "SyntaxError";
          this.message = message;
          this.filename = filename;
          this.line = line;
          this.col = col;
          this.pos = pos;
        }
      }
      function js_error(message, filename, line, col, pos) {
        throw new JS_Parse_Error(message, filename, line, col, pos);
      }
      function is_token(token, type, val) {
        return token.type == type && (val == null || token.value == val);
      }
      var EX_EOF = {};
      function tokenizer($TEXT, filename, html5_comments, shebang) {
        var S = {
          text: $TEXT,
          filename,
          pos: 0,
          tokpos: 0,
          line: 1,
          tokline: 0,
          col: 0,
          tokcol: 0,
          newline_before: false,
          regex_allowed: false,
          brace_counter: 0,
          template_braces: [],
          comments_before: [],
          directives: {},
          directive_stack: []
        };
        function peek() {
          return get_full_char(S.text, S.pos);
        }
        function is_option_chain_op() {
          const must_be_dot = S.text.charCodeAt(S.pos + 1) === 46;
          if (!must_be_dot)
            return false;
          const cannot_be_digit = S.text.charCodeAt(S.pos + 2);
          return cannot_be_digit < 48 || cannot_be_digit > 57;
        }
        function next(signal_eof, in_string) {
          var ch = get_full_char(S.text, S.pos++);
          if (signal_eof && !ch)
            throw EX_EOF;
          if (NEWLINE_CHARS.has(ch)) {
            S.newline_before = S.newline_before || !in_string;
            ++S.line;
            S.col = 0;
            if (ch == "\r" && peek() == "\n") {
              ++S.pos;
              ch = "\n";
            }
          } else {
            if (ch.length > 1) {
              ++S.pos;
              ++S.col;
            }
            ++S.col;
          }
          return ch;
        }
        function forward(i) {
          while (i--)
            next();
        }
        function looking_at(str) {
          return S.text.substr(S.pos, str.length) == str;
        }
        function find_eol() {
          var text = S.text;
          for (var i = S.pos, n = S.text.length; i < n; ++i) {
            var ch = text[i];
            if (NEWLINE_CHARS.has(ch))
              return i;
          }
          return -1;
        }
        function find(what, signal_eof) {
          var pos = S.text.indexOf(what, S.pos);
          if (signal_eof && pos == -1)
            throw EX_EOF;
          return pos;
        }
        function start_token() {
          S.tokline = S.line;
          S.tokcol = S.col;
          S.tokpos = S.pos;
        }
        var prev_was_dot = false;
        var previous_token = null;
        function token(type, value, is_comment) {
          S.regex_allowed = type == "operator" && !UNARY_POSTFIX.has(value) || type == "keyword" && KEYWORDS_BEFORE_EXPRESSION.has(value) || type == "punc" && PUNC_BEFORE_EXPRESSION.has(value) || type == "arrow";
          if (type == "punc" && (value == "." || value == "?.")) {
            prev_was_dot = true;
          } else if (!is_comment) {
            prev_was_dot = false;
          }
          const line = S.tokline;
          const col = S.tokcol;
          const pos = S.tokpos;
          const nlb = S.newline_before;
          const file = filename;
          let comments_before = [];
          let comments_after = [];
          if (!is_comment) {
            comments_before = S.comments_before;
            comments_after = S.comments_before = [];
          }
          S.newline_before = false;
          const tok = new AST_Token(type, value, line, col, pos, nlb, comments_before, comments_after, file);
          if (!is_comment)
            previous_token = tok;
          return tok;
        }
        function skip_whitespace() {
          while (WHITESPACE_CHARS.has(peek()))
            next();
        }
        function read_while(pred) {
          var ret = "", ch, i = 0;
          while ((ch = peek()) && pred(ch, i++))
            ret += next();
          return ret;
        }
        function parse_error(err) {
          js_error(err, filename, S.tokline, S.tokcol, S.tokpos);
        }
        function read_num(prefix) {
          var has_e = false, after_e = false, has_x = false, has_dot = prefix == ".", is_big_int = false, numeric_separator = false;
          var num = read_while(function(ch, i) {
            if (is_big_int)
              return false;
            var code = ch.charCodeAt(0);
            switch (code) {
              case 95:
                return numeric_separator = true;
              case 98:
              case 66:
                return has_x = true;
              case 111:
              case 79:
              case 120:
              case 88:
                return has_x ? false : has_x = true;
              case 101:
              case 69:
                return has_x ? true : has_e ? false : has_e = after_e = true;
              case 45:
                return after_e || i == 0 && !prefix;
              case 43:
                return after_e;
              case (after_e = false, 46):
                return !has_dot && !has_x && !has_e ? has_dot = true : false;
            }
            if (ch === "n") {
              is_big_int = true;
              return true;
            }
            return RE_NUM_LITERAL.test(ch);
          });
          if (prefix)
            num = prefix + num;
          LATEST_RAW = num;
          if (RE_OCT_NUMBER.test(num) && next_token.has_directive("use strict")) {
            parse_error("Legacy octal literals are not allowed in strict mode");
          }
          if (numeric_separator) {
            if (num.endsWith("_")) {
              parse_error("Numeric separators are not allowed at the end of numeric literals");
            } else if (num.includes("__")) {
              parse_error("Only one underscore is allowed as numeric separator");
            }
            num = num.replace(/_/g, "");
          }
          if (num.endsWith("n")) {
            const without_n = num.slice(0, -1);
            const allow_e = RE_HEX_NUMBER.test(without_n);
            const valid2 = parse_js_number(without_n, allow_e);
            if (!has_dot && RE_BIG_INT.test(num) && !isNaN(valid2))
              return token("big_int", without_n);
            parse_error("Invalid or unexpected token");
          }
          var valid = parse_js_number(num);
          if (!isNaN(valid)) {
            return token("num", valid);
          } else {
            parse_error("Invalid syntax: " + num);
          }
        }
        function is_octal(ch) {
          return ch >= "0" && ch <= "7";
        }
        function read_escaped_char(in_string, strict_hex, template_string) {
          var ch = next(true, in_string);
          switch (ch.charCodeAt(0)) {
            case 110:
              return "\n";
            case 114:
              return "\r";
            case 116:
              return "	";
            case 98:
              return "\b";
            case 118:
              return "\v";
            case 102:
              return "\f";
            case 120:
              return String.fromCharCode(hex_bytes(2, strict_hex));
            case 117:
              if (peek() == "{") {
                next(true);
                if (peek() === "}")
                  parse_error("Expecting hex-character between {}");
                while (peek() == "0")
                  next(true);
                var result, length = find("}", true) - S.pos;
                if (length > 6 || (result = hex_bytes(length, strict_hex)) > 1114111) {
                  parse_error("Unicode reference out of bounds");
                }
                next(true);
                return from_char_code(result);
              }
              return String.fromCharCode(hex_bytes(4, strict_hex));
            case 10:
              return "";
            case 13:
              if (peek() == "\n") {
                next(true, in_string);
                return "";
              }
          }
          if (is_octal(ch)) {
            if (template_string && strict_hex) {
              const represents_null_character = ch === "0" && !is_octal(peek());
              if (!represents_null_character) {
                parse_error("Octal escape sequences are not allowed in template strings");
              }
            }
            return read_octal_escape_sequence(ch, strict_hex);
          }
          return ch;
        }
        function read_octal_escape_sequence(ch, strict_octal) {
          var p = peek();
          if (p >= "0" && p <= "7") {
            ch += next(true);
            if (ch[0] <= "3" && (p = peek()) >= "0" && p <= "7")
              ch += next(true);
          }
          if (ch === "0")
            return "\0";
          if (ch.length > 0 && next_token.has_directive("use strict") && strict_octal)
            parse_error("Legacy octal escape sequences are not allowed in strict mode");
          return String.fromCharCode(parseInt(ch, 8));
        }
        function hex_bytes(n, strict_hex) {
          var num = 0;
          for (; n > 0; --n) {
            if (!strict_hex && isNaN(parseInt(peek(), 16))) {
              return parseInt(num, 16) || "";
            }
            var digit = next(true);
            if (isNaN(parseInt(digit, 16)))
              parse_error("Invalid hex-character pattern in string");
            num += digit;
          }
          return parseInt(num, 16);
        }
        var read_string = with_eof_error("Unterminated string constant", function() {
          const start_pos = S.pos;
          var quote = next(), ret = [];
          for (; ; ) {
            var ch = next(true, true);
            if (ch == "\\")
              ch = read_escaped_char(true, true);
            else if (ch == "\r" || ch == "\n")
              parse_error("Unterminated string constant");
            else if (ch == quote)
              break;
            ret.push(ch);
          }
          var tok = token("string", ret.join(""));
          LATEST_RAW = S.text.slice(start_pos, S.pos);
          tok.quote = quote;
          return tok;
        });
        var read_template_characters = with_eof_error("Unterminated template", function(begin) {
          if (begin) {
            S.template_braces.push(S.brace_counter);
          }
          var content = "", raw = "", ch, tok;
          next(true, true);
          while ((ch = next(true, true)) != "`") {
            if (ch == "\r") {
              if (peek() == "\n")
                ++S.pos;
              ch = "\n";
            } else if (ch == "$" && peek() == "{") {
              next(true, true);
              S.brace_counter++;
              tok = token(begin ? "template_head" : "template_substitution", content);
              TEMPLATE_RAWS.set(tok, raw);
              tok.template_end = false;
              return tok;
            }
            raw += ch;
            if (ch == "\\") {
              var tmp = S.pos;
              var prev_is_tag = previous_token && (previous_token.type === "name" || previous_token.type === "punc" && (previous_token.value === ")" || previous_token.value === "]"));
              ch = read_escaped_char(true, !prev_is_tag, true);
              raw += S.text.substr(tmp, S.pos - tmp);
            }
            content += ch;
          }
          S.template_braces.pop();
          tok = token(begin ? "template_head" : "template_substitution", content);
          TEMPLATE_RAWS.set(tok, raw);
          tok.template_end = true;
          return tok;
        });
        function skip_line_comment(type) {
          var regex_allowed = S.regex_allowed;
          var i = find_eol(), ret;
          if (i == -1) {
            ret = S.text.substr(S.pos);
            S.pos = S.text.length;
          } else {
            ret = S.text.substring(S.pos, i);
            S.pos = i;
          }
          S.col = S.tokcol + (S.pos - S.tokpos);
          S.comments_before.push(token(type, ret, true));
          S.regex_allowed = regex_allowed;
          return next_token;
        }
        var skip_multiline_comment = with_eof_error("Unterminated multiline comment", function() {
          var regex_allowed = S.regex_allowed;
          var i = find("*/", true);
          var text = S.text.substring(S.pos, i).replace(/\r\n|\r|\u2028|\u2029/g, "\n");
          forward(get_full_char_length(text) + 2);
          S.comments_before.push(token("comment2", text, true));
          S.newline_before = S.newline_before || text.includes("\n");
          S.regex_allowed = regex_allowed;
          return next_token;
        });
        var read_name = with_eof_error("Unterminated identifier name", function() {
          var name = [], ch, escaped = false;
          var read_escaped_identifier_char = function() {
            escaped = true;
            next();
            if (peek() !== "u") {
              parse_error("Expecting UnicodeEscapeSequence -- uXXXX or u{XXXX}");
            }
            return read_escaped_char(false, true);
          };
          if ((ch = peek()) === "\\") {
            ch = read_escaped_identifier_char();
            if (!is_identifier_start(ch)) {
              parse_error("First identifier char is an invalid identifier char");
            }
          } else if (is_identifier_start(ch)) {
            next();
          } else {
            return "";
          }
          name.push(ch);
          while ((ch = peek()) != null) {
            if ((ch = peek()) === "\\") {
              ch = read_escaped_identifier_char();
              if (!is_identifier_char(ch)) {
                parse_error("Invalid escaped identifier char");
              }
            } else {
              if (!is_identifier_char(ch)) {
                break;
              }
              next();
            }
            name.push(ch);
          }
          const name_str = name.join("");
          if (RESERVED_WORDS.has(name_str) && escaped) {
            parse_error("Escaped characters are not allowed in keywords");
          }
          return name_str;
        });
        var read_regexp = with_eof_error("Unterminated regular expression", function(source) {
          var prev_backslash = false, ch, in_class = false;
          while (ch = next(true))
            if (NEWLINE_CHARS.has(ch)) {
              parse_error("Unexpected line terminator");
            } else if (prev_backslash) {
              source += "\\" + ch;
              prev_backslash = false;
            } else if (ch == "[") {
              in_class = true;
              source += ch;
            } else if (ch == "]" && in_class) {
              in_class = false;
              source += ch;
            } else if (ch == "/" && !in_class) {
              break;
            } else if (ch == "\\") {
              prev_backslash = true;
            } else {
              source += ch;
            }
          const flags = read_name();
          return token("regexp", "/" + source + "/" + flags);
        });
        function read_operator(prefix) {
          function grow(op) {
            if (!peek())
              return op;
            var bigger = op + peek();
            if (OPERATORS.has(bigger)) {
              next();
              return grow(bigger);
            } else {
              return op;
            }
          }
          return token("operator", grow(prefix || next()));
        }
        function handle_slash() {
          next();
          switch (peek()) {
            case "/":
              next();
              return skip_line_comment("comment1");
            case "*":
              next();
              return skip_multiline_comment();
          }
          return S.regex_allowed ? read_regexp("") : read_operator("/");
        }
        function handle_eq_sign() {
          next();
          if (peek() === ">") {
            next();
            return token("arrow", "=>");
          } else {
            return read_operator("=");
          }
        }
        function handle_dot() {
          next();
          if (is_digit(peek().charCodeAt(0))) {
            return read_num(".");
          }
          if (peek() === ".") {
            next();
            next();
            return token("expand", "...");
          }
          return token("punc", ".");
        }
        function read_word() {
          var word = read_name();
          if (prev_was_dot)
            return token("name", word);
          return KEYWORDS_ATOM.has(word) ? token("atom", word) : !KEYWORDS.has(word) ? token("name", word) : OPERATORS.has(word) ? token("operator", word) : token("keyword", word);
        }
        function read_private_word() {
          next();
          return token("privatename", read_name());
        }
        function with_eof_error(eof_error, cont) {
          return function(x) {
            try {
              return cont(x);
            } catch (ex) {
              if (ex === EX_EOF)
                parse_error(eof_error);
              else
                throw ex;
            }
          };
        }
        function next_token(force_regexp) {
          if (force_regexp != null)
            return read_regexp(force_regexp);
          if (shebang && S.pos == 0 && looking_at("#!")) {
            start_token();
            forward(2);
            skip_line_comment("comment5");
          }
          for (; ; ) {
            skip_whitespace();
            start_token();
            if (html5_comments) {
              if (looking_at("<!--")) {
                forward(4);
                skip_line_comment("comment3");
                continue;
              }
              if (looking_at("-->") && S.newline_before) {
                forward(3);
                skip_line_comment("comment4");
                continue;
              }
            }
            var ch = peek();
            if (!ch)
              return token("eof");
            var code = ch.charCodeAt(0);
            switch (code) {
              case 34:
              case 39:
                return read_string();
              case 46:
                return handle_dot();
              case 47: {
                var tok = handle_slash();
                if (tok === next_token)
                  continue;
                return tok;
              }
              case 61:
                return handle_eq_sign();
              case 63: {
                if (!is_option_chain_op())
                  break;
                next();
                next();
                return token("punc", "?.");
              }
              case 96:
                return read_template_characters(true);
              case 123:
                S.brace_counter++;
                break;
              case 125:
                S.brace_counter--;
                if (S.template_braces.length > 0 && S.template_braces[S.template_braces.length - 1] === S.brace_counter)
                  return read_template_characters(false);
                break;
            }
            if (is_digit(code))
              return read_num();
            if (PUNC_CHARS.has(ch))
              return token("punc", next());
            if (OPERATOR_CHARS.has(ch))
              return read_operator();
            if (code == 92 || is_identifier_start(ch))
              return read_word();
            if (code == 35)
              return read_private_word();
            break;
          }
          parse_error("Unexpected character '" + ch + "'");
        }
        next_token.next = next;
        next_token.peek = peek;
        next_token.context = function(nc) {
          if (nc)
            S = nc;
          return S;
        };
        next_token.add_directive = function(directive) {
          S.directive_stack[S.directive_stack.length - 1].push(directive);
          if (S.directives[directive] === void 0) {
            S.directives[directive] = 1;
          } else {
            S.directives[directive]++;
          }
        };
        next_token.push_directives_stack = function() {
          S.directive_stack.push([]);
        };
        next_token.pop_directives_stack = function() {
          var directives2 = S.directive_stack[S.directive_stack.length - 1];
          for (var i = 0; i < directives2.length; i++) {
            S.directives[directives2[i]]--;
          }
          S.directive_stack.pop();
        };
        next_token.has_directive = function(directive) {
          return S.directives[directive] > 0;
        };
        return next_token;
      }
      var UNARY_PREFIX = makePredicate([
        "typeof",
        "void",
        "delete",
        "--",
        "++",
        "!",
        "~",
        "-",
        "+"
      ]);
      var UNARY_POSTFIX = makePredicate(["--", "++"]);
      var ASSIGNMENT = makePredicate(["=", "+=", "-=", "??=", "&&=", "||=", "/=", "*=", "**=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&="]);
      var LOGICAL_ASSIGNMENT = makePredicate(["??=", "&&=", "||="]);
      var PRECEDENCE = function(a, ret) {
        for (var i = 0; i < a.length; ++i) {
          var b = a[i];
          for (var j = 0; j < b.length; ++j) {
            ret[b[j]] = i + 1;
          }
        }
        return ret;
      }([
        ["||"],
        ["??"],
        ["&&"],
        ["|"],
        ["^"],
        ["&"],
        ["==", "===", "!=", "!=="],
        ["<", ">", "<=", ">=", "in", "instanceof"],
        [">>", "<<", ">>>"],
        ["+", "-"],
        ["*", "/", "%"],
        ["**"]
      ], {});
      var ATOMIC_START_TOKEN = makePredicate(["atom", "num", "big_int", "string", "regexp", "name"]);
      function parse($TEXT, options) {
        const outer_comments_before_counts = /* @__PURE__ */ new WeakMap();
        options = defaults(options, {
          bare_returns: false,
          ecma: null,
          expression: false,
          filename: null,
          html5_comments: true,
          module: false,
          shebang: true,
          strict: false,
          toplevel: null
        }, true);
        var S = {
          input: typeof $TEXT == "string" ? tokenizer($TEXT, options.filename, options.html5_comments, options.shebang) : $TEXT,
          token: null,
          prev: null,
          peeked: null,
          in_function: 0,
          in_async: -1,
          in_generator: -1,
          in_directives: true,
          in_loop: 0,
          labels: []
        };
        S.token = next();
        function is(type, value) {
          return is_token(S.token, type, value);
        }
        function peek() {
          return S.peeked || (S.peeked = S.input());
        }
        function next() {
          S.prev = S.token;
          if (!S.peeked)
            peek();
          S.token = S.peeked;
          S.peeked = null;
          S.in_directives = S.in_directives && (S.token.type == "string" || is("punc", ";"));
          return S.token;
        }
        function prev() {
          return S.prev;
        }
        function croak(msg, line, col, pos) {
          var ctx = S.input.context();
          js_error(msg, ctx.filename, line != null ? line : ctx.tokline, col != null ? col : ctx.tokcol, pos != null ? pos : ctx.tokpos);
        }
        function token_error(token, msg) {
          croak(msg, token.line, token.col);
        }
        function unexpected(token) {
          if (token == null)
            token = S.token;
          token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")");
        }
        function expect_token(type, val) {
          if (is(type, val)) {
            return next();
          }
          token_error(S.token, "Unexpected token " + S.token.type + " \xAB" + S.token.value + "\xBB, expected " + type + " \xAB" + val + "\xBB");
        }
        function expect(punc) {
          return expect_token("punc", punc);
        }
        function has_newline_before(token) {
          return token.nlb || !token.comments_before.every((comment) => !comment.nlb);
        }
        function can_insert_semicolon() {
          return !options.strict && (is("eof") || is("punc", "}") || has_newline_before(S.token));
        }
        function is_in_generator() {
          return S.in_generator === S.in_function;
        }
        function is_in_async() {
          return S.in_async === S.in_function;
        }
        function can_await() {
          return S.in_async === S.in_function || S.in_function === 0 && S.input.has_directive("use strict");
        }
        function semicolon(optional) {
          if (is("punc", ";"))
            next();
          else if (!optional && !can_insert_semicolon())
            unexpected();
        }
        function parenthesised() {
          expect("(");
          var exp = expression(true);
          expect(")");
          return exp;
        }
        function embed_tokens(parser) {
          return function _embed_tokens_wrapper(...args) {
            const start = S.token;
            const expr = parser(...args);
            expr.start = start;
            expr.end = prev();
            return expr;
          };
        }
        function handle_regexp() {
          if (is("operator", "/") || is("operator", "/=")) {
            S.peeked = null;
            S.token = S.input(S.token.value.substr(1));
          }
        }
        var statement = embed_tokens(function statement2(is_export_default, is_for_body, is_if_body) {
          handle_regexp();
          switch (S.token.type) {
            case "string":
              if (S.in_directives) {
                var token = peek();
                if (!LATEST_RAW.includes("\\") && (is_token(token, "punc", ";") || is_token(token, "punc", "}") || has_newline_before(token) || is_token(token, "eof"))) {
                  S.input.add_directive(S.token.value);
                } else {
                  S.in_directives = false;
                }
              }
              var dir = S.in_directives, stat = simple_statement();
              return dir && stat.body instanceof AST_String ? new AST_Directive(stat.body) : stat;
            case "template_head":
            case "num":
            case "big_int":
            case "regexp":
            case "operator":
            case "atom":
              return simple_statement();
            case "name":
            case "privatename":
              if (is("privatename") && !S.in_class)
                croak("Private field must be used in an enclosing class");
              if (S.token.value == "async" && is_token(peek(), "keyword", "function")) {
                next();
                next();
                if (is_for_body) {
                  croak("functions are not allowed as the body of a loop");
                }
                return function_(AST_Defun, false, true, is_export_default);
              }
              if (S.token.value == "import" && !is_token(peek(), "punc", "(") && !is_token(peek(), "punc", ".")) {
                next();
                var node = import_statement();
                semicolon();
                return node;
              }
              return is_token(peek(), "punc", ":") ? labeled_statement() : simple_statement();
            case "punc":
              switch (S.token.value) {
                case "{":
                  return new AST_BlockStatement({
                    start: S.token,
                    body: block_(),
                    end: prev()
                  });
                case "[":
                case "(":
                  return simple_statement();
                case ";":
                  S.in_directives = false;
                  next();
                  return new AST_EmptyStatement();
                default:
                  unexpected();
              }
            case "keyword":
              switch (S.token.value) {
                case "break":
                  next();
                  return break_cont(AST_Break);
                case "continue":
                  next();
                  return break_cont(AST_Continue);
                case "debugger":
                  next();
                  semicolon();
                  return new AST_Debugger();
                case "do":
                  next();
                  var body = in_loop(statement2);
                  expect_token("keyword", "while");
                  var condition = parenthesised();
                  semicolon(true);
                  return new AST_Do({
                    body,
                    condition
                  });
                case "while":
                  next();
                  return new AST_While({
                    condition: parenthesised(),
                    body: in_loop(function() {
                      return statement2(false, true);
                    })
                  });
                case "for":
                  next();
                  return for_();
                case "class":
                  next();
                  if (is_for_body) {
                    croak("classes are not allowed as the body of a loop");
                  }
                  if (is_if_body) {
                    croak("classes are not allowed as the body of an if");
                  }
                  return class_(AST_DefClass, is_export_default);
                case "function":
                  next();
                  if (is_for_body) {
                    croak("functions are not allowed as the body of a loop");
                  }
                  return function_(AST_Defun, false, false, is_export_default);
                case "if":
                  next();
                  return if_();
                case "return":
                  if (S.in_function == 0 && !options.bare_returns)
                    croak("'return' outside of function");
                  next();
                  var value = null;
                  if (is("punc", ";")) {
                    next();
                  } else if (!can_insert_semicolon()) {
                    value = expression(true);
                    semicolon();
                  }
                  return new AST_Return({
                    value
                  });
                case "switch":
                  next();
                  return new AST_Switch({
                    expression: parenthesised(),
                    body: in_loop(switch_body_)
                  });
                case "throw":
                  next();
                  if (has_newline_before(S.token))
                    croak("Illegal newline after 'throw'");
                  var value = expression(true);
                  semicolon();
                  return new AST_Throw({
                    value
                  });
                case "try":
                  next();
                  return try_();
                case "var":
                  next();
                  var node = var_();
                  semicolon();
                  return node;
                case "let":
                  next();
                  var node = let_();
                  semicolon();
                  return node;
                case "const":
                  next();
                  var node = const_();
                  semicolon();
                  return node;
                case "with":
                  if (S.input.has_directive("use strict")) {
                    croak("Strict mode may not include a with statement");
                  }
                  next();
                  return new AST_With({
                    expression: parenthesised(),
                    body: statement2()
                  });
                case "export":
                  if (!is_token(peek(), "punc", "(")) {
                    next();
                    var node = export_statement();
                    if (is("punc", ";"))
                      semicolon();
                    return node;
                  }
              }
          }
          unexpected();
        });
        function labeled_statement() {
          var label = as_symbol(AST_Label);
          if (label.name === "await" && is_in_async()) {
            token_error(S.prev, "await cannot be used as label inside async function");
          }
          if (S.labels.some((l) => l.name === label.name)) {
            croak("Label " + label.name + " defined twice");
          }
          expect(":");
          S.labels.push(label);
          var stat = statement();
          S.labels.pop();
          if (!(stat instanceof AST_IterationStatement)) {
            label.references.forEach(function(ref) {
              if (ref instanceof AST_Continue) {
                ref = ref.label.start;
                croak("Continue label `" + label.name + "` refers to non-IterationStatement.", ref.line, ref.col, ref.pos);
              }
            });
          }
          return new AST_LabeledStatement({ body: stat, label });
        }
        function simple_statement(tmp) {
          return new AST_SimpleStatement({ body: (tmp = expression(true), semicolon(), tmp) });
        }
        function break_cont(type) {
          var label = null, ldef;
          if (!can_insert_semicolon()) {
            label = as_symbol(AST_LabelRef, true);
          }
          if (label != null) {
            ldef = S.labels.find((l) => l.name === label.name);
            if (!ldef)
              croak("Undefined label " + label.name);
            label.thedef = ldef;
          } else if (S.in_loop == 0)
            croak(type.TYPE + " not inside a loop or switch");
          semicolon();
          var stat = new type({ label });
          if (ldef)
            ldef.references.push(stat);
          return stat;
        }
        function for_() {
          var for_await_error = "`for await` invalid in this context";
          var await_tok = S.token;
          if (await_tok.type == "name" && await_tok.value == "await") {
            if (!can_await()) {
              token_error(await_tok, for_await_error);
            }
            next();
          } else {
            await_tok = false;
          }
          expect("(");
          var init = null;
          if (!is("punc", ";")) {
            init = is("keyword", "var") ? (next(), var_(true)) : is("keyword", "let") ? (next(), let_(true)) : is("keyword", "const") ? (next(), const_(true)) : expression(true, true);
            var is_in = is("operator", "in");
            var is_of = is("name", "of");
            if (await_tok && !is_of) {
              token_error(await_tok, for_await_error);
            }
            if (is_in || is_of) {
              if (init instanceof AST_Definitions) {
                if (init.definitions.length > 1)
                  token_error(init.start, "Only one variable declaration allowed in for..in loop");
              } else if (!(is_assignable(init) || (init = to_destructuring(init)) instanceof AST_Destructuring)) {
                token_error(init.start, "Invalid left-hand side in for..in loop");
              }
              next();
              if (is_in) {
                return for_in(init);
              } else {
                return for_of(init, !!await_tok);
              }
            }
          } else if (await_tok) {
            token_error(await_tok, for_await_error);
          }
          return regular_for(init);
        }
        function regular_for(init) {
          expect(";");
          var test = is("punc", ";") ? null : expression(true);
          expect(";");
          var step = is("punc", ")") ? null : expression(true);
          expect(")");
          return new AST_For({
            init,
            condition: test,
            step,
            body: in_loop(function() {
              return statement(false, true);
            })
          });
        }
        function for_of(init, is_await) {
          var lhs = init instanceof AST_Definitions ? init.definitions[0].name : null;
          var obj = expression(true);
          expect(")");
          return new AST_ForOf({
            await: is_await,
            init,
            name: lhs,
            object: obj,
            body: in_loop(function() {
              return statement(false, true);
            })
          });
        }
        function for_in(init) {
          var obj = expression(true);
          expect(")");
          return new AST_ForIn({
            init,
            object: obj,
            body: in_loop(function() {
              return statement(false, true);
            })
          });
        }
        var arrow_function = function(start, argnames, is_async) {
          if (has_newline_before(S.token)) {
            croak("Unexpected newline before arrow (=>)");
          }
          expect_token("arrow", "=>");
          var body = _function_body(is("punc", "{"), false, is_async);
          var end = body instanceof Array && body.length ? body[body.length - 1].end : body instanceof Array ? start : body.end;
          return new AST_Arrow({
            start,
            end,
            async: is_async,
            argnames,
            body
          });
        };
        var function_ = function(ctor, is_generator_property, is_async, is_export_default) {
          var in_statement = ctor === AST_Defun;
          var is_generator = is("operator", "*");
          if (is_generator) {
            next();
          }
          var name = is("name") ? as_symbol(in_statement ? AST_SymbolDefun : AST_SymbolLambda) : null;
          if (in_statement && !name) {
            if (is_export_default) {
              ctor = AST_Function;
            } else {
              unexpected();
            }
          }
          if (name && ctor !== AST_Accessor && !(name instanceof AST_SymbolDeclaration))
            unexpected(prev());
          var args = [];
          var body = _function_body(true, is_generator || is_generator_property, is_async, name, args);
          return new ctor({
            start: args.start,
            end: body.end,
            is_generator,
            async: is_async,
            name,
            argnames: args,
            body
          });
        };
        class UsedParametersTracker {
          constructor(is_parameter, strict, duplicates_ok = false) {
            this.is_parameter = is_parameter;
            this.duplicates_ok = duplicates_ok;
            this.parameters = /* @__PURE__ */ new Set();
            this.duplicate = null;
            this.default_assignment = false;
            this.spread = false;
            this.strict_mode = !!strict;
          }
          add_parameter(token) {
            if (this.parameters.has(token.value)) {
              if (this.duplicate === null) {
                this.duplicate = token;
              }
              this.check_strict();
            } else {
              this.parameters.add(token.value);
              if (this.is_parameter) {
                switch (token.value) {
                  case "arguments":
                  case "eval":
                  case "yield":
                    if (this.strict_mode) {
                      token_error(token, "Unexpected " + token.value + " identifier as parameter inside strict mode");
                    }
                    break;
                  default:
                    if (RESERVED_WORDS.has(token.value)) {
                      unexpected();
                    }
                }
              }
            }
          }
          mark_default_assignment(token) {
            if (this.default_assignment === false) {
              this.default_assignment = token;
            }
          }
          mark_spread(token) {
            if (this.spread === false) {
              this.spread = token;
            }
          }
          mark_strict_mode() {
            this.strict_mode = true;
          }
          is_strict() {
            return this.default_assignment !== false || this.spread !== false || this.strict_mode;
          }
          check_strict() {
            if (this.is_strict() && this.duplicate !== null && !this.duplicates_ok) {
              token_error(this.duplicate, "Parameter " + this.duplicate.value + " was used already");
            }
          }
        }
        function parameters(params) {
          var used_parameters = new UsedParametersTracker(true, S.input.has_directive("use strict"));
          expect("(");
          while (!is("punc", ")")) {
            var param = parameter(used_parameters);
            params.push(param);
            if (!is("punc", ")")) {
              expect(",");
            }
            if (param instanceof AST_Expansion) {
              break;
            }
          }
          next();
        }
        function parameter(used_parameters, symbol_type) {
          var param;
          var expand = false;
          if (used_parameters === void 0) {
            used_parameters = new UsedParametersTracker(true, S.input.has_directive("use strict"));
          }
          if (is("expand", "...")) {
            expand = S.token;
            used_parameters.mark_spread(S.token);
            next();
          }
          param = binding_element(used_parameters, symbol_type);
          if (is("operator", "=") && expand === false) {
            used_parameters.mark_default_assignment(S.token);
            next();
            param = new AST_DefaultAssign({
              start: param.start,
              left: param,
              operator: "=",
              right: expression(false),
              end: S.token
            });
          }
          if (expand !== false) {
            if (!is("punc", ")")) {
              unexpected();
            }
            param = new AST_Expansion({
              start: expand,
              expression: param,
              end: expand
            });
          }
          used_parameters.check_strict();
          return param;
        }
        function binding_element(used_parameters, symbol_type) {
          var elements = [];
          var first = true;
          var is_expand = false;
          var expand_token;
          var first_token = S.token;
          if (used_parameters === void 0) {
            const strict = S.input.has_directive("use strict");
            const duplicates_ok = symbol_type === AST_SymbolVar;
            used_parameters = new UsedParametersTracker(false, strict, duplicates_ok);
          }
          symbol_type = symbol_type === void 0 ? AST_SymbolFunarg : symbol_type;
          if (is("punc", "[")) {
            next();
            while (!is("punc", "]")) {
              if (first) {
                first = false;
              } else {
                expect(",");
              }
              if (is("expand", "...")) {
                is_expand = true;
                expand_token = S.token;
                used_parameters.mark_spread(S.token);
                next();
              }
              if (is("punc")) {
                switch (S.token.value) {
                  case ",":
                    elements.push(new AST_Hole({
                      start: S.token,
                      end: S.token
                    }));
                    continue;
                  case "]":
                    break;
                  case "[":
                  case "{":
                    elements.push(binding_element(used_parameters, symbol_type));
                    break;
                  default:
                    unexpected();
                }
              } else if (is("name")) {
                used_parameters.add_parameter(S.token);
                elements.push(as_symbol(symbol_type));
              } else {
                croak("Invalid function parameter");
              }
              if (is("operator", "=") && is_expand === false) {
                used_parameters.mark_default_assignment(S.token);
                next();
                elements[elements.length - 1] = new AST_DefaultAssign({
                  start: elements[elements.length - 1].start,
                  left: elements[elements.length - 1],
                  operator: "=",
                  right: expression(false),
                  end: S.token
                });
              }
              if (is_expand) {
                if (!is("punc", "]")) {
                  croak("Rest element must be last element");
                }
                elements[elements.length - 1] = new AST_Expansion({
                  start: expand_token,
                  expression: elements[elements.length - 1],
                  end: expand_token
                });
              }
            }
            expect("]");
            used_parameters.check_strict();
            return new AST_Destructuring({
              start: first_token,
              names: elements,
              is_array: true,
              end: prev()
            });
          } else if (is("punc", "{")) {
            next();
            while (!is("punc", "}")) {
              if (first) {
                first = false;
              } else {
                expect(",");
              }
              if (is("expand", "...")) {
                is_expand = true;
                expand_token = S.token;
                used_parameters.mark_spread(S.token);
                next();
              }
              if (is("name") && (is_token(peek(), "punc") || is_token(peek(), "operator")) && [",", "}", "="].includes(peek().value)) {
                used_parameters.add_parameter(S.token);
                var start = prev();
                var value = as_symbol(symbol_type);
                if (is_expand) {
                  elements.push(new AST_Expansion({
                    start: expand_token,
                    expression: value,
                    end: value.end
                  }));
                } else {
                  elements.push(new AST_ObjectKeyVal({
                    start,
                    key: value.name,
                    value,
                    end: value.end
                  }));
                }
              } else if (is("punc", "}")) {
                continue;
              } else {
                var property_token = S.token;
                var property = as_property_name();
                if (property === null) {
                  unexpected(prev());
                } else if (prev().type === "name" && !is("punc", ":")) {
                  elements.push(new AST_ObjectKeyVal({
                    start: prev(),
                    key: property,
                    value: new symbol_type({
                      start: prev(),
                      name: property,
                      end: prev()
                    }),
                    end: prev()
                  }));
                } else {
                  expect(":");
                  elements.push(new AST_ObjectKeyVal({
                    start: property_token,
                    quote: property_token.quote,
                    key: property,
                    value: binding_element(used_parameters, symbol_type),
                    end: prev()
                  }));
                }
              }
              if (is_expand) {
                if (!is("punc", "}")) {
                  croak("Rest element must be last element");
                }
              } else if (is("operator", "=")) {
                used_parameters.mark_default_assignment(S.token);
                next();
                elements[elements.length - 1].value = new AST_DefaultAssign({
                  start: elements[elements.length - 1].value.start,
                  left: elements[elements.length - 1].value,
                  operator: "=",
                  right: expression(false),
                  end: S.token
                });
              }
            }
            expect("}");
            used_parameters.check_strict();
            return new AST_Destructuring({
              start: first_token,
              names: elements,
              is_array: false,
              end: prev()
            });
          } else if (is("name")) {
            used_parameters.add_parameter(S.token);
            return as_symbol(symbol_type);
          } else {
            croak("Invalid function parameter");
          }
        }
        function params_or_seq_(allow_arrows, maybe_sequence) {
          var spread_token;
          var invalid_sequence;
          var trailing_comma;
          var a = [];
          expect("(");
          while (!is("punc", ")")) {
            if (spread_token)
              unexpected(spread_token);
            if (is("expand", "...")) {
              spread_token = S.token;
              if (maybe_sequence)
                invalid_sequence = S.token;
              next();
              a.push(new AST_Expansion({
                start: prev(),
                expression: expression(),
                end: S.token
              }));
            } else {
              a.push(expression());
            }
            if (!is("punc", ")")) {
              expect(",");
              if (is("punc", ")")) {
                trailing_comma = prev();
                if (maybe_sequence)
                  invalid_sequence = trailing_comma;
              }
            }
          }
          expect(")");
          if (allow_arrows && is("arrow", "=>")) {
            if (spread_token && trailing_comma)
              unexpected(trailing_comma);
          } else if (invalid_sequence) {
            unexpected(invalid_sequence);
          }
          return a;
        }
        function _function_body(block, generator, is_async, name, args) {
          var loop = S.in_loop;
          var labels = S.labels;
          var current_generator = S.in_generator;
          var current_async = S.in_async;
          ++S.in_function;
          if (generator)
            S.in_generator = S.in_function;
          if (is_async)
            S.in_async = S.in_function;
          if (args)
            parameters(args);
          if (block)
            S.in_directives = true;
          S.in_loop = 0;
          S.labels = [];
          if (block) {
            S.input.push_directives_stack();
            var a = block_();
            if (name)
              _verify_symbol(name);
            if (args)
              args.forEach(_verify_symbol);
            S.input.pop_directives_stack();
          } else {
            var a = [new AST_Return({
              start: S.token,
              value: expression(false),
              end: S.token
            })];
          }
          --S.in_function;
          S.in_loop = loop;
          S.labels = labels;
          S.in_generator = current_generator;
          S.in_async = current_async;
          return a;
        }
        function _await_expression() {
          if (!can_await()) {
            croak("Unexpected await expression outside async function", S.prev.line, S.prev.col, S.prev.pos);
          }
          return new AST_Await({
            start: prev(),
            end: S.token,
            expression: maybe_unary(true)
          });
        }
        function _yield_expression() {
          if (!is_in_generator()) {
            croak("Unexpected yield expression outside generator function", S.prev.line, S.prev.col, S.prev.pos);
          }
          var start = S.token;
          var star = false;
          var has_expression = true;
          if (can_insert_semicolon() || is("punc") && PUNC_AFTER_EXPRESSION.has(S.token.value)) {
            has_expression = false;
          } else if (is("operator", "*")) {
            star = true;
            next();
          }
          return new AST_Yield({
            start,
            is_star: star,
            expression: has_expression ? expression() : null,
            end: prev()
          });
        }
        function if_() {
          var cond = parenthesised(), body = statement(false, false, true), belse = null;
          if (is("keyword", "else")) {
            next();
            belse = statement(false, false, true);
          }
          return new AST_If({
            condition: cond,
            body,
            alternative: belse
          });
        }
        function block_() {
          expect("{");
          var a = [];
          while (!is("punc", "}")) {
            if (is("eof"))
              unexpected();
            a.push(statement());
          }
          next();
          return a;
        }
        function switch_body_() {
          expect("{");
          var a = [], cur = null, branch = null, tmp;
          while (!is("punc", "}")) {
            if (is("eof"))
              unexpected();
            if (is("keyword", "case")) {
              if (branch)
                branch.end = prev();
              cur = [];
              branch = new AST_Case({
                start: (tmp = S.token, next(), tmp),
                expression: expression(true),
                body: cur
              });
              a.push(branch);
              expect(":");
            } else if (is("keyword", "default")) {
              if (branch)
                branch.end = prev();
              cur = [];
              branch = new AST_Default({
                start: (tmp = S.token, next(), expect(":"), tmp),
                body: cur
              });
              a.push(branch);
            } else {
              if (!cur)
                unexpected();
              cur.push(statement());
            }
          }
          if (branch)
            branch.end = prev();
          next();
          return a;
        }
        function try_() {
          var body, bcatch = null, bfinally = null;
          body = new AST_TryBlock({
            start: S.token,
            body: block_(),
            end: prev()
          });
          if (is("keyword", "catch")) {
            var start = S.token;
            next();
            if (is("punc", "{")) {
              var name = null;
            } else {
              expect("(");
              var name = parameter(void 0, AST_SymbolCatch);
              expect(")");
            }
            bcatch = new AST_Catch({
              start,
              argname: name,
              body: block_(),
              end: prev()
            });
          }
          if (is("keyword", "finally")) {
            var start = S.token;
            next();
            bfinally = new AST_Finally({
              start,
              body: block_(),
              end: prev()
            });
          }
          if (!bcatch && !bfinally)
            croak("Missing catch/finally blocks");
          return new AST_Try({
            body,
            bcatch,
            bfinally
          });
        }
        function vardefs(no_in, kind) {
          var var_defs = [];
          var def;
          for (; ; ) {
            var sym_type = kind === "var" ? AST_SymbolVar : kind === "const" ? AST_SymbolConst : kind === "let" ? AST_SymbolLet : null;
            if (is("punc", "{") || is("punc", "[")) {
              def = new AST_VarDef({
                start: S.token,
                name: binding_element(void 0, sym_type),
                value: is("operator", "=") ? (expect_token("operator", "="), expression(false, no_in)) : null,
                end: prev()
              });
            } else {
              def = new AST_VarDef({
                start: S.token,
                name: as_symbol(sym_type),
                value: is("operator", "=") ? (next(), expression(false, no_in)) : !no_in && kind === "const" ? croak("Missing initializer in const declaration") : null,
                end: prev()
              });
              if (def.name.name == "import")
                croak("Unexpected token: import");
            }
            var_defs.push(def);
            if (!is("punc", ","))
              break;
            next();
          }
          return var_defs;
        }
        var var_ = function(no_in) {
          return new AST_Var({
            start: prev(),
            definitions: vardefs(no_in, "var"),
            end: prev()
          });
        };
        var let_ = function(no_in) {
          return new AST_Let({
            start: prev(),
            definitions: vardefs(no_in, "let"),
            end: prev()
          });
        };
        var const_ = function(no_in) {
          return new AST_Const({
            start: prev(),
            definitions: vardefs(no_in, "const"),
            end: prev()
          });
        };
        var new_ = function(allow_calls) {
          var start = S.token;
          expect_token("operator", "new");
          if (is("punc", ".")) {
            next();
            expect_token("name", "target");
            return subscripts(new AST_NewTarget({
              start,
              end: prev()
            }), allow_calls);
          }
          var newexp = expr_atom(false), args;
          if (is("punc", "(")) {
            next();
            args = expr_list(")", true);
          } else {
            args = [];
          }
          var call = new AST_New({
            start,
            expression: newexp,
            args,
            end: prev()
          });
          annotate(call);
          return subscripts(call, allow_calls);
        };
        function as_atom_node() {
          var tok = S.token, ret;
          switch (tok.type) {
            case "name":
              ret = _make_symbol(AST_SymbolRef);
              break;
            case "num":
              ret = new AST_Number({
                start: tok,
                end: tok,
                value: tok.value,
                raw: LATEST_RAW
              });
              break;
            case "big_int":
              ret = new AST_BigInt({ start: tok, end: tok, value: tok.value });
              break;
            case "string":
              ret = new AST_String({
                start: tok,
                end: tok,
                value: tok.value,
                quote: tok.quote
              });
              annotate(ret);
              break;
            case "regexp":
              const [_, source, flags] = tok.value.match(/^\/(.*)\/(\w*)$/);
              ret = new AST_RegExp({ start: tok, end: tok, value: { source, flags } });
              break;
            case "atom":
              switch (tok.value) {
                case "false":
                  ret = new AST_False({ start: tok, end: tok });
                  break;
                case "true":
                  ret = new AST_True({ start: tok, end: tok });
                  break;
                case "null":
                  ret = new AST_Null({ start: tok, end: tok });
                  break;
              }
              break;
          }
          next();
          return ret;
        }
        function to_fun_args(ex, default_seen_above) {
          var insert_default = function(ex2, default_value) {
            if (default_value) {
              return new AST_DefaultAssign({
                start: ex2.start,
                left: ex2,
                operator: "=",
                right: default_value,
                end: default_value.end
              });
            }
            return ex2;
          };
          if (ex instanceof AST_Object) {
            return insert_default(new AST_Destructuring({
              start: ex.start,
              end: ex.end,
              is_array: false,
              names: ex.properties.map((prop) => to_fun_args(prop))
            }), default_seen_above);
          } else if (ex instanceof AST_ObjectKeyVal) {
            ex.value = to_fun_args(ex.value);
            return insert_default(ex, default_seen_above);
          } else if (ex instanceof AST_Hole) {
            return ex;
          } else if (ex instanceof AST_Destructuring) {
            ex.names = ex.names.map((name) => to_fun_args(name));
            return insert_default(ex, default_seen_above);
          } else if (ex instanceof AST_SymbolRef) {
            return insert_default(new AST_SymbolFunarg({
              name: ex.name,
              start: ex.start,
              end: ex.end
            }), default_seen_above);
          } else if (ex instanceof AST_Expansion) {
            ex.expression = to_fun_args(ex.expression);
            return insert_default(ex, default_seen_above);
          } else if (ex instanceof AST_Array) {
            return insert_default(new AST_Destructuring({
              start: ex.start,
              end: ex.end,
              is_array: true,
              names: ex.elements.map((elm) => to_fun_args(elm))
            }), default_seen_above);
          } else if (ex instanceof AST_Assign) {
            return insert_default(to_fun_args(ex.left, ex.right), default_seen_above);
          } else if (ex instanceof AST_DefaultAssign) {
            ex.left = to_fun_args(ex.left);
            return ex;
          } else {
            croak("Invalid function parameter", ex.start.line, ex.start.col);
          }
        }
        var expr_atom = function(allow_calls, allow_arrows) {
          if (is("operator", "new")) {
            return new_(allow_calls);
          }
          if (is("name", "import") && is_token(peek(), "punc", ".")) {
            return import_meta(allow_calls);
          }
          var start = S.token;
          var peeked;
          var async = is("name", "async") && (peeked = peek()).value != "[" && peeked.type != "arrow" && as_atom_node();
          if (is("punc")) {
            switch (S.token.value) {
              case "(":
                if (async && !allow_calls)
                  break;
                var exprs = params_or_seq_(allow_arrows, !async);
                if (allow_arrows && is("arrow", "=>")) {
                  return arrow_function(start, exprs.map((e) => to_fun_args(e)), !!async);
                }
                var ex = async ? new AST_Call({
                  expression: async,
                  args: exprs
                }) : to_expr_or_sequence(start, exprs);
                if (ex.start) {
                  const outer_comments_before = start.comments_before.length;
                  outer_comments_before_counts.set(start, outer_comments_before);
                  ex.start.comments_before.unshift(...start.comments_before);
                  start.comments_before = ex.start.comments_before;
                  if (outer_comments_before == 0 && start.comments_before.length > 0) {
                    var comment = start.comments_before[0];
                    if (!comment.nlb) {
                      comment.nlb = start.nlb;
                      start.nlb = false;
                    }
                  }
                  start.comments_after = ex.start.comments_after;
                }
                ex.start = start;
                var end = prev();
                if (ex.end) {
                  end.comments_before = ex.end.comments_before;
                  ex.end.comments_after.push(...end.comments_after);
                  end.comments_after = ex.end.comments_after;
                }
                ex.end = end;
                if (ex instanceof AST_Call)
                  annotate(ex);
                return subscripts(ex, allow_calls);
              case "[":
                return subscripts(array_(), allow_calls);
              case "{":
                return subscripts(object_or_destructuring_(), allow_calls);
            }
            if (!async)
              unexpected();
          }
          if (allow_arrows && is("name") && is_token(peek(), "arrow")) {
            var param = new AST_SymbolFunarg({
              name: S.token.value,
              start,
              end: start
            });
            next();
            return arrow_function(start, [param], !!async);
          }
          if (is("keyword", "function")) {
            next();
            var func = function_(AST_Function, false, !!async);
            func.start = start;
            func.end = prev();
            return subscripts(func, allow_calls);
          }
          if (async)
            return subscripts(async, allow_calls);
          if (is("keyword", "class")) {
            next();
            var cls = class_(AST_ClassExpression);
            cls.start = start;
            cls.end = prev();
            return subscripts(cls, allow_calls);
          }
          if (is("template_head")) {
            return subscripts(template_string(), allow_calls);
          }
          if (is("privatename")) {
            if (!S.in_class) {
              croak("Private field must be used in an enclosing class");
            }
            const start2 = S.token;
            const key = new AST_SymbolPrivateProperty({
              start: start2,
              name: start2.value,
              end: start2
            });
            next();
            expect_token("operator", "in");
            const private_in = new AST_PrivateIn({
              start: start2,
              key,
              value: subscripts(as_atom_node(), allow_calls),
              end: prev()
            });
            return subscripts(private_in, allow_calls);
          }
          if (ATOMIC_START_TOKEN.has(S.token.type)) {
            return subscripts(as_atom_node(), allow_calls);
          }
          unexpected();
        };
        function template_string() {
          var segments = [], start = S.token;
          segments.push(new AST_TemplateSegment({
            start: S.token,
            raw: TEMPLATE_RAWS.get(S.token),
            value: S.token.value,
            end: S.token
          }));
          while (!S.token.template_end) {
            next();
            handle_regexp();
            segments.push(expression(true));
            segments.push(new AST_TemplateSegment({
              start: S.token,
              raw: TEMPLATE_RAWS.get(S.token),
              value: S.token.value,
              end: S.token
            }));
          }
          next();
          return new AST_TemplateString({
            start,
            segments,
            end: S.token
          });
        }
        function expr_list(closing, allow_trailing_comma, allow_empty) {
          var first = true, a = [];
          while (!is("punc", closing)) {
            if (first)
              first = false;
            else
              expect(",");
            if (allow_trailing_comma && is("punc", closing))
              break;
            if (is("punc", ",") && allow_empty) {
              a.push(new AST_Hole({ start: S.token, end: S.token }));
            } else if (is("expand", "...")) {
              next();
              a.push(new AST_Expansion({ start: prev(), expression: expression(), end: S.token }));
            } else {
              a.push(expression(false));
            }
          }
          next();
          return a;
        }
        var array_ = embed_tokens(function() {
          expect("[");
          return new AST_Array({
            elements: expr_list("]", !options.strict, true)
          });
        });
        var create_accessor = embed_tokens((is_generator, is_async) => {
          return function_(AST_Accessor, is_generator, is_async);
        });
        var object_or_destructuring_ = embed_tokens(function object_or_destructuring_2() {
          var start = S.token, first = true, a = [];
          expect("{");
          while (!is("punc", "}")) {
            if (first)
              first = false;
            else
              expect(",");
            if (!options.strict && is("punc", "}"))
              break;
            start = S.token;
            if (start.type == "expand") {
              next();
              a.push(new AST_Expansion({
                start,
                expression: expression(false),
                end: prev()
              }));
              continue;
            }
            if (is("privatename")) {
              croak("private fields are not allowed in an object");
            }
            var name = as_property_name();
            var value;
            if (!is("punc", ":")) {
              var concise = concise_method_or_getset(name, start);
              if (concise) {
                a.push(concise);
                continue;
              }
              value = new AST_SymbolRef({
                start: prev(),
                name,
                end: prev()
              });
            } else if (name === null) {
              unexpected(prev());
            } else {
              next();
              value = expression(false);
            }
            if (is("operator", "=")) {
              next();
              value = new AST_Assign({
                start,
                left: value,
                operator: "=",
                right: expression(false),
                logical: false,
                end: prev()
              });
            }
            const kv = new AST_ObjectKeyVal({
              start,
              quote: start.quote,
              key: name instanceof AST_Node ? name : "" + name,
              value,
              end: prev()
            });
            a.push(annotate(kv));
          }
          next();
          return new AST_Object({ properties: a });
        });
        function class_(KindOfClass, is_export_default) {
          var start, method, class_name, extends_, a = [];
          S.input.push_directives_stack();
          S.input.add_directive("use strict");
          if (S.token.type == "name" && S.token.value != "extends") {
            class_name = as_symbol(KindOfClass === AST_DefClass ? AST_SymbolDefClass : AST_SymbolClass);
          }
          if (KindOfClass === AST_DefClass && !class_name) {
            if (is_export_default) {
              KindOfClass = AST_ClassExpression;
            } else {
              unexpected();
            }
          }
          if (S.token.value == "extends") {
            next();
            extends_ = expression(true);
          }
          expect("{");
          const save_in_class = S.in_class;
          S.in_class = true;
          while (is("punc", ";")) {
            next();
          }
          while (!is("punc", "}")) {
            start = S.token;
            method = concise_method_or_getset(as_property_name(), start, true);
            if (!method) {
              unexpected();
            }
            a.push(method);
            while (is("punc", ";")) {
              next();
            }
          }
          S.in_class = save_in_class;
          S.input.pop_directives_stack();
          next();
          return new KindOfClass({
            start,
            name: class_name,
            extends: extends_,
            properties: a,
            end: prev()
          });
        }
        function concise_method_or_getset(name, start, is_class) {
          const get_symbol_ast = (name2, SymbolClass = AST_SymbolMethod) => {
            if (typeof name2 === "string" || typeof name2 === "number") {
              return new SymbolClass({
                start,
                name: "" + name2,
                end: prev()
              });
            } else if (name2 === null) {
              unexpected();
            }
            return name2;
          };
          const is_not_method_start = () => !is("punc", "(") && !is("punc", ",") && !is("punc", "}") && !is("punc", ";") && !is("operator", "=");
          var is_async = false;
          var is_static = false;
          var is_generator = false;
          var is_private = false;
          var accessor_type = null;
          if (is_class && name === "static" && is_not_method_start()) {
            const static_block = class_static_block();
            if (static_block != null) {
              return static_block;
            }
            is_static = true;
            name = as_property_name();
          }
          if (name === "async" && is_not_method_start()) {
            is_async = true;
            name = as_property_name();
          }
          if (prev().type === "operator" && prev().value === "*") {
            is_generator = true;
            name = as_property_name();
          }
          if ((name === "get" || name === "set") && is_not_method_start()) {
            accessor_type = name;
            name = as_property_name();
          }
          if (prev().type === "privatename") {
            is_private = true;
          }
          const property_token = prev();
          if (accessor_type != null) {
            if (!is_private) {
              const AccessorClass = accessor_type === "get" ? AST_ObjectGetter : AST_ObjectSetter;
              name = get_symbol_ast(name);
              return annotate(new AccessorClass({
                start,
                static: is_static,
                key: name,
                quote: name instanceof AST_SymbolMethod ? property_token.quote : void 0,
                value: create_accessor(),
                end: prev()
              }));
            } else {
              const AccessorClass = accessor_type === "get" ? AST_PrivateGetter : AST_PrivateSetter;
              return annotate(new AccessorClass({
                start,
                static: is_static,
                key: get_symbol_ast(name),
                value: create_accessor(),
                end: prev()
              }));
            }
          }
          if (is("punc", "(")) {
            name = get_symbol_ast(name);
            const AST_MethodVariant = is_private ? AST_PrivateMethod : AST_ConciseMethod;
            var node = new AST_MethodVariant({
              start,
              static: is_static,
              is_generator,
              async: is_async,
              key: name,
              quote: name instanceof AST_SymbolMethod ? property_token.quote : void 0,
              value: create_accessor(is_generator, is_async),
              end: prev()
            });
            return annotate(node);
          }
          if (is_class) {
            const key = get_symbol_ast(name, AST_SymbolClassProperty);
            const quote = key instanceof AST_SymbolClassProperty ? property_token.quote : void 0;
            const AST_ClassPropertyVariant = is_private ? AST_ClassPrivateProperty : AST_ClassProperty;
            if (is("operator", "=")) {
              next();
              return annotate(new AST_ClassPropertyVariant({
                start,
                static: is_static,
                quote,
                key,
                value: expression(false),
                end: prev()
              }));
            } else if (is("name") || is("privatename") || is("operator", "*") || is("punc", ";") || is("punc", "}")) {
              return annotate(new AST_ClassPropertyVariant({
                start,
                static: is_static,
                quote,
                key,
                end: prev()
              }));
            }
          }
        }
        function class_static_block() {
          if (!is("punc", "{")) {
            return null;
          }
          const start = S.token;
          const body = [];
          next();
          while (!is("punc", "}")) {
            body.push(statement());
          }
          next();
          return new AST_ClassStaticBlock({ start, body, end: prev() });
        }
        function maybe_import_assertion() {
          if (is("name", "assert") && !has_newline_before(S.token)) {
            next();
            return object_or_destructuring_();
          }
          return null;
        }
        function import_statement() {
          var start = prev();
          var imported_name;
          var imported_names;
          if (is("name")) {
            imported_name = as_symbol(AST_SymbolImport);
          }
          if (is("punc", ",")) {
            next();
          }
          imported_names = map_names(true);
          if (imported_names || imported_name) {
            expect_token("name", "from");
          }
          var mod_str = S.token;
          if (mod_str.type !== "string") {
            unexpected();
          }
          next();
          const assert_clause = maybe_import_assertion();
          return new AST_Import({
            start,
            imported_name,
            imported_names,
            module_name: new AST_String({
              start: mod_str,
              value: mod_str.value,
              quote: mod_str.quote,
              end: mod_str
            }),
            assert_clause,
            end: S.token
          });
        }
        function import_meta(allow_calls) {
          var start = S.token;
          expect_token("name", "import");
          expect_token("punc", ".");
          expect_token("name", "meta");
          return subscripts(new AST_ImportMeta({
            start,
            end: prev()
          }), allow_calls);
        }
        function map_name(is_import) {
          function make_symbol(type2, quote) {
            return new type2({
              name: as_property_name(),
              quote: quote || void 0,
              start: prev(),
              end: prev()
            });
          }
          var foreign_type = is_import ? AST_SymbolImportForeign : AST_SymbolExportForeign;
          var type = is_import ? AST_SymbolImport : AST_SymbolExport;
          var start = S.token;
          var foreign_name;
          var name;
          if (is_import) {
            foreign_name = make_symbol(foreign_type, start.quote);
          } else {
            name = make_symbol(type, start.quote);
          }
          if (is("name", "as")) {
            next();
            if (is_import) {
              name = make_symbol(type);
            } else {
              foreign_name = make_symbol(foreign_type, S.token.quote);
            }
          } else if (is_import) {
            name = new type(foreign_name);
          } else {
            foreign_name = new foreign_type(name);
          }
          return new AST_NameMapping({
            start,
            foreign_name,
            name,
            end: prev()
          });
        }
        function map_nameAsterisk(is_import, import_or_export_foreign_name) {
          var foreign_type = is_import ? AST_SymbolImportForeign : AST_SymbolExportForeign;
          var type = is_import ? AST_SymbolImport : AST_SymbolExport;
          var start = S.token;
          var name, foreign_name;
          var end = prev();
          if (is_import) {
            name = import_or_export_foreign_name;
          } else {
            foreign_name = import_or_export_foreign_name;
          }
          name = name || new type({
            start,
            name: "*",
            end
          });
          foreign_name = foreign_name || new foreign_type({
            start,
            name: "*",
            end
          });
          return new AST_NameMapping({
            start,
            foreign_name,
            name,
            end
          });
        }
        function map_names(is_import) {
          var names;
          if (is("punc", "{")) {
            next();
            names = [];
            while (!is("punc", "}")) {
              names.push(map_name(is_import));
              if (is("punc", ",")) {
                next();
              }
            }
            next();
          } else if (is("operator", "*")) {
            var name;
            next();
            if (is("name", "as")) {
              next();
              name = is_import ? as_symbol(AST_SymbolImport) : as_symbol_or_string(AST_SymbolExportForeign);
            }
            names = [map_nameAsterisk(is_import, name)];
          }
          return names;
        }
        function export_statement() {
          var start = S.token;
          var is_default;
          var exported_names;
          if (is("keyword", "default")) {
            is_default = true;
            next();
          } else if (exported_names = map_names(false)) {
            if (is("name", "from")) {
              next();
              var mod_str = S.token;
              if (mod_str.type !== "string") {
                unexpected();
              }
              next();
              const assert_clause = maybe_import_assertion();
              return new AST_Export({
                start,
                is_default,
                exported_names,
                module_name: new AST_String({
                  start: mod_str,
                  value: mod_str.value,
                  quote: mod_str.quote,
                  end: mod_str
                }),
                end: prev(),
                assert_clause
              });
            } else {
              return new AST_Export({
                start,
                is_default,
                exported_names,
                end: prev()
              });
            }
          }
          var node;
          var exported_value;
          var exported_definition;
          if (is("punc", "{") || is_default && (is("keyword", "class") || is("keyword", "function")) && is_token(peek(), "punc")) {
            exported_value = expression(false);
            semicolon();
          } else if ((node = statement(is_default)) instanceof AST_Definitions && is_default) {
            unexpected(node.start);
          } else if (node instanceof AST_Definitions || node instanceof AST_Defun || node instanceof AST_DefClass) {
            exported_definition = node;
          } else if (node instanceof AST_ClassExpression || node instanceof AST_Function) {
            exported_value = node;
          } else if (node instanceof AST_SimpleStatement) {
            exported_value = node.body;
          } else {
            unexpected(node.start);
          }
          return new AST_Export({
            start,
            is_default,
            exported_value,
            exported_definition,
            end: prev(),
            assert_clause: null
          });
        }
        function as_property_name() {
          var tmp = S.token;
          switch (tmp.type) {
            case "punc":
              if (tmp.value === "[") {
                next();
                var ex = expression(false);
                expect("]");
                return ex;
              } else
                unexpected(tmp);
            case "operator":
              if (tmp.value === "*") {
                next();
                return null;
              }
              if (!["delete", "in", "instanceof", "new", "typeof", "void"].includes(tmp.value)) {
                unexpected(tmp);
              }
            case "name":
            case "privatename":
            case "string":
            case "num":
            case "big_int":
            case "keyword":
            case "atom":
              next();
              return tmp.value;
            default:
              unexpected(tmp);
          }
        }
        function as_name() {
          var tmp = S.token;
          if (tmp.type != "name" && tmp.type != "privatename")
            unexpected();
          next();
          return tmp.value;
        }
        function _make_symbol(type) {
          var name = S.token.value;
          return new (name == "this" ? AST_This : name == "super" ? AST_Super : type)({
            name: String(name),
            start: S.token,
            end: S.token
          });
        }
        function _verify_symbol(sym) {
          var name = sym.name;
          if (is_in_generator() && name == "yield") {
            token_error(sym.start, "Yield cannot be used as identifier inside generators");
          }
          if (S.input.has_directive("use strict")) {
            if (name == "yield") {
              token_error(sym.start, "Unexpected yield identifier inside strict mode");
            }
            if (sym instanceof AST_SymbolDeclaration && (name == "arguments" || name == "eval")) {
              token_error(sym.start, "Unexpected " + name + " in strict mode");
            }
          }
        }
        function as_symbol(type, noerror) {
          if (!is("name")) {
            if (!noerror)
              croak("Name expected");
            return null;
          }
          var sym = _make_symbol(type);
          _verify_symbol(sym);
          next();
          return sym;
        }
        function as_symbol_or_string(type) {
          if (!is("name")) {
            if (!is("string")) {
              croak("Name or string expected");
            }
            var tok = S.token;
            var ret = new type({
              start: tok,
              end: tok,
              name: tok.value,
              quote: tok.quote
            });
            next();
            return ret;
          }
          var sym = _make_symbol(type);
          _verify_symbol(sym);
          next();
          return sym;
        }
        function annotate(node, before_token = node.start) {
          var comments = before_token.comments_before;
          const comments_outside_parens = outer_comments_before_counts.get(before_token);
          var i = comments_outside_parens != null ? comments_outside_parens : comments.length;
          while (--i >= 0) {
            var comment = comments[i];
            if (/[@#]__/.test(comment.value)) {
              if (/[@#]__PURE__/.test(comment.value)) {
                set_annotation(node, _PURE);
                break;
              }
              if (/[@#]__INLINE__/.test(comment.value)) {
                set_annotation(node, _INLINE);
                break;
              }
              if (/[@#]__NOINLINE__/.test(comment.value)) {
                set_annotation(node, _NOINLINE);
                break;
              }
              if (/[@#]__KEY__/.test(comment.value)) {
                set_annotation(node, _KEY);
                break;
              }
              if (/[@#]__MANGLE_PROP__/.test(comment.value)) {
                set_annotation(node, _MANGLEPROP);
                break;
              }
            }
          }
          return node;
        }
        var subscripts = function(expr, allow_calls, is_chain) {
          var start = expr.start;
          if (is("punc", ".")) {
            next();
            if (is("privatename") && !S.in_class)
              croak("Private field must be used in an enclosing class");
            const AST_DotVariant = is("privatename") ? AST_DotHash : AST_Dot;
            return annotate(subscripts(new AST_DotVariant({
              start,
              expression: expr,
              optional: false,
              property: as_name(),
              end: prev()
            }), allow_calls, is_chain));
          }
          if (is("punc", "[")) {
            next();
            var prop = expression(true);
            expect("]");
            return annotate(subscripts(new AST_Sub({
              start,
              expression: expr,
              optional: false,
              property: prop,
              end: prev()
            }), allow_calls, is_chain));
          }
          if (allow_calls && is("punc", "(")) {
            next();
            var call = new AST_Call({
              start,
              expression: expr,
              optional: false,
              args: call_args(),
              end: prev()
            });
            annotate(call);
            return subscripts(call, true, is_chain);
          }
          if (is("punc", "?.")) {
            next();
            let chain_contents;
            if (allow_calls && is("punc", "(")) {
              next();
              const call2 = new AST_Call({
                start,
                optional: true,
                expression: expr,
                args: call_args(),
                end: prev()
              });
              annotate(call2);
              chain_contents = subscripts(call2, true, true);
            } else if (is("name") || is("privatename")) {
              if (is("privatename") && !S.in_class)
                croak("Private field must be used in an enclosing class");
              const AST_DotVariant = is("privatename") ? AST_DotHash : AST_Dot;
              chain_contents = annotate(subscripts(new AST_DotVariant({
                start,
                expression: expr,
                optional: true,
                property: as_name(),
                end: prev()
              }), allow_calls, true));
            } else if (is("punc", "[")) {
              next();
              const property = expression(true);
              expect("]");
              chain_contents = annotate(subscripts(new AST_Sub({
                start,
                expression: expr,
                optional: true,
                property,
                end: prev()
              }), allow_calls, true));
            }
            if (!chain_contents)
              unexpected();
            if (chain_contents instanceof AST_Chain)
              return chain_contents;
            return new AST_Chain({
              start,
              expression: chain_contents,
              end: prev()
            });
          }
          if (is("template_head")) {
            if (is_chain) {
              unexpected();
            }
            return subscripts(new AST_PrefixedTemplateString({
              start,
              prefix: expr,
              template_string: template_string(),
              end: prev()
            }), allow_calls);
          }
          return expr;
        };
        function call_args() {
          var args = [];
          while (!is("punc", ")")) {
            if (is("expand", "...")) {
              next();
              args.push(new AST_Expansion({
                start: prev(),
                expression: expression(false),
                end: prev()
              }));
            } else {
              args.push(expression(false));
            }
            if (!is("punc", ")")) {
              expect(",");
            }
          }
          next();
          return args;
        }
        var maybe_unary = function(allow_calls, allow_arrows) {
          var start = S.token;
          if (start.type == "name" && start.value == "await" && can_await()) {
            next();
            return _await_expression();
          }
          if (is("operator") && UNARY_PREFIX.has(start.value)) {
            next();
            handle_regexp();
            var ex = make_unary(AST_UnaryPrefix, start, maybe_unary(allow_calls));
            ex.start = start;
            ex.end = prev();
            return ex;
          }
          var val = expr_atom(allow_calls, allow_arrows);
          while (is("operator") && UNARY_POSTFIX.has(S.token.value) && !has_newline_before(S.token)) {
            if (val instanceof AST_Arrow)
              unexpected();
            val = make_unary(AST_UnaryPostfix, S.token, val);
            val.start = start;
            val.end = S.token;
            next();
          }
          return val;
        };
        function make_unary(ctor, token, expr) {
          var op = token.value;
          switch (op) {
            case "++":
            case "--":
              if (!is_assignable(expr))
                croak("Invalid use of " + op + " operator", token.line, token.col, token.pos);
              break;
            case "delete":
              if (expr instanceof AST_SymbolRef && S.input.has_directive("use strict"))
                croak("Calling delete on expression not allowed in strict mode", expr.start.line, expr.start.col, expr.start.pos);
              break;
          }
          return new ctor({ operator: op, expression: expr });
        }
        var expr_op = function(left, min_prec, no_in) {
          var op = is("operator") ? S.token.value : null;
          if (op == "in" && no_in)
            op = null;
          if (op == "**" && left instanceof AST_UnaryPrefix && !is_token(left.start, "punc", "(") && left.operator !== "--" && left.operator !== "++")
            unexpected(left.start);
          var prec = op != null ? PRECEDENCE[op] : null;
          if (prec != null && (prec > min_prec || op === "**" && min_prec === prec)) {
            next();
            var right = expr_op(maybe_unary(true), prec, no_in);
            return expr_op(new AST_Binary({
              start: left.start,
              left,
              operator: op,
              right,
              end: right.end
            }), min_prec, no_in);
          }
          return left;
        };
        function expr_ops(no_in) {
          return expr_op(maybe_unary(true, true), 0, no_in);
        }
        var maybe_conditional = function(no_in) {
          var start = S.token;
          var expr = expr_ops(no_in);
          if (is("operator", "?")) {
            next();
            var yes = expression(false);
            expect(":");
            return new AST_Conditional({
              start,
              condition: expr,
              consequent: yes,
              alternative: expression(false, no_in),
              end: prev()
            });
          }
          return expr;
        };
        function is_assignable(expr) {
          return expr instanceof AST_PropAccess || expr instanceof AST_SymbolRef;
        }
        function to_destructuring(node) {
          if (node instanceof AST_Object) {
            node = new AST_Destructuring({
              start: node.start,
              names: node.properties.map(to_destructuring),
              is_array: false,
              end: node.end
            });
          } else if (node instanceof AST_Array) {
            var names = [];
            for (var i = 0; i < node.elements.length; i++) {
              if (node.elements[i] instanceof AST_Expansion) {
                if (i + 1 !== node.elements.length) {
                  token_error(node.elements[i].start, "Spread must the be last element in destructuring array");
                }
                node.elements[i].expression = to_destructuring(node.elements[i].expression);
              }
              names.push(to_destructuring(node.elements[i]));
            }
            node = new AST_Destructuring({
              start: node.start,
              names,
              is_array: true,
              end: node.end
            });
          } else if (node instanceof AST_ObjectProperty) {
            node.value = to_destructuring(node.value);
          } else if (node instanceof AST_Assign) {
            node = new AST_DefaultAssign({
              start: node.start,
              left: node.left,
              operator: "=",
              right: node.right,
              end: node.end
            });
          }
          return node;
        }
        var maybe_assign = function(no_in) {
          handle_regexp();
          var start = S.token;
          if (start.type == "name" && start.value == "yield") {
            if (is_in_generator()) {
              next();
              return _yield_expression();
            } else if (S.input.has_directive("use strict")) {
              token_error(S.token, "Unexpected yield identifier inside strict mode");
            }
          }
          var left = maybe_conditional(no_in);
          var val = S.token.value;
          if (is("operator") && ASSIGNMENT.has(val)) {
            if (is_assignable(left) || (left = to_destructuring(left)) instanceof AST_Destructuring) {
              next();
              return new AST_Assign({
                start,
                left,
                operator: val,
                right: maybe_assign(no_in),
                logical: LOGICAL_ASSIGNMENT.has(val),
                end: prev()
              });
            }
            croak("Invalid assignment");
          }
          return left;
        };
        var to_expr_or_sequence = function(start, exprs) {
          if (exprs.length === 1) {
            return exprs[0];
          } else if (exprs.length > 1) {
            return new AST_Sequence({ start, expressions: exprs, end: peek() });
          } else {
            croak("Invalid parenthesized expression");
          }
        };
        var expression = function(commas, no_in) {
          var start = S.token;
          var exprs = [];
          while (true) {
            exprs.push(maybe_assign(no_in));
            if (!commas || !is("punc", ","))
              break;
            next();
            commas = true;
          }
          return to_expr_or_sequence(start, exprs);
        };
        function in_loop(cont) {
          ++S.in_loop;
          var ret = cont();
          --S.in_loop;
          return ret;
        }
        if (options.expression) {
          return expression(true);
        }
        return function parse_toplevel() {
          var start = S.token;
          var body = [];
          S.input.push_directives_stack();
          if (options.module)
            S.input.add_directive("use strict");
          while (!is("eof")) {
            body.push(statement());
          }
          S.input.pop_directives_stack();
          var end = prev();
          var toplevel = options.toplevel;
          if (toplevel) {
            toplevel.body = toplevel.body.concat(body);
            toplevel.end = end;
          } else {
            toplevel = new AST_Toplevel({ start, body, end });
          }
          TEMPLATE_RAWS = /* @__PURE__ */ new Map();
          return toplevel;
        }();
      }
      function DEFNODE(type, props, ctor, methods, base = AST_Node) {
        if (!props)
          props = [];
        else
          props = props.split(/\s+/);
        var self_props = props;
        if (base && base.PROPS)
          props = props.concat(base.PROPS);
        const proto = base && Object.create(base.prototype);
        if (proto) {
          ctor.prototype = proto;
          ctor.BASE = base;
        }
        if (base)
          base.SUBCLASSES.push(ctor);
        ctor.prototype.CTOR = ctor;
        ctor.prototype.constructor = ctor;
        ctor.PROPS = props || null;
        ctor.SELF_PROPS = self_props;
        ctor.SUBCLASSES = [];
        if (type) {
          ctor.prototype.TYPE = ctor.TYPE = type;
        }
        if (methods) {
          for (let i in methods)
            if (HOP(methods, i)) {
              if (i[0] === "$") {
                ctor[i.substr(1)] = methods[i];
              } else {
                ctor.prototype[i] = methods[i];
              }
            }
        }
        ctor.DEFMETHOD = function(name, method) {
          this.prototype[name] = method;
        };
        return ctor;
      }
      const has_tok_flag = (tok, flag) => Boolean(tok.flags & flag);
      const set_tok_flag = (tok, flag, truth) => {
        if (truth) {
          tok.flags |= flag;
        } else {
          tok.flags &= ~flag;
        }
      };
      const TOK_FLAG_NLB = 1;
      const TOK_FLAG_QUOTE_SINGLE = 2;
      const TOK_FLAG_QUOTE_EXISTS = 4;
      const TOK_FLAG_TEMPLATE_END = 8;
      class AST_Token {
        constructor(type, value, line, col, pos, nlb, comments_before, comments_after, file) {
          this.flags = nlb ? 1 : 0;
          this.type = type;
          this.value = value;
          this.line = line;
          this.col = col;
          this.pos = pos;
          this.comments_before = comments_before;
          this.comments_after = comments_after;
          this.file = file;
          Object.seal(this);
        }
        [Symbol.for("nodejs.util.inspect.custom")](_depth, options) {
          const special = (str) => options.stylize(str, "special");
          const quote = typeof this.value === "string" && this.value.includes("`") ? "'" : "`";
          const value = `${quote}${this.value}${quote}`;
          return `${special("[AST_Token")} ${value} at ${this.line}:${this.col}${special("]")}`;
        }
        get nlb() {
          return has_tok_flag(this, TOK_FLAG_NLB);
        }
        set nlb(new_nlb) {
          set_tok_flag(this, TOK_FLAG_NLB, new_nlb);
        }
        get quote() {
          return !has_tok_flag(this, TOK_FLAG_QUOTE_EXISTS) ? "" : has_tok_flag(this, TOK_FLAG_QUOTE_SINGLE) ? "'" : '"';
        }
        set quote(quote_type) {
          set_tok_flag(this, TOK_FLAG_QUOTE_SINGLE, quote_type === "'");
          set_tok_flag(this, TOK_FLAG_QUOTE_EXISTS, !!quote_type);
        }
        get template_end() {
          return has_tok_flag(this, TOK_FLAG_TEMPLATE_END);
        }
        set template_end(new_template_end) {
          set_tok_flag(this, TOK_FLAG_TEMPLATE_END, new_template_end);
        }
      }
      var AST_Node = DEFNODE("Node", "start end", function AST_Node2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        _clone: function(deep) {
          if (deep) {
            var self2 = this.clone();
            return self2.transform(new TreeTransformer(function(node) {
              if (node !== self2) {
                return node.clone(true);
              }
            }));
          }
          return new this.CTOR(this);
        },
        clone: function(deep) {
          return this._clone(deep);
        },
        $documentation: "Base class of all AST nodes",
        $propdoc: {
          start: "[AST_Token] The first token of this node",
          end: "[AST_Token] The last token of this node"
        },
        _walk: function(visitor) {
          return visitor._visit(this);
        },
        walk: function(visitor) {
          return this._walk(visitor);
        },
        _children_backwards: () => {
        }
      }, null);
      var AST_Statement = DEFNODE("Statement", null, function AST_Statement2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class of all statements"
      });
      var AST_Debugger = DEFNODE("Debugger", null, function AST_Debugger2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Represents a debugger statement"
      }, AST_Statement);
      var AST_Directive = DEFNODE("Directive", "value quote", function AST_Directive2(props) {
        if (props) {
          this.value = props.value;
          this.quote = props.quote;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: 'Represents a directive, like "use strict";',
        $propdoc: {
          value: "[string] The value of this directive as a plain string (it's not an AST_String!)",
          quote: "[string] the original quote character"
        }
      }, AST_Statement);
      var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", function AST_SimpleStatement2(props) {
        if (props) {
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A statement consisting of an expression, i.e. a = 1 + 2",
        $propdoc: {
          body: "[AST_Node] an expression node (should not be instanceof AST_Statement)"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.body._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.body);
        }
      }, AST_Statement);
      function walk_body(node, visitor) {
        const body = node.body;
        for (var i = 0, len = body.length; i < len; i++) {
          body[i]._walk(visitor);
        }
      }
      function clone_block_scope(deep) {
        var clone = this._clone(deep);
        if (this.block_scope) {
          clone.block_scope = this.block_scope.clone();
        }
        return clone;
      }
      var AST_Block = DEFNODE("Block", "body block_scope", function AST_Block2(props) {
        if (props) {
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A body of statements (usually braced)",
        $propdoc: {
          body: "[AST_Statement*] an array of statements",
          block_scope: "[AST_Scope] the block scope"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            walk_body(this, visitor);
          });
        },
        _children_backwards(push2) {
          let i = this.body.length;
          while (i--)
            push2(this.body[i]);
        },
        clone: clone_block_scope
      }, AST_Statement);
      var AST_BlockStatement = DEFNODE("BlockStatement", null, function AST_BlockStatement2(props) {
        if (props) {
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A block statement"
      }, AST_Block);
      var AST_EmptyStatement = DEFNODE("EmptyStatement", null, function AST_EmptyStatement2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The empty statement (empty block or simply a semicolon)"
      }, AST_Statement);
      var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", function AST_StatementWithBody2(props) {
        if (props) {
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`",
        $propdoc: {
          body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement"
        }
      }, AST_Statement);
      var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", function AST_LabeledStatement2(props) {
        if (props) {
          this.label = props.label;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Statement with a label",
        $propdoc: {
          label: "[AST_Label] a label definition"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.label._walk(visitor);
            this.body._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.body);
          push2(this.label);
        },
        clone: function(deep) {
          var node = this._clone(deep);
          if (deep) {
            var label = node.label;
            var def = this.label;
            node.walk(new TreeWalker(function(node2) {
              if (node2 instanceof AST_LoopControl && node2.label && node2.label.thedef === def) {
                node2.label.thedef = label;
                label.references.push(node2);
              }
            }));
          }
          return node;
        }
      }, AST_StatementWithBody);
      var AST_IterationStatement = DEFNODE("IterationStatement", "block_scope", function AST_IterationStatement2(props) {
        if (props) {
          this.block_scope = props.block_scope;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Internal class.  All loops inherit from it.",
        $propdoc: {
          block_scope: "[AST_Scope] the block scope for this iteration statement."
        },
        clone: clone_block_scope
      }, AST_StatementWithBody);
      var AST_DWLoop = DEFNODE("DWLoop", "condition", function AST_DWLoop2(props) {
        if (props) {
          this.condition = props.condition;
          this.block_scope = props.block_scope;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for do/while statements",
        $propdoc: {
          condition: "[AST_Node] the loop condition.  Should not be instanceof AST_Statement"
        }
      }, AST_IterationStatement);
      var AST_Do = DEFNODE("Do", null, function AST_Do2(props) {
        if (props) {
          this.condition = props.condition;
          this.block_scope = props.block_scope;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `do` statement",
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.body._walk(visitor);
            this.condition._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.condition);
          push2(this.body);
        }
      }, AST_DWLoop);
      var AST_While = DEFNODE("While", null, function AST_While2(props) {
        if (props) {
          this.condition = props.condition;
          this.block_scope = props.block_scope;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `while` statement",
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.condition._walk(visitor);
            this.body._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.body);
          push2(this.condition);
        }
      }, AST_DWLoop);
      var AST_For = DEFNODE("For", "init condition step", function AST_For2(props) {
        if (props) {
          this.init = props.init;
          this.condition = props.condition;
          this.step = props.step;
          this.block_scope = props.block_scope;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `for` statement",
        $propdoc: {
          init: "[AST_Node?] the `for` initialization code, or null if empty",
          condition: "[AST_Node?] the `for` termination clause, or null if empty",
          step: "[AST_Node?] the `for` update clause, or null if empty"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            if (this.init)
              this.init._walk(visitor);
            if (this.condition)
              this.condition._walk(visitor);
            if (this.step)
              this.step._walk(visitor);
            this.body._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.body);
          if (this.step)
            push2(this.step);
          if (this.condition)
            push2(this.condition);
          if (this.init)
            push2(this.init);
        }
      }, AST_IterationStatement);
      var AST_ForIn = DEFNODE("ForIn", "init object", function AST_ForIn2(props) {
        if (props) {
          this.init = props.init;
          this.object = props.object;
          this.block_scope = props.block_scope;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `for ... in` statement",
        $propdoc: {
          init: "[AST_Node] the `for/in` initialization code",
          object: "[AST_Node] the object that we're looping through"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.init._walk(visitor);
            this.object._walk(visitor);
            this.body._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.body);
          if (this.object)
            push2(this.object);
          if (this.init)
            push2(this.init);
        }
      }, AST_IterationStatement);
      var AST_ForOf = DEFNODE("ForOf", "await", function AST_ForOf2(props) {
        if (props) {
          this.await = props.await;
          this.init = props.init;
          this.object = props.object;
          this.block_scope = props.block_scope;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `for ... of` statement"
      }, AST_ForIn);
      var AST_With = DEFNODE("With", "expression", function AST_With2(props) {
        if (props) {
          this.expression = props.expression;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `with` statement",
        $propdoc: {
          expression: "[AST_Node] the `with` expression"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression._walk(visitor);
            this.body._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.body);
          push2(this.expression);
        }
      }, AST_StatementWithBody);
      var AST_Scope = DEFNODE("Scope", "variables uses_with uses_eval parent_scope enclosed cname", function AST_Scope2(props) {
        if (props) {
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for all statements introducing a lexical scope",
        $propdoc: {
          variables: "[Map/S] a map of name -> SymbolDef for all variables/functions defined in this scope",
          uses_with: "[boolean/S] tells whether this scope uses the `with` statement",
          uses_eval: "[boolean/S] tells whether this scope contains a direct call to the global `eval`",
          parent_scope: "[AST_Scope?/S] link to the parent scope",
          enclosed: "[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",
          cname: "[integer/S] current index for mangling variables (used internally by the mangler)"
        },
        get_defun_scope: function() {
          var self2 = this;
          while (self2.is_block_scope()) {
            self2 = self2.parent_scope;
          }
          return self2;
        },
        clone: function(deep, toplevel) {
          var node = this._clone(deep);
          if (deep && this.variables && toplevel && !this._block_scope) {
            node.figure_out_scope({}, {
              toplevel,
              parent_scope: this.parent_scope
            });
          } else {
            if (this.variables)
              node.variables = new Map(this.variables);
            if (this.enclosed)
              node.enclosed = this.enclosed.slice();
            if (this._block_scope)
              node._block_scope = this._block_scope;
          }
          return node;
        },
        pinned: function() {
          return this.uses_eval || this.uses_with;
        }
      }, AST_Block);
      var AST_Toplevel = DEFNODE("Toplevel", "globals", function AST_Toplevel2(props) {
        if (props) {
          this.globals = props.globals;
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The toplevel scope",
        $propdoc: {
          globals: "[Map/S] a map of name -> SymbolDef for all undeclared names"
        },
        wrap_commonjs: function(name) {
          var body = this.body;
          var wrapped_tl = "(function(exports){'$ORIG';})(typeof " + name + "=='undefined'?(" + name + "={}):" + name + ");";
          wrapped_tl = parse(wrapped_tl);
          wrapped_tl = wrapped_tl.transform(new TreeTransformer(function(node) {
            if (node instanceof AST_Directive && node.value == "$ORIG") {
              return MAP.splice(body);
            }
          }));
          return wrapped_tl;
        },
        wrap_enclose: function(args_values) {
          if (typeof args_values != "string")
            args_values = "";
          var index = args_values.indexOf(":");
          if (index < 0)
            index = args_values.length;
          var body = this.body;
          return parse([
            "(function(",
            args_values.slice(0, index),
            '){"$ORIG"})(',
            args_values.slice(index + 1),
            ")"
          ].join("")).transform(new TreeTransformer(function(node) {
            if (node instanceof AST_Directive && node.value == "$ORIG") {
              return MAP.splice(body);
            }
          }));
        }
      }, AST_Scope);
      var AST_Expansion = DEFNODE("Expansion", "expression", function AST_Expansion2(props) {
        if (props) {
          this.expression = props.expression;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "An expandible argument, such as ...rest, a splat, such as [1,2,...all], or an expansion in a variable declaration, such as var [first, ...rest] = list",
        $propdoc: {
          expression: "[AST_Node] the thing to be expanded"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression.walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.expression);
        }
      });
      var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments is_generator async", function AST_Lambda2(props) {
        if (props) {
          this.name = props.name;
          this.argnames = props.argnames;
          this.uses_arguments = props.uses_arguments;
          this.is_generator = props.is_generator;
          this.async = props.async;
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for functions",
        $propdoc: {
          name: "[AST_SymbolDeclaration?] the name of this function",
          argnames: "[AST_SymbolFunarg|AST_Destructuring|AST_Expansion|AST_DefaultAssign*] array of function arguments, destructurings, or expanding arguments",
          uses_arguments: "[boolean/S] tells whether this function accesses the arguments array",
          is_generator: "[boolean] is this a generator method",
          async: "[boolean] is this method async"
        },
        args_as_names: function() {
          var out = [];
          for (var i = 0; i < this.argnames.length; i++) {
            if (this.argnames[i] instanceof AST_Destructuring) {
              out.push(...this.argnames[i].all_symbols());
            } else {
              out.push(this.argnames[i]);
            }
          }
          return out;
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            if (this.name)
              this.name._walk(visitor);
            var argnames = this.argnames;
            for (var i = 0, len = argnames.length; i < len; i++) {
              argnames[i]._walk(visitor);
            }
            walk_body(this, visitor);
          });
        },
        _children_backwards(push2) {
          let i = this.body.length;
          while (i--)
            push2(this.body[i]);
          i = this.argnames.length;
          while (i--)
            push2(this.argnames[i]);
          if (this.name)
            push2(this.name);
        },
        is_braceless() {
          return this.body[0] instanceof AST_Return && this.body[0].value;
        },
        length_property() {
          let length = 0;
          for (const arg of this.argnames) {
            if (arg instanceof AST_SymbolFunarg || arg instanceof AST_Destructuring) {
              length++;
            }
          }
          return length;
        }
      }, AST_Scope);
      var AST_Accessor = DEFNODE("Accessor", null, function AST_Accessor2(props) {
        if (props) {
          this.name = props.name;
          this.argnames = props.argnames;
          this.uses_arguments = props.uses_arguments;
          this.is_generator = props.is_generator;
          this.async = props.async;
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A setter/getter function.  The `name` property is always null."
      }, AST_Lambda);
      var AST_Function = DEFNODE("Function", null, function AST_Function2(props) {
        if (props) {
          this.name = props.name;
          this.argnames = props.argnames;
          this.uses_arguments = props.uses_arguments;
          this.is_generator = props.is_generator;
          this.async = props.async;
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A function expression"
      }, AST_Lambda);
      var AST_Arrow = DEFNODE("Arrow", null, function AST_Arrow2(props) {
        if (props) {
          this.name = props.name;
          this.argnames = props.argnames;
          this.uses_arguments = props.uses_arguments;
          this.is_generator = props.is_generator;
          this.async = props.async;
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "An ES6 Arrow function ((a) => b)"
      }, AST_Lambda);
      var AST_Defun = DEFNODE("Defun", null, function AST_Defun2(props) {
        if (props) {
          this.name = props.name;
          this.argnames = props.argnames;
          this.uses_arguments = props.uses_arguments;
          this.is_generator = props.is_generator;
          this.async = props.async;
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A function definition"
      }, AST_Lambda);
      var AST_Destructuring = DEFNODE("Destructuring", "names is_array", function AST_Destructuring2(props) {
        if (props) {
          this.names = props.names;
          this.is_array = props.is_array;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A destructuring of several names. Used in destructuring assignment and with destructuring function argument names",
        $propdoc: {
          "names": "[AST_Node*] Array of properties or elements",
          "is_array": "[Boolean] Whether the destructuring represents an object or array"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.names.forEach(function(name) {
              name._walk(visitor);
            });
          });
        },
        _children_backwards(push2) {
          let i = this.names.length;
          while (i--)
            push2(this.names[i]);
        },
        all_symbols: function() {
          var out = [];
          walk(this, (node) => {
            if (node instanceof AST_SymbolDeclaration) {
              out.push(node);
            }
            if (node instanceof AST_Lambda) {
              return true;
            }
          });
          return out;
        }
      });
      var AST_PrefixedTemplateString = DEFNODE("PrefixedTemplateString", "template_string prefix", function AST_PrefixedTemplateString2(props) {
        if (props) {
          this.template_string = props.template_string;
          this.prefix = props.prefix;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A templatestring with a prefix, such as String.raw`foobarbaz`",
        $propdoc: {
          template_string: "[AST_TemplateString] The template string",
          prefix: "[AST_Node] The prefix, which will get called."
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.prefix._walk(visitor);
            this.template_string._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.template_string);
          push2(this.prefix);
        }
      });
      var AST_TemplateString = DEFNODE("TemplateString", "segments", function AST_TemplateString2(props) {
        if (props) {
          this.segments = props.segments;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A template string literal",
        $propdoc: {
          segments: "[AST_Node*] One or more segments, starting with AST_TemplateSegment. AST_Node may follow AST_TemplateSegment, but each AST_Node must be followed by AST_TemplateSegment."
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.segments.forEach(function(seg) {
              seg._walk(visitor);
            });
          });
        },
        _children_backwards(push2) {
          let i = this.segments.length;
          while (i--)
            push2(this.segments[i]);
        }
      });
      var AST_TemplateSegment = DEFNODE("TemplateSegment", "value raw", function AST_TemplateSegment2(props) {
        if (props) {
          this.value = props.value;
          this.raw = props.raw;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A segment of a template string literal",
        $propdoc: {
          value: "Content of the segment",
          raw: "Raw source of the segment"
        }
      });
      var AST_Jump = DEFNODE("Jump", null, function AST_Jump2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for \u201Cjumps\u201D (for now that's `return`, `throw`, `break` and `continue`)"
      }, AST_Statement);
      var AST_Exit = DEFNODE("Exit", "value", function AST_Exit2(props) {
        if (props) {
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for \u201Cexits\u201D (`return` and `throw`)",
        $propdoc: {
          value: "[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"
        },
        _walk: function(visitor) {
          return visitor._visit(this, this.value && function() {
            this.value._walk(visitor);
          });
        },
        _children_backwards(push2) {
          if (this.value)
            push2(this.value);
        }
      }, AST_Jump);
      var AST_Return = DEFNODE("Return", null, function AST_Return2(props) {
        if (props) {
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `return` statement"
      }, AST_Exit);
      var AST_Throw = DEFNODE("Throw", null, function AST_Throw2(props) {
        if (props) {
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `throw` statement"
      }, AST_Exit);
      var AST_LoopControl = DEFNODE("LoopControl", "label", function AST_LoopControl2(props) {
        if (props) {
          this.label = props.label;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for loop control statements (`break` and `continue`)",
        $propdoc: {
          label: "[AST_LabelRef?] the label, or null if none"
        },
        _walk: function(visitor) {
          return visitor._visit(this, this.label && function() {
            this.label._walk(visitor);
          });
        },
        _children_backwards(push2) {
          if (this.label)
            push2(this.label);
        }
      }, AST_Jump);
      var AST_Break = DEFNODE("Break", null, function AST_Break2(props) {
        if (props) {
          this.label = props.label;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `break` statement"
      }, AST_LoopControl);
      var AST_Continue = DEFNODE("Continue", null, function AST_Continue2(props) {
        if (props) {
          this.label = props.label;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `continue` statement"
      }, AST_LoopControl);
      var AST_Await = DEFNODE("Await", "expression", function AST_Await2(props) {
        if (props) {
          this.expression = props.expression;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "An `await` statement",
        $propdoc: {
          expression: "[AST_Node] the mandatory expression being awaited"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.expression);
        }
      });
      var AST_Yield = DEFNODE("Yield", "expression is_star", function AST_Yield2(props) {
        if (props) {
          this.expression = props.expression;
          this.is_star = props.is_star;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `yield` statement",
        $propdoc: {
          expression: "[AST_Node?] the value returned or thrown by this statement; could be null (representing undefined) but only when is_star is set to false",
          is_star: "[Boolean] Whether this is a yield or yield* statement"
        },
        _walk: function(visitor) {
          return visitor._visit(this, this.expression && function() {
            this.expression._walk(visitor);
          });
        },
        _children_backwards(push2) {
          if (this.expression)
            push2(this.expression);
        }
      });
      var AST_If = DEFNODE("If", "condition alternative", function AST_If2(props) {
        if (props) {
          this.condition = props.condition;
          this.alternative = props.alternative;
          this.body = props.body;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `if` statement",
        $propdoc: {
          condition: "[AST_Node] the `if` condition",
          alternative: "[AST_Statement?] the `else` part, or null if not present"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.condition._walk(visitor);
            this.body._walk(visitor);
            if (this.alternative)
              this.alternative._walk(visitor);
          });
        },
        _children_backwards(push2) {
          if (this.alternative) {
            push2(this.alternative);
          }
          push2(this.body);
          push2(this.condition);
        }
      }, AST_StatementWithBody);
      var AST_Switch = DEFNODE("Switch", "expression", function AST_Switch2(props) {
        if (props) {
          this.expression = props.expression;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `switch` statement",
        $propdoc: {
          expression: "[AST_Node] the `switch` \u201Cdiscriminant\u201D"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression._walk(visitor);
            walk_body(this, visitor);
          });
        },
        _children_backwards(push2) {
          let i = this.body.length;
          while (i--)
            push2(this.body[i]);
          push2(this.expression);
        }
      }, AST_Block);
      var AST_SwitchBranch = DEFNODE("SwitchBranch", null, function AST_SwitchBranch2(props) {
        if (props) {
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for `switch` branches"
      }, AST_Block);
      var AST_Default = DEFNODE("Default", null, function AST_Default2(props) {
        if (props) {
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `default` switch branch"
      }, AST_SwitchBranch);
      var AST_Case = DEFNODE("Case", "expression", function AST_Case2(props) {
        if (props) {
          this.expression = props.expression;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `case` switch branch",
        $propdoc: {
          expression: "[AST_Node] the `case` expression"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression._walk(visitor);
            walk_body(this, visitor);
          });
        },
        _children_backwards(push2) {
          let i = this.body.length;
          while (i--)
            push2(this.body[i]);
          push2(this.expression);
        }
      }, AST_SwitchBranch);
      var AST_Try = DEFNODE("Try", "body bcatch bfinally", function AST_Try2(props) {
        if (props) {
          this.body = props.body;
          this.bcatch = props.bcatch;
          this.bfinally = props.bfinally;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `try` statement",
        $propdoc: {
          body: "[AST_TryBlock] the try block",
          bcatch: "[AST_Catch?] the catch block, or null if not present",
          bfinally: "[AST_Finally?] the finally block, or null if not present"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.body._walk(visitor);
            if (this.bcatch)
              this.bcatch._walk(visitor);
            if (this.bfinally)
              this.bfinally._walk(visitor);
          });
        },
        _children_backwards(push2) {
          if (this.bfinally)
            push2(this.bfinally);
          if (this.bcatch)
            push2(this.bcatch);
          push2(this.body);
        }
      }, AST_Statement);
      var AST_TryBlock = DEFNODE("TryBlock", null, function AST_TryBlock2(props) {
        if (props) {
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The `try` block of a try statement"
      }, AST_Block);
      var AST_Catch = DEFNODE("Catch", "argname", function AST_Catch2(props) {
        if (props) {
          this.argname = props.argname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `catch` node; only makes sense as part of a `try` statement",
        $propdoc: {
          argname: "[AST_SymbolCatch|AST_Destructuring|AST_Expansion|AST_DefaultAssign] symbol for the exception"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            if (this.argname)
              this.argname._walk(visitor);
            walk_body(this, visitor);
          });
        },
        _children_backwards(push2) {
          let i = this.body.length;
          while (i--)
            push2(this.body[i]);
          if (this.argname)
            push2(this.argname);
        }
      }, AST_Block);
      var AST_Finally = DEFNODE("Finally", null, function AST_Finally2(props) {
        if (props) {
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `finally` node; only makes sense as part of a `try` statement"
      }, AST_Block);
      var AST_Definitions = DEFNODE("Definitions", "definitions", function AST_Definitions2(props) {
        if (props) {
          this.definitions = props.definitions;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for `var` or `const` nodes (variable declarations/initializations)",
        $propdoc: {
          definitions: "[AST_VarDef*] array of variable definitions"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            var definitions = this.definitions;
            for (var i = 0, len = definitions.length; i < len; i++) {
              definitions[i]._walk(visitor);
            }
          });
        },
        _children_backwards(push2) {
          let i = this.definitions.length;
          while (i--)
            push2(this.definitions[i]);
        }
      }, AST_Statement);
      var AST_Var = DEFNODE("Var", null, function AST_Var2(props) {
        if (props) {
          this.definitions = props.definitions;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `var` statement"
      }, AST_Definitions);
      var AST_Let = DEFNODE("Let", null, function AST_Let2(props) {
        if (props) {
          this.definitions = props.definitions;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `let` statement"
      }, AST_Definitions);
      var AST_Const = DEFNODE("Const", null, function AST_Const2(props) {
        if (props) {
          this.definitions = props.definitions;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A `const` statement"
      }, AST_Definitions);
      var AST_VarDef = DEFNODE("VarDef", "name value", function AST_VarDef2(props) {
        if (props) {
          this.name = props.name;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A variable declaration; only appears in a AST_Definitions node",
        $propdoc: {
          name: "[AST_Destructuring|AST_SymbolConst|AST_SymbolLet|AST_SymbolVar] name of the variable",
          value: "[AST_Node?] initializer, or null of there's no initializer"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.name._walk(visitor);
            if (this.value)
              this.value._walk(visitor);
          });
        },
        _children_backwards(push2) {
          if (this.value)
            push2(this.value);
          push2(this.name);
        },
        declarations_as_names() {
          if (this.name instanceof AST_SymbolDeclaration) {
            return [this];
          } else {
            return this.name.all_symbols();
          }
        }
      });
      var AST_NameMapping = DEFNODE("NameMapping", "foreign_name name", function AST_NameMapping2(props) {
        if (props) {
          this.foreign_name = props.foreign_name;
          this.name = props.name;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The part of the export/import statement that declare names from a module.",
        $propdoc: {
          foreign_name: "[AST_SymbolExportForeign|AST_SymbolImportForeign] The name being exported/imported (as specified in the module)",
          name: "[AST_SymbolExport|AST_SymbolImport] The name as it is visible to this module."
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.foreign_name._walk(visitor);
            this.name._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.name);
          push2(this.foreign_name);
        }
      });
      var AST_Import = DEFNODE("Import", "imported_name imported_names module_name assert_clause", function AST_Import2(props) {
        if (props) {
          this.imported_name = props.imported_name;
          this.imported_names = props.imported_names;
          this.module_name = props.module_name;
          this.assert_clause = props.assert_clause;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "An `import` statement",
        $propdoc: {
          imported_name: "[AST_SymbolImport] The name of the variable holding the module's default export.",
          imported_names: "[AST_NameMapping*] The names of non-default imported variables",
          module_name: "[AST_String] String literal describing where this module came from",
          assert_clause: "[AST_Object?] The import assertion"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            if (this.imported_name) {
              this.imported_name._walk(visitor);
            }
            if (this.imported_names) {
              this.imported_names.forEach(function(name_import) {
                name_import._walk(visitor);
              });
            }
            this.module_name._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.module_name);
          if (this.imported_names) {
            let i = this.imported_names.length;
            while (i--)
              push2(this.imported_names[i]);
          }
          if (this.imported_name)
            push2(this.imported_name);
        }
      });
      var AST_ImportMeta = DEFNODE("ImportMeta", null, function AST_ImportMeta2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A reference to import.meta"
      });
      var AST_Export = DEFNODE("Export", "exported_definition exported_value is_default exported_names module_name assert_clause", function AST_Export2(props) {
        if (props) {
          this.exported_definition = props.exported_definition;
          this.exported_value = props.exported_value;
          this.is_default = props.is_default;
          this.exported_names = props.exported_names;
          this.module_name = props.module_name;
          this.assert_clause = props.assert_clause;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "An `export` statement",
        $propdoc: {
          exported_definition: "[AST_Defun|AST_Definitions|AST_DefClass?] An exported definition",
          exported_value: "[AST_Node?] An exported value",
          exported_names: "[AST_NameMapping*?] List of exported names",
          module_name: "[AST_String?] Name of the file to load exports from",
          is_default: "[Boolean] Whether this is the default exported value of this module",
          assert_clause: "[AST_Object?] The import assertion"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            if (this.exported_definition) {
              this.exported_definition._walk(visitor);
            }
            if (this.exported_value) {
              this.exported_value._walk(visitor);
            }
            if (this.exported_names) {
              this.exported_names.forEach(function(name_export) {
                name_export._walk(visitor);
              });
            }
            if (this.module_name) {
              this.module_name._walk(visitor);
            }
          });
        },
        _children_backwards(push2) {
          if (this.module_name)
            push2(this.module_name);
          if (this.exported_names) {
            let i = this.exported_names.length;
            while (i--)
              push2(this.exported_names[i]);
          }
          if (this.exported_value)
            push2(this.exported_value);
          if (this.exported_definition)
            push2(this.exported_definition);
        }
      }, AST_Statement);
      var AST_Call = DEFNODE("Call", "expression args optional _annotations", function AST_Call2(props) {
        if (props) {
          this.expression = props.expression;
          this.args = props.args;
          this.optional = props.optional;
          this._annotations = props._annotations;
          this.start = props.start;
          this.end = props.end;
          this.initialize();
        }
        this.flags = 0;
      }, {
        $documentation: "A function call expression",
        $propdoc: {
          expression: "[AST_Node] expression to invoke as function",
          args: "[AST_Node*] array of arguments",
          optional: "[boolean] whether this is an optional call (IE ?.() )",
          _annotations: "[number] bitfield containing information about the call"
        },
        initialize() {
          if (this._annotations == null)
            this._annotations = 0;
        },
        _walk(visitor) {
          return visitor._visit(this, function() {
            var args = this.args;
            for (var i = 0, len = args.length; i < len; i++) {
              args[i]._walk(visitor);
            }
            this.expression._walk(visitor);
          });
        },
        _children_backwards(push2) {
          let i = this.args.length;
          while (i--)
            push2(this.args[i]);
          push2(this.expression);
        }
      });
      var AST_New = DEFNODE("New", null, function AST_New2(props) {
        if (props) {
          this.expression = props.expression;
          this.args = props.args;
          this.optional = props.optional;
          this._annotations = props._annotations;
          this.start = props.start;
          this.end = props.end;
          this.initialize();
        }
        this.flags = 0;
      }, {
        $documentation: "An object instantiation.  Derives from a function call since it has exactly the same properties"
      }, AST_Call);
      var AST_Sequence = DEFNODE("Sequence", "expressions", function AST_Sequence2(props) {
        if (props) {
          this.expressions = props.expressions;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A sequence expression (comma-separated expressions)",
        $propdoc: {
          expressions: "[AST_Node*] array of expressions (at least two)"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expressions.forEach(function(node) {
              node._walk(visitor);
            });
          });
        },
        _children_backwards(push2) {
          let i = this.expressions.length;
          while (i--)
            push2(this.expressions[i]);
        }
      });
      var AST_PropAccess = DEFNODE("PropAccess", "expression property optional", function AST_PropAccess2(props) {
        if (props) {
          this.expression = props.expression;
          this.property = props.property;
          this.optional = props.optional;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: 'Base class for property access expressions, i.e. `a.foo` or `a["foo"]`',
        $propdoc: {
          expression: "[AST_Node] the \u201Ccontainer\u201D expression",
          property: "[AST_Node|string] the property to access.  For AST_Dot & AST_DotHash this is always a plain string, while for AST_Sub it's an arbitrary AST_Node",
          optional: "[boolean] whether this is an optional property access (IE ?.)"
        }
      });
      var AST_Dot = DEFNODE("Dot", "quote", function AST_Dot2(props) {
        if (props) {
          this.quote = props.quote;
          this.expression = props.expression;
          this.property = props.property;
          this.optional = props.optional;
          this._annotations = props._annotations;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A dotted property access expression",
        $propdoc: {
          quote: "[string] the original quote character when transformed from AST_Sub"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.expression);
        }
      }, AST_PropAccess);
      var AST_DotHash = DEFNODE("DotHash", "", function AST_DotHash2(props) {
        if (props) {
          this.expression = props.expression;
          this.property = props.property;
          this.optional = props.optional;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A dotted property access to a private property",
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.expression);
        }
      }, AST_PropAccess);
      var AST_Sub = DEFNODE("Sub", null, function AST_Sub2(props) {
        if (props) {
          this.expression = props.expression;
          this.property = props.property;
          this.optional = props.optional;
          this._annotations = props._annotations;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: 'Index-style property access, i.e. `a["foo"]`',
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression._walk(visitor);
            this.property._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.property);
          push2(this.expression);
        }
      }, AST_PropAccess);
      var AST_Chain = DEFNODE("Chain", "expression", function AST_Chain2(props) {
        if (props) {
          this.expression = props.expression;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A chain expression like a?.b?.(c)?.[d]",
        $propdoc: {
          expression: "[AST_Call|AST_Dot|AST_DotHash|AST_Sub] chain element."
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.expression);
        }
      });
      var AST_Unary = DEFNODE("Unary", "operator expression", function AST_Unary2(props) {
        if (props) {
          this.operator = props.operator;
          this.expression = props.expression;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for unary expressions",
        $propdoc: {
          operator: "[string] the operator",
          expression: "[AST_Node] expression that this unary operator applies to"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.expression._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.expression);
        }
      });
      var AST_UnaryPrefix = DEFNODE("UnaryPrefix", null, function AST_UnaryPrefix2(props) {
        if (props) {
          this.operator = props.operator;
          this.expression = props.expression;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Unary prefix expression, i.e. `typeof i` or `++i`"
      }, AST_Unary);
      var AST_UnaryPostfix = DEFNODE("UnaryPostfix", null, function AST_UnaryPostfix2(props) {
        if (props) {
          this.operator = props.operator;
          this.expression = props.expression;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Unary postfix expression, i.e. `i++`"
      }, AST_Unary);
      var AST_Binary = DEFNODE("Binary", "operator left right", function AST_Binary2(props) {
        if (props) {
          this.operator = props.operator;
          this.left = props.left;
          this.right = props.right;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Binary expression, i.e. `a + b`",
        $propdoc: {
          left: "[AST_Node] left-hand side expression",
          operator: "[string] the operator",
          right: "[AST_Node] right-hand side expression"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.left._walk(visitor);
            this.right._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.right);
          push2(this.left);
        }
      });
      var AST_Conditional = DEFNODE("Conditional", "condition consequent alternative", function AST_Conditional2(props) {
        if (props) {
          this.condition = props.condition;
          this.consequent = props.consequent;
          this.alternative = props.alternative;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Conditional expression using the ternary operator, i.e. `a ? b : c`",
        $propdoc: {
          condition: "[AST_Node]",
          consequent: "[AST_Node]",
          alternative: "[AST_Node]"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.condition._walk(visitor);
            this.consequent._walk(visitor);
            this.alternative._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.alternative);
          push2(this.consequent);
          push2(this.condition);
        }
      });
      var AST_Assign = DEFNODE("Assign", "logical", function AST_Assign2(props) {
        if (props) {
          this.logical = props.logical;
          this.operator = props.operator;
          this.left = props.left;
          this.right = props.right;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "An assignment expression \u2014 `a = b + 5`",
        $propdoc: {
          logical: "Whether it's a logical assignment"
        }
      }, AST_Binary);
      var AST_DefaultAssign = DEFNODE("DefaultAssign", null, function AST_DefaultAssign2(props) {
        if (props) {
          this.operator = props.operator;
          this.left = props.left;
          this.right = props.right;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A default assignment expression like in `(a = 3) => a`"
      }, AST_Binary);
      var AST_Array = DEFNODE("Array", "elements", function AST_Array2(props) {
        if (props) {
          this.elements = props.elements;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "An array literal",
        $propdoc: {
          elements: "[AST_Node*] array of elements"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            var elements = this.elements;
            for (var i = 0, len = elements.length; i < len; i++) {
              elements[i]._walk(visitor);
            }
          });
        },
        _children_backwards(push2) {
          let i = this.elements.length;
          while (i--)
            push2(this.elements[i]);
        }
      });
      var AST_Object = DEFNODE("Object", "properties", function AST_Object2(props) {
        if (props) {
          this.properties = props.properties;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "An object literal",
        $propdoc: {
          properties: "[AST_ObjectProperty*] array of properties"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            var properties = this.properties;
            for (var i = 0, len = properties.length; i < len; i++) {
              properties[i]._walk(visitor);
            }
          });
        },
        _children_backwards(push2) {
          let i = this.properties.length;
          while (i--)
            push2(this.properties[i]);
        }
      });
      var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", function AST_ObjectProperty2(props) {
        if (props) {
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
          this._annotations = props._annotations;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for literal object properties",
        $propdoc: {
          key: "[string|AST_Node] property name. For ObjectKeyVal this is a string. For getters, setters and computed property this is an AST_Node.",
          value: "[AST_Node] property value.  For getters and setters this is an AST_Accessor."
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            if (this.key instanceof AST_Node)
              this.key._walk(visitor);
            this.value._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.value);
          if (this.key instanceof AST_Node)
            push2(this.key);
        }
      });
      var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", "quote", function AST_ObjectKeyVal2(props) {
        if (props) {
          this.quote = props.quote;
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
          this._annotations = props._annotations;
        }
        this.flags = 0;
      }, {
        $documentation: "A key: value object property",
        $propdoc: {
          quote: "[string] the original quote character"
        },
        computed_key() {
          return this.key instanceof AST_Node;
        }
      }, AST_ObjectProperty);
      var AST_PrivateSetter = DEFNODE("PrivateSetter", "static", function AST_PrivateSetter2(props) {
        if (props) {
          this.static = props.static;
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $propdoc: {
          static: "[boolean] whether this is a static private setter"
        },
        $documentation: "A private setter property",
        computed_key() {
          return false;
        }
      }, AST_ObjectProperty);
      var AST_PrivateGetter = DEFNODE("PrivateGetter", "static", function AST_PrivateGetter2(props) {
        if (props) {
          this.static = props.static;
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $propdoc: {
          static: "[boolean] whether this is a static private getter"
        },
        $documentation: "A private getter property",
        computed_key() {
          return false;
        }
      }, AST_ObjectProperty);
      var AST_ObjectSetter = DEFNODE("ObjectSetter", "quote static", function AST_ObjectSetter2(props) {
        if (props) {
          this.quote = props.quote;
          this.static = props.static;
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
          this._annotations = props._annotations;
        }
        this.flags = 0;
      }, {
        $propdoc: {
          quote: "[string|undefined] the original quote character, if any",
          static: "[boolean] whether this is a static setter (classes only)"
        },
        $documentation: "An object setter property",
        computed_key() {
          return !(this.key instanceof AST_SymbolMethod);
        }
      }, AST_ObjectProperty);
      var AST_ObjectGetter = DEFNODE("ObjectGetter", "quote static", function AST_ObjectGetter2(props) {
        if (props) {
          this.quote = props.quote;
          this.static = props.static;
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
          this._annotations = props._annotations;
        }
        this.flags = 0;
      }, {
        $propdoc: {
          quote: "[string|undefined] the original quote character, if any",
          static: "[boolean] whether this is a static getter (classes only)"
        },
        $documentation: "An object getter property",
        computed_key() {
          return !(this.key instanceof AST_SymbolMethod);
        }
      }, AST_ObjectProperty);
      var AST_ConciseMethod = DEFNODE("ConciseMethod", "quote static is_generator async", function AST_ConciseMethod2(props) {
        if (props) {
          this.quote = props.quote;
          this.static = props.static;
          this.is_generator = props.is_generator;
          this.async = props.async;
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
          this._annotations = props._annotations;
        }
        this.flags = 0;
      }, {
        $propdoc: {
          quote: "[string|undefined] the original quote character, if any",
          static: "[boolean] is this method static (classes only)",
          is_generator: "[boolean] is this a generator method",
          async: "[boolean] is this method async"
        },
        $documentation: "An ES6 concise method inside an object or class",
        computed_key() {
          return !(this.key instanceof AST_SymbolMethod);
        }
      }, AST_ObjectProperty);
      var AST_PrivateMethod = DEFNODE("PrivateMethod", "", function AST_PrivateMethod2(props) {
        if (props) {
          this.quote = props.quote;
          this.static = props.static;
          this.is_generator = props.is_generator;
          this.async = props.async;
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A private class method inside a class"
      }, AST_ConciseMethod);
      var AST_Class = DEFNODE("Class", "name extends properties", function AST_Class2(props) {
        if (props) {
          this.name = props.name;
          this.extends = props.extends;
          this.properties = props.properties;
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $propdoc: {
          name: "[AST_SymbolClass|AST_SymbolDefClass?] optional class name.",
          extends: "[AST_Node]? optional parent class",
          properties: "[AST_ObjectProperty*] array of properties"
        },
        $documentation: "An ES6 class",
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            if (this.name) {
              this.name._walk(visitor);
            }
            if (this.extends) {
              this.extends._walk(visitor);
            }
            this.properties.forEach((prop) => prop._walk(visitor));
          });
        },
        _children_backwards(push2) {
          let i = this.properties.length;
          while (i--)
            push2(this.properties[i]);
          if (this.extends)
            push2(this.extends);
          if (this.name)
            push2(this.name);
        },
        visit_nondeferred_class_parts(visitor) {
          if (this.extends) {
            this.extends._walk(visitor);
          }
          this.properties.forEach((prop) => {
            if (prop instanceof AST_ClassStaticBlock) {
              prop._walk(visitor);
              return;
            }
            if (prop.computed_key()) {
              visitor.push(prop);
              prop.key._walk(visitor);
              visitor.pop();
            }
            if ((prop instanceof AST_ClassPrivateProperty || prop instanceof AST_ClassProperty) && prop.static && prop.value) {
              visitor.push(prop);
              prop.value._walk(visitor);
              visitor.pop();
            }
          });
        },
        visit_deferred_class_parts(visitor) {
          this.properties.forEach((prop) => {
            if (prop instanceof AST_ConciseMethod) {
              prop.walk(visitor);
            } else if (prop instanceof AST_ClassProperty && !prop.static && prop.value) {
              visitor.push(prop);
              prop.value._walk(visitor);
              visitor.pop();
            }
          });
        }
      }, AST_Scope);
      var AST_ClassProperty = DEFNODE("ClassProperty", "static quote", function AST_ClassProperty2(props) {
        if (props) {
          this.static = props.static;
          this.quote = props.quote;
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
          this._annotations = props._annotations;
        }
        this.flags = 0;
      }, {
        $documentation: "A class property",
        $propdoc: {
          static: "[boolean] whether this is a static key",
          quote: "[string] which quote is being used"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            if (this.key instanceof AST_Node)
              this.key._walk(visitor);
            if (this.value instanceof AST_Node)
              this.value._walk(visitor);
          });
        },
        _children_backwards(push2) {
          if (this.value instanceof AST_Node)
            push2(this.value);
          if (this.key instanceof AST_Node)
            push2(this.key);
        },
        computed_key() {
          return !(this.key instanceof AST_SymbolClassProperty);
        }
      }, AST_ObjectProperty);
      var AST_ClassPrivateProperty = DEFNODE("ClassPrivateProperty", "", function AST_ClassPrivateProperty2(props) {
        if (props) {
          this.static = props.static;
          this.quote = props.quote;
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A class property for a private property"
      }, AST_ClassProperty);
      var AST_PrivateIn = DEFNODE("PrivateIn", "key value", function AST_PrivateIn2(props) {
        if (props) {
          this.key = props.key;
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "An `in` binop when the key is private, eg #x in this",
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            this.key._walk(visitor);
            this.value._walk(visitor);
          });
        },
        _children_backwards(push2) {
          push2(this.value);
          push2(this.key);
        }
      });
      var AST_DefClass = DEFNODE("DefClass", null, function AST_DefClass2(props) {
        if (props) {
          this.name = props.name;
          this.extends = props.extends;
          this.properties = props.properties;
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A class definition"
      }, AST_Class);
      var AST_ClassStaticBlock = DEFNODE("ClassStaticBlock", "body block_scope", function AST_ClassStaticBlock2(props) {
        this.body = props.body;
        this.block_scope = props.block_scope;
        this.start = props.start;
        this.end = props.end;
      }, {
        $documentation: "A block containing statements to be executed in the context of the class",
        $propdoc: {
          body: "[AST_Statement*] an array of statements"
        },
        _walk: function(visitor) {
          return visitor._visit(this, function() {
            walk_body(this, visitor);
          });
        },
        _children_backwards(push2) {
          let i = this.body.length;
          while (i--)
            push2(this.body[i]);
        },
        clone: clone_block_scope,
        computed_key: () => false
      }, AST_Scope);
      var AST_ClassExpression = DEFNODE("ClassExpression", null, function AST_ClassExpression2(props) {
        if (props) {
          this.name = props.name;
          this.extends = props.extends;
          this.properties = props.properties;
          this.variables = props.variables;
          this.uses_with = props.uses_with;
          this.uses_eval = props.uses_eval;
          this.parent_scope = props.parent_scope;
          this.enclosed = props.enclosed;
          this.cname = props.cname;
          this.body = props.body;
          this.block_scope = props.block_scope;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A class expression."
      }, AST_Class);
      var AST_Symbol = DEFNODE("Symbol", "scope name thedef", function AST_Symbol2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $propdoc: {
          name: "[string] name of this symbol",
          scope: "[AST_Scope/S] the current scope (not necessarily the definition scope)",
          thedef: "[SymbolDef/S] the definition of this symbol"
        },
        $documentation: "Base class for all symbols"
      });
      var AST_NewTarget = DEFNODE("NewTarget", null, function AST_NewTarget2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A reference to new.target"
      });
      var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", function AST_SymbolDeclaration2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A declaration symbol (symbol in var/const, function name or argument, symbol in catch)"
      }, AST_Symbol);
      var AST_SymbolVar = DEFNODE("SymbolVar", null, function AST_SymbolVar2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol defining a variable"
      }, AST_SymbolDeclaration);
      var AST_SymbolBlockDeclaration = DEFNODE("SymbolBlockDeclaration", null, function AST_SymbolBlockDeclaration2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for block-scoped declaration symbols"
      }, AST_SymbolDeclaration);
      var AST_SymbolConst = DEFNODE("SymbolConst", null, function AST_SymbolConst2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A constant declaration"
      }, AST_SymbolBlockDeclaration);
      var AST_SymbolLet = DEFNODE("SymbolLet", null, function AST_SymbolLet2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A block-scoped `let` declaration"
      }, AST_SymbolBlockDeclaration);
      var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, function AST_SymbolFunarg2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol naming a function argument"
      }, AST_SymbolVar);
      var AST_SymbolDefun = DEFNODE("SymbolDefun", null, function AST_SymbolDefun2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol defining a function"
      }, AST_SymbolDeclaration);
      var AST_SymbolMethod = DEFNODE("SymbolMethod", null, function AST_SymbolMethod2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol in an object defining a method"
      }, AST_Symbol);
      var AST_SymbolClassProperty = DEFNODE("SymbolClassProperty", null, function AST_SymbolClassProperty2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol for a class property"
      }, AST_Symbol);
      var AST_SymbolLambda = DEFNODE("SymbolLambda", null, function AST_SymbolLambda2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol naming a function expression"
      }, AST_SymbolDeclaration);
      var AST_SymbolDefClass = DEFNODE("SymbolDefClass", null, function AST_SymbolDefClass2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol naming a class's name in a class declaration. Lexically scoped to its containing scope, and accessible within the class."
      }, AST_SymbolBlockDeclaration);
      var AST_SymbolClass = DEFNODE("SymbolClass", null, function AST_SymbolClass2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol naming a class's name. Lexically scoped to the class."
      }, AST_SymbolDeclaration);
      var AST_SymbolCatch = DEFNODE("SymbolCatch", null, function AST_SymbolCatch2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol naming the exception in catch"
      }, AST_SymbolBlockDeclaration);
      var AST_SymbolImport = DEFNODE("SymbolImport", null, function AST_SymbolImport2(props) {
        if (props) {
          this.init = props.init;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol referring to an imported name"
      }, AST_SymbolBlockDeclaration);
      var AST_SymbolImportForeign = DEFNODE("SymbolImportForeign", null, function AST_SymbolImportForeign2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.quote = props.quote;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A symbol imported from a module, but it is defined in the other module, and its real name is irrelevant for this module's purposes"
      }, AST_Symbol);
      var AST_Label = DEFNODE("Label", "references", function AST_Label2(props) {
        if (props) {
          this.references = props.references;
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
          this.initialize();
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol naming a label (declaration)",
        $propdoc: {
          references: "[AST_LoopControl*] a list of nodes referring to this label"
        },
        initialize: function() {
          this.references = [];
          this.thedef = this;
        }
      }, AST_Symbol);
      var AST_SymbolRef = DEFNODE("SymbolRef", null, function AST_SymbolRef2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Reference to some symbol (not definition/declaration)"
      }, AST_Symbol);
      var AST_SymbolExport = DEFNODE("SymbolExport", null, function AST_SymbolExport2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.quote = props.quote;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Symbol referring to a name to export"
      }, AST_SymbolRef);
      var AST_SymbolExportForeign = DEFNODE("SymbolExportForeign", null, function AST_SymbolExportForeign2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.quote = props.quote;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A symbol exported from this module, but it is used in the other module, and its real name is irrelevant for this module's purposes"
      }, AST_Symbol);
      var AST_LabelRef = DEFNODE("LabelRef", null, function AST_LabelRef2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Reference to a label symbol"
      }, AST_Symbol);
      var AST_SymbolPrivateProperty = DEFNODE("SymbolPrivateProperty", null, function AST_SymbolPrivateProperty2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A symbol that refers to a private property"
      }, AST_Symbol);
      var AST_This = DEFNODE("This", null, function AST_This2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The `this` symbol"
      }, AST_Symbol);
      var AST_Super = DEFNODE("Super", null, function AST_Super2(props) {
        if (props) {
          this.scope = props.scope;
          this.name = props.name;
          this.thedef = props.thedef;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The `super` symbol"
      }, AST_This);
      var AST_Constant = DEFNODE("Constant", null, function AST_Constant2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for all constants",
        getValue: function() {
          return this.value;
        }
      });
      var AST_String = DEFNODE("String", "value quote", function AST_String2(props) {
        if (props) {
          this.value = props.value;
          this.quote = props.quote;
          this.start = props.start;
          this.end = props.end;
          this._annotations = props._annotations;
        }
        this.flags = 0;
      }, {
        $documentation: "A string literal",
        $propdoc: {
          value: "[string] the contents of this string",
          quote: "[string] the original quote character"
        }
      }, AST_Constant);
      var AST_Number = DEFNODE("Number", "value raw", function AST_Number2(props) {
        if (props) {
          this.value = props.value;
          this.raw = props.raw;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A number literal",
        $propdoc: {
          value: "[number] the numeric value",
          raw: "[string] numeric value as string"
        }
      }, AST_Constant);
      var AST_BigInt = DEFNODE("BigInt", "value", function AST_BigInt2(props) {
        if (props) {
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A big int literal",
        $propdoc: {
          value: "[string] big int value"
        }
      }, AST_Constant);
      var AST_RegExp = DEFNODE("RegExp", "value", function AST_RegExp2(props) {
        if (props) {
          this.value = props.value;
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A regexp literal",
        $propdoc: {
          value: "[RegExp] the actual regexp"
        }
      }, AST_Constant);
      var AST_Atom = DEFNODE("Atom", null, function AST_Atom2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for atoms"
      }, AST_Constant);
      var AST_Null = DEFNODE("Null", null, function AST_Null2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The `null` atom",
        value: null
      }, AST_Atom);
      var AST_NaN = DEFNODE("NaN", null, function AST_NaN2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The impossible value",
        value: 0 / 0
      }, AST_Atom);
      var AST_Undefined = DEFNODE("Undefined", null, function AST_Undefined2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The `undefined` value",
        value: function() {
        }()
      }, AST_Atom);
      var AST_Hole = DEFNODE("Hole", null, function AST_Hole2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "A hole in an array",
        value: function() {
        }()
      }, AST_Atom);
      var AST_Infinity = DEFNODE("Infinity", null, function AST_Infinity2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The `Infinity` value",
        value: 1 / 0
      }, AST_Atom);
      var AST_Boolean = DEFNODE("Boolean", null, function AST_Boolean2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "Base class for booleans"
      }, AST_Atom);
      var AST_False = DEFNODE("False", null, function AST_False2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The `false` atom",
        value: false
      }, AST_Boolean);
      var AST_True = DEFNODE("True", null, function AST_True2(props) {
        if (props) {
          this.start = props.start;
          this.end = props.end;
        }
        this.flags = 0;
      }, {
        $documentation: "The `true` atom",
        value: true
      }, AST_Boolean);
      function walk(node, cb, to_visit = [node]) {
        const push2 = to_visit.push.bind(to_visit);
        while (to_visit.length) {
          const node2 = to_visit.pop();
          const ret = cb(node2, to_visit);
          if (ret) {
            if (ret === walk_abort)
              return true;
            continue;
          }
          node2._children_backwards(push2);
        }
        return false;
      }
      function walk_parent(node, cb, initial_stack) {
        const to_visit = [node];
        const push2 = to_visit.push.bind(to_visit);
        const stack = initial_stack ? initial_stack.slice() : [];
        const parent_pop_indices = [];
        let current;
        const info = {
          parent: (n = 0) => {
            if (n === -1) {
              return current;
            }
            if (initial_stack && n >= stack.length) {
              n -= stack.length;
              return initial_stack[initial_stack.length - (n + 1)];
            }
            return stack[stack.length - (1 + n)];
          }
        };
        while (to_visit.length) {
          current = to_visit.pop();
          while (parent_pop_indices.length && to_visit.length == parent_pop_indices[parent_pop_indices.length - 1]) {
            stack.pop();
            parent_pop_indices.pop();
          }
          const ret = cb(current, info);
          if (ret) {
            if (ret === walk_abort)
              return true;
            continue;
          }
          const visit_length = to_visit.length;
          current._children_backwards(push2);
          if (to_visit.length > visit_length) {
            stack.push(current);
            parent_pop_indices.push(visit_length - 1);
          }
        }
        return false;
      }
      const walk_abort = Symbol("abort walk");
      class TreeWalker {
        constructor(callback) {
          this.visit = callback;
          this.stack = [];
          this.directives = /* @__PURE__ */ Object.create(null);
        }
        _visit(node, descend) {
          this.push(node);
          var ret = this.visit(node, descend ? function() {
            descend.call(node);
          } : noop);
          if (!ret && descend) {
            descend.call(node);
          }
          this.pop();
          return ret;
        }
        parent(n) {
          return this.stack[this.stack.length - 2 - (n || 0)];
        }
        push(node) {
          if (node instanceof AST_Lambda) {
            this.directives = Object.create(this.directives);
          } else if (node instanceof AST_Directive && !this.directives[node.value]) {
            this.directives[node.value] = node;
          } else if (node instanceof AST_Class) {
            this.directives = Object.create(this.directives);
            if (!this.directives["use strict"]) {
              this.directives["use strict"] = node;
            }
          }
          this.stack.push(node);
        }
        pop() {
          var node = this.stack.pop();
          if (node instanceof AST_Lambda || node instanceof AST_Class) {
            this.directives = Object.getPrototypeOf(this.directives);
          }
        }
        self() {
          return this.stack[this.stack.length - 1];
        }
        find_parent(type) {
          var stack = this.stack;
          for (var i = stack.length; --i >= 0; ) {
            var x = stack[i];
            if (x instanceof type)
              return x;
          }
        }
        find_scope() {
          var stack = this.stack;
          for (var i = stack.length; --i >= 0; ) {
            const p = stack[i];
            if (p instanceof AST_Toplevel)
              return p;
            if (p instanceof AST_Lambda)
              return p;
            if (p.block_scope)
              return p.block_scope;
          }
        }
        has_directive(type) {
          var dir = this.directives[type];
          if (dir)
            return dir;
          var node = this.stack[this.stack.length - 1];
          if (node instanceof AST_Scope && node.body) {
            for (var i = 0; i < node.body.length; ++i) {
              var st = node.body[i];
              if (!(st instanceof AST_Directive))
                break;
              if (st.value == type)
                return st;
            }
          }
        }
        loopcontrol_target(node) {
          var stack = this.stack;
          if (node.label)
            for (var i = stack.length; --i >= 0; ) {
              var x = stack[i];
              if (x instanceof AST_LabeledStatement && x.label.name == node.label.name)
                return x.body;
            }
          else
            for (var i = stack.length; --i >= 0; ) {
              var x = stack[i];
              if (x instanceof AST_IterationStatement || node instanceof AST_Break && x instanceof AST_Switch)
                return x;
            }
        }
      }
      class TreeTransformer extends TreeWalker {
        constructor(before, after) {
          super();
          this.before = before;
          this.after = after;
        }
      }
      const _PURE = 1;
      const _INLINE = 2;
      const _NOINLINE = 4;
      const _KEY = 8;
      const _MANGLEPROP = 16;
      function def_transform(node, descend) {
        node.DEFMETHOD("transform", function(tw, in_list) {
          let transformed = void 0;
          tw.push(this);
          if (tw.before)
            transformed = tw.before(this, descend, in_list);
          if (transformed === void 0) {
            transformed = this;
            descend(transformed, tw);
            if (tw.after) {
              const after_ret = tw.after(transformed, in_list);
              if (after_ret !== void 0)
                transformed = after_ret;
            }
          }
          tw.pop();
          return transformed;
        });
      }
      def_transform(AST_Node, noop);
      def_transform(AST_LabeledStatement, function(self2, tw) {
        self2.label = self2.label.transform(tw);
        self2.body = self2.body.transform(tw);
      });
      def_transform(AST_SimpleStatement, function(self2, tw) {
        self2.body = self2.body.transform(tw);
      });
      def_transform(AST_Block, function(self2, tw) {
        self2.body = MAP(self2.body, tw);
      });
      def_transform(AST_Do, function(self2, tw) {
        self2.body = self2.body.transform(tw);
        self2.condition = self2.condition.transform(tw);
      });
      def_transform(AST_While, function(self2, tw) {
        self2.condition = self2.condition.transform(tw);
        self2.body = self2.body.transform(tw);
      });
      def_transform(AST_For, function(self2, tw) {
        if (self2.init)
          self2.init = self2.init.transform(tw);
        if (self2.condition)
          self2.condition = self2.condition.transform(tw);
        if (self2.step)
          self2.step = self2.step.transform(tw);
        self2.body = self2.body.transform(tw);
      });
      def_transform(AST_ForIn, function(self2, tw) {
        self2.init = self2.init.transform(tw);
        self2.object = self2.object.transform(tw);
        self2.body = self2.body.transform(tw);
      });
      def_transform(AST_With, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
        self2.body = self2.body.transform(tw);
      });
      def_transform(AST_Exit, function(self2, tw) {
        if (self2.value)
          self2.value = self2.value.transform(tw);
      });
      def_transform(AST_LoopControl, function(self2, tw) {
        if (self2.label)
          self2.label = self2.label.transform(tw);
      });
      def_transform(AST_If, function(self2, tw) {
        self2.condition = self2.condition.transform(tw);
        self2.body = self2.body.transform(tw);
        if (self2.alternative)
          self2.alternative = self2.alternative.transform(tw);
      });
      def_transform(AST_Switch, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
        self2.body = MAP(self2.body, tw);
      });
      def_transform(AST_Case, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
        self2.body = MAP(self2.body, tw);
      });
      def_transform(AST_Try, function(self2, tw) {
        self2.body = self2.body.transform(tw);
        if (self2.bcatch)
          self2.bcatch = self2.bcatch.transform(tw);
        if (self2.bfinally)
          self2.bfinally = self2.bfinally.transform(tw);
      });
      def_transform(AST_Catch, function(self2, tw) {
        if (self2.argname)
          self2.argname = self2.argname.transform(tw);
        self2.body = MAP(self2.body, tw);
      });
      def_transform(AST_Definitions, function(self2, tw) {
        self2.definitions = MAP(self2.definitions, tw);
      });
      def_transform(AST_VarDef, function(self2, tw) {
        self2.name = self2.name.transform(tw);
        if (self2.value)
          self2.value = self2.value.transform(tw);
      });
      def_transform(AST_Destructuring, function(self2, tw) {
        self2.names = MAP(self2.names, tw);
      });
      def_transform(AST_Lambda, function(self2, tw) {
        if (self2.name)
          self2.name = self2.name.transform(tw);
        self2.argnames = MAP(self2.argnames, tw, false);
        if (self2.body instanceof AST_Node) {
          self2.body = self2.body.transform(tw);
        } else {
          self2.body = MAP(self2.body, tw);
        }
      });
      def_transform(AST_Call, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
        self2.args = MAP(self2.args, tw, false);
      });
      def_transform(AST_Sequence, function(self2, tw) {
        const result = MAP(self2.expressions, tw);
        self2.expressions = result.length ? result : [new AST_Number({ value: 0 })];
      });
      def_transform(AST_PropAccess, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
      });
      def_transform(AST_Sub, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
        self2.property = self2.property.transform(tw);
      });
      def_transform(AST_Chain, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
      });
      def_transform(AST_Yield, function(self2, tw) {
        if (self2.expression)
          self2.expression = self2.expression.transform(tw);
      });
      def_transform(AST_Await, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
      });
      def_transform(AST_Unary, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
      });
      def_transform(AST_Binary, function(self2, tw) {
        self2.left = self2.left.transform(tw);
        self2.right = self2.right.transform(tw);
      });
      def_transform(AST_PrivateIn, function(self2, tw) {
        self2.key = self2.key.transform(tw);
        self2.value = self2.value.transform(tw);
      });
      def_transform(AST_Conditional, function(self2, tw) {
        self2.condition = self2.condition.transform(tw);
        self2.consequent = self2.consequent.transform(tw);
        self2.alternative = self2.alternative.transform(tw);
      });
      def_transform(AST_Array, function(self2, tw) {
        self2.elements = MAP(self2.elements, tw);
      });
      def_transform(AST_Object, function(self2, tw) {
        self2.properties = MAP(self2.properties, tw);
      });
      def_transform(AST_ObjectProperty, function(self2, tw) {
        if (self2.key instanceof AST_Node) {
          self2.key = self2.key.transform(tw);
        }
        if (self2.value)
          self2.value = self2.value.transform(tw);
      });
      def_transform(AST_Class, function(self2, tw) {
        if (self2.name)
          self2.name = self2.name.transform(tw);
        if (self2.extends)
          self2.extends = self2.extends.transform(tw);
        self2.properties = MAP(self2.properties, tw);
      });
      def_transform(AST_ClassStaticBlock, function(self2, tw) {
        self2.body = MAP(self2.body, tw);
      });
      def_transform(AST_Expansion, function(self2, tw) {
        self2.expression = self2.expression.transform(tw);
      });
      def_transform(AST_NameMapping, function(self2, tw) {
        self2.foreign_name = self2.foreign_name.transform(tw);
        self2.name = self2.name.transform(tw);
      });
      def_transform(AST_Import, function(self2, tw) {
        if (self2.imported_name)
          self2.imported_name = self2.imported_name.transform(tw);
        if (self2.imported_names)
          MAP(self2.imported_names, tw);
        self2.module_name = self2.module_name.transform(tw);
      });
      def_transform(AST_Export, function(self2, tw) {
        if (self2.exported_definition)
          self2.exported_definition = self2.exported_definition.transform(tw);
        if (self2.exported_value)
          self2.exported_value = self2.exported_value.transform(tw);
        if (self2.exported_names)
          MAP(self2.exported_names, tw);
        if (self2.module_name)
          self2.module_name = self2.module_name.transform(tw);
      });
      def_transform(AST_TemplateString, function(self2, tw) {
        self2.segments = MAP(self2.segments, tw);
      });
      def_transform(AST_PrefixedTemplateString, function(self2, tw) {
        self2.prefix = self2.prefix.transform(tw);
        self2.template_string = self2.template_string.transform(tw);
      });
      (function() {
        var normalize_directives = function(body) {
          for (var i = 0; i < body.length; i++) {
            if (body[i] instanceof AST_Statement && body[i].body instanceof AST_String) {
              body[i] = new AST_Directive({
                start: body[i].start,
                end: body[i].end,
                value: body[i].body.value
              });
            } else {
              return body;
            }
          }
          return body;
        };
        const assert_clause_from_moz = (assertions) => {
          if (assertions && assertions.length > 0) {
            return new AST_Object({
              start: my_start_token(assertions),
              end: my_end_token(assertions),
              properties: assertions.map((assertion_kv) => new AST_ObjectKeyVal({
                start: my_start_token(assertion_kv),
                end: my_end_token(assertion_kv),
                key: assertion_kv.key.name || assertion_kv.key.value,
                value: from_moz(assertion_kv.value)
              }))
            });
          }
          return null;
        };
        var MOZ_TO_ME = {
          Program: function(M) {
            return new AST_Toplevel({
              start: my_start_token(M),
              end: my_end_token(M),
              body: normalize_directives(M.body.map(from_moz))
            });
          },
          ArrayPattern: function(M) {
            return new AST_Destructuring({
              start: my_start_token(M),
              end: my_end_token(M),
              names: M.elements.map(function(elm) {
                if (elm === null) {
                  return new AST_Hole();
                }
                return from_moz(elm);
              }),
              is_array: true
            });
          },
          ObjectPattern: function(M) {
            return new AST_Destructuring({
              start: my_start_token(M),
              end: my_end_token(M),
              names: M.properties.map(from_moz),
              is_array: false
            });
          },
          AssignmentPattern: function(M) {
            return new AST_DefaultAssign({
              start: my_start_token(M),
              end: my_end_token(M),
              left: from_moz(M.left),
              operator: "=",
              right: from_moz(M.right)
            });
          },
          SpreadElement: function(M) {
            return new AST_Expansion({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.argument)
            });
          },
          RestElement: function(M) {
            return new AST_Expansion({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.argument)
            });
          },
          TemplateElement: function(M) {
            return new AST_TemplateSegment({
              start: my_start_token(M),
              end: my_end_token(M),
              value: M.value.cooked,
              raw: M.value.raw
            });
          },
          TemplateLiteral: function(M) {
            var segments = [];
            for (var i = 0; i < M.quasis.length; i++) {
              segments.push(from_moz(M.quasis[i]));
              if (M.expressions[i]) {
                segments.push(from_moz(M.expressions[i]));
              }
            }
            return new AST_TemplateString({
              start: my_start_token(M),
              end: my_end_token(M),
              segments
            });
          },
          TaggedTemplateExpression: function(M) {
            return new AST_PrefixedTemplateString({
              start: my_start_token(M),
              end: my_end_token(M),
              template_string: from_moz(M.quasi),
              prefix: from_moz(M.tag)
            });
          },
          FunctionDeclaration: function(M) {
            return new AST_Defun({
              start: my_start_token(M),
              end: my_end_token(M),
              name: from_moz(M.id),
              argnames: M.params.map(from_moz),
              is_generator: M.generator,
              async: M.async,
              body: normalize_directives(from_moz(M.body).body)
            });
          },
          FunctionExpression: function(M) {
            return new AST_Function({
              start: my_start_token(M),
              end: my_end_token(M),
              name: from_moz(M.id),
              argnames: M.params.map(from_moz),
              is_generator: M.generator,
              async: M.async,
              body: normalize_directives(from_moz(M.body).body)
            });
          },
          ArrowFunctionExpression: function(M) {
            const body = M.body.type === "BlockStatement" ? from_moz(M.body).body : [make_node(AST_Return, {}, { value: from_moz(M.body) })];
            return new AST_Arrow({
              start: my_start_token(M),
              end: my_end_token(M),
              argnames: M.params.map(from_moz),
              body,
              async: M.async
            });
          },
          ExpressionStatement: function(M) {
            return new AST_SimpleStatement({
              start: my_start_token(M),
              end: my_end_token(M),
              body: from_moz(M.expression)
            });
          },
          TryStatement: function(M) {
            var handlers = M.handlers || [M.handler];
            if (handlers.length > 1 || M.guardedHandlers && M.guardedHandlers.length) {
              throw new Error("Multiple catch clauses are not supported.");
            }
            return new AST_Try({
              start: my_start_token(M),
              end: my_end_token(M),
              body: new AST_TryBlock(from_moz(M.block)),
              bcatch: from_moz(handlers[0]),
              bfinally: M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null
            });
          },
          Property: function(M) {
            var key = M.key;
            var args = {
              start: my_start_token(key || M.value),
              end: my_end_token(M.value),
              key: key.type == "Identifier" ? key.name : key.value,
              value: from_moz(M.value)
            };
            if (M.computed) {
              args.key = from_moz(M.key);
            }
            if (M.method) {
              args.is_generator = M.value.generator;
              args.async = M.value.async;
              if (!M.computed) {
                args.key = new AST_SymbolMethod({ name: args.key });
              } else {
                args.key = from_moz(M.key);
              }
              return new AST_ConciseMethod(args);
            }
            if (M.kind == "init") {
              if (key.type != "Identifier" && key.type != "Literal") {
                args.key = from_moz(key);
              }
              return new AST_ObjectKeyVal(args);
            }
            if (typeof args.key === "string" || typeof args.key === "number") {
              args.key = new AST_SymbolMethod({
                name: args.key
              });
            }
            args.value = new AST_Accessor(args.value);
            if (M.kind == "get")
              return new AST_ObjectGetter(args);
            if (M.kind == "set")
              return new AST_ObjectSetter(args);
            if (M.kind == "method") {
              args.async = M.value.async;
              args.is_generator = M.value.generator;
              args.quote = M.computed ? '"' : null;
              return new AST_ConciseMethod(args);
            }
          },
          MethodDefinition: function(M) {
            const is_private = M.key.type === "PrivateIdentifier";
            const key = M.computed ? from_moz(M.key) : new AST_SymbolMethod({ name: M.key.name || M.key.value });
            var args = {
              start: my_start_token(M),
              end: my_end_token(M),
              key,
              value: from_moz(M.value),
              static: M.static
            };
            if (M.kind == "get") {
              return new (is_private ? AST_PrivateGetter : AST_ObjectGetter)(args);
            }
            if (M.kind == "set") {
              return new (is_private ? AST_PrivateSetter : AST_ObjectSetter)(args);
            }
            args.is_generator = M.value.generator;
            args.async = M.value.async;
            return new (is_private ? AST_PrivateMethod : AST_ConciseMethod)(args);
          },
          FieldDefinition: function(M) {
            let key;
            if (M.computed) {
              key = from_moz(M.key);
            } else {
              if (M.key.type !== "Identifier")
                throw new Error("Non-Identifier key in FieldDefinition");
              key = from_moz(M.key);
            }
            return new AST_ClassProperty({
              start: my_start_token(M),
              end: my_end_token(M),
              key,
              value: from_moz(M.value),
              static: M.static
            });
          },
          PropertyDefinition: function(M) {
            let key;
            if (M.computed) {
              key = from_moz(M.key);
            } else if (M.key.type === "PrivateIdentifier") {
              return new AST_ClassPrivateProperty({
                start: my_start_token(M),
                end: my_end_token(M),
                key: from_moz(M.key),
                value: from_moz(M.value),
                static: M.static
              });
            } else {
              if (M.key.type !== "Identifier") {
                throw new Error("Non-Identifier key in PropertyDefinition");
              }
              key = from_moz(M.key);
            }
            return new AST_ClassProperty({
              start: my_start_token(M),
              end: my_end_token(M),
              key,
              value: from_moz(M.value),
              static: M.static
            });
          },
          PrivateIdentifier: function(M) {
            return new AST_SymbolPrivateProperty({
              start: my_start_token(M),
              end: my_end_token(M),
              name: M.name
            });
          },
          StaticBlock: function(M) {
            return new AST_ClassStaticBlock({
              start: my_start_token(M),
              end: my_end_token(M),
              body: M.body.map(from_moz)
            });
          },
          ArrayExpression: function(M) {
            return new AST_Array({
              start: my_start_token(M),
              end: my_end_token(M),
              elements: M.elements.map(function(elem) {
                return elem === null ? new AST_Hole() : from_moz(elem);
              })
            });
          },
          ObjectExpression: function(M) {
            return new AST_Object({
              start: my_start_token(M),
              end: my_end_token(M),
              properties: M.properties.map(function(prop) {
                if (prop.type === "SpreadElement") {
                  return from_moz(prop);
                }
                prop.type = "Property";
                return from_moz(prop);
              })
            });
          },
          SequenceExpression: function(M) {
            return new AST_Sequence({
              start: my_start_token(M),
              end: my_end_token(M),
              expressions: M.expressions.map(from_moz)
            });
          },
          MemberExpression: function(M) {
            if (M.property.type === "PrivateIdentifier") {
              return new AST_DotHash({
                start: my_start_token(M),
                end: my_end_token(M),
                property: M.property.name,
                expression: from_moz(M.object),
                optional: M.optional || false
              });
            }
            return new (M.computed ? AST_Sub : AST_Dot)({
              start: my_start_token(M),
              end: my_end_token(M),
              property: M.computed ? from_moz(M.property) : M.property.name,
              expression: from_moz(M.object),
              optional: M.optional || false
            });
          },
          ChainExpression: function(M) {
            return new AST_Chain({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.expression)
            });
          },
          SwitchCase: function(M) {
            return new (M.test ? AST_Case : AST_Default)({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.test),
              body: M.consequent.map(from_moz)
            });
          },
          VariableDeclaration: function(M) {
            return new (M.kind === "const" ? AST_Const : M.kind === "let" ? AST_Let : AST_Var)({
              start: my_start_token(M),
              end: my_end_token(M),
              definitions: M.declarations.map(from_moz)
            });
          },
          ImportDeclaration: function(M) {
            var imported_name = null;
            var imported_names = null;
            M.specifiers.forEach(function(specifier) {
              if (specifier.type === "ImportSpecifier" || specifier.type === "ImportNamespaceSpecifier") {
                if (!imported_names) {
                  imported_names = [];
                }
                imported_names.push(from_moz(specifier));
              } else if (specifier.type === "ImportDefaultSpecifier") {
                imported_name = from_moz(specifier);
              }
            });
            return new AST_Import({
              start: my_start_token(M),
              end: my_end_token(M),
              imported_name,
              imported_names,
              module_name: from_moz(M.source),
              assert_clause: assert_clause_from_moz(M.assertions)
            });
          },
          ImportSpecifier: function(M) {
            return new AST_NameMapping({
              start: my_start_token(M),
              end: my_end_token(M),
              foreign_name: from_moz(M.imported),
              name: from_moz(M.local)
            });
          },
          ImportDefaultSpecifier: function(M) {
            return from_moz(M.local);
          },
          ImportNamespaceSpecifier: function(M) {
            return new AST_NameMapping({
              start: my_start_token(M),
              end: my_end_token(M),
              foreign_name: new AST_SymbolImportForeign({ name: "*" }),
              name: from_moz(M.local)
            });
          },
          ExportAllDeclaration: function(M) {
            var foreign_name = M.exported == null ? new AST_SymbolExportForeign({ name: "*" }) : from_moz(M.exported);
            return new AST_Export({
              start: my_start_token(M),
              end: my_end_token(M),
              exported_names: [
                new AST_NameMapping({
                  name: new AST_SymbolExportForeign({ name: "*" }),
                  foreign_name
                })
              ],
              module_name: from_moz(M.source),
              assert_clause: assert_clause_from_moz(M.assertions)
            });
          },
          ExportNamedDeclaration: function(M) {
            return new AST_Export({
              start: my_start_token(M),
              end: my_end_token(M),
              exported_definition: from_moz(M.declaration),
              exported_names: M.specifiers && M.specifiers.length ? M.specifiers.map(function(specifier) {
                return from_moz(specifier);
              }) : null,
              module_name: from_moz(M.source),
              assert_clause: assert_clause_from_moz(M.assertions)
            });
          },
          ExportDefaultDeclaration: function(M) {
            return new AST_Export({
              start: my_start_token(M),
              end: my_end_token(M),
              exported_value: from_moz(M.declaration),
              is_default: true
            });
          },
          ExportSpecifier: function(M) {
            return new AST_NameMapping({
              foreign_name: from_moz(M.exported),
              name: from_moz(M.local)
            });
          },
          Literal: function(M) {
            var val = M.value, args = {
              start: my_start_token(M),
              end: my_end_token(M)
            };
            var rx = M.regex;
            if (rx && rx.pattern) {
              args.value = {
                source: rx.pattern,
                flags: rx.flags
              };
              return new AST_RegExp(args);
            } else if (rx) {
              const rx_source = M.raw || val;
              const match = rx_source.match(/^\/(.*)\/(\w*)$/);
              if (!match)
                throw new Error("Invalid regex source " + rx_source);
              const [_, source, flags] = match;
              args.value = { source, flags };
              return new AST_RegExp(args);
            }
            if (val === null)
              return new AST_Null(args);
            switch (typeof val) {
              case "string":
                args.quote = '"';
                var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2];
                if (p.type == "ImportSpecifier") {
                  args.name = val;
                  return new AST_SymbolImportForeign(args);
                } else if (p.type == "ExportSpecifier") {
                  args.name = val;
                  if (M == p.exported) {
                    return new AST_SymbolExportForeign(args);
                  } else {
                    return new AST_SymbolExport(args);
                  }
                } else if (p.type == "ExportAllDeclaration" && M == p.exported) {
                  args.name = val;
                  return new AST_SymbolExportForeign(args);
                }
                args.value = val;
                return new AST_String(args);
              case "number":
                args.value = val;
                args.raw = M.raw || val.toString();
                return new AST_Number(args);
              case "boolean":
                return new (val ? AST_True : AST_False)(args);
            }
          },
          MetaProperty: function(M) {
            if (M.meta.name === "new" && M.property.name === "target") {
              return new AST_NewTarget({
                start: my_start_token(M),
                end: my_end_token(M)
              });
            } else if (M.meta.name === "import" && M.property.name === "meta") {
              return new AST_ImportMeta({
                start: my_start_token(M),
                end: my_end_token(M)
              });
            }
          },
          Identifier: function(M) {
            var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2];
            return new (p.type == "LabeledStatement" ? AST_Label : p.type == "VariableDeclarator" && p.id === M ? p.kind == "const" ? AST_SymbolConst : p.kind == "let" ? AST_SymbolLet : AST_SymbolVar : /Import.*Specifier/.test(p.type) ? p.local === M ? AST_SymbolImport : AST_SymbolImportForeign : p.type == "ExportSpecifier" ? p.local === M ? AST_SymbolExport : AST_SymbolExportForeign : p.type == "FunctionExpression" ? p.id === M ? AST_SymbolLambda : AST_SymbolFunarg : p.type == "FunctionDeclaration" ? p.id === M ? AST_SymbolDefun : AST_SymbolFunarg : p.type == "ArrowFunctionExpression" ? p.params.includes(M) ? AST_SymbolFunarg : AST_SymbolRef : p.type == "ClassExpression" ? p.id === M ? AST_SymbolClass : AST_SymbolRef : p.type == "Property" ? p.key === M && p.computed || p.value === M ? AST_SymbolRef : AST_SymbolMethod : p.type == "PropertyDefinition" || p.type === "FieldDefinition" ? p.key === M && p.computed || p.value === M ? AST_SymbolRef : AST_SymbolClassProperty : p.type == "ClassDeclaration" ? p.id === M ? AST_SymbolDefClass : AST_SymbolRef : p.type == "MethodDefinition" ? p.computed ? AST_SymbolRef : AST_SymbolMethod : p.type == "CatchClause" ? AST_SymbolCatch : p.type == "BreakStatement" || p.type == "ContinueStatement" ? AST_LabelRef : AST_SymbolRef)({
              start: my_start_token(M),
              end: my_end_token(M),
              name: M.name
            });
          },
          BigIntLiteral(M) {
            return new AST_BigInt({
              start: my_start_token(M),
              end: my_end_token(M),
              value: M.value
            });
          },
          EmptyStatement: function(M) {
            return new AST_EmptyStatement({
              start: my_start_token(M),
              end: my_end_token(M)
            });
          },
          BlockStatement: function(M) {
            return new AST_BlockStatement({
              start: my_start_token(M),
              end: my_end_token(M),
              body: M.body.map(from_moz)
            });
          },
          IfStatement: function(M) {
            return new AST_If({
              start: my_start_token(M),
              end: my_end_token(M),
              condition: from_moz(M.test),
              body: from_moz(M.consequent),
              alternative: from_moz(M.alternate)
            });
          },
          LabeledStatement: function(M) {
            return new AST_LabeledStatement({
              start: my_start_token(M),
              end: my_end_token(M),
              label: from_moz(M.label),
              body: from_moz(M.body)
            });
          },
          BreakStatement: function(M) {
            return new AST_Break({
              start: my_start_token(M),
              end: my_end_token(M),
              label: from_moz(M.label)
            });
          },
          ContinueStatement: function(M) {
            return new AST_Continue({
              start: my_start_token(M),
              end: my_end_token(M),
              label: from_moz(M.label)
            });
          },
          WithStatement: function(M) {
            return new AST_With({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.object),
              body: from_moz(M.body)
            });
          },
          SwitchStatement: function(M) {
            return new AST_Switch({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.discriminant),
              body: M.cases.map(from_moz)
            });
          },
          ReturnStatement: function(M) {
            return new AST_Return({
              start: my_start_token(M),
              end: my_end_token(M),
              value: from_moz(M.argument)
            });
          },
          ThrowStatement: function(M) {
            return new AST_Throw({
              start: my_start_token(M),
              end: my_end_token(M),
              value: from_moz(M.argument)
            });
          },
          WhileStatement: function(M) {
            return new AST_While({
              start: my_start_token(M),
              end: my_end_token(M),
              condition: from_moz(M.test),
              body: from_moz(M.body)
            });
          },
          DoWhileStatement: function(M) {
            return new AST_Do({
              start: my_start_token(M),
              end: my_end_token(M),
              condition: from_moz(M.test),
              body: from_moz(M.body)
            });
          },
          ForStatement: function(M) {
            return new AST_For({
              start: my_start_token(M),
              end: my_end_token(M),
              init: from_moz(M.init),
              condition: from_moz(M.test),
              step: from_moz(M.update),
              body: from_moz(M.body)
            });
          },
          ForInStatement: function(M) {
            return new AST_ForIn({
              start: my_start_token(M),
              end: my_end_token(M),
              init: from_moz(M.left),
              object: from_moz(M.right),
              body: from_moz(M.body)
            });
          },
          ForOfStatement: function(M) {
            return new AST_ForOf({
              start: my_start_token(M),
              end: my_end_token(M),
              init: from_moz(M.left),
              object: from_moz(M.right),
              body: from_moz(M.body),
              await: M.await
            });
          },
          AwaitExpression: function(M) {
            return new AST_Await({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.argument)
            });
          },
          YieldExpression: function(M) {
            return new AST_Yield({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.argument),
              is_star: M.delegate
            });
          },
          DebuggerStatement: function(M) {
            return new AST_Debugger({
              start: my_start_token(M),
              end: my_end_token(M)
            });
          },
          VariableDeclarator: function(M) {
            return new AST_VarDef({
              start: my_start_token(M),
              end: my_end_token(M),
              name: from_moz(M.id),
              value: from_moz(M.init)
            });
          },
          CatchClause: function(M) {
            return new AST_Catch({
              start: my_start_token(M),
              end: my_end_token(M),
              argname: from_moz(M.param),
              body: from_moz(M.body).body
            });
          },
          ThisExpression: function(M) {
            return new AST_This({
              start: my_start_token(M),
              end: my_end_token(M)
            });
          },
          Super: function(M) {
            return new AST_Super({
              start: my_start_token(M),
              end: my_end_token(M)
            });
          },
          BinaryExpression: function(M) {
            if (M.left.type === "PrivateIdentifier") {
              return new AST_PrivateIn({
                start: my_start_token(M),
                end: my_end_token(M),
                key: new AST_SymbolPrivateProperty({
                  start: my_start_token(M.left),
                  end: my_end_token(M.left),
                  name: M.left.name
                }),
                value: from_moz(M.right)
              });
            }
            return new AST_Binary({
              start: my_start_token(M),
              end: my_end_token(M),
              operator: M.operator,
              left: from_moz(M.left),
              right: from_moz(M.right)
            });
          },
          LogicalExpression: function(M) {
            return new AST_Binary({
              start: my_start_token(M),
              end: my_end_token(M),
              operator: M.operator,
              left: from_moz(M.left),
              right: from_moz(M.right)
            });
          },
          AssignmentExpression: function(M) {
            return new AST_Assign({
              start: my_start_token(M),
              end: my_end_token(M),
              operator: M.operator,
              left: from_moz(M.left),
              right: from_moz(M.right)
            });
          },
          ConditionalExpression: function(M) {
            return new AST_Conditional({
              start: my_start_token(M),
              end: my_end_token(M),
              condition: from_moz(M.test),
              consequent: from_moz(M.consequent),
              alternative: from_moz(M.alternate)
            });
          },
          NewExpression: function(M) {
            return new AST_New({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.callee),
              args: M.arguments.map(from_moz)
            });
          },
          CallExpression: function(M) {
            return new AST_Call({
              start: my_start_token(M),
              end: my_end_token(M),
              expression: from_moz(M.callee),
              optional: M.optional,
              args: M.arguments.map(from_moz)
            });
          }
        };
        MOZ_TO_ME.UpdateExpression = MOZ_TO_ME.UnaryExpression = function To_Moz_Unary(M) {
          var prefix = "prefix" in M ? M.prefix : M.type == "UnaryExpression" ? true : false;
          return new (prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({
            start: my_start_token(M),
            end: my_end_token(M),
            operator: M.operator,
            expression: from_moz(M.argument)
          });
        };
        MOZ_TO_ME.ClassDeclaration = MOZ_TO_ME.ClassExpression = function From_Moz_Class(M) {
          return new (M.type === "ClassDeclaration" ? AST_DefClass : AST_ClassExpression)({
            start: my_start_token(M),
            end: my_end_token(M),
            name: from_moz(M.id),
            extends: from_moz(M.superClass),
            properties: M.body.body.map(from_moz)
          });
        };
        def_to_moz(AST_EmptyStatement, function To_Moz_EmptyStatement() {
          return {
            type: "EmptyStatement"
          };
        });
        def_to_moz(AST_BlockStatement, function To_Moz_BlockStatement(M) {
          return {
            type: "BlockStatement",
            body: M.body.map(to_moz)
          };
        });
        def_to_moz(AST_If, function To_Moz_IfStatement(M) {
          return {
            type: "IfStatement",
            test: to_moz(M.condition),
            consequent: to_moz(M.body),
            alternate: to_moz(M.alternative)
          };
        });
        def_to_moz(AST_LabeledStatement, function To_Moz_LabeledStatement(M) {
          return {
            type: "LabeledStatement",
            label: to_moz(M.label),
            body: to_moz(M.body)
          };
        });
        def_to_moz(AST_Break, function To_Moz_BreakStatement(M) {
          return {
            type: "BreakStatement",
            label: to_moz(M.label)
          };
        });
        def_to_moz(AST_Continue, function To_Moz_ContinueStatement(M) {
          return {
            type: "ContinueStatement",
            label: to_moz(M.label)
          };
        });
        def_to_moz(AST_With, function To_Moz_WithStatement(M) {
          return {
            type: "WithStatement",
            object: to_moz(M.expression),
            body: to_moz(M.body)
          };
        });
        def_to_moz(AST_Switch, function To_Moz_SwitchStatement(M) {
          return {
            type: "SwitchStatement",
            discriminant: to_moz(M.expression),
            cases: M.body.map(to_moz)
          };
        });
        def_to_moz(AST_Return, function To_Moz_ReturnStatement(M) {
          return {
            type: "ReturnStatement",
            argument: to_moz(M.value)
          };
        });
        def_to_moz(AST_Throw, function To_Moz_ThrowStatement(M) {
          return {
            type: "ThrowStatement",
            argument: to_moz(M.value)
          };
        });
        def_to_moz(AST_While, function To_Moz_WhileStatement(M) {
          return {
            type: "WhileStatement",
            test: to_moz(M.condition),
            body: to_moz(M.body)
          };
        });
        def_to_moz(AST_Do, function To_Moz_DoWhileStatement(M) {
          return {
            type: "DoWhileStatement",
            test: to_moz(M.condition),
            body: to_moz(M.body)
          };
        });
        def_to_moz(AST_For, function To_Moz_ForStatement(M) {
          return {
            type: "ForStatement",
            init: to_moz(M.init),
            test: to_moz(M.condition),
            update: to_moz(M.step),
            body: to_moz(M.body)
          };
        });
        def_to_moz(AST_ForIn, function To_Moz_ForInStatement(M) {
          return {
            type: "ForInStatement",
            left: to_moz(M.init),
            right: to_moz(M.object),
            body: to_moz(M.body)
          };
        });
        def_to_moz(AST_ForOf, function To_Moz_ForOfStatement(M) {
          return {
            type: "ForOfStatement",
            left: to_moz(M.init),
            right: to_moz(M.object),
            body: to_moz(M.body),
            await: M.await
          };
        });
        def_to_moz(AST_Await, function To_Moz_AwaitExpression(M) {
          return {
            type: "AwaitExpression",
            argument: to_moz(M.expression)
          };
        });
        def_to_moz(AST_Yield, function To_Moz_YieldExpression(M) {
          return {
            type: "YieldExpression",
            argument: to_moz(M.expression),
            delegate: M.is_star
          };
        });
        def_to_moz(AST_Debugger, function To_Moz_DebuggerStatement() {
          return {
            type: "DebuggerStatement"
          };
        });
        def_to_moz(AST_VarDef, function To_Moz_VariableDeclarator(M) {
          return {
            type: "VariableDeclarator",
            id: to_moz(M.name),
            init: to_moz(M.value)
          };
        });
        def_to_moz(AST_Catch, function To_Moz_CatchClause(M) {
          return {
            type: "CatchClause",
            param: to_moz(M.argname),
            body: to_moz_block(M)
          };
        });
        def_to_moz(AST_This, function To_Moz_ThisExpression() {
          return {
            type: "ThisExpression"
          };
        });
        def_to_moz(AST_Super, function To_Moz_Super() {
          return {
            type: "Super"
          };
        });
        def_to_moz(AST_Binary, function To_Moz_BinaryExpression(M) {
          return {
            type: "BinaryExpression",
            operator: M.operator,
            left: to_moz(M.left),
            right: to_moz(M.right)
          };
        });
        def_to_moz(AST_Binary, function To_Moz_LogicalExpression(M) {
          return {
            type: "LogicalExpression",
            operator: M.operator,
            left: to_moz(M.left),
            right: to_moz(M.right)
          };
        });
        def_to_moz(AST_Assign, function To_Moz_AssignmentExpression(M) {
          return {
            type: "AssignmentExpression",
            operator: M.operator,
            left: to_moz(M.left),
            right: to_moz(M.right)
          };
        });
        def_to_moz(AST_Conditional, function To_Moz_ConditionalExpression(M) {
          return {
            type: "ConditionalExpression",
            test: to_moz(M.condition),
            consequent: to_moz(M.consequent),
            alternate: to_moz(M.alternative)
          };
        });
        def_to_moz(AST_New, function To_Moz_NewExpression(M) {
          return {
            type: "NewExpression",
            callee: to_moz(M.expression),
            arguments: M.args.map(to_moz)
          };
        });
        def_to_moz(AST_Call, function To_Moz_CallExpression(M) {
          return {
            type: "CallExpression",
            callee: to_moz(M.expression),
            optional: M.optional,
            arguments: M.args.map(to_moz)
          };
        });
        def_to_moz(AST_Toplevel, function To_Moz_Program(M) {
          return to_moz_scope("Program", M);
        });
        def_to_moz(AST_Expansion, function To_Moz_Spread(M) {
          return {
            type: to_moz_in_destructuring() ? "RestElement" : "SpreadElement",
            argument: to_moz(M.expression)
          };
        });
        def_to_moz(AST_PrefixedTemplateString, function To_Moz_TaggedTemplateExpression(M) {
          return {
            type: "TaggedTemplateExpression",
            tag: to_moz(M.prefix),
            quasi: to_moz(M.template_string)
          };
        });
        def_to_moz(AST_TemplateString, function To_Moz_TemplateLiteral(M) {
          var quasis = [];
          var expressions = [];
          for (var i = 0; i < M.segments.length; i++) {
            if (i % 2 !== 0) {
              expressions.push(to_moz(M.segments[i]));
            } else {
              quasis.push({
                type: "TemplateElement",
                value: {
                  raw: M.segments[i].raw,
                  cooked: M.segments[i].value
                },
                tail: i === M.segments.length - 1
              });
            }
          }
          return {
            type: "TemplateLiteral",
            quasis,
            expressions
          };
        });
        def_to_moz(AST_Defun, function To_Moz_FunctionDeclaration(M) {
          return {
            type: "FunctionDeclaration",
            id: to_moz(M.name),
            params: M.argnames.map(to_moz),
            generator: M.is_generator,
            async: M.async,
            body: to_moz_scope("BlockStatement", M)
          };
        });
        def_to_moz(AST_Function, function To_Moz_FunctionExpression(M, parent) {
          var is_generator = parent.is_generator !== void 0 ? parent.is_generator : M.is_generator;
          return {
            type: "FunctionExpression",
            id: to_moz(M.name),
            params: M.argnames.map(to_moz),
            generator: is_generator,
            async: M.async,
            body: to_moz_scope("BlockStatement", M)
          };
        });
        def_to_moz(AST_Arrow, function To_Moz_ArrowFunctionExpression(M) {
          var body = {
            type: "BlockStatement",
            body: M.body.map(to_moz)
          };
          return {
            type: "ArrowFunctionExpression",
            params: M.argnames.map(to_moz),
            async: M.async,
            body
          };
        });
        def_to_moz(AST_Destructuring, function To_Moz_ObjectPattern(M) {
          if (M.is_array) {
            return {
              type: "ArrayPattern",
              elements: M.names.map(to_moz)
            };
          }
          return {
            type: "ObjectPattern",
            properties: M.names.map(to_moz)
          };
        });
        def_to_moz(AST_Directive, function To_Moz_Directive(M) {
          return {
            type: "ExpressionStatement",
            expression: {
              type: "Literal",
              value: M.value,
              raw: M.print_to_string()
            },
            directive: M.value
          };
        });
        def_to_moz(AST_SimpleStatement, function To_Moz_ExpressionStatement(M) {
          return {
            type: "ExpressionStatement",
            expression: to_moz(M.body)
          };
        });
        def_to_moz(AST_SwitchBranch, function To_Moz_SwitchCase(M) {
          return {
            type: "SwitchCase",
            test: to_moz(M.expression),
            consequent: M.body.map(to_moz)
          };
        });
        def_to_moz(AST_Try, function To_Moz_TryStatement(M) {
          return {
            type: "TryStatement",
            block: to_moz_block(M.body),
            handler: to_moz(M.bcatch),
            guardedHandlers: [],
            finalizer: to_moz(M.bfinally)
          };
        });
        def_to_moz(AST_Catch, function To_Moz_CatchClause(M) {
          return {
            type: "CatchClause",
            param: to_moz(M.argname),
            guard: null,
            body: to_moz_block(M)
          };
        });
        def_to_moz(AST_Definitions, function To_Moz_VariableDeclaration(M) {
          return {
            type: "VariableDeclaration",
            kind: M instanceof AST_Const ? "const" : M instanceof AST_Let ? "let" : "var",
            declarations: M.definitions.map(to_moz)
          };
        });
        const assert_clause_to_moz = (assert_clause) => {
          const assertions = [];
          if (assert_clause) {
            for (const { key, value } of assert_clause.properties) {
              const key_moz = is_basic_identifier_string(key) ? { type: "Identifier", name: key } : { type: "Literal", value: key, raw: JSON.stringify(key) };
              assertions.push({
                type: "ImportAttribute",
                key: key_moz,
                value: to_moz(value)
              });
            }
          }
          return assertions;
        };
        def_to_moz(AST_Export, function To_Moz_ExportDeclaration(M) {
          if (M.exported_names) {
            var first_exported = M.exported_names[0];
            var first_exported_name = first_exported.name;
            if (first_exported_name.name === "*" && !first_exported_name.quote) {
              var foreign_name = first_exported.foreign_name;
              var exported = foreign_name.name === "*" && !foreign_name.quote ? null : to_moz(foreign_name);
              return {
                type: "ExportAllDeclaration",
                source: to_moz(M.module_name),
                exported,
                assertions: assert_clause_to_moz(M.assert_clause)
              };
            }
            return {
              type: "ExportNamedDeclaration",
              specifiers: M.exported_names.map(function(name_mapping) {
                return {
                  type: "ExportSpecifier",
                  exported: to_moz(name_mapping.foreign_name),
                  local: to_moz(name_mapping.name)
                };
              }),
              declaration: to_moz(M.exported_definition),
              source: to_moz(M.module_name),
              assertions: assert_clause_to_moz(M.assert_clause)
            };
          }
          return {
            type: M.is_default ? "ExportDefaultDeclaration" : "ExportNamedDeclaration",
            declaration: to_moz(M.exported_value || M.exported_definition)
          };
        });
        def_to_moz(AST_Import, function To_Moz_ImportDeclaration(M) {
          var specifiers = [];
          if (M.imported_name) {
            specifiers.push({
              type: "ImportDefaultSpecifier",
              local: to_moz(M.imported_name)
            });
          }
          if (M.imported_names) {
            var first_imported_foreign_name = M.imported_names[0].foreign_name;
            if (first_imported_foreign_name.name === "*" && !first_imported_foreign_name.quote) {
              specifiers.push({
                type: "ImportNamespaceSpecifier",
                local: to_moz(M.imported_names[0].name)
              });
            } else {
              M.imported_names.forEach(function(name_mapping) {
                specifiers.push({
                  type: "ImportSpecifier",
                  local: to_moz(name_mapping.name),
                  imported: to_moz(name_mapping.foreign_name)
                });
              });
            }
          }
          return {
            type: "ImportDeclaration",
            specifiers,
            source: to_moz(M.module_name),
            assertions: assert_clause_to_moz(M.assert_clause)
          };
        });
        def_to_moz(AST_ImportMeta, function To_Moz_MetaProperty() {
          return {
            type: "MetaProperty",
            meta: {
              type: "Identifier",
              name: "import"
            },
            property: {
              type: "Identifier",
              name: "meta"
            }
          };
        });
        def_to_moz(AST_Sequence, function To_Moz_SequenceExpression(M) {
          return {
            type: "SequenceExpression",
            expressions: M.expressions.map(to_moz)
          };
        });
        def_to_moz(AST_DotHash, function To_Moz_PrivateMemberExpression(M) {
          return {
            type: "MemberExpression",
            object: to_moz(M.expression),
            computed: false,
            property: {
              type: "PrivateIdentifier",
              name: M.property
            },
            optional: M.optional
          };
        });
        def_to_moz(AST_PropAccess, function To_Moz_MemberExpression(M) {
          var isComputed = M instanceof AST_Sub;
          return {
            type: "MemberExpression",
            object: to_moz(M.expression),
            computed: isComputed,
            property: isComputed ? to_moz(M.property) : { type: "Identifier", name: M.property },
            optional: M.optional
          };
        });
        def_to_moz(AST_Chain, function To_Moz_ChainExpression(M) {
          return {
            type: "ChainExpression",
            expression: to_moz(M.expression)
          };
        });
        def_to_moz(AST_Unary, function To_Moz_Unary(M) {
          return {
            type: M.operator == "++" || M.operator == "--" ? "UpdateExpression" : "UnaryExpression",
            operator: M.operator,
            prefix: M instanceof AST_UnaryPrefix,
            argument: to_moz(M.expression)
          };
        });
        def_to_moz(AST_Binary, function To_Moz_BinaryExpression(M) {
          if (M.operator == "=" && to_moz_in_destructuring()) {
            return {
              type: "AssignmentPattern",
              left: to_moz(M.left),
              right: to_moz(M.right)
            };
          }
          const type = M.operator == "&&" || M.operator == "||" || M.operator === "??" ? "LogicalExpression" : "BinaryExpression";
          return {
            type,
            left: to_moz(M.left),
            operator: M.operator,
            right: to_moz(M.right)
          };
        });
        def_to_moz(AST_PrivateIn, function To_Moz_BinaryExpression_PrivateIn(M) {
          return {
            type: "BinaryExpression",
            left: { type: "PrivateIdentifier", name: M.key.name },
            operator: "in",
            right: to_moz(M.value)
          };
        });
        def_to_moz(AST_Array, function To_Moz_ArrayExpression(M) {
          return {
            type: "ArrayExpression",
            elements: M.elements.map(to_moz)
          };
        });
        def_to_moz(AST_Object, function To_Moz_ObjectExpression(M) {
          return {
            type: "ObjectExpression",
            properties: M.properties.map(to_moz)
          };
        });
        def_to_moz(AST_ObjectProperty, function To_Moz_Property(M, parent) {
          var key = M.key instanceof AST_Node ? to_moz(M.key) : {
            type: "Identifier",
            value: M.key
          };
          if (typeof M.key === "number") {
            key = {
              type: "Literal",
              value: Number(M.key)
            };
          }
          if (typeof M.key === "string") {
            key = {
              type: "Identifier",
              name: M.key
            };
          }
          var kind;
          var string_or_num = typeof M.key === "string" || typeof M.key === "number";
          var computed = string_or_num ? false : !(M.key instanceof AST_Symbol) || M.key instanceof AST_SymbolRef;
          if (M instanceof AST_ObjectKeyVal) {
            kind = "init";
            computed = !string_or_num;
          } else if (M instanceof AST_ObjectGetter) {
            kind = "get";
          } else if (M instanceof AST_ObjectSetter) {
            kind = "set";
          }
          if (M instanceof AST_PrivateGetter || M instanceof AST_PrivateSetter) {
            const kind2 = M instanceof AST_PrivateGetter ? "get" : "set";
            return {
              type: "MethodDefinition",
              computed: false,
              kind: kind2,
              static: M.static,
              key: {
                type: "PrivateIdentifier",
                name: M.key.name
              },
              value: to_moz(M.value)
            };
          }
          if (M instanceof AST_ClassPrivateProperty) {
            return {
              type: "PropertyDefinition",
              key: {
                type: "PrivateIdentifier",
                name: M.key.name
              },
              value: to_moz(M.value),
              computed: false,
              static: M.static
            };
          }
          if (M instanceof AST_ClassProperty) {
            return {
              type: "PropertyDefinition",
              key,
              value: to_moz(M.value),
              computed,
              static: M.static
            };
          }
          if (parent instanceof AST_Class) {
            return {
              type: "MethodDefinition",
              computed,
              kind,
              static: M.static,
              key: to_moz(M.key),
              value: to_moz(M.value)
            };
          }
          return {
            type: "Property",
            computed,
            kind,
            key,
            value: to_moz(M.value)
          };
        });
        def_to_moz(AST_ConciseMethod, function To_Moz_MethodDefinition(M, parent) {
          if (parent instanceof AST_Object) {
            return {
              type: "Property",
              computed: !(M.key instanceof AST_Symbol) || M.key instanceof AST_SymbolRef,
              kind: "init",
              method: true,
              shorthand: false,
              key: to_moz(M.key),
              value: to_moz(M.value)
            };
          }
          const key = M instanceof AST_PrivateMethod ? {
            type: "PrivateIdentifier",
            name: M.key.name
          } : to_moz(M.key);
          return {
            type: "MethodDefinition",
            kind: M.key === "constructor" ? "constructor" : "method",
            key,
            value: to_moz(M.value),
            computed: !(M.key instanceof AST_Symbol) || M.key instanceof AST_SymbolRef,
            static: M.static
          };
        });
        def_to_moz(AST_Class, function To_Moz_Class(M) {
          var type = M instanceof AST_ClassExpression ? "ClassExpression" : "ClassDeclaration";
          return {
            type,
            superClass: to_moz(M.extends),
            id: M.name ? to_moz(M.name) : null,
            body: {
              type: "ClassBody",
              body: M.properties.map(to_moz)
            }
          };
        });
        def_to_moz(AST_ClassStaticBlock, function To_Moz_StaticBlock(M) {
          return {
            type: "StaticBlock",
            body: M.body.map(to_moz)
          };
        });
        def_to_moz(AST_NewTarget, function To_Moz_MetaProperty() {
          return {
            type: "MetaProperty",
            meta: {
              type: "Identifier",
              name: "new"
            },
            property: {
              type: "Identifier",
              name: "target"
            }
          };
        });
        def_to_moz(AST_Symbol, function To_Moz_Identifier(M, parent) {
          if (M instanceof AST_SymbolMethod && parent.quote || (M instanceof AST_SymbolImportForeign || M instanceof AST_SymbolExportForeign || M instanceof AST_SymbolExport) && M.quote) {
            return {
              type: "Literal",
              value: M.name
            };
          }
          var def = M.definition();
          return {
            type: "Identifier",
            name: def ? def.mangled_name || def.name : M.name
          };
        });
        def_to_moz(AST_RegExp, function To_Moz_RegExpLiteral(M) {
          const pattern = M.value.source;
          const flags = M.value.flags;
          return {
            type: "Literal",
            value: null,
            raw: M.print_to_string(),
            regex: { pattern, flags }
          };
        });
        def_to_moz(AST_Constant, function To_Moz_Literal(M) {
          var value = M.value;
          return {
            type: "Literal",
            value,
            raw: M.raw || M.print_to_string()
          };
        });
        def_to_moz(AST_Atom, function To_Moz_Atom(M) {
          return {
            type: "Identifier",
            name: String(M.value)
          };
        });
        def_to_moz(AST_BigInt, (M) => ({
          type: "BigIntLiteral",
          value: M.value
        }));
        AST_Boolean.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast);
        AST_Null.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast);
        AST_Hole.DEFMETHOD("to_mozilla_ast", function To_Moz_ArrayHole() {
          return null;
        });
        AST_Block.DEFMETHOD("to_mozilla_ast", AST_BlockStatement.prototype.to_mozilla_ast);
        AST_Lambda.DEFMETHOD("to_mozilla_ast", AST_Function.prototype.to_mozilla_ast);
        function my_start_token(moznode) {
          var loc = moznode.loc, start = loc && loc.start;
          var range = moznode.range;
          return new AST_Token("", "", start && start.line || 0, start && start.column || 0, range ? range[0] : moznode.start, false, [], [], loc && loc.source);
        }
        function my_end_token(moznode) {
          var loc = moznode.loc, end = loc && loc.end;
          var range = moznode.range;
          return new AST_Token("", "", end && end.line || 0, end && end.column || 0, range ? range[0] : moznode.end, false, [], [], loc && loc.source);
        }
        var FROM_MOZ_STACK = null;
        function from_moz(node) {
          FROM_MOZ_STACK.push(node);
          var ret = node != null ? MOZ_TO_ME[node.type](node) : null;
          FROM_MOZ_STACK.pop();
          return ret;
        }
        AST_Node.from_mozilla_ast = function(node) {
          var save_stack = FROM_MOZ_STACK;
          FROM_MOZ_STACK = [];
          var ast = from_moz(node);
          FROM_MOZ_STACK = save_stack;
          return ast;
        };
        function set_moz_loc(mynode, moznode) {
          var start = mynode.start;
          var end = mynode.end;
          if (!(start && end)) {
            return moznode;
          }
          if (start.pos != null && end.endpos != null) {
            moznode.range = [start.pos, end.endpos];
          }
          if (start.line) {
            moznode.loc = {
              start: { line: start.line, column: start.col },
              end: end.endline ? { line: end.endline, column: end.endcol } : null
            };
            if (start.file) {
              moznode.loc.source = start.file;
            }
          }
          return moznode;
        }
        function def_to_moz(mytype, handler) {
          mytype.DEFMETHOD("to_mozilla_ast", function(parent) {
            return set_moz_loc(this, handler(this, parent));
          });
        }
        var TO_MOZ_STACK = null;
        function to_moz(node) {
          if (TO_MOZ_STACK === null) {
            TO_MOZ_STACK = [];
          }
          TO_MOZ_STACK.push(node);
          var ast = node != null ? node.to_mozilla_ast(TO_MOZ_STACK[TO_MOZ_STACK.length - 2]) : null;
          TO_MOZ_STACK.pop();
          if (TO_MOZ_STACK.length === 0) {
            TO_MOZ_STACK = null;
          }
          return ast;
        }
        function to_moz_in_destructuring() {
          var i = TO_MOZ_STACK.length;
          while (i--) {
            if (TO_MOZ_STACK[i] instanceof AST_Destructuring) {
              return true;
            }
          }
          return false;
        }
        function to_moz_block(node) {
          return {
            type: "BlockStatement",
            body: node.body.map(to_moz)
          };
        }
        function to_moz_scope(type, node) {
          var body = node.body.map(to_moz);
          if (node.body[0] instanceof AST_SimpleStatement && node.body[0].body instanceof AST_String) {
            body.unshift(to_moz(new AST_EmptyStatement(node.body[0])));
          }
          return {
            type,
            body
          };
        }
      })();
      function first_in_statement(stack) {
        let node = stack.parent(-1);
        for (let i = 0, p; p = stack.parent(i); i++) {
          if (p instanceof AST_Statement && p.body === node)
            return true;
          if (p instanceof AST_Sequence && p.expressions[0] === node || p.TYPE === "Call" && p.expression === node || p instanceof AST_PrefixedTemplateString && p.prefix === node || p instanceof AST_Dot && p.expression === node || p instanceof AST_Sub && p.expression === node || p instanceof AST_Chain && p.expression === node || p instanceof AST_Conditional && p.condition === node || p instanceof AST_Binary && p.left === node || p instanceof AST_UnaryPostfix && p.expression === node) {
            node = p;
          } else {
            return false;
          }
        }
      }
      function left_is_object(node) {
        if (node instanceof AST_Object)
          return true;
        if (node instanceof AST_Sequence)
          return left_is_object(node.expressions[0]);
        if (node.TYPE === "Call")
          return left_is_object(node.expression);
        if (node instanceof AST_PrefixedTemplateString)
          return left_is_object(node.prefix);
        if (node instanceof AST_Dot || node instanceof AST_Sub)
          return left_is_object(node.expression);
        if (node instanceof AST_Chain)
          return left_is_object(node.expression);
        if (node instanceof AST_Conditional)
          return left_is_object(node.condition);
        if (node instanceof AST_Binary)
          return left_is_object(node.left);
        if (node instanceof AST_UnaryPostfix)
          return left_is_object(node.expression);
        return false;
      }
      const CODE_LINE_BREAK = 10;
      const CODE_SPACE = 32;
      const r_annotation = /[@#]__(PURE|INLINE|NOINLINE)__/;
      function is_some_comments(comment) {
        return (comment.type === "comment2" || comment.type === "comment1") && /@preserve|@copyright|@lic|@cc_on|^\**!/i.test(comment.value);
      }
      const ROPE_COMMIT_WHEN = 8 * 1e3;
      class Rope {
        constructor() {
          this.committed = "";
          this.current = "";
        }
        append(str) {
          if (this.current.length > ROPE_COMMIT_WHEN) {
            this.committed += this.current + str;
            this.current = "";
          } else {
            this.current += str;
          }
        }
        insertAt(char, index) {
          const { committed, current } = this;
          if (index < committed.length) {
            this.committed = committed.slice(0, index) + char + committed.slice(index);
          } else if (index === committed.length) {
            this.committed += char;
          } else {
            index -= committed.length;
            this.committed += current.slice(0, index) + char;
            this.current = current.slice(index);
          }
        }
        charAt(index) {
          const { committed } = this;
          if (index < committed.length)
            return committed[index];
          return this.current[index - committed.length];
        }
        charCodeAt(index) {
          const { committed } = this;
          if (index < committed.length)
            return committed.charCodeAt(index);
          return this.current.charCodeAt(index - committed.length);
        }
        length() {
          return this.committed.length + this.current.length;
        }
        expectDirective() {
          let ch, n = this.length();
          if (n <= 0)
            return true;
          while ((ch = this.charCodeAt(--n)) && (ch == CODE_SPACE || ch == CODE_LINE_BREAK))
            ;
          return !ch || ch === 59 || ch === 123;
        }
        hasNLB() {
          let n = this.length() - 1;
          while (n >= 0) {
            const code = this.charCodeAt(n--);
            if (code === CODE_LINE_BREAK)
              return true;
            if (code !== CODE_SPACE)
              return false;
          }
          return true;
        }
        toString() {
          return this.committed + this.current;
        }
      }
      function OutputStream(options) {
        var readonly = !options;
        options = defaults(options, {
          ascii_only: false,
          beautify: false,
          braces: false,
          comments: "some",
          ecma: 5,
          ie8: false,
          indent_level: 4,
          indent_start: 0,
          inline_script: true,
          keep_numbers: false,
          keep_quoted_props: false,
          max_line_len: false,
          preamble: null,
          preserve_annotations: false,
          quote_keys: false,
          quote_style: 0,
          safari10: false,
          semicolons: true,
          shebang: true,
          shorthand: void 0,
          source_map: null,
          webkit: false,
          width: 80,
          wrap_iife: false,
          wrap_func_args: true,
          _destroy_ast: false
        }, true);
        if (options.shorthand === void 0)
          options.shorthand = options.ecma > 5;
        var comment_filter = return_false;
        if (options.comments) {
          let comments = options.comments;
          if (typeof options.comments === "string" && /^\/.*\/[a-zA-Z]*$/.test(options.comments)) {
            var regex_pos = options.comments.lastIndexOf("/");
            comments = new RegExp(options.comments.substr(1, regex_pos - 1), options.comments.substr(regex_pos + 1));
          }
          if (comments instanceof RegExp) {
            comment_filter = function(comment) {
              return comment.type != "comment5" && comments.test(comment.value);
            };
          } else if (typeof comments === "function") {
            comment_filter = function(comment) {
              return comment.type != "comment5" && comments(this, comment);
            };
          } else if (comments === "some") {
            comment_filter = is_some_comments;
          } else {
            comment_filter = return_true;
          }
        }
        if (options.preserve_annotations) {
          let prev_comment_filter = comment_filter;
          comment_filter = function(comment) {
            return r_annotation.test(comment.value) || prev_comment_filter.apply(this, arguments);
          };
        }
        var indentation = 0;
        var current_col = 0;
        var current_line = 1;
        var current_pos = 0;
        var OUTPUT = new Rope();
        let printed_comments = /* @__PURE__ */ new Set();
        var to_utf8 = options.ascii_only ? function(str, identifier = false, regexp = false) {
          if (options.ecma >= 2015 && !options.safari10 && !regexp) {
            str = str.replace(/[\ud800-\udbff][\udc00-\udfff]/g, function(ch) {
              var code = get_full_char_code(ch, 0).toString(16);
              return "\\u{" + code + "}";
            });
          }
          return str.replace(/[\u0000-\u001f\u007f-\uffff]/g, function(ch) {
            var code = ch.charCodeAt(0).toString(16);
            if (code.length <= 2 && !identifier) {
              while (code.length < 2)
                code = "0" + code;
              return "\\x" + code;
            } else {
              while (code.length < 4)
                code = "0" + code;
              return "\\u" + code;
            }
          });
        } : function(str) {
          return str.replace(/[\ud800-\udbff][\udc00-\udfff]|([\ud800-\udbff]|[\udc00-\udfff])/g, function(match, lone) {
            if (lone) {
              return "\\u" + lone.charCodeAt(0).toString(16);
            }
            return match;
          });
        };
        function make_string(str, quote) {
          var dq = 0, sq = 0;
          str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s, i) {
            switch (s) {
              case '"':
                ++dq;
                return '"';
              case "'":
                ++sq;
                return "'";
              case "\\":
                return "\\\\";
              case "\n":
                return "\\n";
              case "\r":
                return "\\r";
              case "	":
                return "\\t";
              case "\b":
                return "\\b";
              case "\f":
                return "\\f";
              case "\v":
                return options.ie8 ? "\\x0B" : "\\v";
              case "\u2028":
                return "\\u2028";
              case "\u2029":
                return "\\u2029";
              case "\uFEFF":
                return "\\ufeff";
              case "\0":
                return /[0-9]/.test(get_full_char(str, i + 1)) ? "\\x00" : "\\0";
            }
            return s;
          });
          function quote_single() {
            return "'" + str.replace(/\x27/g, "\\'") + "'";
          }
          function quote_double() {
            return '"' + str.replace(/\x22/g, '\\"') + '"';
          }
          function quote_template() {
            return "`" + str.replace(/`/g, "\\`") + "`";
          }
          str = to_utf8(str);
          if (quote === "`")
            return quote_template();
          switch (options.quote_style) {
            case 1:
              return quote_single();
            case 2:
              return quote_double();
            case 3:
              return quote == "'" ? quote_single() : quote_double();
            default:
              return dq > sq ? quote_single() : quote_double();
          }
        }
        function encode_string(str, quote) {
          var ret = make_string(str, quote);
          if (options.inline_script) {
            ret = ret.replace(/<\x2f(script)([>\/\t\n\f\r ])/gi, "<\\/$1$2");
            ret = ret.replace(/\x3c!--/g, "\\x3c!--");
            ret = ret.replace(/--\x3e/g, "--\\x3e");
          }
          return ret;
        }
        function make_name(name) {
          name = name.toString();
          name = to_utf8(name, true);
          return name;
        }
        function make_indent(back) {
          return " ".repeat(options.indent_start + indentation - back * options.indent_level);
        }
        var has_parens = false;
        var might_need_space = false;
        var might_need_semicolon = false;
        var might_add_newline = 0;
        var need_newline_indented = false;
        var need_space = false;
        var newline_insert = -1;
        var last2 = "";
        var mapping_token, mapping_name, mappings = options.source_map && [];
        var do_add_mapping = mappings ? function() {
          mappings.forEach(function(mapping) {
            try {
              let { name, token } = mapping;
              if (name !== false) {
                if (token.type == "name" || token.type === "privatename") {
                  name = token.value;
                } else if (name instanceof AST_Symbol) {
                  name = token.type === "string" ? token.value : name.name;
                }
              }
              options.source_map.add(mapping.token.file, mapping.line, mapping.col, mapping.token.line, mapping.token.col, is_basic_identifier_string(name) ? name : void 0);
            } catch (ex) {
            }
          });
          mappings = [];
        } : noop;
        var ensure_line_len = options.max_line_len ? function() {
          if (current_col > options.max_line_len) {
            if (might_add_newline) {
              OUTPUT.insertAt("\n", might_add_newline);
              const len_after_newline = OUTPUT.length() - might_add_newline - 1;
              if (mappings) {
                var delta = len_after_newline - current_col;
                mappings.forEach(function(mapping) {
                  mapping.line++;
                  mapping.col += delta;
                });
              }
              current_line++;
              current_pos++;
              current_col = len_after_newline;
            }
          }
          if (might_add_newline) {
            might_add_newline = 0;
            do_add_mapping();
          }
        } : noop;
        var requireSemicolonChars = makePredicate("( [ + * / - , . `");
        function print(str) {
          str = String(str);
          var ch = get_full_char(str, 0);
          if (need_newline_indented && ch) {
            need_newline_indented = false;
            if (ch !== "\n") {
              print("\n");
              indent();
            }
          }
          if (need_space && ch) {
            need_space = false;
            if (!/[\s;})]/.test(ch)) {
              space();
            }
          }
          newline_insert = -1;
          var prev = last2.charAt(last2.length - 1);
          if (might_need_semicolon) {
            might_need_semicolon = false;
            if (prev === ":" && ch === "}" || (!ch || !";}".includes(ch)) && prev !== ";") {
              if (options.semicolons || requireSemicolonChars.has(ch)) {
                OUTPUT.append(";");
                current_col++;
                current_pos++;
              } else {
                ensure_line_len();
                if (current_col > 0) {
                  OUTPUT.append("\n");
                  current_pos++;
                  current_line++;
                  current_col = 0;
                }
                if (/^\s+$/.test(str)) {
                  might_need_semicolon = true;
                }
              }
              if (!options.beautify)
                might_need_space = false;
            }
          }
          if (might_need_space) {
            if (is_identifier_char(prev) && (is_identifier_char(ch) || ch == "\\") || ch == "/" && ch == prev || (ch == "+" || ch == "-") && ch == last2) {
              OUTPUT.append(" ");
              current_col++;
              current_pos++;
            }
            might_need_space = false;
          }
          if (mapping_token) {
            mappings.push({
              token: mapping_token,
              name: mapping_name,
              line: current_line,
              col: current_col
            });
            mapping_token = false;
            if (!might_add_newline)
              do_add_mapping();
          }
          OUTPUT.append(str);
          has_parens = str[str.length - 1] == "(";
          current_pos += str.length;
          var a = str.split(/\r?\n/), n = a.length - 1;
          current_line += n;
          current_col += a[0].length;
          if (n > 0) {
            ensure_line_len();
            current_col = a[n].length;
          }
          last2 = str;
        }
        var star = function() {
          print("*");
        };
        var space = options.beautify ? function() {
          print(" ");
        } : function() {
          might_need_space = true;
        };
        var indent = options.beautify ? function(half) {
          if (options.beautify) {
            print(make_indent(half ? 0.5 : 0));
          }
        } : noop;
        var with_indent = options.beautify ? function(col, cont) {
          if (col === true)
            col = next_indent();
          var save_indentation = indentation;
          indentation = col;
          var ret = cont();
          indentation = save_indentation;
          return ret;
        } : function(col, cont) {
          return cont();
        };
        var newline = options.beautify ? function() {
          if (newline_insert < 0)
            return print("\n");
          if (OUTPUT.charAt(newline_insert) != "\n") {
            OUTPUT.insertAt("\n", newline_insert);
            current_pos++;
            current_line++;
          }
          newline_insert++;
        } : options.max_line_len ? function() {
          ensure_line_len();
          might_add_newline = OUTPUT.length();
        } : noop;
        var semicolon = options.beautify ? function() {
          print(";");
        } : function() {
          might_need_semicolon = true;
        };
        function force_semicolon() {
          might_need_semicolon = false;
          print(";");
        }
        function next_indent() {
          return indentation + options.indent_level;
        }
        function with_block(cont) {
          var ret;
          print("{");
          newline();
          with_indent(next_indent(), function() {
            ret = cont();
          });
          indent();
          print("}");
          return ret;
        }
        function with_parens(cont) {
          print("(");
          var ret = cont();
          print(")");
          return ret;
        }
        function with_square(cont) {
          print("[");
          var ret = cont();
          print("]");
          return ret;
        }
        function comma() {
          print(",");
          space();
        }
        function colon() {
          print(":");
          space();
        }
        var add_mapping = mappings ? function(token, name) {
          mapping_token = token;
          mapping_name = name;
        } : noop;
        function get() {
          if (might_add_newline) {
            ensure_line_len();
          }
          return OUTPUT.toString();
        }
        function filter_comment(comment) {
          if (!options.preserve_annotations) {
            comment = comment.replace(r_annotation, " ");
          }
          if (/^\s*$/.test(comment)) {
            return "";
          }
          return comment.replace(/(<\s*\/\s*)(script)/i, "<\\/$2");
        }
        function prepend_comments(node) {
          var self2 = this;
          var start = node.start;
          if (!start)
            return;
          var printed_comments2 = self2.printed_comments;
          const keyword_with_value = node instanceof AST_Exit && node.value || (node instanceof AST_Await || node instanceof AST_Yield) && node.expression;
          if (start.comments_before && printed_comments2.has(start.comments_before)) {
            if (keyword_with_value) {
              start.comments_before = [];
            } else {
              return;
            }
          }
          var comments = start.comments_before;
          if (!comments) {
            comments = start.comments_before = [];
          }
          printed_comments2.add(comments);
          if (keyword_with_value) {
            var tw = new TreeWalker(function(node2) {
              var parent = tw.parent();
              if (parent instanceof AST_Exit || parent instanceof AST_Await || parent instanceof AST_Yield || parent instanceof AST_Binary && parent.left === node2 || parent.TYPE == "Call" && parent.expression === node2 || parent instanceof AST_Conditional && parent.condition === node2 || parent instanceof AST_Dot && parent.expression === node2 || parent instanceof AST_Sequence && parent.expressions[0] === node2 || parent instanceof AST_Sub && parent.expression === node2 || parent instanceof AST_UnaryPostfix) {
                if (!node2.start)
                  return;
                var text = node2.start.comments_before;
                if (text && !printed_comments2.has(text)) {
                  printed_comments2.add(text);
                  comments = comments.concat(text);
                }
              } else {
                return true;
              }
            });
            tw.push(node);
            keyword_with_value.walk(tw);
          }
          if (current_pos == 0) {
            if (comments.length > 0 && options.shebang && comments[0].type === "comment5" && !printed_comments2.has(comments[0])) {
              print("#!" + comments.shift().value + "\n");
              indent();
            }
            var preamble = options.preamble;
            if (preamble) {
              print(preamble.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g, "\n"));
            }
          }
          comments = comments.filter(comment_filter, node).filter((c) => !printed_comments2.has(c));
          if (comments.length == 0)
            return;
          var last_nlb = OUTPUT.hasNLB();
          comments.forEach(function(c, i) {
            printed_comments2.add(c);
            if (!last_nlb) {
              if (c.nlb) {
                print("\n");
                indent();
                last_nlb = true;
              } else if (i > 0) {
                space();
              }
            }
            if (/comment[134]/.test(c.type)) {
              var value = filter_comment(c.value);
              if (value) {
                print("//" + value + "\n");
                indent();
              }
              last_nlb = true;
            } else if (c.type == "comment2") {
              var value = filter_comment(c.value);
              if (value) {
                print("/*" + value + "*/");
              }
              last_nlb = false;
            }
          });
          if (!last_nlb) {
            if (start.nlb) {
              print("\n");
              indent();
            } else {
              space();
            }
          }
        }
        function append_comments(node, tail) {
          var self2 = this;
          var token = node.end;
          if (!token)
            return;
          var printed_comments2 = self2.printed_comments;
          var comments = token[tail ? "comments_before" : "comments_after"];
          if (!comments || printed_comments2.has(comments))
            return;
          if (!(node instanceof AST_Statement || comments.every((c) => !/comment[134]/.test(c.type))))
            return;
          printed_comments2.add(comments);
          var insert = OUTPUT.length();
          comments.filter(comment_filter, node).forEach(function(c, i) {
            if (printed_comments2.has(c))
              return;
            printed_comments2.add(c);
            need_space = false;
            if (need_newline_indented) {
              print("\n");
              indent();
              need_newline_indented = false;
            } else if (c.nlb && (i > 0 || !OUTPUT.hasNLB())) {
              print("\n");
              indent();
            } else if (i > 0 || !tail) {
              space();
            }
            if (/comment[134]/.test(c.type)) {
              const value = filter_comment(c.value);
              if (value) {
                print("//" + value);
              }
              need_newline_indented = true;
            } else if (c.type == "comment2") {
              const value = filter_comment(c.value);
              if (value) {
                print("/*" + value + "*/");
              }
              need_space = true;
            }
          });
          if (OUTPUT.length() > insert)
            newline_insert = insert;
        }
        const gc_scope = options["_destroy_ast"] ? function gc_scope2(scope) {
          scope.body.length = 0;
          scope.argnames.length = 0;
        } : noop;
        var stack = [];
        return {
          get,
          toString: get,
          indent,
          in_directive: false,
          use_asm: null,
          active_scope: null,
          indentation: function() {
            return indentation;
          },
          current_width: function() {
            return current_col - indentation;
          },
          should_break: function() {
            return options.width && this.current_width() >= options.width;
          },
          has_parens: function() {
            return has_parens;
          },
          newline,
          print,
          star,
          space,
          comma,
          colon,
          last: function() {
            return last2;
          },
          semicolon,
          force_semicolon,
          to_utf8,
          print_name: function(name) {
            print(make_name(name));
          },
          print_string: function(str, quote, escape_directive) {
            var encoded = encode_string(str, quote);
            if (escape_directive === true && !encoded.includes("\\")) {
              if (!OUTPUT.expectDirective()) {
                force_semicolon();
              }
              force_semicolon();
            }
            print(encoded);
          },
          print_template_string_chars: function(str) {
            var encoded = encode_string(str, "`").replace(/\${/g, "\\${");
            return print(encoded.substr(1, encoded.length - 2));
          },
          encode_string,
          next_indent,
          with_indent,
          with_block,
          with_parens,
          with_square,
          add_mapping,
          option: function(opt) {
            return options[opt];
          },
          gc_scope,
          printed_comments,
          prepend_comments: readonly ? noop : prepend_comments,
          append_comments: readonly || comment_filter === return_false ? noop : append_comments,
          line: function() {
            return current_line;
          },
          col: function() {
            return current_col;
          },
          pos: function() {
            return current_pos;
          },
          push_node: function(node) {
            stack.push(node);
          },
          pop_node: function() {
            return stack.pop();
          },
          parent: function(n) {
            return stack[stack.length - 2 - (n || 0)];
          }
        };
      }
      (function() {
        function DEFPRINT(nodetype, generator) {
          nodetype.DEFMETHOD("_codegen", generator);
        }
        AST_Node.DEFMETHOD("print", function(output, force_parens) {
          var self2 = this, generator = self2._codegen;
          if (self2 instanceof AST_Scope) {
            output.active_scope = self2;
          } else if (!output.use_asm && self2 instanceof AST_Directive && self2.value == "use asm") {
            output.use_asm = output.active_scope;
          }
          function doit() {
            output.prepend_comments(self2);
            self2.add_source_map(output);
            generator(self2, output);
            output.append_comments(self2);
          }
          output.push_node(self2);
          if (force_parens || self2.needs_parens(output)) {
            output.with_parens(doit);
          } else {
            doit();
          }
          output.pop_node();
          if (self2 === output.use_asm) {
            output.use_asm = null;
          }
        });
        AST_Node.DEFMETHOD("_print", AST_Node.prototype.print);
        AST_Node.DEFMETHOD("print_to_string", function(options) {
          var output = OutputStream(options);
          this.print(output);
          return output.get();
        });
        function PARENS(nodetype, func) {
          if (Array.isArray(nodetype)) {
            nodetype.forEach(function(nodetype2) {
              PARENS(nodetype2, func);
            });
          } else {
            nodetype.DEFMETHOD("needs_parens", func);
          }
        }
        PARENS(AST_Node, return_false);
        PARENS(AST_Function, function(output) {
          if (!output.has_parens() && first_in_statement(output)) {
            return true;
          }
          if (output.option("webkit")) {
            var p = output.parent();
            if (p instanceof AST_PropAccess && p.expression === this) {
              return true;
            }
          }
          if (output.option("wrap_iife")) {
            var p = output.parent();
            if (p instanceof AST_Call && p.expression === this) {
              return true;
            }
          }
          if (output.option("wrap_func_args")) {
            var p = output.parent();
            if (p instanceof AST_Call && p.args.includes(this)) {
              return true;
            }
          }
          return false;
        });
        PARENS(AST_Arrow, function(output) {
          var p = output.parent();
          if (output.option("wrap_func_args") && p instanceof AST_Call && p.args.includes(this)) {
            return true;
          }
          return p instanceof AST_PropAccess && p.expression === this || p instanceof AST_Conditional && p.condition === this;
        });
        PARENS(AST_Object, function(output) {
          return !output.has_parens() && first_in_statement(output);
        });
        PARENS(AST_ClassExpression, first_in_statement);
        PARENS(AST_Unary, function(output) {
          var p = output.parent();
          return p instanceof AST_PropAccess && p.expression === this || p instanceof AST_Call && p.expression === this || p instanceof AST_Binary && p.operator === "**" && this instanceof AST_UnaryPrefix && p.left === this && this.operator !== "++" && this.operator !== "--";
        });
        PARENS(AST_Await, function(output) {
          var p = output.parent();
          return p instanceof AST_PropAccess && p.expression === this || p instanceof AST_Call && p.expression === this || p instanceof AST_Binary && p.operator === "**" && p.left === this || output.option("safari10") && p instanceof AST_UnaryPrefix;
        });
        PARENS(AST_Sequence, function(output) {
          var p = output.parent();
          return p instanceof AST_Call || p instanceof AST_Unary || p instanceof AST_Binary || p instanceof AST_VarDef || p instanceof AST_PropAccess || p instanceof AST_Array || p instanceof AST_ObjectProperty || p instanceof AST_Conditional || p instanceof AST_Arrow || p instanceof AST_DefaultAssign || p instanceof AST_Expansion || p instanceof AST_ForOf && this === p.object || p instanceof AST_Yield || p instanceof AST_Export;
        });
        PARENS(AST_Binary, function(output) {
          var p = output.parent();
          if (p instanceof AST_Call && p.expression === this)
            return true;
          if (p instanceof AST_Unary)
            return true;
          if (p instanceof AST_PropAccess && p.expression === this)
            return true;
          if (p instanceof AST_Binary) {
            const po = p.operator;
            const so = this.operator;
            if (so === "??" && (po === "||" || po === "&&")) {
              return true;
            }
            if (po === "??" && (so === "||" || so === "&&")) {
              return true;
            }
            const pp = PRECEDENCE[po];
            const sp = PRECEDENCE[so];
            if (pp > sp || pp == sp && (this === p.right || po == "**")) {
              return true;
            }
          }
        });
        PARENS(AST_Yield, function(output) {
          var p = output.parent();
          if (p instanceof AST_Binary && p.operator !== "=")
            return true;
          if (p instanceof AST_Call && p.expression === this)
            return true;
          if (p instanceof AST_Conditional && p.condition === this)
            return true;
          if (p instanceof AST_Unary)
            return true;
          if (p instanceof AST_PropAccess && p.expression === this)
            return true;
        });
        PARENS(AST_Chain, function(output) {
          var p = output.parent();
          if (!(p instanceof AST_Call || p instanceof AST_PropAccess))
            return false;
          return p.expression === this;
        });
        PARENS(AST_PropAccess, function(output) {
          var p = output.parent();
          if (p instanceof AST_New && p.expression === this) {
            return walk(this, (node) => {
              if (node instanceof AST_Scope)
                return true;
              if (node instanceof AST_Call) {
                return walk_abort;
              }
            });
          }
        });
        PARENS(AST_Call, function(output) {
          var p = output.parent(), p1;
          if (p instanceof AST_New && p.expression === this || p instanceof AST_Export && p.is_default && this.expression instanceof AST_Function)
            return true;
          return this.expression instanceof AST_Function && p instanceof AST_PropAccess && p.expression === this && (p1 = output.parent(1)) instanceof AST_Assign && p1.left === p;
        });
        PARENS(AST_New, function(output) {
          var p = output.parent();
          if (this.args.length === 0 && (p instanceof AST_PropAccess || p instanceof AST_Call && p.expression === this || p instanceof AST_PrefixedTemplateString && p.prefix === this))
            return true;
        });
        PARENS(AST_Number, function(output) {
          var p = output.parent();
          if (p instanceof AST_PropAccess && p.expression === this) {
            var value = this.getValue();
            if (value < 0 || /^0/.test(make_num(value))) {
              return true;
            }
          }
        });
        PARENS(AST_BigInt, function(output) {
          var p = output.parent();
          if (p instanceof AST_PropAccess && p.expression === this) {
            var value = this.getValue();
            if (value.startsWith("-")) {
              return true;
            }
          }
        });
        PARENS([AST_Assign, AST_Conditional], function(output) {
          var p = output.parent();
          if (p instanceof AST_Unary)
            return true;
          if (p instanceof AST_Binary && !(p instanceof AST_Assign))
            return true;
          if (p instanceof AST_Call && p.expression === this)
            return true;
          if (p instanceof AST_Conditional && p.condition === this)
            return true;
          if (p instanceof AST_PropAccess && p.expression === this)
            return true;
          if (this instanceof AST_Assign && this.left instanceof AST_Destructuring && this.left.is_array === false)
            return true;
        });
        DEFPRINT(AST_Directive, function(self2, output) {
          output.print_string(self2.value, self2.quote);
          output.semicolon();
        });
        DEFPRINT(AST_Expansion, function(self2, output) {
          output.print("...");
          self2.expression.print(output);
        });
        DEFPRINT(AST_Destructuring, function(self2, output) {
          output.print(self2.is_array ? "[" : "{");
          var len = self2.names.length;
          self2.names.forEach(function(name, i) {
            if (i > 0)
              output.comma();
            name.print(output);
            if (i == len - 1 && name instanceof AST_Hole)
              output.comma();
          });
          output.print(self2.is_array ? "]" : "}");
        });
        DEFPRINT(AST_Debugger, function(self2, output) {
          output.print("debugger");
          output.semicolon();
        });
        function display_body(body, is_toplevel, output, allow_directives) {
          var last2 = body.length - 1;
          output.in_directive = allow_directives;
          body.forEach(function(stmt, i) {
            if (output.in_directive === true && !(stmt instanceof AST_Directive || stmt instanceof AST_EmptyStatement || stmt instanceof AST_SimpleStatement && stmt.body instanceof AST_String)) {
              output.in_directive = false;
            }
            if (!(stmt instanceof AST_EmptyStatement)) {
              output.indent();
              stmt.print(output);
              if (!(i == last2 && is_toplevel)) {
                output.newline();
                if (is_toplevel)
                  output.newline();
              }
            }
            if (output.in_directive === true && stmt instanceof AST_SimpleStatement && stmt.body instanceof AST_String) {
              output.in_directive = false;
            }
          });
          output.in_directive = false;
        }
        AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output) {
          print_maybe_braced_body(this.body, output);
        });
        DEFPRINT(AST_Statement, function(self2, output) {
          self2.body.print(output);
          output.semicolon();
        });
        DEFPRINT(AST_Toplevel, function(self2, output) {
          display_body(self2.body, true, output, true);
          output.print("");
        });
        DEFPRINT(AST_LabeledStatement, function(self2, output) {
          self2.label.print(output);
          output.colon();
          self2.body.print(output);
        });
        DEFPRINT(AST_SimpleStatement, function(self2, output) {
          self2.body.print(output);
          output.semicolon();
        });
        function print_braced_empty(self2, output) {
          output.print("{");
          output.with_indent(output.next_indent(), function() {
            output.append_comments(self2, true);
          });
          output.add_mapping(self2.end);
          output.print("}");
        }
        function print_braced(self2, output, allow_directives) {
          if (self2.body.length > 0) {
            output.with_block(function() {
              display_body(self2.body, false, output, allow_directives);
              output.add_mapping(self2.end);
            });
          } else
            print_braced_empty(self2, output);
        }
        DEFPRINT(AST_BlockStatement, function(self2, output) {
          print_braced(self2, output);
        });
        DEFPRINT(AST_EmptyStatement, function(self2, output) {
          output.semicolon();
        });
        DEFPRINT(AST_Do, function(self2, output) {
          output.print("do");
          output.space();
          make_block(self2.body, output);
          output.space();
          output.print("while");
          output.space();
          output.with_parens(function() {
            self2.condition.print(output);
          });
          output.semicolon();
        });
        DEFPRINT(AST_While, function(self2, output) {
          output.print("while");
          output.space();
          output.with_parens(function() {
            self2.condition.print(output);
          });
          output.space();
          self2._do_print_body(output);
        });
        DEFPRINT(AST_For, function(self2, output) {
          output.print("for");
          output.space();
          output.with_parens(function() {
            if (self2.init) {
              if (self2.init instanceof AST_Definitions) {
                self2.init.print(output);
              } else {
                parenthesize_for_noin(self2.init, output, true);
              }
              output.print(";");
              output.space();
            } else {
              output.print(";");
            }
            if (self2.condition) {
              self2.condition.print(output);
              output.print(";");
              output.space();
            } else {
              output.print(";");
            }
            if (self2.step) {
              self2.step.print(output);
            }
          });
          output.space();
          self2._do_print_body(output);
        });
        DEFPRINT(AST_ForIn, function(self2, output) {
          output.print("for");
          if (self2.await) {
            output.space();
            output.print("await");
          }
          output.space();
          output.with_parens(function() {
            self2.init.print(output);
            output.space();
            output.print(self2 instanceof AST_ForOf ? "of" : "in");
            output.space();
            self2.object.print(output);
          });
          output.space();
          self2._do_print_body(output);
        });
        DEFPRINT(AST_With, function(self2, output) {
          output.print("with");
          output.space();
          output.with_parens(function() {
            self2.expression.print(output);
          });
          output.space();
          self2._do_print_body(output);
        });
        AST_Lambda.DEFMETHOD("_do_print", function(output, nokeyword) {
          var self2 = this;
          if (!nokeyword) {
            if (self2.async) {
              output.print("async");
              output.space();
            }
            output.print("function");
            if (self2.is_generator) {
              output.star();
            }
            if (self2.name) {
              output.space();
            }
          }
          if (self2.name instanceof AST_Symbol) {
            self2.name.print(output);
          } else if (nokeyword && self2.name instanceof AST_Node) {
            output.with_square(function() {
              self2.name.print(output);
            });
          }
          output.with_parens(function() {
            self2.argnames.forEach(function(arg, i) {
              if (i)
                output.comma();
              arg.print(output);
            });
          });
          output.space();
          print_braced(self2, output, true);
        });
        DEFPRINT(AST_Lambda, function(self2, output) {
          self2._do_print(output);
          output.gc_scope(self2);
        });
        DEFPRINT(AST_PrefixedTemplateString, function(self2, output) {
          var tag = self2.prefix;
          var parenthesize_tag = tag instanceof AST_Lambda || tag instanceof AST_Binary || tag instanceof AST_Conditional || tag instanceof AST_Sequence || tag instanceof AST_Unary || tag instanceof AST_Dot && tag.expression instanceof AST_Object;
          if (parenthesize_tag)
            output.print("(");
          self2.prefix.print(output);
          if (parenthesize_tag)
            output.print(")");
          self2.template_string.print(output);
        });
        DEFPRINT(AST_TemplateString, function(self2, output) {
          var is_tagged = output.parent() instanceof AST_PrefixedTemplateString;
          output.print("`");
          for (var i = 0; i < self2.segments.length; i++) {
            if (!(self2.segments[i] instanceof AST_TemplateSegment)) {
              output.print("${");
              self2.segments[i].print(output);
              output.print("}");
            } else if (is_tagged) {
              output.print(self2.segments[i].raw);
            } else {
              output.print_template_string_chars(self2.segments[i].value);
            }
          }
          output.print("`");
        });
        DEFPRINT(AST_TemplateSegment, function(self2, output) {
          output.print_template_string_chars(self2.value);
        });
        AST_Arrow.DEFMETHOD("_do_print", function(output) {
          var self2 = this;
          var parent = output.parent();
          var needs_parens = parent instanceof AST_Binary && !(parent instanceof AST_Assign) || parent instanceof AST_Unary || parent instanceof AST_Call && self2 === parent.expression;
          if (needs_parens) {
            output.print("(");
          }
          if (self2.async) {
            output.print("async");
            output.space();
          }
          if (self2.argnames.length === 1 && self2.argnames[0] instanceof AST_Symbol) {
            self2.argnames[0].print(output);
          } else {
            output.with_parens(function() {
              self2.argnames.forEach(function(arg, i) {
                if (i)
                  output.comma();
                arg.print(output);
              });
            });
          }
          output.space();
          output.print("=>");
          output.space();
          const first_statement = self2.body[0];
          if (self2.body.length === 1 && first_statement instanceof AST_Return) {
            const returned = first_statement.value;
            if (!returned) {
              output.print("{}");
            } else if (left_is_object(returned)) {
              output.print("(");
              returned.print(output);
              output.print(")");
            } else {
              returned.print(output);
            }
          } else {
            print_braced(self2, output);
          }
          if (needs_parens) {
            output.print(")");
          }
          output.gc_scope(self2);
        });
        AST_Exit.DEFMETHOD("_do_print", function(output, kind) {
          output.print(kind);
          if (this.value) {
            output.space();
            const comments = this.value.start.comments_before;
            if (comments && comments.length && !output.printed_comments.has(comments)) {
              output.print("(");
              this.value.print(output);
              output.print(")");
            } else {
              this.value.print(output);
            }
          }
          output.semicolon();
        });
        DEFPRINT(AST_Return, function(self2, output) {
          self2._do_print(output, "return");
        });
        DEFPRINT(AST_Throw, function(self2, output) {
          self2._do_print(output, "throw");
        });
        DEFPRINT(AST_Yield, function(self2, output) {
          var star = self2.is_star ? "*" : "";
          output.print("yield" + star);
          if (self2.expression) {
            output.space();
            self2.expression.print(output);
          }
        });
        DEFPRINT(AST_Await, function(self2, output) {
          output.print("await");
          output.space();
          var e = self2.expression;
          var parens = !(e instanceof AST_Call || e instanceof AST_SymbolRef || e instanceof AST_PropAccess || e instanceof AST_Unary || e instanceof AST_Constant || e instanceof AST_Await || e instanceof AST_Object);
          if (parens)
            output.print("(");
          self2.expression.print(output);
          if (parens)
            output.print(")");
        });
        AST_LoopControl.DEFMETHOD("_do_print", function(output, kind) {
          output.print(kind);
          if (this.label) {
            output.space();
            this.label.print(output);
          }
          output.semicolon();
        });
        DEFPRINT(AST_Break, function(self2, output) {
          self2._do_print(output, "break");
        });
        DEFPRINT(AST_Continue, function(self2, output) {
          self2._do_print(output, "continue");
        });
        function make_then(self2, output) {
          var b = self2.body;
          if (output.option("braces") || output.option("ie8") && b instanceof AST_Do)
            return make_block(b, output);
          if (!b)
            return output.force_semicolon();
          while (true) {
            if (b instanceof AST_If) {
              if (!b.alternative) {
                make_block(self2.body, output);
                return;
              }
              b = b.alternative;
            } else if (b instanceof AST_StatementWithBody) {
              b = b.body;
            } else
              break;
          }
          print_maybe_braced_body(self2.body, output);
        }
        DEFPRINT(AST_If, function(self2, output) {
          output.print("if");
          output.space();
          output.with_parens(function() {
            self2.condition.print(output);
          });
          output.space();
          if (self2.alternative) {
            make_then(self2, output);
            output.space();
            output.print("else");
            output.space();
            if (self2.alternative instanceof AST_If)
              self2.alternative.print(output);
            else
              print_maybe_braced_body(self2.alternative, output);
          } else {
            self2._do_print_body(output);
          }
        });
        DEFPRINT(AST_Switch, function(self2, output) {
          output.print("switch");
          output.space();
          output.with_parens(function() {
            self2.expression.print(output);
          });
          output.space();
          var last2 = self2.body.length - 1;
          if (last2 < 0)
            print_braced_empty(self2, output);
          else
            output.with_block(function() {
              self2.body.forEach(function(branch, i) {
                output.indent(true);
                branch.print(output);
                if (i < last2 && branch.body.length > 0)
                  output.newline();
              });
            });
        });
        AST_SwitchBranch.DEFMETHOD("_do_print_body", function(output) {
          output.newline();
          this.body.forEach(function(stmt) {
            output.indent();
            stmt.print(output);
            output.newline();
          });
        });
        DEFPRINT(AST_Default, function(self2, output) {
          output.print("default:");
          self2._do_print_body(output);
        });
        DEFPRINT(AST_Case, function(self2, output) {
          output.print("case");
          output.space();
          self2.expression.print(output);
          output.print(":");
          self2._do_print_body(output);
        });
        DEFPRINT(AST_Try, function(self2, output) {
          output.print("try");
          output.space();
          self2.body.print(output);
          if (self2.bcatch) {
            output.space();
            self2.bcatch.print(output);
          }
          if (self2.bfinally) {
            output.space();
            self2.bfinally.print(output);
          }
        });
        DEFPRINT(AST_TryBlock, function(self2, output) {
          print_braced(self2, output);
        });
        DEFPRINT(AST_Catch, function(self2, output) {
          output.print("catch");
          if (self2.argname) {
            output.space();
            output.with_parens(function() {
              self2.argname.print(output);
            });
          }
          output.space();
          print_braced(self2, output);
        });
        DEFPRINT(AST_Finally, function(self2, output) {
          output.print("finally");
          output.space();
          print_braced(self2, output);
        });
        AST_Definitions.DEFMETHOD("_do_print", function(output, kind) {
          output.print(kind);
          output.space();
          this.definitions.forEach(function(def, i) {
            if (i)
              output.comma();
            def.print(output);
          });
          var p = output.parent();
          var in_for = p instanceof AST_For || p instanceof AST_ForIn;
          var output_semicolon = !in_for || p && p.init !== this;
          if (output_semicolon)
            output.semicolon();
        });
        DEFPRINT(AST_Let, function(self2, output) {
          self2._do_print(output, "let");
        });
        DEFPRINT(AST_Var, function(self2, output) {
          self2._do_print(output, "var");
        });
        DEFPRINT(AST_Const, function(self2, output) {
          self2._do_print(output, "const");
        });
        DEFPRINT(AST_Import, function(self2, output) {
          output.print("import");
          output.space();
          if (self2.imported_name) {
            self2.imported_name.print(output);
          }
          if (self2.imported_name && self2.imported_names) {
            output.print(",");
            output.space();
          }
          if (self2.imported_names) {
            if (self2.imported_names.length === 1 && self2.imported_names[0].foreign_name.name === "*" && !self2.imported_names[0].foreign_name.quote) {
              self2.imported_names[0].print(output);
            } else {
              output.print("{");
              self2.imported_names.forEach(function(name_import, i) {
                output.space();
                name_import.print(output);
                if (i < self2.imported_names.length - 1) {
                  output.print(",");
                }
              });
              output.space();
              output.print("}");
            }
          }
          if (self2.imported_name || self2.imported_names) {
            output.space();
            output.print("from");
            output.space();
          }
          self2.module_name.print(output);
          if (self2.assert_clause) {
            output.print("assert");
            self2.assert_clause.print(output);
          }
          output.semicolon();
        });
        DEFPRINT(AST_ImportMeta, function(self2, output) {
          output.print("import.meta");
        });
        DEFPRINT(AST_NameMapping, function(self2, output) {
          var is_import = output.parent() instanceof AST_Import;
          var definition = self2.name.definition();
          var foreign_name = self2.foreign_name;
          var names_are_different = (definition && definition.mangled_name || self2.name.name) !== foreign_name.name;
          if (!names_are_different && foreign_name.name === "*" && foreign_name.quote != self2.name.quote) {
            names_are_different = true;
          }
          var foreign_name_is_name = foreign_name.quote == null;
          if (names_are_different) {
            if (is_import) {
              if (foreign_name_is_name) {
                output.print(foreign_name.name);
              } else {
                output.print_string(foreign_name.name, foreign_name.quote);
              }
            } else {
              if (self2.name.quote == null) {
                self2.name.print(output);
              } else {
                output.print_string(self2.name.name, self2.name.quote);
              }
            }
            output.space();
            output.print("as");
            output.space();
            if (is_import) {
              self2.name.print(output);
            } else {
              if (foreign_name_is_name) {
                output.print(foreign_name.name);
              } else {
                output.print_string(foreign_name.name, foreign_name.quote);
              }
            }
          } else {
            if (self2.name.quote == null) {
              self2.name.print(output);
            } else {
              output.print_string(self2.name.name, self2.name.quote);
            }
          }
        });
        DEFPRINT(AST_Export, function(self2, output) {
          output.print("export");
          output.space();
          if (self2.is_default) {
            output.print("default");
            output.space();
          }
          if (self2.exported_names) {
            if (self2.exported_names.length === 1 && self2.exported_names[0].name.name === "*" && !self2.exported_names[0].name.quote) {
              self2.exported_names[0].print(output);
            } else {
              output.print("{");
              self2.exported_names.forEach(function(name_export, i) {
                output.space();
                name_export.print(output);
                if (i < self2.exported_names.length - 1) {
                  output.print(",");
                }
              });
              output.space();
              output.print("}");
            }
          } else if (self2.exported_value) {
            self2.exported_value.print(output);
          } else if (self2.exported_definition) {
            self2.exported_definition.print(output);
            if (self2.exported_definition instanceof AST_Definitions)
              return;
          }
          if (self2.module_name) {
            output.space();
            output.print("from");
            output.space();
            self2.module_name.print(output);
          }
          if (self2.assert_clause) {
            output.print("assert");
            self2.assert_clause.print(output);
          }
          if (self2.exported_value && !(self2.exported_value instanceof AST_Defun || self2.exported_value instanceof AST_Function || self2.exported_value instanceof AST_Class) || self2.module_name || self2.exported_names) {
            output.semicolon();
          }
        });
        function parenthesize_for_noin(node, output, noin) {
          var parens = false;
          if (noin) {
            parens = walk(node, (node2) => {
              if (node2 instanceof AST_Scope && !(node2 instanceof AST_Arrow)) {
                return true;
              }
              if (node2 instanceof AST_Binary && node2.operator == "in" || node2 instanceof AST_PrivateIn) {
                return walk_abort;
              }
            });
          }
          node.print(output, parens);
        }
        DEFPRINT(AST_VarDef, function(self2, output) {
          self2.name.print(output);
          if (self2.value) {
            output.space();
            output.print("=");
            output.space();
            var p = output.parent(1);
            var noin = p instanceof AST_For || p instanceof AST_ForIn;
            parenthesize_for_noin(self2.value, output, noin);
          }
        });
        DEFPRINT(AST_Call, function(self2, output) {
          self2.expression.print(output);
          if (self2 instanceof AST_New && self2.args.length === 0)
            return;
          if (self2.expression instanceof AST_Call || self2.expression instanceof AST_Lambda) {
            output.add_mapping(self2.start);
          }
          if (self2.optional)
            output.print("?.");
          output.with_parens(function() {
            self2.args.forEach(function(expr, i) {
              if (i)
                output.comma();
              expr.print(output);
            });
          });
        });
        DEFPRINT(AST_New, function(self2, output) {
          output.print("new");
          output.space();
          AST_Call.prototype._codegen(self2, output);
        });
        AST_Sequence.DEFMETHOD("_do_print", function(output) {
          this.expressions.forEach(function(node, index) {
            if (index > 0) {
              output.comma();
              if (output.should_break()) {
                output.newline();
                output.indent();
              }
            }
            node.print(output);
          });
        });
        DEFPRINT(AST_Sequence, function(self2, output) {
          self2._do_print(output);
        });
        DEFPRINT(AST_Dot, function(self2, output) {
          var expr = self2.expression;
          expr.print(output);
          var prop = self2.property;
          var print_computed = ALL_RESERVED_WORDS.has(prop) ? output.option("ie8") : !is_identifier_string(prop, output.option("ecma") >= 2015 && !output.option("safari10"));
          if (self2.optional)
            output.print("?.");
          if (print_computed) {
            output.print("[");
            output.add_mapping(self2.end);
            output.print_string(prop);
            output.print("]");
          } else {
            if (expr instanceof AST_Number && expr.getValue() >= 0) {
              if (!/[xa-f.)]/i.test(output.last())) {
                output.print(".");
              }
            }
            if (!self2.optional)
              output.print(".");
            output.add_mapping(self2.end);
            output.print_name(prop);
          }
        });
        DEFPRINT(AST_DotHash, function(self2, output) {
          var expr = self2.expression;
          expr.print(output);
          var prop = self2.property;
          if (self2.optional)
            output.print("?");
          output.print(".#");
          output.add_mapping(self2.end);
          output.print_name(prop);
        });
        DEFPRINT(AST_Sub, function(self2, output) {
          self2.expression.print(output);
          if (self2.optional)
            output.print("?.");
          output.print("[");
          self2.property.print(output);
          output.print("]");
        });
        DEFPRINT(AST_Chain, function(self2, output) {
          self2.expression.print(output);
        });
        DEFPRINT(AST_UnaryPrefix, function(self2, output) {
          var op = self2.operator;
          if (op === "--" && output.last().endsWith("!")) {
            output.print(" ");
          }
          output.print(op);
          if (/^[a-z]/i.test(op) || /[+-]$/.test(op) && self2.expression instanceof AST_UnaryPrefix && /^[+-]/.test(self2.expression.operator)) {
            output.space();
          }
          self2.expression.print(output);
        });
        DEFPRINT(AST_UnaryPostfix, function(self2, output) {
          self2.expression.print(output);
          output.print(self2.operator);
        });
        DEFPRINT(AST_Binary, function(self2, output) {
          var op = self2.operator;
          self2.left.print(output);
          if (op[0] == ">" && output.last().endsWith("--")) {
            output.print(" ");
          } else {
            output.space();
          }
          output.print(op);
          output.space();
          self2.right.print(output);
        });
        DEFPRINT(AST_Conditional, function(self2, output) {
          self2.condition.print(output);
          output.space();
          output.print("?");
          output.space();
          self2.consequent.print(output);
          output.space();
          output.colon();
          self2.alternative.print(output);
        });
        DEFPRINT(AST_Array, function(self2, output) {
          output.with_square(function() {
            var a = self2.elements, len = a.length;
            if (len > 0)
              output.space();
            a.forEach(function(exp, i) {
              if (i)
                output.comma();
              exp.print(output);
              if (i === len - 1 && exp instanceof AST_Hole)
                output.comma();
            });
            if (len > 0)
              output.space();
          });
        });
        DEFPRINT(AST_Object, function(self2, output) {
          if (self2.properties.length > 0)
            output.with_block(function() {
              self2.properties.forEach(function(prop, i) {
                if (i) {
                  output.print(",");
                  output.newline();
                }
                output.indent();
                prop.print(output);
              });
              output.newline();
            });
          else
            print_braced_empty(self2, output);
        });
        DEFPRINT(AST_Class, function(self2, output) {
          output.print("class");
          output.space();
          if (self2.name) {
            self2.name.print(output);
            output.space();
          }
          if (self2.extends) {
            var parens = !(self2.extends instanceof AST_SymbolRef) && !(self2.extends instanceof AST_PropAccess) && !(self2.extends instanceof AST_ClassExpression) && !(self2.extends instanceof AST_Function);
            output.print("extends");
            if (parens) {
              output.print("(");
            } else {
              output.space();
            }
            self2.extends.print(output);
            if (parens) {
              output.print(")");
            } else {
              output.space();
            }
          }
          if (self2.properties.length > 0)
            output.with_block(function() {
              self2.properties.forEach(function(prop, i) {
                if (i) {
                  output.newline();
                }
                output.indent();
                prop.print(output);
              });
              output.newline();
            });
          else
            output.print("{}");
        });
        DEFPRINT(AST_NewTarget, function(self2, output) {
          output.print("new.target");
        });
        function print_property_name(key, quote, output) {
          if (output.option("quote_keys")) {
            output.print_string(key);
            return false;
          }
          if ("" + +key == key && key >= 0) {
            if (output.option("keep_numbers")) {
              output.print(key);
              return false;
            }
            output.print(make_num(key));
            return false;
          }
          var print_string = ALL_RESERVED_WORDS.has(key) ? output.option("ie8") : output.option("ecma") < 2015 || output.option("safari10") ? !is_basic_identifier_string(key) : !is_identifier_string(key, true);
          if (print_string || quote && output.option("keep_quoted_props")) {
            output.print_string(key, quote);
            return false;
          }
          output.print_name(key);
          return true;
        }
        DEFPRINT(AST_ObjectKeyVal, function(self2, output) {
          function get_name(self3) {
            var def = self3.definition();
            return def ? def.mangled_name || def.name : self3.name;
          }
          const try_shorthand = output.option("shorthand") && !(self2.key instanceof AST_Node);
          if (try_shorthand && self2.value instanceof AST_Symbol && get_name(self2.value) === self2.key && !ALL_RESERVED_WORDS.has(self2.key)) {
            const was_shorthand = print_property_name(self2.key, self2.quote, output);
            if (!was_shorthand) {
              output.colon();
              self2.value.print(output);
            }
          } else if (try_shorthand && self2.value instanceof AST_DefaultAssign && self2.value.left instanceof AST_Symbol && get_name(self2.value.left) === self2.key) {
            const was_shorthand = print_property_name(self2.key, self2.quote, output);
            if (!was_shorthand) {
              output.colon();
              self2.value.left.print(output);
            }
            output.space();
            output.print("=");
            output.space();
            self2.value.right.print(output);
          } else {
            if (!(self2.key instanceof AST_Node)) {
              print_property_name(self2.key, self2.quote, output);
            } else {
              output.with_square(function() {
                self2.key.print(output);
              });
            }
            output.colon();
            self2.value.print(output);
          }
        });
        DEFPRINT(AST_ClassPrivateProperty, (self2, output) => {
          if (self2.static) {
            output.print("static");
            output.space();
          }
          output.print("#");
          print_property_name(self2.key.name, self2.quote, output);
          if (self2.value) {
            output.print("=");
            self2.value.print(output);
          }
          output.semicolon();
        });
        DEFPRINT(AST_ClassProperty, (self2, output) => {
          if (self2.static) {
            output.print("static");
            output.space();
          }
          if (self2.key instanceof AST_SymbolClassProperty) {
            print_property_name(self2.key.name, self2.quote, output);
          } else {
            output.print("[");
            self2.key.print(output);
            output.print("]");
          }
          if (self2.value) {
            output.print("=");
            self2.value.print(output);
          }
          output.semicolon();
        });
        AST_ObjectProperty.DEFMETHOD("_print_getter_setter", function(type, is_private, output) {
          var self2 = this;
          if (self2.static) {
            output.print("static");
            output.space();
          }
          if (type) {
            output.print(type);
            output.space();
          }
          if (self2.key instanceof AST_SymbolMethod) {
            if (is_private)
              output.print("#");
            print_property_name(self2.key.name, self2.quote, output);
            self2.key.add_source_map(output);
          } else {
            output.with_square(function() {
              self2.key.print(output);
            });
          }
          self2.value._do_print(output, true);
        });
        DEFPRINT(AST_ObjectSetter, function(self2, output) {
          self2._print_getter_setter("set", false, output);
        });
        DEFPRINT(AST_ObjectGetter, function(self2, output) {
          self2._print_getter_setter("get", false, output);
        });
        DEFPRINT(AST_PrivateSetter, function(self2, output) {
          self2._print_getter_setter("set", true, output);
        });
        DEFPRINT(AST_PrivateGetter, function(self2, output) {
          self2._print_getter_setter("get", true, output);
        });
        DEFPRINT(AST_PrivateMethod, function(self2, output) {
          var type;
          if (self2.is_generator && self2.async) {
            type = "async*";
          } else if (self2.is_generator) {
            type = "*";
          } else if (self2.async) {
            type = "async";
          }
          self2._print_getter_setter(type, true, output);
        });
        DEFPRINT(AST_PrivateIn, function(self2, output) {
          self2.key.print(output);
          output.space();
          output.print("in");
          output.space();
          self2.value.print(output);
        });
        DEFPRINT(AST_SymbolPrivateProperty, function(self2, output) {
          output.print("#" + self2.name);
        });
        DEFPRINT(AST_ConciseMethod, function(self2, output) {
          var type;
          if (self2.is_generator && self2.async) {
            type = "async*";
          } else if (self2.is_generator) {
            type = "*";
          } else if (self2.async) {
            type = "async";
          }
          self2._print_getter_setter(type, false, output);
        });
        DEFPRINT(AST_ClassStaticBlock, function(self2, output) {
          output.print("static");
          output.space();
          print_braced(self2, output);
        });
        AST_Symbol.DEFMETHOD("_do_print", function(output) {
          var def = this.definition();
          output.print_name(def ? def.mangled_name || def.name : this.name);
        });
        DEFPRINT(AST_Symbol, function(self2, output) {
          self2._do_print(output);
        });
        DEFPRINT(AST_Hole, noop);
        DEFPRINT(AST_This, function(self2, output) {
          output.print("this");
        });
        DEFPRINT(AST_Super, function(self2, output) {
          output.print("super");
        });
        DEFPRINT(AST_Constant, function(self2, output) {
          output.print(self2.getValue());
        });
        DEFPRINT(AST_String, function(self2, output) {
          output.print_string(self2.getValue(), self2.quote, output.in_directive);
        });
        DEFPRINT(AST_Number, function(self2, output) {
          if ((output.option("keep_numbers") || output.use_asm) && self2.raw) {
            output.print(self2.raw);
          } else {
            output.print(make_num(self2.getValue()));
          }
        });
        DEFPRINT(AST_BigInt, function(self2, output) {
          output.print(self2.getValue() + "n");
        });
        const r_slash_script = /(<\s*\/\s*script)/i;
        const r_starts_with_script = /^\s*script/i;
        const slash_script_replace = (_, $1) => $1.replace("/", "\\/");
        DEFPRINT(AST_RegExp, function(self2, output) {
          let { source, flags } = self2.getValue();
          source = regexp_source_fix(source);
          flags = flags ? sort_regexp_flags(flags) : "";
          source = source.replace(r_slash_script, slash_script_replace);
          if (r_starts_with_script.test(source) && output.last().endsWith("<")) {
            output.print(" ");
          }
          output.print(output.to_utf8(`/${source}/${flags}`, false, true));
          const parent = output.parent();
          if (parent instanceof AST_Binary && /^\w/.test(parent.operator) && parent.left === self2) {
            output.print(" ");
          }
        });
        function print_maybe_braced_body(stat, output) {
          if (output.option("braces")) {
            make_block(stat, output);
          } else {
            if (!stat || stat instanceof AST_EmptyStatement)
              output.force_semicolon();
            else if (stat instanceof AST_Let || stat instanceof AST_Const || stat instanceof AST_Class)
              make_block(stat, output);
            else
              stat.print(output);
          }
        }
        function best_of2(a) {
          var best = a[0], len = best.length;
          for (var i = 1; i < a.length; ++i) {
            if (a[i].length < len) {
              best = a[i];
              len = best.length;
            }
          }
          return best;
        }
        function make_num(num) {
          var str = num.toString(10).replace(/^0\./, ".").replace("e+", "e");
          var candidates = [str];
          if (Math.floor(num) === num) {
            if (num < 0) {
              candidates.push("-0x" + (-num).toString(16).toLowerCase());
            } else {
              candidates.push("0x" + num.toString(16).toLowerCase());
            }
          }
          var match, len, digits;
          if (match = /^\.0+/.exec(str)) {
            len = match[0].length;
            digits = str.slice(len);
            candidates.push(digits + "e-" + (digits.length + len - 1));
          } else if (match = /0+$/.exec(str)) {
            len = match[0].length;
            candidates.push(str.slice(0, -len) + "e" + len);
          } else if (match = /^(\d)\.(\d+)e(-?\d+)$/.exec(str)) {
            candidates.push(match[1] + match[2] + "e" + (match[3] - match[2].length));
          }
          return best_of2(candidates);
        }
        function make_block(stmt, output) {
          if (!stmt || stmt instanceof AST_EmptyStatement)
            output.print("{}");
          else if (stmt instanceof AST_BlockStatement)
            stmt.print(output);
          else
            output.with_block(function() {
              output.indent();
              stmt.print(output);
              output.newline();
            });
        }
        function DEFMAP(nodetype, generator) {
          nodetype.forEach(function(nodetype2) {
            nodetype2.DEFMETHOD("add_source_map", generator);
          });
        }
        DEFMAP([
          AST_Node,
          AST_LabeledStatement,
          AST_Toplevel
        ], noop);
        DEFMAP([
          AST_Array,
          AST_BlockStatement,
          AST_Catch,
          AST_Class,
          AST_Constant,
          AST_Debugger,
          AST_Definitions,
          AST_Directive,
          AST_Finally,
          AST_Jump,
          AST_Lambda,
          AST_New,
          AST_Object,
          AST_StatementWithBody,
          AST_Symbol,
          AST_Switch,
          AST_SwitchBranch,
          AST_TemplateString,
          AST_TemplateSegment,
          AST_Try
        ], function(output) {
          output.add_mapping(this.start);
        });
        DEFMAP([
          AST_ObjectGetter,
          AST_ObjectSetter,
          AST_PrivateGetter,
          AST_PrivateSetter,
          AST_ConciseMethod,
          AST_PrivateMethod
        ], function(output) {
          output.add_mapping(this.start, false);
        });
        DEFMAP([
          AST_SymbolMethod,
          AST_SymbolPrivateProperty
        ], function(output) {
          const tok_type = this.end && this.end.type;
          if (tok_type === "name" || tok_type === "privatename") {
            output.add_mapping(this.end, this.name);
          } else {
            output.add_mapping(this.end);
          }
        });
        DEFMAP([AST_ObjectProperty], function(output) {
          output.add_mapping(this.start, this.key);
        });
      })();
      const shallow_cmp = (node1, node2) => {
        return node1 === null && node2 === null || node1.TYPE === node2.TYPE && node1.shallow_cmp(node2);
      };
      const equivalent_to = (tree1, tree2) => {
        if (!shallow_cmp(tree1, tree2))
          return false;
        const walk_1_state = [tree1];
        const walk_2_state = [tree2];
        const walk_1_push = walk_1_state.push.bind(walk_1_state);
        const walk_2_push = walk_2_state.push.bind(walk_2_state);
        while (walk_1_state.length && walk_2_state.length) {
          const node_1 = walk_1_state.pop();
          const node_2 = walk_2_state.pop();
          if (!shallow_cmp(node_1, node_2))
            return false;
          node_1._children_backwards(walk_1_push);
          node_2._children_backwards(walk_2_push);
          if (walk_1_state.length !== walk_2_state.length) {
            return false;
          }
        }
        return walk_1_state.length == 0 && walk_2_state.length == 0;
      };
      const pass_through = () => true;
      AST_Node.prototype.shallow_cmp = function() {
        throw new Error("did not find a shallow_cmp function for " + this.constructor.name);
      };
      AST_Debugger.prototype.shallow_cmp = pass_through;
      AST_Directive.prototype.shallow_cmp = function(other) {
        return this.value === other.value;
      };
      AST_SimpleStatement.prototype.shallow_cmp = pass_through;
      AST_Block.prototype.shallow_cmp = pass_through;
      AST_EmptyStatement.prototype.shallow_cmp = pass_through;
      AST_LabeledStatement.prototype.shallow_cmp = function(other) {
        return this.label.name === other.label.name;
      };
      AST_Do.prototype.shallow_cmp = pass_through;
      AST_While.prototype.shallow_cmp = pass_through;
      AST_For.prototype.shallow_cmp = function(other) {
        return (this.init == null ? other.init == null : this.init === other.init) && (this.condition == null ? other.condition == null : this.condition === other.condition) && (this.step == null ? other.step == null : this.step === other.step);
      };
      AST_ForIn.prototype.shallow_cmp = pass_through;
      AST_ForOf.prototype.shallow_cmp = pass_through;
      AST_With.prototype.shallow_cmp = pass_through;
      AST_Toplevel.prototype.shallow_cmp = pass_through;
      AST_Expansion.prototype.shallow_cmp = pass_through;
      AST_Lambda.prototype.shallow_cmp = function(other) {
        return this.is_generator === other.is_generator && this.async === other.async;
      };
      AST_Destructuring.prototype.shallow_cmp = function(other) {
        return this.is_array === other.is_array;
      };
      AST_PrefixedTemplateString.prototype.shallow_cmp = pass_through;
      AST_TemplateString.prototype.shallow_cmp = pass_through;
      AST_TemplateSegment.prototype.shallow_cmp = function(other) {
        return this.value === other.value;
      };
      AST_Jump.prototype.shallow_cmp = pass_through;
      AST_LoopControl.prototype.shallow_cmp = pass_through;
      AST_Await.prototype.shallow_cmp = pass_through;
      AST_Yield.prototype.shallow_cmp = function(other) {
        return this.is_star === other.is_star;
      };
      AST_If.prototype.shallow_cmp = function(other) {
        return this.alternative == null ? other.alternative == null : this.alternative === other.alternative;
      };
      AST_Switch.prototype.shallow_cmp = pass_through;
      AST_SwitchBranch.prototype.shallow_cmp = pass_through;
      AST_Try.prototype.shallow_cmp = function(other) {
        return this.body === other.body && (this.bcatch == null ? other.bcatch == null : this.bcatch === other.bcatch) && (this.bfinally == null ? other.bfinally == null : this.bfinally === other.bfinally);
      };
      AST_Catch.prototype.shallow_cmp = function(other) {
        return this.argname == null ? other.argname == null : this.argname === other.argname;
      };
      AST_Finally.prototype.shallow_cmp = pass_through;
      AST_Definitions.prototype.shallow_cmp = pass_through;
      AST_VarDef.prototype.shallow_cmp = function(other) {
        return this.value == null ? other.value == null : this.value === other.value;
      };
      AST_NameMapping.prototype.shallow_cmp = pass_through;
      AST_Import.prototype.shallow_cmp = function(other) {
        return (this.imported_name == null ? other.imported_name == null : this.imported_name === other.imported_name) && (this.imported_names == null ? other.imported_names == null : this.imported_names === other.imported_names);
      };
      AST_ImportMeta.prototype.shallow_cmp = pass_through;
      AST_Export.prototype.shallow_cmp = function(other) {
        return (this.exported_definition == null ? other.exported_definition == null : this.exported_definition === other.exported_definition) && (this.exported_value == null ? other.exported_value == null : this.exported_value === other.exported_value) && (this.exported_names == null ? other.exported_names == null : this.exported_names === other.exported_names) && this.module_name === other.module_name && this.is_default === other.is_default;
      };
      AST_Call.prototype.shallow_cmp = pass_through;
      AST_Sequence.prototype.shallow_cmp = pass_through;
      AST_PropAccess.prototype.shallow_cmp = pass_through;
      AST_Chain.prototype.shallow_cmp = pass_through;
      AST_Dot.prototype.shallow_cmp = function(other) {
        return this.property === other.property;
      };
      AST_DotHash.prototype.shallow_cmp = function(other) {
        return this.property === other.property;
      };
      AST_Unary.prototype.shallow_cmp = function(other) {
        return this.operator === other.operator;
      };
      AST_Binary.prototype.shallow_cmp = function(other) {
        return this.operator === other.operator;
      };
      AST_Conditional.prototype.shallow_cmp = pass_through;
      AST_Array.prototype.shallow_cmp = pass_through;
      AST_Object.prototype.shallow_cmp = pass_through;
      AST_ObjectProperty.prototype.shallow_cmp = pass_through;
      AST_ObjectKeyVal.prototype.shallow_cmp = function(other) {
        return this.key === other.key;
      };
      AST_ObjectSetter.prototype.shallow_cmp = function(other) {
        return this.static === other.static;
      };
      AST_ObjectGetter.prototype.shallow_cmp = function(other) {
        return this.static === other.static;
      };
      AST_ConciseMethod.prototype.shallow_cmp = function(other) {
        return this.static === other.static && this.is_generator === other.is_generator && this.async === other.async;
      };
      AST_Class.prototype.shallow_cmp = function(other) {
        return (this.name == null ? other.name == null : this.name === other.name) && (this.extends == null ? other.extends == null : this.extends === other.extends);
      };
      AST_ClassProperty.prototype.shallow_cmp = function(other) {
        return this.static === other.static;
      };
      AST_Symbol.prototype.shallow_cmp = function(other) {
        return this.name === other.name;
      };
      AST_NewTarget.prototype.shallow_cmp = pass_through;
      AST_This.prototype.shallow_cmp = pass_through;
      AST_Super.prototype.shallow_cmp = pass_through;
      AST_String.prototype.shallow_cmp = function(other) {
        return this.value === other.value;
      };
      AST_Number.prototype.shallow_cmp = function(other) {
        return this.value === other.value;
      };
      AST_BigInt.prototype.shallow_cmp = function(other) {
        return this.value === other.value;
      };
      AST_RegExp.prototype.shallow_cmp = function(other) {
        return this.value.flags === other.value.flags && this.value.source === other.value.source;
      };
      AST_Atom.prototype.shallow_cmp = pass_through;
      const MASK_EXPORT_DONT_MANGLE = 1 << 0;
      const MASK_EXPORT_WANT_MANGLE = 1 << 1;
      let function_defs = null;
      let unmangleable_names = null;
      let scopes_with_block_defuns = null;
      class SymbolDef {
        constructor(scope, orig, init) {
          this.name = orig.name;
          this.orig = [orig];
          this.init = init;
          this.eliminated = 0;
          this.assignments = 0;
          this.scope = scope;
          this.replaced = 0;
          this.global = false;
          this.export = 0;
          this.mangled_name = null;
          this.undeclared = false;
          this.id = SymbolDef.next_id++;
          this.chained = false;
          this.direct_access = false;
          this.escaped = 0;
          this.recursive_refs = 0;
          this.references = [];
          this.should_replace = void 0;
          this.single_use = false;
          this.fixed = false;
          Object.seal(this);
        }
        fixed_value() {
          if (!this.fixed || this.fixed instanceof AST_Node)
            return this.fixed;
          return this.fixed();
        }
        unmangleable(options) {
          if (!options)
            options = {};
          if (function_defs && function_defs.has(this.id) && keep_name(options.keep_fnames, this.orig[0].name))
            return true;
          return this.global && !options.toplevel || this.export & MASK_EXPORT_DONT_MANGLE || this.undeclared || !options.eval && this.scope.pinned() || (this.orig[0] instanceof AST_SymbolLambda || this.orig[0] instanceof AST_SymbolDefun) && keep_name(options.keep_fnames, this.orig[0].name) || this.orig[0] instanceof AST_SymbolMethod || (this.orig[0] instanceof AST_SymbolClass || this.orig[0] instanceof AST_SymbolDefClass) && keep_name(options.keep_classnames, this.orig[0].name);
        }
        mangle(options) {
          const cache = options.cache && options.cache.props;
          if (this.global && cache && cache.has(this.name)) {
            this.mangled_name = cache.get(this.name);
          } else if (!this.mangled_name && !this.unmangleable(options)) {
            var s = this.scope;
            var sym = this.orig[0];
            if (options.ie8 && sym instanceof AST_SymbolLambda)
              s = s.parent_scope;
            const redefinition = redefined_catch_def(this);
            this.mangled_name = redefinition ? redefinition.mangled_name || redefinition.name : s.next_mangled(options, this);
            if (this.global && cache) {
              cache.set(this.name, this.mangled_name);
            }
          }
        }
      }
      SymbolDef.next_id = 1;
      function redefined_catch_def(def) {
        if (def.orig[0] instanceof AST_SymbolCatch && def.scope.is_block_scope()) {
          return def.scope.get_defun_scope().variables.get(def.name);
        }
      }
      AST_Scope.DEFMETHOD("figure_out_scope", function(options, { parent_scope = null, toplevel = this } = {}) {
        options = defaults(options, {
          cache: null,
          ie8: false,
          safari10: false,
          module: false
        });
        if (!(toplevel instanceof AST_Toplevel)) {
          throw new Error("Invalid toplevel scope");
        }
        var scope = this.parent_scope = parent_scope;
        var labels = /* @__PURE__ */ new Map();
        var defun = null;
        var in_destructuring = null;
        var for_scopes = [];
        var tw = new TreeWalker((node, descend) => {
          if (node.is_block_scope()) {
            const save_scope2 = scope;
            node.block_scope = scope = new AST_Scope(node);
            scope._block_scope = true;
            scope.init_scope_vars(save_scope2);
            scope.uses_with = save_scope2.uses_with;
            scope.uses_eval = save_scope2.uses_eval;
            if (options.safari10) {
              if (node instanceof AST_For || node instanceof AST_ForIn || node instanceof AST_ForOf) {
                for_scopes.push(scope);
              }
            }
            if (node instanceof AST_Switch) {
              const the_block_scope = scope;
              scope = save_scope2;
              node.expression.walk(tw);
              scope = the_block_scope;
              for (let i = 0; i < node.body.length; i++) {
                node.body[i].walk(tw);
              }
            } else {
              descend();
            }
            scope = save_scope2;
            return true;
          }
          if (node instanceof AST_Destructuring) {
            const save_destructuring = in_destructuring;
            in_destructuring = node;
            descend();
            in_destructuring = save_destructuring;
            return true;
          }
          if (node instanceof AST_Scope) {
            node.init_scope_vars(scope);
            var save_scope = scope;
            var save_defun = defun;
            var save_labels = labels;
            defun = scope = node;
            labels = /* @__PURE__ */ new Map();
            descend();
            scope = save_scope;
            defun = save_defun;
            labels = save_labels;
            return true;
          }
          if (node instanceof AST_LabeledStatement) {
            var l = node.label;
            if (labels.has(l.name)) {
              throw new Error(string_template("Label {name} defined twice", l));
            }
            labels.set(l.name, l);
            descend();
            labels.delete(l.name);
            return true;
          }
          if (node instanceof AST_With) {
            for (var s = scope; s; s = s.parent_scope)
              s.uses_with = true;
            return;
          }
          if (node instanceof AST_Symbol) {
            node.scope = scope;
          }
          if (node instanceof AST_Label) {
            node.thedef = node;
            node.references = [];
          }
          if (node instanceof AST_SymbolLambda) {
            defun.def_function(node, node.name == "arguments" ? void 0 : defun);
          } else if (node instanceof AST_SymbolDefun) {
            const closest_scope = defun.parent_scope;
            node.scope = tw.directives["use strict"] ? closest_scope : closest_scope.get_defun_scope();
            mark_export(node.scope.def_function(node, defun), 1);
          } else if (node instanceof AST_SymbolClass) {
            mark_export(defun.def_variable(node, defun), 1);
          } else if (node instanceof AST_SymbolImport) {
            scope.def_variable(node);
          } else if (node instanceof AST_SymbolDefClass) {
            mark_export((node.scope = defun.parent_scope).def_function(node, defun), 1);
          } else if (node instanceof AST_SymbolVar || node instanceof AST_SymbolLet || node instanceof AST_SymbolConst || node instanceof AST_SymbolCatch) {
            var def;
            if (node instanceof AST_SymbolBlockDeclaration) {
              def = scope.def_variable(node, null);
            } else {
              def = defun.def_variable(node, node.TYPE == "SymbolVar" ? null : void 0);
            }
            if (!def.orig.every((sym2) => {
              if (sym2 === node)
                return true;
              if (node instanceof AST_SymbolBlockDeclaration) {
                return sym2 instanceof AST_SymbolLambda;
              }
              return !(sym2 instanceof AST_SymbolLet || sym2 instanceof AST_SymbolConst);
            })) {
              js_error(`"${node.name}" is redeclared`, node.start.file, node.start.line, node.start.col, node.start.pos);
            }
            if (!(node instanceof AST_SymbolFunarg))
              mark_export(def, 2);
            if (defun !== scope) {
              node.mark_enclosed();
              var def = scope.find_variable(node);
              if (node.thedef !== def) {
                node.thedef = def;
                node.reference();
              }
            }
          } else if (node instanceof AST_LabelRef) {
            var sym = labels.get(node.name);
            if (!sym)
              throw new Error(string_template("Undefined label {name} [{line},{col}]", {
                name: node.name,
                line: node.start.line,
                col: node.start.col
              }));
            node.thedef = sym;
          }
          if (!(scope instanceof AST_Toplevel) && (node instanceof AST_Export || node instanceof AST_Import)) {
            js_error(`"${node.TYPE}" statement may only appear at the top level`, node.start.file, node.start.line, node.start.col, node.start.pos);
          }
        });
        if (options.module) {
          tw.directives["use strict"] = true;
        }
        this.walk(tw);
        function mark_export(def, level) {
          if (in_destructuring) {
            var i = 0;
            do {
              level++;
            } while (tw.parent(i++) !== in_destructuring);
          }
          var node = tw.parent(level);
          if (def.export = node instanceof AST_Export ? MASK_EXPORT_DONT_MANGLE : 0) {
            var exported = node.exported_definition;
            if ((exported instanceof AST_Defun || exported instanceof AST_DefClass) && node.is_default) {
              def.export = MASK_EXPORT_WANT_MANGLE;
            }
          }
        }
        const is_toplevel = this instanceof AST_Toplevel;
        if (is_toplevel) {
          this.globals = /* @__PURE__ */ new Map();
        }
        var tw = new TreeWalker((node) => {
          if (node instanceof AST_LoopControl && node.label) {
            node.label.thedef.references.push(node);
            return true;
          }
          if (node instanceof AST_SymbolRef) {
            var name = node.name;
            if (name == "eval" && tw.parent() instanceof AST_Call) {
              for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) {
                s.uses_eval = true;
              }
            }
            var sym;
            if (tw.parent() instanceof AST_NameMapping && tw.parent(1).module_name || !(sym = node.scope.find_variable(name))) {
              sym = toplevel.def_global(node);
              if (node instanceof AST_SymbolExport)
                sym.export = MASK_EXPORT_DONT_MANGLE;
            } else if (sym.scope instanceof AST_Lambda && name == "arguments") {
              sym.scope.get_defun_scope().uses_arguments = true;
            }
            node.thedef = sym;
            node.reference();
            if (node.scope.is_block_scope() && !(sym.orig[0] instanceof AST_SymbolBlockDeclaration)) {
              node.scope = node.scope.get_defun_scope();
            }
            return true;
          }
          var def;
          if (node instanceof AST_SymbolCatch && (def = redefined_catch_def(node.definition()))) {
            var s = node.scope;
            while (s) {
              push_uniq(s.enclosed, def);
              if (s === def.scope)
                break;
              s = s.parent_scope;
            }
          }
        });
        this.walk(tw);
        if (options.ie8 || options.safari10) {
          walk(this, (node) => {
            if (node instanceof AST_SymbolCatch) {
              var name = node.name;
              var refs = node.thedef.references;
              var scope2 = node.scope.get_defun_scope();
              var def = scope2.find_variable(name) || toplevel.globals.get(name) || scope2.def_variable(node);
              refs.forEach(function(ref) {
                ref.thedef = def;
                ref.reference();
              });
              node.thedef = def;
              node.reference();
              return true;
            }
          });
        }
        if (options.safari10) {
          for (const scope2 of for_scopes) {
            scope2.parent_scope.variables.forEach(function(def) {
              push_uniq(scope2.enclosed, def);
            });
          }
        }
      });
      AST_Toplevel.DEFMETHOD("def_global", function(node) {
        var globals = this.globals, name = node.name;
        if (globals.has(name)) {
          return globals.get(name);
        } else {
          var g = new SymbolDef(this, node);
          g.undeclared = true;
          g.global = true;
          globals.set(name, g);
          return g;
        }
      });
      AST_Scope.DEFMETHOD("init_scope_vars", function(parent_scope) {
        this.variables = /* @__PURE__ */ new Map();
        this.uses_with = false;
        this.uses_eval = false;
        this.parent_scope = parent_scope;
        this.enclosed = [];
        this.cname = -1;
      });
      AST_Scope.DEFMETHOD("conflicting_def", function(name) {
        return this.enclosed.find((def) => def.name === name) || this.variables.has(name) || this.parent_scope && this.parent_scope.conflicting_def(name);
      });
      AST_Scope.DEFMETHOD("conflicting_def_shallow", function(name) {
        return this.enclosed.find((def) => def.name === name) || this.variables.has(name);
      });
      AST_Scope.DEFMETHOD("add_child_scope", function(scope) {
        if (scope.parent_scope === this)
          return;
        scope.parent_scope = this;
        if (scope instanceof AST_Arrow && !this.uses_arguments) {
          this.uses_arguments = walk(scope, (node) => {
            if (node instanceof AST_SymbolRef && node.scope instanceof AST_Lambda && node.name === "arguments") {
              return walk_abort;
            }
            if (node instanceof AST_Lambda && !(node instanceof AST_Arrow)) {
              return true;
            }
          });
        }
        this.uses_with = this.uses_with || scope.uses_with;
        this.uses_eval = this.uses_eval || scope.uses_eval;
        const scope_ancestry = (() => {
          const ancestry = [];
          let cur = this;
          do {
            ancestry.push(cur);
          } while (cur = cur.parent_scope);
          ancestry.reverse();
          return ancestry;
        })();
        const new_scope_enclosed_set = new Set(scope.enclosed);
        const to_enclose = [];
        for (const scope_topdown of scope_ancestry) {
          to_enclose.forEach((e) => push_uniq(scope_topdown.enclosed, e));
          for (const def of scope_topdown.variables.values()) {
            if (new_scope_enclosed_set.has(def)) {
              push_uniq(to_enclose, def);
              push_uniq(scope_topdown.enclosed, def);
            }
          }
        }
      });
      function find_scopes_visible_from(scopes) {
        const found_scopes = /* @__PURE__ */ new Set();
        for (const scope of new Set(scopes)) {
          (function bubble_up(scope2) {
            if (scope2 == null || found_scopes.has(scope2))
              return;
            found_scopes.add(scope2);
            bubble_up(scope2.parent_scope);
          })(scope);
        }
        return [...found_scopes];
      }
      AST_Scope.DEFMETHOD("create_symbol", function(SymClass, {
        source,
        tentative_name,
        scope,
        conflict_scopes = [scope],
        init = null
      } = {}) {
        let symbol_name;
        conflict_scopes = find_scopes_visible_from(conflict_scopes);
        if (tentative_name) {
          tentative_name = symbol_name = tentative_name.replace(/(?:^[^a-z_$]|[^a-z0-9_$])/ig, "_");
          let i = 0;
          while (conflict_scopes.find((s) => s.conflicting_def_shallow(symbol_name))) {
            symbol_name = tentative_name + "$" + i++;
          }
        }
        if (!symbol_name) {
          throw new Error("No symbol name could be generated in create_symbol()");
        }
        const symbol = make_node(SymClass, source, {
          name: symbol_name,
          scope
        });
        this.def_variable(symbol, init || null);
        symbol.mark_enclosed();
        return symbol;
      });
      AST_Node.DEFMETHOD("is_block_scope", return_false);
      AST_Class.DEFMETHOD("is_block_scope", return_false);
      AST_Lambda.DEFMETHOD("is_block_scope", return_false);
      AST_Toplevel.DEFMETHOD("is_block_scope", return_false);
      AST_SwitchBranch.DEFMETHOD("is_block_scope", return_false);
      AST_Block.DEFMETHOD("is_block_scope", return_true);
      AST_Scope.DEFMETHOD("is_block_scope", function() {
        return this._block_scope || false;
      });
      AST_IterationStatement.DEFMETHOD("is_block_scope", return_true);
      AST_Lambda.DEFMETHOD("init_scope_vars", function() {
        AST_Scope.prototype.init_scope_vars.apply(this, arguments);
        this.uses_arguments = false;
        this.def_variable(new AST_SymbolFunarg({
          name: "arguments",
          start: this.start,
          end: this.end
        }));
      });
      AST_Arrow.DEFMETHOD("init_scope_vars", function() {
        AST_Scope.prototype.init_scope_vars.apply(this, arguments);
        this.uses_arguments = false;
      });
      AST_Symbol.DEFMETHOD("mark_enclosed", function() {
        var def = this.definition();
        var s = this.scope;
        while (s) {
          push_uniq(s.enclosed, def);
          if (s === def.scope)
            break;
          s = s.parent_scope;
        }
      });
      AST_Symbol.DEFMETHOD("reference", function() {
        this.definition().references.push(this);
        this.mark_enclosed();
      });
      AST_Scope.DEFMETHOD("find_variable", function(name) {
        if (name instanceof AST_Symbol)
          name = name.name;
        return this.variables.get(name) || this.parent_scope && this.parent_scope.find_variable(name);
      });
      AST_Scope.DEFMETHOD("def_function", function(symbol, init) {
        var def = this.def_variable(symbol, init);
        if (!def.init || def.init instanceof AST_Defun)
          def.init = init;
        return def;
      });
      AST_Scope.DEFMETHOD("def_variable", function(symbol, init) {
        var def = this.variables.get(symbol.name);
        if (def) {
          def.orig.push(symbol);
          if (def.init && (def.scope !== symbol.scope || def.init instanceof AST_Function)) {
            def.init = init;
          }
        } else {
          def = new SymbolDef(this, symbol, init);
          this.variables.set(symbol.name, def);
          def.global = !this.parent_scope;
        }
        return symbol.thedef = def;
      });
      function next_mangled(scope, options) {
        let defun_scope;
        if (scopes_with_block_defuns && (defun_scope = scope.get_defun_scope()) && scopes_with_block_defuns.has(defun_scope)) {
          scope = defun_scope;
        }
        var ext = scope.enclosed;
        var nth_identifier = options.nth_identifier;
        out:
          while (true) {
            var m = nth_identifier.get(++scope.cname);
            if (ALL_RESERVED_WORDS.has(m))
              continue;
            if (options.reserved.has(m))
              continue;
            if (unmangleable_names && unmangleable_names.has(m))
              continue out;
            for (let i = ext.length; --i >= 0; ) {
              const def = ext[i];
              const name = def.mangled_name || def.unmangleable(options) && def.name;
              if (m == name)
                continue out;
            }
            return m;
          }
      }
      AST_Scope.DEFMETHOD("next_mangled", function(options) {
        return next_mangled(this, options);
      });
      AST_Toplevel.DEFMETHOD("next_mangled", function(options) {
        let name;
        const mangled_names = this.mangled_names;
        do {
          name = next_mangled(this, options);
        } while (mangled_names.has(name));
        return name;
      });
      AST_Function.DEFMETHOD("next_mangled", function(options, def) {
        var tricky_def = def.orig[0] instanceof AST_SymbolFunarg && this.name && this.name.definition();
        var tricky_name = tricky_def ? tricky_def.mangled_name || tricky_def.name : null;
        while (true) {
          var name = next_mangled(this, options);
          if (!tricky_name || tricky_name != name)
            return name;
        }
      });
      AST_Symbol.DEFMETHOD("unmangleable", function(options) {
        var def = this.definition();
        return !def || def.unmangleable(options);
      });
      AST_Label.DEFMETHOD("unmangleable", return_false);
      AST_Symbol.DEFMETHOD("unreferenced", function() {
        return !this.definition().references.length && !this.scope.pinned();
      });
      AST_Symbol.DEFMETHOD("definition", function() {
        return this.thedef;
      });
      AST_Symbol.DEFMETHOD("global", function() {
        return this.thedef.global;
      });
      function format_mangler_options(options) {
        options = defaults(options, {
          eval: false,
          nth_identifier: base54,
          ie8: false,
          keep_classnames: false,
          keep_fnames: false,
          module: false,
          reserved: [],
          toplevel: false
        });
        if (options.module)
          options.toplevel = true;
        if (!Array.isArray(options.reserved) && !(options.reserved instanceof Set)) {
          options.reserved = [];
        }
        options.reserved = new Set(options.reserved);
        options.reserved.add("arguments");
        return options;
      }
      AST_Toplevel.DEFMETHOD("mangle_names", function(options) {
        options = format_mangler_options(options);
        var nth_identifier = options.nth_identifier;
        var lname = -1;
        var to_mangle = [];
        if (options.keep_fnames) {
          function_defs = /* @__PURE__ */ new Set();
        }
        const mangled_names = this.mangled_names = /* @__PURE__ */ new Set();
        unmangleable_names = /* @__PURE__ */ new Set();
        if (options.cache) {
          this.globals.forEach(collect);
          if (options.cache.props) {
            options.cache.props.forEach(function(mangled_name) {
              mangled_names.add(mangled_name);
            });
          }
        }
        var tw = new TreeWalker(function(node, descend) {
          if (node instanceof AST_LabeledStatement) {
            var save_nesting = lname;
            descend();
            lname = save_nesting;
            return true;
          }
          if (node instanceof AST_Defun && !(tw.parent() instanceof AST_Scope)) {
            scopes_with_block_defuns = scopes_with_block_defuns || /* @__PURE__ */ new Set();
            scopes_with_block_defuns.add(node.parent_scope.get_defun_scope());
          }
          if (node instanceof AST_Scope) {
            node.variables.forEach(collect);
            return;
          }
          if (node.is_block_scope()) {
            node.block_scope.variables.forEach(collect);
            return;
          }
          if (function_defs && node instanceof AST_VarDef && node.value instanceof AST_Lambda && !node.value.name && keep_name(options.keep_fnames, node.name.name)) {
            function_defs.add(node.name.definition().id);
            return;
          }
          if (node instanceof AST_Label) {
            let name;
            do {
              name = nth_identifier.get(++lname);
            } while (ALL_RESERVED_WORDS.has(name));
            node.mangled_name = name;
            return true;
          }
          if (!(options.ie8 || options.safari10) && node instanceof AST_SymbolCatch) {
            to_mangle.push(node.definition());
            return;
          }
        });
        this.walk(tw);
        if (options.keep_fnames || options.keep_classnames) {
          to_mangle.forEach((def) => {
            if (def.name.length < 6 && def.unmangleable(options)) {
              unmangleable_names.add(def.name);
            }
          });
        }
        to_mangle.forEach((def) => {
          def.mangle(options);
        });
        function_defs = null;
        unmangleable_names = null;
        scopes_with_block_defuns = null;
        function collect(symbol) {
          if (symbol.export & MASK_EXPORT_DONT_MANGLE) {
            unmangleable_names.add(symbol.name);
          } else if (!options.reserved.has(symbol.name)) {
            to_mangle.push(symbol);
          }
        }
      });
      AST_Toplevel.DEFMETHOD("find_colliding_names", function(options) {
        const cache = options.cache && options.cache.props;
        const avoid = /* @__PURE__ */ new Set();
        options.reserved.forEach(to_avoid);
        this.globals.forEach(add_def);
        this.walk(new TreeWalker(function(node) {
          if (node instanceof AST_Scope)
            node.variables.forEach(add_def);
          if (node instanceof AST_SymbolCatch)
            add_def(node.definition());
        }));
        return avoid;
        function to_avoid(name) {
          avoid.add(name);
        }
        function add_def(def) {
          var name = def.name;
          if (def.global && cache && cache.has(name))
            name = cache.get(name);
          else if (!def.unmangleable(options))
            return;
          to_avoid(name);
        }
      });
      AST_Toplevel.DEFMETHOD("expand_names", function(options) {
        options = format_mangler_options(options);
        var nth_identifier = options.nth_identifier;
        if (nth_identifier.reset && nth_identifier.sort) {
          nth_identifier.reset();
          nth_identifier.sort();
        }
        var avoid = this.find_colliding_names(options);
        var cname = 0;
        this.globals.forEach(rename);
        this.walk(new TreeWalker(function(node) {
          if (node instanceof AST_Scope)
            node.variables.forEach(rename);
          if (node instanceof AST_SymbolCatch)
            rename(node.definition());
        }));
        function next_name() {
          var name;
          do {
            name = nth_identifier.get(cname++);
          } while (avoid.has(name) || ALL_RESERVED_WORDS.has(name));
          return name;
        }
        function rename(def) {
          if (def.global && options.cache)
            return;
          if (def.unmangleable(options))
            return;
          if (options.reserved.has(def.name))
            return;
          const redefinition = redefined_catch_def(def);
          const name = def.name = redefinition ? redefinition.name : next_name();
          def.orig.forEach(function(sym) {
            sym.name = name;
          });
          def.references.forEach(function(sym) {
            sym.name = name;
          });
        }
      });
      AST_Node.DEFMETHOD("tail_node", return_this);
      AST_Sequence.DEFMETHOD("tail_node", function() {
        return this.expressions[this.expressions.length - 1];
      });
      AST_Toplevel.DEFMETHOD("compute_char_frequency", function(options) {
        options = format_mangler_options(options);
        var nth_identifier = options.nth_identifier;
        if (!nth_identifier.reset || !nth_identifier.consider || !nth_identifier.sort) {
          return;
        }
        nth_identifier.reset();
        try {
          AST_Node.prototype.print = function(stream, force_parens) {
            this._print(stream, force_parens);
            if (this instanceof AST_Symbol && !this.unmangleable(options)) {
              nth_identifier.consider(this.name, -1);
            } else if (options.properties) {
              if (this instanceof AST_DotHash) {
                nth_identifier.consider("#" + this.property, -1);
              } else if (this instanceof AST_Dot) {
                nth_identifier.consider(this.property, -1);
              } else if (this instanceof AST_Sub) {
                skip_string(this.property);
              }
            }
          };
          nth_identifier.consider(this.print_to_string(), 1);
        } finally {
          AST_Node.prototype.print = AST_Node.prototype._print;
        }
        nth_identifier.sort();
        function skip_string(node) {
          if (node instanceof AST_String) {
            nth_identifier.consider(node.value, -1);
          } else if (node instanceof AST_Conditional) {
            skip_string(node.consequent);
            skip_string(node.alternative);
          } else if (node instanceof AST_Sequence) {
            skip_string(node.tail_node());
          }
        }
      });
      const base54 = (() => {
        const leading = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_".split("");
        const digits = "0123456789".split("");
        let chars;
        let frequency;
        function reset() {
          frequency = /* @__PURE__ */ new Map();
          leading.forEach(function(ch) {
            frequency.set(ch, 0);
          });
          digits.forEach(function(ch) {
            frequency.set(ch, 0);
          });
        }
        function consider(str, delta) {
          for (var i = str.length; --i >= 0; ) {
            frequency.set(str[i], frequency.get(str[i]) + delta);
          }
        }
        function compare(a, b) {
          return frequency.get(b) - frequency.get(a);
        }
        function sort() {
          chars = mergeSort(leading, compare).concat(mergeSort(digits, compare));
        }
        reset();
        sort();
        function base542(num) {
          var ret = "", base = 54;
          num++;
          do {
            num--;
            ret += chars[num % base];
            num = Math.floor(num / base);
            base = 64;
          } while (num > 0);
          return ret;
        }
        return {
          get: base542,
          consider,
          reset,
          sort
        };
      })();
      let mangle_options = void 0;
      AST_Node.prototype.size = function(compressor, stack) {
        mangle_options = compressor && compressor._mangle_options;
        let size = 0;
        walk_parent(this, (node, info) => {
          size += node._size(info);
          if (node instanceof AST_Arrow && node.is_braceless()) {
            size += node.body[0].value._size(info);
            return true;
          }
        }, stack || compressor && compressor.stack);
        mangle_options = void 0;
        return size;
      };
      AST_Node.prototype._size = () => 0;
      AST_Debugger.prototype._size = () => 8;
      AST_Directive.prototype._size = function() {
        return 2 + this.value.length;
      };
      const list_overhead = (array) => array.length && array.length - 1;
      AST_Block.prototype._size = function() {
        return 2 + list_overhead(this.body);
      };
      AST_Toplevel.prototype._size = function() {
        return list_overhead(this.body);
      };
      AST_EmptyStatement.prototype._size = () => 1;
      AST_LabeledStatement.prototype._size = () => 2;
      AST_Do.prototype._size = () => 9;
      AST_While.prototype._size = () => 7;
      AST_For.prototype._size = () => 8;
      AST_ForIn.prototype._size = () => 8;
      AST_With.prototype._size = () => 6;
      AST_Expansion.prototype._size = () => 3;
      const lambda_modifiers = (func) => (func.is_generator ? 1 : 0) + (func.async ? 6 : 0);
      AST_Accessor.prototype._size = function() {
        return lambda_modifiers(this) + 4 + list_overhead(this.argnames) + list_overhead(this.body);
      };
      AST_Function.prototype._size = function(info) {
        const first = !!first_in_statement(info);
        return first * 2 + lambda_modifiers(this) + 12 + list_overhead(this.argnames) + list_overhead(this.body);
      };
      AST_Defun.prototype._size = function() {
        return lambda_modifiers(this) + 13 + list_overhead(this.argnames) + list_overhead(this.body);
      };
      AST_Arrow.prototype._size = function() {
        let args_and_arrow = 2 + list_overhead(this.argnames);
        if (!(this.argnames.length === 1 && this.argnames[0] instanceof AST_Symbol)) {
          args_and_arrow += 2;
        }
        const body_overhead = this.is_braceless() ? 0 : list_overhead(this.body) + 2;
        return lambda_modifiers(this) + args_and_arrow + body_overhead;
      };
      AST_Destructuring.prototype._size = () => 2;
      AST_TemplateString.prototype._size = function() {
        return 2 + Math.floor(this.segments.length / 2) * 3;
      };
      AST_TemplateSegment.prototype._size = function() {
        return this.value.length;
      };
      AST_Return.prototype._size = function() {
        return this.value ? 7 : 6;
      };
      AST_Throw.prototype._size = () => 6;
      AST_Break.prototype._size = function() {
        return this.label ? 6 : 5;
      };
      AST_Continue.prototype._size = function() {
        return this.label ? 9 : 8;
      };
      AST_If.prototype._size = () => 4;
      AST_Switch.prototype._size = function() {
        return 8 + list_overhead(this.body);
      };
      AST_Case.prototype._size = function() {
        return 5 + list_overhead(this.body);
      };
      AST_Default.prototype._size = function() {
        return 8 + list_overhead(this.body);
      };
      AST_Try.prototype._size = () => 3;
      AST_Catch.prototype._size = function() {
        let size = 7 + list_overhead(this.body);
        if (this.argname) {
          size += 2;
        }
        return size;
      };
      AST_Finally.prototype._size = function() {
        return 7 + list_overhead(this.body);
      };
      AST_Var.prototype._size = function() {
        return 4 + list_overhead(this.definitions);
      };
      AST_Let.prototype._size = function() {
        return 4 + list_overhead(this.definitions);
      };
      AST_Const.prototype._size = function() {
        return 6 + list_overhead(this.definitions);
      };
      AST_VarDef.prototype._size = function() {
        return this.value ? 1 : 0;
      };
      AST_NameMapping.prototype._size = function() {
        return this.name ? 4 : 0;
      };
      AST_Import.prototype._size = function() {
        let size = 6;
        if (this.imported_name)
          size += 1;
        if (this.imported_name || this.imported_names)
          size += 5;
        if (this.imported_names) {
          size += 2 + list_overhead(this.imported_names);
        }
        return size;
      };
      AST_ImportMeta.prototype._size = () => 11;
      AST_Export.prototype._size = function() {
        let size = 7 + (this.is_default ? 8 : 0);
        if (this.exported_value) {
          size += this.exported_value._size();
        }
        if (this.exported_names) {
          size += 2 + list_overhead(this.exported_names);
        }
        if (this.module_name) {
          size += 5;
        }
        return size;
      };
      AST_Call.prototype._size = function() {
        if (this.optional) {
          return 4 + list_overhead(this.args);
        }
        return 2 + list_overhead(this.args);
      };
      AST_New.prototype._size = function() {
        return 6 + list_overhead(this.args);
      };
      AST_Sequence.prototype._size = function() {
        return list_overhead(this.expressions);
      };
      AST_Dot.prototype._size = function() {
        if (this.optional) {
          return this.property.length + 2;
        }
        return this.property.length + 1;
      };
      AST_DotHash.prototype._size = function() {
        if (this.optional) {
          return this.property.length + 3;
        }
        return this.property.length + 2;
      };
      AST_Sub.prototype._size = function() {
        return this.optional ? 4 : 2;
      };
      AST_Unary.prototype._size = function() {
        if (this.operator === "typeof")
          return 7;
        if (this.operator === "void")
          return 5;
        return this.operator.length;
      };
      AST_Binary.prototype._size = function(info) {
        if (this.operator === "in")
          return 4;
        let size = this.operator.length;
        if ((this.operator === "+" || this.operator === "-") && this.right instanceof AST_Unary && this.right.operator === this.operator) {
          size += 1;
        }
        if (this.needs_parens(info)) {
          size += 2;
        }
        return size;
      };
      AST_Conditional.prototype._size = () => 3;
      AST_Array.prototype._size = function() {
        return 2 + list_overhead(this.elements);
      };
      AST_Object.prototype._size = function(info) {
        let base = 2;
        if (first_in_statement(info)) {
          base += 2;
        }
        return base + list_overhead(this.properties);
      };
      const key_size = (key) => typeof key === "string" ? key.length : 0;
      AST_ObjectKeyVal.prototype._size = function() {
        return key_size(this.key) + 1;
      };
      const static_size = (is_static) => is_static ? 7 : 0;
      AST_ObjectGetter.prototype._size = function() {
        return 5 + static_size(this.static) + key_size(this.key);
      };
      AST_ObjectSetter.prototype._size = function() {
        return 5 + static_size(this.static) + key_size(this.key);
      };
      AST_ConciseMethod.prototype._size = function() {
        return static_size(this.static) + key_size(this.key) + lambda_modifiers(this);
      };
      AST_PrivateMethod.prototype._size = function() {
        return AST_ConciseMethod.prototype._size.call(this) + 1;
      };
      AST_PrivateGetter.prototype._size = AST_PrivateSetter.prototype._size = function() {
        return AST_ConciseMethod.prototype._size.call(this) + 4;
      };
      AST_PrivateIn.prototype._size = function() {
        return 5;
      };
      AST_Class.prototype._size = function() {
        return (this.name ? 8 : 7) + (this.extends ? 8 : 0);
      };
      AST_ClassStaticBlock.prototype._size = function() {
        return 7 + list_overhead(this.body);
      };
      AST_ClassProperty.prototype._size = function() {
        return static_size(this.static) + (typeof this.key === "string" ? this.key.length + 2 : 0) + (this.value ? 1 : 0);
      };
      AST_ClassPrivateProperty.prototype._size = function() {
        return AST_ClassProperty.prototype._size.call(this) + 1;
      };
      AST_Symbol.prototype._size = function() {
        if (!(mangle_options && this.thedef && !this.thedef.unmangleable(mangle_options))) {
          return this.name.length;
        } else {
          return 1;
        }
      };
      AST_SymbolClassProperty.prototype._size = function() {
        return this.name.length;
      };
      AST_SymbolRef.prototype._size = AST_SymbolDeclaration.prototype._size = function() {
        if (this.name === "arguments")
          return 9;
        return AST_Symbol.prototype._size.call(this);
      };
      AST_NewTarget.prototype._size = () => 10;
      AST_SymbolImportForeign.prototype._size = function() {
        return this.name.length;
      };
      AST_SymbolExportForeign.prototype._size = function() {
        return this.name.length;
      };
      AST_This.prototype._size = () => 4;
      AST_Super.prototype._size = () => 5;
      AST_String.prototype._size = function() {
        return this.value.length + 2;
      };
      AST_Number.prototype._size = function() {
        const { value } = this;
        if (value === 0)
          return 1;
        if (value > 0 && Math.floor(value) === value) {
          return Math.floor(Math.log10(value) + 1);
        }
        return value.toString().length;
      };
      AST_BigInt.prototype._size = function() {
        return this.value.length;
      };
      AST_RegExp.prototype._size = function() {
        return this.value.toString().length;
      };
      AST_Null.prototype._size = () => 4;
      AST_NaN.prototype._size = () => 3;
      AST_Undefined.prototype._size = () => 6;
      AST_Hole.prototype._size = () => 0;
      AST_Infinity.prototype._size = () => 8;
      AST_True.prototype._size = () => 4;
      AST_False.prototype._size = () => 5;
      AST_Await.prototype._size = () => 6;
      AST_Yield.prototype._size = () => 6;
      const UNUSED = 1;
      const TRUTHY = 2;
      const FALSY = 4;
      const UNDEFINED = 8;
      const INLINED = 16;
      const WRITE_ONLY = 32;
      const SQUEEZED = 256;
      const OPTIMIZED = 512;
      const TOP = 1024;
      const CLEAR_BETWEEN_PASSES = SQUEEZED | OPTIMIZED | TOP;
      const has_flag = (node, flag) => node.flags & flag;
      const set_flag = (node, flag) => {
        node.flags |= flag;
      };
      const clear_flag = (node, flag) => {
        node.flags &= ~flag;
      };
      function merge_sequence(array, node) {
        if (node instanceof AST_Sequence) {
          array.push(...node.expressions);
        } else {
          array.push(node);
        }
        return array;
      }
      function make_sequence(orig, expressions) {
        if (expressions.length == 1)
          return expressions[0];
        if (expressions.length == 0)
          throw new Error("trying to create a sequence with length zero!");
        return make_node(AST_Sequence, orig, {
          expressions: expressions.reduce(merge_sequence, [])
        });
      }
      function make_node_from_constant(val, orig) {
        switch (typeof val) {
          case "string":
            return make_node(AST_String, orig, {
              value: val
            });
          case "number":
            if (isNaN(val))
              return make_node(AST_NaN, orig);
            if (isFinite(val)) {
              return 1 / val < 0 ? make_node(AST_UnaryPrefix, orig, {
                operator: "-",
                expression: make_node(AST_Number, orig, { value: -val })
              }) : make_node(AST_Number, orig, { value: val });
            }
            return val < 0 ? make_node(AST_UnaryPrefix, orig, {
              operator: "-",
              expression: make_node(AST_Infinity, orig)
            }) : make_node(AST_Infinity, orig);
          case "boolean":
            return make_node(val ? AST_True : AST_False, orig);
          case "undefined":
            return make_node(AST_Undefined, orig);
          default:
            if (val === null) {
              return make_node(AST_Null, orig, { value: null });
            }
            if (val instanceof RegExp) {
              return make_node(AST_RegExp, orig, {
                value: {
                  source: regexp_source_fix(val.source),
                  flags: val.flags
                }
              });
            }
            throw new Error(string_template("Can't handle constant of type: {type}", {
              type: typeof val
            }));
        }
      }
      function best_of_expression(ast1, ast2) {
        return ast1.size() > ast2.size() ? ast2 : ast1;
      }
      function best_of_statement(ast1, ast2) {
        return best_of_expression(make_node(AST_SimpleStatement, ast1, {
          body: ast1
        }), make_node(AST_SimpleStatement, ast2, {
          body: ast2
        })).body;
      }
      function best_of(compressor, ast1, ast2) {
        if (first_in_statement(compressor)) {
          return best_of_statement(ast1, ast2);
        } else {
          return best_of_expression(ast1, ast2);
        }
      }
      function get_simple_key(key) {
        if (key instanceof AST_Constant) {
          return key.getValue();
        }
        if (key instanceof AST_UnaryPrefix && key.operator == "void" && key.expression instanceof AST_Constant) {
          return;
        }
        return key;
      }
      function read_property(obj, key) {
        key = get_simple_key(key);
        if (key instanceof AST_Node)
          return;
        var value;
        if (obj instanceof AST_Array) {
          var elements = obj.elements;
          if (key == "length")
            return make_node_from_constant(elements.length, obj);
          if (typeof key == "number" && key in elements)
            value = elements[key];
        } else if (obj instanceof AST_Object) {
          key = "" + key;
          var props = obj.properties;
          for (var i = props.length; --i >= 0; ) {
            var prop = props[i];
            if (!(prop instanceof AST_ObjectKeyVal))
              return;
            if (!value && props[i].key === key)
              value = props[i].value;
          }
        }
        return value instanceof AST_SymbolRef && value.fixed_value() || value;
      }
      function has_break_or_continue(loop, parent) {
        var found = false;
        var tw = new TreeWalker(function(node) {
          if (found || node instanceof AST_Scope)
            return true;
          if (node instanceof AST_LoopControl && tw.loopcontrol_target(node) === loop) {
            return found = true;
          }
        });
        if (parent instanceof AST_LabeledStatement)
          tw.push(parent);
        tw.push(loop);
        loop.body.walk(tw);
        return found;
      }
      function maintain_this_binding(parent, orig, val) {
        if (parent instanceof AST_UnaryPrefix && parent.operator == "delete" || parent instanceof AST_Call && parent.expression === orig && (val instanceof AST_Chain || val instanceof AST_PropAccess || val instanceof AST_SymbolRef && val.name == "eval")) {
          const zero = make_node(AST_Number, orig, { value: 0 });
          return make_sequence(orig, [zero, val]);
        } else {
          return val;
        }
      }
      function is_func_expr(node) {
        return node instanceof AST_Arrow || node instanceof AST_Function;
      }
      function is_iife_call(node) {
        if (node.TYPE != "Call")
          return false;
        return node.expression instanceof AST_Function || is_iife_call(node.expression);
      }
      function is_empty(thing) {
        if (thing === null)
          return true;
        if (thing instanceof AST_EmptyStatement)
          return true;
        if (thing instanceof AST_BlockStatement)
          return thing.body.length == 0;
        return false;
      }
      const identifier_atom = makePredicate("Infinity NaN undefined");
      function is_identifier_atom(node) {
        return node instanceof AST_Infinity || node instanceof AST_NaN || node instanceof AST_Undefined;
      }
      function is_ref_of(ref, type) {
        if (!(ref instanceof AST_SymbolRef))
          return false;
        var orig = ref.definition().orig;
        for (var i = orig.length; --i >= 0; ) {
          if (orig[i] instanceof type)
            return true;
        }
      }
      function can_be_evicted_from_block(node) {
        return !(node instanceof AST_DefClass || node instanceof AST_Defun || node instanceof AST_Let || node instanceof AST_Const || node instanceof AST_Export || node instanceof AST_Import);
      }
      function as_statement_array(thing) {
        if (thing === null)
          return [];
        if (thing instanceof AST_BlockStatement)
          return thing.body;
        if (thing instanceof AST_EmptyStatement)
          return [];
        if (thing instanceof AST_Statement)
          return [thing];
        throw new Error("Can't convert thing to statement array");
      }
      function is_reachable(scope_node, defs) {
        const find_ref = (node) => {
          if (node instanceof AST_SymbolRef && defs.includes(node.definition())) {
            return walk_abort;
          }
        };
        return walk_parent(scope_node, (node, info) => {
          if (node instanceof AST_Scope && node !== scope_node) {
            var parent = info.parent();
            if (parent instanceof AST_Call && parent.expression === node && !(node.async || node.is_generator)) {
              return;
            }
            if (walk(node, find_ref))
              return walk_abort;
            return true;
          }
        });
      }
      function is_recursive_ref(compressor, def) {
        var node;
        for (var i = 0; node = compressor.parent(i); i++) {
          if (node instanceof AST_Lambda || node instanceof AST_Class) {
            var name = node.name;
            if (name && name.definition() === def) {
              return true;
            }
          }
        }
        return false;
      }
      function retain_top_func(fn, compressor) {
        return compressor.top_retain && fn instanceof AST_Defun && has_flag(fn, TOP) && fn.name && compressor.top_retain(fn.name.definition());
      }
      function make_nested_lookup(obj) {
        const out = /* @__PURE__ */ new Map();
        for (var key of Object.keys(obj)) {
          out.set(key, makePredicate(obj[key]));
        }
        const does_have = (global_name, fname) => {
          const inner_map = out.get(global_name);
          return inner_map != null && inner_map.has(fname);
        };
        return does_have;
      }
      const pure_prop_access_globals = /* @__PURE__ */ new Set([
        "Number",
        "String",
        "Array",
        "Object",
        "Function",
        "Promise"
      ]);
      const object_methods = [
        "constructor",
        "toString",
        "valueOf"
      ];
      const is_pure_native_method = make_nested_lookup({
        Array: [
          "at",
          "flat",
          "includes",
          "indexOf",
          "join",
          "lastIndexOf",
          "slice",
          ...object_methods
        ],
        Boolean: object_methods,
        Function: object_methods,
        Number: [
          "toExponential",
          "toFixed",
          "toPrecision",
          ...object_methods
        ],
        Object: object_methods,
        RegExp: [
          "test",
          ...object_methods
        ],
        String: [
          "at",
          "charAt",
          "charCodeAt",
          "charPointAt",
          "concat",
          "endsWith",
          "fromCharCode",
          "fromCodePoint",
          "includes",
          "indexOf",
          "italics",
          "lastIndexOf",
          "localeCompare",
          "match",
          "matchAll",
          "normalize",
          "padStart",
          "padEnd",
          "repeat",
          "replace",
          "replaceAll",
          "search",
          "slice",
          "split",
          "startsWith",
          "substr",
          "substring",
          "repeat",
          "toLocaleLowerCase",
          "toLocaleUpperCase",
          "toLowerCase",
          "toUpperCase",
          "trim",
          "trimEnd",
          "trimStart",
          ...object_methods
        ]
      });
      const is_pure_native_fn = make_nested_lookup({
        Array: [
          "isArray"
        ],
        Math: [
          "abs",
          "acos",
          "asin",
          "atan",
          "ceil",
          "cos",
          "exp",
          "floor",
          "log",
          "round",
          "sin",
          "sqrt",
          "tan",
          "atan2",
          "pow",
          "max",
          "min"
        ],
        Number: [
          "isFinite",
          "isNaN"
        ],
        Object: [
          "create",
          "getOwnPropertyDescriptor",
          "getOwnPropertyNames",
          "getPrototypeOf",
          "isExtensible",
          "isFrozen",
          "isSealed",
          "hasOwn",
          "keys"
        ],
        String: [
          "fromCharCode"
        ]
      });
      const is_pure_native_value = make_nested_lookup({
        Math: [
          "E",
          "LN10",
          "LN2",
          "LOG2E",
          "LOG10E",
          "PI",
          "SQRT1_2",
          "SQRT2"
        ],
        Number: [
          "MAX_VALUE",
          "MIN_VALUE",
          "NaN",
          "NEGATIVE_INFINITY",
          "POSITIVE_INFINITY"
        ]
      });
      const is_undeclared_ref = (node) => node instanceof AST_SymbolRef && node.definition().undeclared;
      const lazy_op = makePredicate("&& || ??");
      const unary_side_effects = makePredicate("delete ++ --");
      (function(def_is_boolean) {
        const unary_bool = makePredicate("! delete");
        const binary_bool = makePredicate("in instanceof == != === !== < <= >= >");
        def_is_boolean(AST_Node, return_false);
        def_is_boolean(AST_UnaryPrefix, function() {
          return unary_bool.has(this.operator);
        });
        def_is_boolean(AST_Binary, function() {
          return binary_bool.has(this.operator) || lazy_op.has(this.operator) && this.left.is_boolean() && this.right.is_boolean();
        });
        def_is_boolean(AST_Conditional, function() {
          return this.consequent.is_boolean() && this.alternative.is_boolean();
        });
        def_is_boolean(AST_Assign, function() {
          return this.operator == "=" && this.right.is_boolean();
        });
        def_is_boolean(AST_Sequence, function() {
          return this.tail_node().is_boolean();
        });
        def_is_boolean(AST_True, return_true);
        def_is_boolean(AST_False, return_true);
      })(function(node, func) {
        node.DEFMETHOD("is_boolean", func);
      });
      (function(def_is_number) {
        def_is_number(AST_Node, return_false);
        def_is_number(AST_Number, return_true);
        const unary = makePredicate("+ - ~ ++ --");
        def_is_number(AST_Unary, function() {
          return unary.has(this.operator) && !(this.expression instanceof AST_BigInt);
        });
        const numeric_ops = makePredicate("- * / % & | ^ << >> >>>");
        def_is_number(AST_Binary, function(compressor) {
          return numeric_ops.has(this.operator) || this.operator == "+" && this.left.is_number(compressor) && this.right.is_number(compressor);
        });
        def_is_number(AST_Assign, function(compressor) {
          return numeric_ops.has(this.operator.slice(0, -1)) || this.operator == "=" && this.right.is_number(compressor);
        });
        def_is_number(AST_Sequence, function(compressor) {
          return this.tail_node().is_number(compressor);
        });
        def_is_number(AST_Conditional, function(compressor) {
          return this.consequent.is_number(compressor) && this.alternative.is_number(compressor);
        });
      })(function(node, func) {
        node.DEFMETHOD("is_number", func);
      });
      (function(def_is_string) {
        def_is_string(AST_Node, return_false);
        def_is_string(AST_String, return_true);
        def_is_string(AST_TemplateString, return_true);
        def_is_string(AST_UnaryPrefix, function() {
          return this.operator == "typeof";
        });
        def_is_string(AST_Binary, function(compressor) {
          return this.operator == "+" && (this.left.is_string(compressor) || this.right.is_string(compressor));
        });
        def_is_string(AST_Assign, function(compressor) {
          return (this.operator == "=" || this.operator == "+=") && this.right.is_string(compressor);
        });
        def_is_string(AST_Sequence, function(compressor) {
          return this.tail_node().is_string(compressor);
        });
        def_is_string(AST_Conditional, function(compressor) {
          return this.consequent.is_string(compressor) && this.alternative.is_string(compressor);
        });
      })(function(node, func) {
        node.DEFMETHOD("is_string", func);
      });
      function is_undefined(node, compressor) {
        return has_flag(node, UNDEFINED) || node instanceof AST_Undefined || node instanceof AST_UnaryPrefix && node.operator == "void" && !node.expression.has_side_effects(compressor);
      }
      function is_null_or_undefined(node, compressor) {
        let fixed;
        return node instanceof AST_Null || is_undefined(node, compressor) || node instanceof AST_SymbolRef && (fixed = node.definition().fixed) instanceof AST_Node && is_nullish(fixed, compressor);
      }
      function is_nullish_shortcircuited(node, compressor) {
        if (node instanceof AST_PropAccess || node instanceof AST_Call) {
          return node.optional && is_null_or_undefined(node.expression, compressor) || is_nullish_shortcircuited(node.expression, compressor);
        }
        if (node instanceof AST_Chain)
          return is_nullish_shortcircuited(node.expression, compressor);
        return false;
      }
      function is_nullish(node, compressor) {
        if (is_null_or_undefined(node, compressor))
          return true;
        return is_nullish_shortcircuited(node, compressor);
      }
      (function(def_has_side_effects) {
        def_has_side_effects(AST_Node, return_true);
        def_has_side_effects(AST_EmptyStatement, return_false);
        def_has_side_effects(AST_Constant, return_false);
        def_has_side_effects(AST_This, return_false);
        function any(list, compressor) {
          for (var i = list.length; --i >= 0; )
            if (list[i].has_side_effects(compressor))
              return true;
          return false;
        }
        def_has_side_effects(AST_Block, function(compressor) {
          return any(this.body, compressor);
        });
        def_has_side_effects(AST_Call, function(compressor) {
          if (!this.is_callee_pure(compressor) && (!this.expression.is_call_pure(compressor) || this.expression.has_side_effects(compressor))) {
            return true;
          }
          return any(this.args, compressor);
        });
        def_has_side_effects(AST_Switch, function(compressor) {
          return this.expression.has_side_effects(compressor) || any(this.body, compressor);
        });
        def_has_side_effects(AST_Case, function(compressor) {
          return this.expression.has_side_effects(compressor) || any(this.body, compressor);
        });
        def_has_side_effects(AST_Try, function(compressor) {
          return this.body.has_side_effects(compressor) || this.bcatch && this.bcatch.has_side_effects(compressor) || this.bfinally && this.bfinally.has_side_effects(compressor);
        });
        def_has_side_effects(AST_If, function(compressor) {
          return this.condition.has_side_effects(compressor) || this.body && this.body.has_side_effects(compressor) || this.alternative && this.alternative.has_side_effects(compressor);
        });
        def_has_side_effects(AST_ImportMeta, return_false);
        def_has_side_effects(AST_LabeledStatement, function(compressor) {
          return this.body.has_side_effects(compressor);
        });
        def_has_side_effects(AST_SimpleStatement, function(compressor) {
          return this.body.has_side_effects(compressor);
        });
        def_has_side_effects(AST_Lambda, return_false);
        def_has_side_effects(AST_Class, function(compressor) {
          if (this.extends && this.extends.has_side_effects(compressor)) {
            return true;
          }
          return any(this.properties, compressor);
        });
        def_has_side_effects(AST_ClassStaticBlock, function(compressor) {
          return any(this.body, compressor);
        });
        def_has_side_effects(AST_Binary, function(compressor) {
          return this.left.has_side_effects(compressor) || this.right.has_side_effects(compressor);
        });
        def_has_side_effects(AST_Assign, return_true);
        def_has_side_effects(AST_Conditional, function(compressor) {
          return this.condition.has_side_effects(compressor) || this.consequent.has_side_effects(compressor) || this.alternative.has_side_effects(compressor);
        });
        def_has_side_effects(AST_Unary, function(compressor) {
          return unary_side_effects.has(this.operator) || this.expression.has_side_effects(compressor);
        });
        def_has_side_effects(AST_SymbolRef, function(compressor) {
          return !this.is_declared(compressor) && !pure_prop_access_globals.has(this.name);
        });
        def_has_side_effects(AST_SymbolClassProperty, return_false);
        def_has_side_effects(AST_SymbolDeclaration, return_false);
        def_has_side_effects(AST_Object, function(compressor) {
          return any(this.properties, compressor);
        });
        def_has_side_effects(AST_ObjectProperty, function(compressor) {
          return this.computed_key() && this.key.has_side_effects(compressor) || this.value && this.value.has_side_effects(compressor);
        });
        def_has_side_effects(AST_ClassProperty, function(compressor) {
          return this.computed_key() && this.key.has_side_effects(compressor) || this.static && this.value && this.value.has_side_effects(compressor);
        });
        def_has_side_effects(AST_ConciseMethod, function(compressor) {
          return this.computed_key() && this.key.has_side_effects(compressor);
        });
        def_has_side_effects(AST_ObjectGetter, function(compressor) {
          return this.computed_key() && this.key.has_side_effects(compressor);
        });
        def_has_side_effects(AST_ObjectSetter, function(compressor) {
          return this.computed_key() && this.key.has_side_effects(compressor);
        });
        def_has_side_effects(AST_Array, function(compressor) {
          return any(this.elements, compressor);
        });
        def_has_side_effects(AST_Dot, function(compressor) {
          if (is_nullish(this, compressor)) {
            return this.expression.has_side_effects(compressor);
          }
          if (!this.optional && this.expression.may_throw_on_access(compressor)) {
            return true;
          }
          return this.expression.has_side_effects(compressor);
        });
        def_has_side_effects(AST_Sub, function(compressor) {
          if (is_nullish(this, compressor)) {
            return this.expression.has_side_effects(compressor);
          }
          if (!this.optional && this.expression.may_throw_on_access(compressor)) {
            return true;
          }
          var property = this.property.has_side_effects(compressor);
          if (property && this.optional)
            return true;
          return property || this.expression.has_side_effects(compressor);
        });
        def_has_side_effects(AST_Chain, function(compressor) {
          return this.expression.has_side_effects(compressor);
        });
        def_has_side_effects(AST_Sequence, function(compressor) {
          return any(this.expressions, compressor);
        });
        def_has_side_effects(AST_Definitions, function(compressor) {
          return any(this.definitions, compressor);
        });
        def_has_side_effects(AST_VarDef, function() {
          return this.value;
        });
        def_has_side_effects(AST_TemplateSegment, return_false);
        def_has_side_effects(AST_TemplateString, function(compressor) {
          return any(this.segments, compressor);
        });
      })(function(node, func) {
        node.DEFMETHOD("has_side_effects", func);
      });
      (function(def_may_throw) {
        def_may_throw(AST_Node, return_true);
        def_may_throw(AST_Constant, return_false);
        def_may_throw(AST_EmptyStatement, return_false);
        def_may_throw(AST_Lambda, return_false);
        def_may_throw(AST_SymbolDeclaration, return_false);
        def_may_throw(AST_This, return_false);
        def_may_throw(AST_ImportMeta, return_false);
        function any(list, compressor) {
          for (var i = list.length; --i >= 0; )
            if (list[i].may_throw(compressor))
              return true;
          return false;
        }
        def_may_throw(AST_Class, function(compressor) {
          if (this.extends && this.extends.may_throw(compressor))
            return true;
          return any(this.properties, compressor);
        });
        def_may_throw(AST_ClassStaticBlock, function(compressor) {
          return any(this.body, compressor);
        });
        def_may_throw(AST_Array, function(compressor) {
          return any(this.elements, compressor);
        });
        def_may_throw(AST_Assign, function(compressor) {
          if (this.right.may_throw(compressor))
            return true;
          if (!compressor.has_directive("use strict") && this.operator == "=" && this.left instanceof AST_SymbolRef) {
            return false;
          }
          return this.left.may_throw(compressor);
        });
        def_may_throw(AST_Binary, function(compressor) {
          return this.left.may_throw(compressor) || this.right.may_throw(compressor);
        });
        def_may_throw(AST_Block, function(compressor) {
          return any(this.body, compressor);
        });
        def_may_throw(AST_Call, function(compressor) {
          if (is_nullish(this, compressor))
            return false;
          if (any(this.args, compressor))
            return true;
          if (this.is_callee_pure(compressor))
            return false;
          if (this.expression.may_throw(compressor))
            return true;
          return !(this.expression instanceof AST_Lambda) || any(this.expression.body, compressor);
        });
        def_may_throw(AST_Case, function(compressor) {
          return this.expression.may_throw(compressor) || any(this.body, compressor);
        });
        def_may_throw(AST_Conditional, function(compressor) {
          return this.condition.may_throw(compressor) || this.consequent.may_throw(compressor) || this.alternative.may_throw(compressor);
        });
        def_may_throw(AST_Definitions, function(compressor) {
          return any(this.definitions, compressor);
        });
        def_may_throw(AST_If, function(compressor) {
          return this.condition.may_throw(compressor) || this.body && this.body.may_throw(compressor) || this.alternative && this.alternative.may_throw(compressor);
        });
        def_may_throw(AST_LabeledStatement, function(compressor) {
          return this.body.may_throw(compressor);
        });
        def_may_throw(AST_Object, function(compressor) {
          return any(this.properties, compressor);
        });
        def_may_throw(AST_ObjectProperty, function(compressor) {
          return this.value ? this.value.may_throw(compressor) : false;
        });
        def_may_throw(AST_ClassProperty, function(compressor) {
          return this.computed_key() && this.key.may_throw(compressor) || this.static && this.value && this.value.may_throw(compressor);
        });
        def_may_throw(AST_ConciseMethod, function(compressor) {
          return this.computed_key() && this.key.may_throw(compressor);
        });
        def_may_throw(AST_ObjectGetter, function(compressor) {
          return this.computed_key() && this.key.may_throw(compressor);
        });
        def_may_throw(AST_ObjectSetter, function(compressor) {
          return this.computed_key() && this.key.may_throw(compressor);
        });
        def_may_throw(AST_Return, function(compressor) {
          return this.value && this.value.may_throw(compressor);
        });
        def_may_throw(AST_Sequence, function(compressor) {
          return any(this.expressions, compressor);
        });
        def_may_throw(AST_SimpleStatement, function(compressor) {
          return this.body.may_throw(compressor);
        });
        def_may_throw(AST_Dot, function(compressor) {
          if (is_nullish(this, compressor))
            return false;
          return !this.optional && this.expression.may_throw_on_access(compressor) || this.expression.may_throw(compressor);
        });
        def_may_throw(AST_Sub, function(compressor) {
          if (is_nullish(this, compressor))
            return false;
          return !this.optional && this.expression.may_throw_on_access(compressor) || this.expression.may_throw(compressor) || this.property.may_throw(compressor);
        });
        def_may_throw(AST_Chain, function(compressor) {
          return this.expression.may_throw(compressor);
        });
        def_may_throw(AST_Switch, function(compressor) {
          return this.expression.may_throw(compressor) || any(this.body, compressor);
        });
        def_may_throw(AST_SymbolRef, function(compressor) {
          return !this.is_declared(compressor) && !pure_prop_access_globals.has(this.name);
        });
        def_may_throw(AST_SymbolClassProperty, return_false);
        def_may_throw(AST_Try, function(compressor) {
          return this.bcatch ? this.bcatch.may_throw(compressor) : this.body.may_throw(compressor) || this.bfinally && this.bfinally.may_throw(compressor);
        });
        def_may_throw(AST_Unary, function(compressor) {
          if (this.operator == "typeof" && this.expression instanceof AST_SymbolRef)
            return false;
          return this.expression.may_throw(compressor);
        });
        def_may_throw(AST_VarDef, function(compressor) {
          if (!this.value)
            return false;
          return this.value.may_throw(compressor);
        });
      })(function(node, func) {
        node.DEFMETHOD("may_throw", func);
      });
      (function(def_is_constant_expression) {
        function all_refs_local(scope) {
          let result = true;
          walk(this, (node) => {
            if (node instanceof AST_SymbolRef) {
              if (has_flag(this, INLINED)) {
                result = false;
                return walk_abort;
              }
              var def = node.definition();
              if (member(def, this.enclosed) && !this.variables.has(def.name)) {
                if (scope) {
                  var scope_def = scope.find_variable(node);
                  if (def.undeclared ? !scope_def : scope_def === def) {
                    result = "f";
                    return true;
                  }
                }
                result = false;
                return walk_abort;
              }
              return true;
            }
            if (node instanceof AST_This && this instanceof AST_Arrow) {
              result = false;
              return walk_abort;
            }
          });
          return result;
        }
        def_is_constant_expression(AST_Node, return_false);
        def_is_constant_expression(AST_Constant, return_true);
        def_is_constant_expression(AST_Class, function(scope) {
          if (this.extends && !this.extends.is_constant_expression(scope)) {
            return false;
          }
          for (const prop of this.properties) {
            if (prop.computed_key() && !prop.key.is_constant_expression(scope)) {
              return false;
            }
            if (prop.static && prop.value && !prop.value.is_constant_expression(scope)) {
              return false;
            }
            if (prop instanceof AST_ClassStaticBlock) {
              return false;
            }
          }
          return all_refs_local.call(this, scope);
        });
        def_is_constant_expression(AST_Lambda, all_refs_local);
        def_is_constant_expression(AST_Unary, function() {
          return this.expression.is_constant_expression();
        });
        def_is_constant_expression(AST_Binary, function() {
          return this.left.is_constant_expression() && this.right.is_constant_expression();
        });
        def_is_constant_expression(AST_Array, function() {
          return this.elements.every((l) => l.is_constant_expression());
        });
        def_is_constant_expression(AST_Object, function() {
          return this.properties.every((l) => l.is_constant_expression());
        });
        def_is_constant_expression(AST_ObjectProperty, function() {
          return !!(!(this.key instanceof AST_Node) && this.value && this.value.is_constant_expression());
        });
      })(function(node, func) {
        node.DEFMETHOD("is_constant_expression", func);
      });
      (function(def_may_throw_on_access) {
        AST_Node.DEFMETHOD("may_throw_on_access", function(compressor) {
          return !compressor.option("pure_getters") || this._dot_throw(compressor);
        });
        function is_strict(compressor) {
          return /strict/.test(compressor.option("pure_getters"));
        }
        def_may_throw_on_access(AST_Node, is_strict);
        def_may_throw_on_access(AST_Null, return_true);
        def_may_throw_on_access(AST_Undefined, return_true);
        def_may_throw_on_access(AST_Constant, return_false);
        def_may_throw_on_access(AST_Array, return_false);
        def_may_throw_on_access(AST_Object, function(compressor) {
          if (!is_strict(compressor))
            return false;
          for (var i = this.properties.length; --i >= 0; )
            if (this.properties[i]._dot_throw(compressor))
              return true;
          return false;
        });
        def_may_throw_on_access(AST_Class, return_false);
        def_may_throw_on_access(AST_ObjectProperty, return_false);
        def_may_throw_on_access(AST_ObjectGetter, return_true);
        def_may_throw_on_access(AST_Expansion, function(compressor) {
          return this.expression._dot_throw(compressor);
        });
        def_may_throw_on_access(AST_Function, return_false);
        def_may_throw_on_access(AST_Arrow, return_false);
        def_may_throw_on_access(AST_UnaryPostfix, return_false);
        def_may_throw_on_access(AST_UnaryPrefix, function() {
          return this.operator == "void";
        });
        def_may_throw_on_access(AST_Binary, function(compressor) {
          return (this.operator == "&&" || this.operator == "||" || this.operator == "??") && (this.left._dot_throw(compressor) || this.right._dot_throw(compressor));
        });
        def_may_throw_on_access(AST_Assign, function(compressor) {
          if (this.logical)
            return true;
          return this.operator == "=" && this.right._dot_throw(compressor);
        });
        def_may_throw_on_access(AST_Conditional, function(compressor) {
          return this.consequent._dot_throw(compressor) || this.alternative._dot_throw(compressor);
        });
        def_may_throw_on_access(AST_Dot, function(compressor) {
          if (!is_strict(compressor))
            return false;
          if (this.property == "prototype") {
            return !(this.expression instanceof AST_Function || this.expression instanceof AST_Class);
          }
          return true;
        });
        def_may_throw_on_access(AST_Chain, function(compressor) {
          return this.expression._dot_throw(compressor);
        });
        def_may_throw_on_access(AST_Sequence, function(compressor) {
          return this.tail_node()._dot_throw(compressor);
        });
        def_may_throw_on_access(AST_SymbolRef, function(compressor) {
          if (this.name === "arguments" && this.scope instanceof AST_Lambda)
            return false;
          if (has_flag(this, UNDEFINED))
            return true;
          if (!is_strict(compressor))
            return false;
          if (is_undeclared_ref(this) && this.is_declared(compressor))
            return false;
          if (this.is_immutable())
            return false;
          var fixed = this.fixed_value();
          return !fixed || fixed._dot_throw(compressor);
        });
      })(function(node, func) {
        node.DEFMETHOD("_dot_throw", func);
      });
      function is_lhs(node, parent) {
        if (parent instanceof AST_Unary && unary_side_effects.has(parent.operator))
          return parent.expression;
        if (parent instanceof AST_Assign && parent.left === node)
          return node;
        if (parent instanceof AST_ForIn && parent.init === node)
          return node;
      }
      (function(def_negate) {
        function basic_negation(exp) {
          return make_node(AST_UnaryPrefix, exp, {
            operator: "!",
            expression: exp
          });
        }
        function best(orig, alt, first_in_statement2) {
          var negated = basic_negation(orig);
          if (first_in_statement2) {
            var stat = make_node(AST_SimpleStatement, alt, {
              body: alt
            });
            return best_of_expression(negated, stat) === stat ? alt : negated;
          }
          return best_of_expression(negated, alt);
        }
        def_negate(AST_Node, function() {
          return basic_negation(this);
        });
        def_negate(AST_Statement, function() {
          throw new Error("Cannot negate a statement");
        });
        def_negate(AST_Function, function() {
          return basic_negation(this);
        });
        def_negate(AST_Class, function() {
          return basic_negation(this);
        });
        def_negate(AST_Arrow, function() {
          return basic_negation(this);
        });
        def_negate(AST_UnaryPrefix, function() {
          if (this.operator == "!")
            return this.expression;
          return basic_negation(this);
        });
        def_negate(AST_Sequence, function(compressor) {
          var expressions = this.expressions.slice();
          expressions.push(expressions.pop().negate(compressor));
          return make_sequence(this, expressions);
        });
        def_negate(AST_Conditional, function(compressor, first_in_statement2) {
          var self2 = this.clone();
          self2.consequent = self2.consequent.negate(compressor);
          self2.alternative = self2.alternative.negate(compressor);
          return best(this, self2, first_in_statement2);
        });
        def_negate(AST_Binary, function(compressor, first_in_statement2) {
          var self2 = this.clone(), op = this.operator;
          if (compressor.option("unsafe_comps")) {
            switch (op) {
              case "<=":
                self2.operator = ">";
                return self2;
              case "<":
                self2.operator = ">=";
                return self2;
              case ">=":
                self2.operator = "<";
                return self2;
              case ">":
                self2.operator = "<=";
                return self2;
            }
          }
          switch (op) {
            case "==":
              self2.operator = "!=";
              return self2;
            case "!=":
              self2.operator = "==";
              return self2;
            case "===":
              self2.operator = "!==";
              return self2;
            case "!==":
              self2.operator = "===";
              return self2;
            case "&&":
              self2.operator = "||";
              self2.left = self2.left.negate(compressor, first_in_statement2);
              self2.right = self2.right.negate(compressor);
              return best(this, self2, first_in_statement2);
            case "||":
              self2.operator = "&&";
              self2.left = self2.left.negate(compressor, first_in_statement2);
              self2.right = self2.right.negate(compressor);
              return best(this, self2, first_in_statement2);
          }
          return basic_negation(this);
        });
      })(function(node, func) {
        node.DEFMETHOD("negate", function(compressor, first_in_statement2) {
          return func.call(this, compressor, first_in_statement2);
        });
      });
      var global_pure_fns = makePredicate("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError");
      AST_Call.DEFMETHOD("is_callee_pure", function(compressor) {
        if (compressor.option("unsafe")) {
          var expr = this.expression;
          var first_arg = this.args && this.args[0] && this.args[0].evaluate(compressor);
          if (expr.expression && expr.expression.name === "hasOwnProperty" && (first_arg == null || first_arg.thedef && first_arg.thedef.undeclared)) {
            return false;
          }
          if (is_undeclared_ref(expr) && global_pure_fns.has(expr.name))
            return true;
          if (expr instanceof AST_Dot && is_undeclared_ref(expr.expression) && is_pure_native_fn(expr.expression.name, expr.property)) {
            return true;
          }
        }
        if (this instanceof AST_New && compressor.option("pure_new")) {
          return true;
        }
        if (compressor.option("side_effects") && has_annotation(this, _PURE)) {
          return true;
        }
        return !compressor.pure_funcs(this);
      });
      AST_Node.DEFMETHOD("is_call_pure", return_false);
      AST_Dot.DEFMETHOD("is_call_pure", function(compressor) {
        if (!compressor.option("unsafe"))
          return;
        const expr = this.expression;
        let native_obj;
        if (expr instanceof AST_Array) {
          native_obj = "Array";
        } else if (expr.is_boolean()) {
          native_obj = "Boolean";
        } else if (expr.is_number(compressor)) {
          native_obj = "Number";
        } else if (expr instanceof AST_RegExp) {
          native_obj = "RegExp";
        } else if (expr.is_string(compressor)) {
          native_obj = "String";
        } else if (!this.may_throw_on_access(compressor)) {
          native_obj = "Object";
        }
        return native_obj != null && is_pure_native_method(native_obj, this.property);
      });
      const aborts = (thing) => thing && thing.aborts();
      (function(def_aborts) {
        def_aborts(AST_Statement, return_null);
        def_aborts(AST_Jump, return_this);
        function block_aborts() {
          for (var i = 0; i < this.body.length; i++) {
            if (aborts(this.body[i])) {
              return this.body[i];
            }
          }
          return null;
        }
        def_aborts(AST_Import, return_null);
        def_aborts(AST_BlockStatement, block_aborts);
        def_aborts(AST_SwitchBranch, block_aborts);
        def_aborts(AST_DefClass, function() {
          for (const prop of this.properties) {
            if (prop instanceof AST_ClassStaticBlock) {
              if (prop.aborts())
                return prop;
            }
          }
          return null;
        });
        def_aborts(AST_ClassStaticBlock, block_aborts);
        def_aborts(AST_If, function() {
          return this.alternative && aborts(this.body) && aborts(this.alternative) && this;
        });
      })(function(node, func) {
        node.DEFMETHOD("aborts", func);
      });
      AST_Node.DEFMETHOD("contains_this", function() {
        return walk(this, (node) => {
          if (node instanceof AST_This)
            return walk_abort;
          if (node !== this && node instanceof AST_Scope && !(node instanceof AST_Arrow)) {
            return true;
          }
        });
      });
      function is_modified(compressor, tw, node, value, level, immutable) {
        var parent = tw.parent(level);
        var lhs = is_lhs(node, parent);
        if (lhs)
          return lhs;
        if (!immutable && parent instanceof AST_Call && parent.expression === node && !(value instanceof AST_Arrow) && !(value instanceof AST_Class) && !parent.is_callee_pure(compressor) && (!(value instanceof AST_Function) || !(parent instanceof AST_New) && value.contains_this())) {
          return true;
        }
        if (parent instanceof AST_Array) {
          return is_modified(compressor, tw, parent, parent, level + 1);
        }
        if (parent instanceof AST_ObjectKeyVal && node === parent.value) {
          var obj = tw.parent(level + 1);
          return is_modified(compressor, tw, obj, obj, level + 2);
        }
        if (parent instanceof AST_PropAccess && parent.expression === node) {
          var prop = read_property(value, parent.property);
          return !immutable && is_modified(compressor, tw, parent, prop, level + 1);
        }
      }
      function def_eval(node, func) {
        node.DEFMETHOD("_eval", func);
      }
      const nullish = Symbol("This AST_Chain is nullish");
      AST_Node.DEFMETHOD("evaluate", function(compressor) {
        if (!compressor.option("evaluate"))
          return this;
        var val = this._eval(compressor, 1);
        if (!val || val instanceof RegExp)
          return val;
        if (typeof val == "function" || typeof val == "object" || val == nullish)
          return this;
        if (typeof val === "string") {
          const unevaluated_size = this.size(compressor);
          if (val.length + 2 > unevaluated_size)
            return this;
        }
        return val;
      });
      var unaryPrefix = makePredicate("! ~ - + void");
      AST_Node.DEFMETHOD("is_constant", function() {
        if (this instanceof AST_Constant) {
          return !(this instanceof AST_RegExp);
        } else {
          return this instanceof AST_UnaryPrefix && this.expression instanceof AST_Constant && unaryPrefix.has(this.operator);
        }
      });
      def_eval(AST_Statement, function() {
        throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]", this.start));
      });
      def_eval(AST_Lambda, return_this);
      def_eval(AST_Class, return_this);
      def_eval(AST_Node, return_this);
      def_eval(AST_Constant, function() {
        return this.getValue();
      });
      def_eval(AST_BigInt, return_this);
      def_eval(AST_RegExp, function(compressor) {
        let evaluated = compressor.evaluated_regexps.get(this.value);
        if (evaluated === void 0 && regexp_is_safe(this.value.source)) {
          try {
            const { source, flags } = this.value;
            evaluated = new RegExp(source, flags);
          } catch (e) {
            evaluated = null;
          }
          compressor.evaluated_regexps.set(this.value, evaluated);
        }
        return evaluated || this;
      });
      def_eval(AST_TemplateString, function() {
        if (this.segments.length !== 1)
          return this;
        return this.segments[0].value;
      });
      def_eval(AST_Function, function(compressor) {
        if (compressor.option("unsafe")) {
          var fn = function() {
          };
          fn.node = this;
          fn.toString = () => this.print_to_string();
          return fn;
        }
        return this;
      });
      def_eval(AST_Array, function(compressor, depth) {
        if (compressor.option("unsafe")) {
          var elements = [];
          for (var i = 0, len = this.elements.length; i < len; i++) {
            var element = this.elements[i];
            var value = element._eval(compressor, depth);
            if (element === value)
              return this;
            elements.push(value);
          }
          return elements;
        }
        return this;
      });
      def_eval(AST_Object, function(compressor, depth) {
        if (compressor.option("unsafe")) {
          var val = {};
          for (var i = 0, len = this.properties.length; i < len; i++) {
            var prop = this.properties[i];
            if (prop instanceof AST_Expansion)
              return this;
            var key = prop.key;
            if (key instanceof AST_Symbol) {
              key = key.name;
            } else if (key instanceof AST_Node) {
              key = key._eval(compressor, depth);
              if (key === prop.key)
                return this;
            }
            if (typeof Object.prototype[key] === "function") {
              return this;
            }
            if (prop.value instanceof AST_Function)
              continue;
            val[key] = prop.value._eval(compressor, depth);
            if (val[key] === prop.value)
              return this;
          }
          return val;
        }
        return this;
      });
      var non_converting_unary = makePredicate("! typeof void");
      def_eval(AST_UnaryPrefix, function(compressor, depth) {
        var e = this.expression;
        if (compressor.option("typeofs") && this.operator == "typeof" && (e instanceof AST_Lambda || e instanceof AST_SymbolRef && e.fixed_value() instanceof AST_Lambda)) {
          return "function";
        }
        if (!non_converting_unary.has(this.operator))
          depth++;
        e = e._eval(compressor, depth);
        if (e === this.expression)
          return this;
        switch (this.operator) {
          case "!":
            return !e;
          case "typeof":
            if (e instanceof RegExp)
              return this;
            return typeof e;
          case "void":
            return void 0;
          case "~":
            return ~e;
          case "-":
            return -e;
          case "+":
            return +e;
        }
        return this;
      });
      var non_converting_binary = makePredicate("&& || ?? === !==");
      const identity_comparison = makePredicate("== != === !==");
      const has_identity = (value) => typeof value === "object" || typeof value === "function" || typeof value === "symbol";
      def_eval(AST_Binary, function(compressor, depth) {
        if (!non_converting_binary.has(this.operator))
          depth++;
        var left = this.left._eval(compressor, depth);
        if (left === this.left)
          return this;
        var right = this.right._eval(compressor, depth);
        if (right === this.right)
          return this;
        var result;
        if (left != null && right != null && identity_comparison.has(this.operator) && has_identity(left) && has_identity(right) && typeof left === typeof right) {
          return this;
        }
        switch (this.operator) {
          case "&&":
            result = left && right;
            break;
          case "||":
            result = left || right;
            break;
          case "??":
            result = left != null ? left : right;
            break;
          case "|":
            result = left | right;
            break;
          case "&":
            result = left & right;
            break;
          case "^":
            result = left ^ right;
            break;
          case "+":
            result = left + right;
            break;
          case "*":
            result = left * right;
            break;
          case "**":
            result = Math.pow(left, right);
            break;
          case "/":
            result = left / right;
            break;
          case "%":
            result = left % right;
            break;
          case "-":
            result = left - right;
            break;
          case "<<":
            result = left << right;
            break;
          case ">>":
            result = left >> right;
            break;
          case ">>>":
            result = left >>> right;
            break;
          case "==":
            result = left == right;
            break;
          case "===":
            result = left === right;
            break;
          case "!=":
            result = left != right;
            break;
          case "!==":
            result = left !== right;
            break;
          case "<":
            result = left < right;
            break;
          case "<=":
            result = left <= right;
            break;
          case ">":
            result = left > right;
            break;
          case ">=":
            result = left >= right;
            break;
          default:
            return this;
        }
        if (isNaN(result) && compressor.find_parent(AST_With)) {
          return this;
        }
        return result;
      });
      def_eval(AST_Conditional, function(compressor, depth) {
        var condition = this.condition._eval(compressor, depth);
        if (condition === this.condition)
          return this;
        var node = condition ? this.consequent : this.alternative;
        var value = node._eval(compressor, depth);
        return value === node ? this : value;
      });
      const reentrant_ref_eval = /* @__PURE__ */ new Set();
      def_eval(AST_SymbolRef, function(compressor, depth) {
        if (reentrant_ref_eval.has(this))
          return this;
        var fixed = this.fixed_value();
        if (!fixed)
          return this;
        reentrant_ref_eval.add(this);
        const value = fixed._eval(compressor, depth);
        reentrant_ref_eval.delete(this);
        if (value === fixed)
          return this;
        if (value && typeof value == "object") {
          var escaped = this.definition().escaped;
          if (escaped && depth > escaped)
            return this;
        }
        return value;
      });
      const global_objs = { Array, Math, Number, Object, String };
      const regexp_flags = /* @__PURE__ */ new Set([
        "dotAll",
        "global",
        "ignoreCase",
        "multiline",
        "sticky",
        "unicode"
      ]);
      def_eval(AST_PropAccess, function(compressor, depth) {
        let obj = this.expression._eval(compressor, depth + 1);
        if (obj === nullish || this.optional && obj == null)
          return nullish;
        if (this.property === "length") {
          if (typeof obj === "string") {
            return obj.length;
          }
          const is_spreadless_array = obj instanceof AST_Array && obj.elements.every((el) => !(el instanceof AST_Expansion));
          if (is_spreadless_array && obj.elements.every((el) => !el.has_side_effects(compressor))) {
            return obj.elements.length;
          }
        }
        if (compressor.option("unsafe")) {
          var key = this.property;
          if (key instanceof AST_Node) {
            key = key._eval(compressor, depth);
            if (key === this.property)
              return this;
          }
          var exp = this.expression;
          if (is_undeclared_ref(exp)) {
            var aa;
            var first_arg = exp.name === "hasOwnProperty" && key === "call" && (aa = compressor.parent() && compressor.parent().args) && (aa && aa[0] && aa[0].evaluate(compressor));
            first_arg = first_arg instanceof AST_Dot ? first_arg.expression : first_arg;
            if (first_arg == null || first_arg.thedef && first_arg.thedef.undeclared) {
              return this.clone();
            }
            if (!is_pure_native_value(exp.name, key))
              return this;
            obj = global_objs[exp.name];
          } else {
            if (obj instanceof RegExp) {
              if (key == "source") {
                return regexp_source_fix(obj.source);
              } else if (key == "flags" || regexp_flags.has(key)) {
                return obj[key];
              }
            }
            if (!obj || obj === exp || !HOP(obj, key))
              return this;
            if (typeof obj == "function")
              switch (key) {
                case "name":
                  return obj.node.name ? obj.node.name.name : "";
                case "length":
                  return obj.node.length_property();
                default:
                  return this;
              }
          }
          return obj[key];
        }
        return this;
      });
      def_eval(AST_Chain, function(compressor, depth) {
        const evaluated = this.expression._eval(compressor, depth);
        return evaluated === nullish ? void 0 : evaluated === this.expression ? this : evaluated;
      });
      def_eval(AST_Call, function(compressor, depth) {
        var exp = this.expression;
        const callee = exp._eval(compressor, depth);
        if (callee === nullish || this.optional && callee == null)
          return nullish;
        if (compressor.option("unsafe") && exp instanceof AST_PropAccess) {
          var key = exp.property;
          if (key instanceof AST_Node) {
            key = key._eval(compressor, depth);
            if (key === exp.property)
              return this;
          }
          var val;
          var e = exp.expression;
          if (is_undeclared_ref(e)) {
            var first_arg = e.name === "hasOwnProperty" && key === "call" && (this.args[0] && this.args[0].evaluate(compressor));
            first_arg = first_arg instanceof AST_Dot ? first_arg.expression : first_arg;
            if (first_arg == null || first_arg.thedef && first_arg.thedef.undeclared) {
              return this.clone();
            }
            if (!is_pure_native_fn(e.name, key))
              return this;
            val = global_objs[e.name];
          } else {
            val = e._eval(compressor, depth + 1);
            if (val === e || !val)
              return this;
            if (!is_pure_native_method(val.constructor.name, key))
              return this;
          }
          var args = [];
          for (var i = 0, len = this.args.length; i < len; i++) {
            var arg = this.args[i];
            var value = arg._eval(compressor, depth);
            if (arg === value)
              return this;
            if (arg instanceof AST_Lambda)
              return this;
            args.push(value);
          }
          try {
            return val[key].apply(val, args);
          } catch (ex) {
          }
        }
        return this;
      });
      def_eval(AST_New, return_this);
      function def_drop_side_effect_free(node, func) {
        node.DEFMETHOD("drop_side_effect_free", func);
      }
      function trim(nodes, compressor, first_in_statement2) {
        var len = nodes.length;
        if (!len)
          return null;
        var ret = [], changed = false;
        for (var i = 0; i < len; i++) {
          var node = nodes[i].drop_side_effect_free(compressor, first_in_statement2);
          changed |= node !== nodes[i];
          if (node) {
            ret.push(node);
            first_in_statement2 = false;
          }
        }
        return changed ? ret.length ? ret : null : nodes;
      }
      def_drop_side_effect_free(AST_Node, return_this);
      def_drop_side_effect_free(AST_Constant, return_null);
      def_drop_side_effect_free(AST_This, return_null);
      def_drop_side_effect_free(AST_Call, function(compressor, first_in_statement2) {
        if (is_nullish_shortcircuited(this, compressor)) {
          return this.expression.drop_side_effect_free(compressor, first_in_statement2);
        }
        if (!this.is_callee_pure(compressor)) {
          if (this.expression.is_call_pure(compressor)) {
            var exprs = this.args.slice();
            exprs.unshift(this.expression.expression);
            exprs = trim(exprs, compressor, first_in_statement2);
            return exprs && make_sequence(this, exprs);
          }
          if (is_func_expr(this.expression) && (!this.expression.name || !this.expression.name.definition().references.length)) {
            var node = this.clone();
            node.expression.process_expression(false, compressor);
            return node;
          }
          return this;
        }
        var args = trim(this.args, compressor, first_in_statement2);
        return args && make_sequence(this, args);
      });
      def_drop_side_effect_free(AST_Accessor, return_null);
      def_drop_side_effect_free(AST_Function, return_null);
      def_drop_side_effect_free(AST_Arrow, return_null);
      def_drop_side_effect_free(AST_Class, function(compressor) {
        const with_effects = [];
        const trimmed_extends = this.extends && this.extends.drop_side_effect_free(compressor);
        if (trimmed_extends)
          with_effects.push(trimmed_extends);
        for (const prop of this.properties) {
          if (prop instanceof AST_ClassStaticBlock) {
            if (prop.has_side_effects(compressor)) {
              return this;
            }
          } else {
            const trimmed_prop = prop.drop_side_effect_free(compressor);
            if (trimmed_prop) {
              if (trimmed_prop.contains_this())
                return this;
              with_effects.push(trimmed_prop);
            }
          }
        }
        if (!with_effects.length)
          return null;
        const exprs = make_sequence(this, with_effects);
        if (this instanceof AST_DefClass) {
          return make_node(AST_SimpleStatement, this, { body: exprs });
        } else {
          return exprs;
        }
      });
      def_drop_side_effect_free(AST_ClassProperty, function(compressor) {
        const key = this.computed_key() && this.key.drop_side_effect_free(compressor);
        const value = this.static && this.value && this.value.drop_side_effect_free(compressor);
        if (key && value)
          return make_sequence(this, [key, value]);
        return key || value || null;
      });
      def_drop_side_effect_free(AST_Binary, function(compressor, first_in_statement2) {
        var right = this.right.drop_side_effect_free(compressor);
        if (!right)
          return this.left.drop_side_effect_free(compressor, first_in_statement2);
        if (lazy_op.has(this.operator)) {
          if (right === this.right)
            return this;
          var node = this.clone();
          node.right = right;
          return node;
        } else {
          var left = this.left.drop_side_effect_free(compressor, first_in_statement2);
          if (!left)
            return this.right.drop_side_effect_free(compressor, first_in_statement2);
          return make_sequence(this, [left, right]);
        }
      });
      def_drop_side_effect_free(AST_Assign, function(compressor) {
        if (this.logical)
          return this;
        var left = this.left;
        if (left.has_side_effects(compressor) || compressor.has_directive("use strict") && left instanceof AST_PropAccess && left.expression.is_constant()) {
          return this;
        }
        set_flag(this, WRITE_ONLY);
        while (left instanceof AST_PropAccess) {
          left = left.expression;
        }
        if (left.is_constant_expression(compressor.find_parent(AST_Scope))) {
          return this.right.drop_side_effect_free(compressor);
        }
        return this;
      });
      def_drop_side_effect_free(AST_Conditional, function(compressor) {
        var consequent = this.consequent.drop_side_effect_free(compressor);
        var alternative = this.alternative.drop_side_effect_free(compressor);
        if (consequent === this.consequent && alternative === this.alternative)
          return this;
        if (!consequent)
          return alternative ? make_node(AST_Binary, this, {
            operator: "||",
            left: this.condition,
            right: alternative
          }) : this.condition.drop_side_effect_free(compressor);
        if (!alternative)
          return make_node(AST_Binary, this, {
            operator: "&&",
            left: this.condition,
            right: consequent
          });
        var node = this.clone();
        node.consequent = consequent;
        node.alternative = alternative;
        return node;
      });
      def_drop_side_effect_free(AST_Unary, function(compressor, first_in_statement2) {
        if (unary_side_effects.has(this.operator)) {
          if (!this.expression.has_side_effects(compressor)) {
            set_flag(this, WRITE_ONLY);
          } else {
            clear_flag(this, WRITE_ONLY);
          }
          return this;
        }
        if (this.operator == "typeof" && this.expression instanceof AST_SymbolRef)
          return null;
        var expression = this.expression.drop_side_effect_free(compressor, first_in_statement2);
        if (first_in_statement2 && expression && is_iife_call(expression)) {
          if (expression === this.expression && this.operator == "!")
            return this;
          return expression.negate(compressor, first_in_statement2);
        }
        return expression;
      });
      def_drop_side_effect_free(AST_SymbolRef, function(compressor) {
        const safe_access = this.is_declared(compressor) || pure_prop_access_globals.has(this.name);
        return safe_access ? null : this;
      });
      def_drop_side_effect_free(AST_Object, function(compressor, first_in_statement2) {
        var values = trim(this.properties, compressor, first_in_statement2);
        return values && make_sequence(this, values);
      });
      def_drop_side_effect_free(AST_ObjectProperty, function(compressor, first_in_statement2) {
        const computed_key = this instanceof AST_ObjectKeyVal && this.key instanceof AST_Node;
        const key = computed_key && this.key.drop_side_effect_free(compressor, first_in_statement2);
        const value = this.value && this.value.drop_side_effect_free(compressor, first_in_statement2);
        if (key && value) {
          return make_sequence(this, [key, value]);
        }
        return key || value;
      });
      def_drop_side_effect_free(AST_ConciseMethod, function() {
        return this.computed_key() ? this.key : null;
      });
      def_drop_side_effect_free(AST_ObjectGetter, function() {
        return this.computed_key() ? this.key : null;
      });
      def_drop_side_effect_free(AST_ObjectSetter, function() {
        return this.computed_key() ? this.key : null;
      });
      def_drop_side_effect_free(AST_Array, function(compressor, first_in_statement2) {
        var values = trim(this.elements, compressor, first_in_statement2);
        return values && make_sequence(this, values);
      });
      def_drop_side_effect_free(AST_Dot, function(compressor, first_in_statement2) {
        if (is_nullish_shortcircuited(this, compressor)) {
          return this.expression.drop_side_effect_free(compressor, first_in_statement2);
        }
        if (!this.optional && this.expression.may_throw_on_access(compressor)) {
          return this;
        }
        return this.expression.drop_side_effect_free(compressor, first_in_statement2);
      });
      def_drop_side_effect_free(AST_Sub, function(compressor, first_in_statement2) {
        if (is_nullish_shortcircuited(this, compressor)) {
          return this.expression.drop_side_effect_free(compressor, first_in_statement2);
        }
        if (!this.optional && this.expression.may_throw_on_access(compressor)) {
          return this;
        }
        var property = this.property.drop_side_effect_free(compressor);
        if (property && this.optional)
          return this;
        var expression = this.expression.drop_side_effect_free(compressor, first_in_statement2);
        if (expression && property)
          return make_sequence(this, [expression, property]);
        return expression || property;
      });
      def_drop_side_effect_free(AST_Chain, function(compressor, first_in_statement2) {
        return this.expression.drop_side_effect_free(compressor, first_in_statement2);
      });
      def_drop_side_effect_free(AST_Sequence, function(compressor) {
        var last2 = this.tail_node();
        var expr = last2.drop_side_effect_free(compressor);
        if (expr === last2)
          return this;
        var expressions = this.expressions.slice(0, -1);
        if (expr)
          expressions.push(expr);
        if (!expressions.length) {
          return make_node(AST_Number, this, { value: 0 });
        }
        return make_sequence(this, expressions);
      });
      def_drop_side_effect_free(AST_Expansion, function(compressor, first_in_statement2) {
        return this.expression.drop_side_effect_free(compressor, first_in_statement2);
      });
      def_drop_side_effect_free(AST_TemplateSegment, return_null);
      def_drop_side_effect_free(AST_TemplateString, function(compressor) {
        var values = trim(this.segments, compressor, first_in_statement);
        return values && make_sequence(this, values);
      });
      const r_keep_assign = /keep_assign/;
      AST_Scope.DEFMETHOD("drop_unused", function(compressor) {
        if (!compressor.option("unused"))
          return;
        if (compressor.has_directive("use asm"))
          return;
        if (!this.variables)
          return;
        var self2 = this;
        if (self2.pinned())
          return;
        var drop_funcs = !(self2 instanceof AST_Toplevel) || compressor.toplevel.funcs;
        var drop_vars = !(self2 instanceof AST_Toplevel) || compressor.toplevel.vars;
        const assign_as_unused = r_keep_assign.test(compressor.option("unused")) ? return_false : function(node) {
          if (node instanceof AST_Assign && !node.logical && (has_flag(node, WRITE_ONLY) || node.operator == "=")) {
            return node.left;
          }
          if (node instanceof AST_Unary && has_flag(node, WRITE_ONLY)) {
            return node.expression;
          }
        };
        var in_use_ids = /* @__PURE__ */ new Map();
        var fixed_ids = /* @__PURE__ */ new Map();
        if (self2 instanceof AST_Toplevel && compressor.top_retain) {
          self2.variables.forEach(function(def) {
            if (compressor.top_retain(def)) {
              in_use_ids.set(def.id, def);
            }
          });
        }
        var var_defs_by_id = /* @__PURE__ */ new Map();
        var initializations = /* @__PURE__ */ new Map();
        var scope = this;
        var tw = new TreeWalker(function(node, descend) {
          if (node instanceof AST_Lambda && node.uses_arguments && !tw.has_directive("use strict")) {
            node.argnames.forEach(function(argname) {
              if (!(argname instanceof AST_SymbolDeclaration))
                return;
              var def = argname.definition();
              in_use_ids.set(def.id, def);
            });
          }
          if (node === self2)
            return;
          if (node instanceof AST_Class) {
            if (node.has_side_effects(compressor)) {
              node.visit_nondeferred_class_parts(tw);
            }
          }
          if (node instanceof AST_Defun || node instanceof AST_DefClass) {
            var node_def = node.name.definition();
            const in_export = tw.parent() instanceof AST_Export;
            if (in_export || !drop_funcs && scope === self2) {
              if (node_def.global) {
                in_use_ids.set(node_def.id, node_def);
              }
            }
            map_add(initializations, node_def.id, node);
            return true;
          }
          const in_root_scope = scope === self2;
          if (node instanceof AST_SymbolFunarg && in_root_scope) {
            map_add(var_defs_by_id, node.definition().id, node);
          }
          if (node instanceof AST_Definitions && in_root_scope) {
            const in_export = tw.parent() instanceof AST_Export;
            node.definitions.forEach(function(def) {
              if (def.name instanceof AST_SymbolVar) {
                map_add(var_defs_by_id, def.name.definition().id, def);
              }
              if (in_export || !drop_vars) {
                walk(def.name, (node2) => {
                  if (node2 instanceof AST_SymbolDeclaration) {
                    const def2 = node2.definition();
                    if (def2.global) {
                      in_use_ids.set(def2.id, def2);
                    }
                  }
                });
              }
              if (def.name instanceof AST_Destructuring) {
                def.walk(tw);
              }
              if (def.name instanceof AST_SymbolDeclaration && def.value) {
                var node_def2 = def.name.definition();
                map_add(initializations, node_def2.id, def.value);
                if (!node_def2.chained && def.name.fixed_value() === def.value) {
                  fixed_ids.set(node_def2.id, def);
                }
                if (def.value.has_side_effects(compressor)) {
                  def.value.walk(tw);
                }
              }
            });
            return true;
          }
          return scan_ref_scoped(node, descend);
        });
        self2.walk(tw);
        tw = new TreeWalker(scan_ref_scoped);
        in_use_ids.forEach(function(def) {
          var init = initializations.get(def.id);
          if (init)
            init.forEach(function(init2) {
              init2.walk(tw);
            });
        });
        var tt = new TreeTransformer(function before(node, descend, in_list) {
          var parent = tt.parent();
          if (drop_vars) {
            const sym2 = assign_as_unused(node);
            if (sym2 instanceof AST_SymbolRef) {
              var def = sym2.definition();
              var in_use = in_use_ids.has(def.id);
              if (node instanceof AST_Assign) {
                if (!in_use || fixed_ids.has(def.id) && fixed_ids.get(def.id) !== node) {
                  return maintain_this_binding(parent, node, node.right.transform(tt));
                }
              } else if (!in_use) {
                return in_list ? MAP.skip : make_node(AST_Number, node, { value: 0 });
              }
            }
          }
          if (scope !== self2)
            return;
          var def;
          if (node.name && (node instanceof AST_ClassExpression && !keep_name(compressor.option("keep_classnames"), (def = node.name.definition()).name) || node instanceof AST_Function && !keep_name(compressor.option("keep_fnames"), (def = node.name.definition()).name))) {
            if (!in_use_ids.has(def.id) || def.orig.length > 1)
              node.name = null;
          }
          if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) {
            var trim2 = !compressor.option("keep_fargs");
            for (var a = node.argnames, i = a.length; --i >= 0; ) {
              var sym = a[i];
              if (sym instanceof AST_Expansion) {
                sym = sym.expression;
              }
              if (sym instanceof AST_DefaultAssign) {
                sym = sym.left;
              }
              if (!(sym instanceof AST_Destructuring) && !in_use_ids.has(sym.definition().id)) {
                set_flag(sym, UNUSED);
                if (trim2) {
                  a.pop();
                }
              } else {
                trim2 = false;
              }
            }
          }
          if (node instanceof AST_DefClass && node !== self2) {
            const def2 = node.name.definition();
            descend(node, this);
            const keep_class = def2.global && !drop_funcs || in_use_ids.has(def2.id);
            if (!keep_class) {
              const kept = node.drop_side_effect_free(compressor);
              if (kept == null) {
                def2.eliminated++;
                return in_list ? MAP.skip : make_node(AST_EmptyStatement, node);
              }
              return kept;
            }
            return node;
          }
          if (node instanceof AST_Defun && node !== self2) {
            const def2 = node.name.definition();
            const keep = def2.global && !drop_funcs || in_use_ids.has(def2.id);
            if (!keep) {
              def2.eliminated++;
              return in_list ? MAP.skip : make_node(AST_EmptyStatement, node);
            }
          }
          if (node instanceof AST_Definitions && !(parent instanceof AST_ForIn && parent.init === node)) {
            var drop_block = !(parent instanceof AST_Toplevel) && !(node instanceof AST_Var);
            var body = [], head = [], tail = [];
            var side_effects = [];
            node.definitions.forEach(function(def2) {
              if (def2.value)
                def2.value = def2.value.transform(tt);
              var is_destructure = def2.name instanceof AST_Destructuring;
              var sym2 = is_destructure ? new SymbolDef(null, { name: "<destructure>" }) : def2.name.definition();
              if (drop_block && sym2.global)
                return tail.push(def2);
              if (!(drop_vars || drop_block) || is_destructure && (def2.name.names.length || def2.name.is_array || compressor.option("pure_getters") != true) || in_use_ids.has(sym2.id)) {
                if (def2.value && fixed_ids.has(sym2.id) && fixed_ids.get(sym2.id) !== def2) {
                  def2.value = def2.value.drop_side_effect_free(compressor);
                }
                if (def2.name instanceof AST_SymbolVar) {
                  var var_defs = var_defs_by_id.get(sym2.id);
                  if (var_defs.length > 1 && (!def2.value || sym2.orig.indexOf(def2.name) > sym2.eliminated)) {
                    if (def2.value) {
                      var ref = make_node(AST_SymbolRef, def2.name, def2.name);
                      sym2.references.push(ref);
                      var assign = make_node(AST_Assign, def2, {
                        operator: "=",
                        logical: false,
                        left: ref,
                        right: def2.value
                      });
                      if (fixed_ids.get(sym2.id) === def2) {
                        fixed_ids.set(sym2.id, assign);
                      }
                      side_effects.push(assign.transform(tt));
                    }
                    remove2(var_defs, def2);
                    sym2.eliminated++;
                    return;
                  }
                }
                if (def2.value) {
                  if (side_effects.length > 0) {
                    if (tail.length > 0) {
                      side_effects.push(def2.value);
                      def2.value = make_sequence(def2.value, side_effects);
                    } else {
                      body.push(make_node(AST_SimpleStatement, node, {
                        body: make_sequence(node, side_effects)
                      }));
                    }
                    side_effects = [];
                  }
                  tail.push(def2);
                } else {
                  head.push(def2);
                }
              } else if (sym2.orig[0] instanceof AST_SymbolCatch) {
                var value = def2.value && def2.value.drop_side_effect_free(compressor);
                if (value)
                  side_effects.push(value);
                def2.value = null;
                head.push(def2);
              } else {
                var value = def2.value && def2.value.drop_side_effect_free(compressor);
                if (value) {
                  side_effects.push(value);
                }
                sym2.eliminated++;
              }
            });
            if (head.length > 0 || tail.length > 0) {
              node.definitions = head.concat(tail);
              body.push(node);
            }
            if (side_effects.length > 0) {
              body.push(make_node(AST_SimpleStatement, node, {
                body: make_sequence(node, side_effects)
              }));
            }
            switch (body.length) {
              case 0:
                return in_list ? MAP.skip : make_node(AST_EmptyStatement, node);
              case 1:
                return body[0];
              default:
                return in_list ? MAP.splice(body) : make_node(AST_BlockStatement, node, { body });
            }
          }
          if (node instanceof AST_For) {
            descend(node, this);
            var block;
            if (node.init instanceof AST_BlockStatement) {
              block = node.init;
              node.init = block.body.pop();
              block.body.push(node);
            }
            if (node.init instanceof AST_SimpleStatement) {
              node.init = node.init.body;
            } else if (is_empty(node.init)) {
              node.init = null;
            }
            return !block ? node : in_list ? MAP.splice(block.body) : block;
          }
          if (node instanceof AST_LabeledStatement && node.body instanceof AST_For) {
            descend(node, this);
            if (node.body instanceof AST_BlockStatement) {
              var block = node.body;
              node.body = block.body.pop();
              block.body.push(node);
              return in_list ? MAP.splice(block.body) : block;
            }
            return node;
          }
          if (node instanceof AST_BlockStatement) {
            descend(node, this);
            if (in_list && node.body.every(can_be_evicted_from_block)) {
              return MAP.splice(node.body);
            }
            return node;
          }
          if (node instanceof AST_Scope && !(node instanceof AST_ClassStaticBlock)) {
            const save_scope = scope;
            scope = node;
            descend(node, this);
            scope = save_scope;
            return node;
          }
        });
        self2.transform(tt);
        function scan_ref_scoped(node, descend) {
          var node_def;
          const sym = assign_as_unused(node);
          if (sym instanceof AST_SymbolRef && !is_ref_of(node.left, AST_SymbolBlockDeclaration) && self2.variables.get(sym.name) === (node_def = sym.definition())) {
            if (node instanceof AST_Assign) {
              node.right.walk(tw);
              if (!node_def.chained && node.left.fixed_value() === node.right) {
                fixed_ids.set(node_def.id, node);
              }
            }
            return true;
          }
          if (node instanceof AST_SymbolRef) {
            node_def = node.definition();
            if (!in_use_ids.has(node_def.id)) {
              in_use_ids.set(node_def.id, node_def);
              if (node_def.orig[0] instanceof AST_SymbolCatch) {
                const redef = node_def.scope.is_block_scope() && node_def.scope.get_defun_scope().variables.get(node_def.name);
                if (redef)
                  in_use_ids.set(redef.id, redef);
              }
            }
            return true;
          }
          if (node instanceof AST_Class) {
            descend();
            return true;
          }
          if (node instanceof AST_Scope && !(node instanceof AST_ClassStaticBlock)) {
            var save_scope = scope;
            scope = node;
            descend();
            scope = save_scope;
            return true;
          }
        }
      });
      function def_reduce_vars(node, func) {
        node.DEFMETHOD("reduce_vars", func);
      }
      def_reduce_vars(AST_Node, noop);
      function reset_def(compressor, def) {
        def.assignments = 0;
        def.chained = false;
        def.direct_access = false;
        def.escaped = 0;
        def.recursive_refs = 0;
        def.references = [];
        def.single_use = void 0;
        if (def.scope.pinned() || def.orig[0] instanceof AST_SymbolFunarg && def.scope.uses_arguments) {
          def.fixed = false;
        } else if (def.orig[0] instanceof AST_SymbolConst || !compressor.exposed(def)) {
          def.fixed = def.init;
        } else {
          def.fixed = false;
        }
      }
      function reset_variables(tw, compressor, node) {
        node.variables.forEach(function(def) {
          reset_def(compressor, def);
          if (def.fixed === null) {
            tw.defs_to_safe_ids.set(def.id, tw.safe_ids);
            mark(tw, def, true);
          } else if (def.fixed) {
            tw.loop_ids.set(def.id, tw.in_loop);
            mark(tw, def, true);
          }
        });
      }
      function reset_block_variables(compressor, node) {
        if (node.block_scope)
          node.block_scope.variables.forEach((def) => {
            reset_def(compressor, def);
          });
      }
      function push(tw) {
        tw.safe_ids = Object.create(tw.safe_ids);
      }
      function pop(tw) {
        tw.safe_ids = Object.getPrototypeOf(tw.safe_ids);
      }
      function mark(tw, def, safe) {
        tw.safe_ids[def.id] = safe;
      }
      function safe_to_read(tw, def) {
        if (def.single_use == "m")
          return false;
        if (tw.safe_ids[def.id]) {
          if (def.fixed == null) {
            var orig = def.orig[0];
            if (orig instanceof AST_SymbolFunarg || orig.name == "arguments")
              return false;
            def.fixed = make_node(AST_Undefined, orig);
          }
          return true;
        }
        return def.fixed instanceof AST_Defun;
      }
      function safe_to_assign(tw, def, scope, value) {
        if (def.fixed === void 0)
          return true;
        let def_safe_ids;
        if (def.fixed === null && (def_safe_ids = tw.defs_to_safe_ids.get(def.id))) {
          def_safe_ids[def.id] = false;
          tw.defs_to_safe_ids.delete(def.id);
          return true;
        }
        if (!HOP(tw.safe_ids, def.id))
          return false;
        if (!safe_to_read(tw, def))
          return false;
        if (def.fixed === false)
          return false;
        if (def.fixed != null && (!value || def.references.length > def.assignments))
          return false;
        if (def.fixed instanceof AST_Defun) {
          return value instanceof AST_Node && def.fixed.parent_scope === scope;
        }
        return def.orig.every((sym) => {
          return !(sym instanceof AST_SymbolConst || sym instanceof AST_SymbolDefun || sym instanceof AST_SymbolLambda);
        });
      }
      function ref_once(tw, compressor, def) {
        return compressor.option("unused") && !def.scope.pinned() && def.references.length - def.recursive_refs == 1 && tw.loop_ids.get(def.id) === tw.in_loop;
      }
      function is_immutable(value) {
        if (!value)
          return false;
        return value.is_constant() || value instanceof AST_Lambda || value instanceof AST_This;
      }
      function mark_escaped(tw, d, scope, node, value, level = 0, depth = 1) {
        var parent = tw.parent(level);
        if (value) {
          if (value.is_constant())
            return;
          if (value instanceof AST_ClassExpression)
            return;
        }
        if (parent instanceof AST_Assign && (parent.operator === "=" || parent.logical) && node === parent.right || parent instanceof AST_Call && (node !== parent.expression || parent instanceof AST_New) || parent instanceof AST_Exit && node === parent.value && node.scope !== d.scope || parent instanceof AST_VarDef && node === parent.value || parent instanceof AST_Yield && node === parent.value && node.scope !== d.scope) {
          if (depth > 1 && !(value && value.is_constant_expression(scope)))
            depth = 1;
          if (!d.escaped || d.escaped > depth)
            d.escaped = depth;
          return;
        } else if (parent instanceof AST_Array || parent instanceof AST_Await || parent instanceof AST_Binary && lazy_op.has(parent.operator) || parent instanceof AST_Conditional && node !== parent.condition || parent instanceof AST_Expansion || parent instanceof AST_Sequence && node === parent.tail_node()) {
          mark_escaped(tw, d, scope, parent, parent, level + 1, depth);
        } else if (parent instanceof AST_ObjectKeyVal && node === parent.value) {
          var obj = tw.parent(level + 1);
          mark_escaped(tw, d, scope, obj, obj, level + 2, depth);
        } else if (parent instanceof AST_PropAccess && node === parent.expression) {
          value = read_property(value, parent.property);
          mark_escaped(tw, d, scope, parent, value, level + 1, depth + 1);
          if (value)
            return;
        }
        if (level > 0)
          return;
        if (parent instanceof AST_Sequence && node !== parent.tail_node())
          return;
        if (parent instanceof AST_SimpleStatement)
          return;
        d.direct_access = true;
      }
      const suppress = (node) => walk(node, (node2) => {
        if (!(node2 instanceof AST_Symbol))
          return;
        var d = node2.definition();
        if (!d)
          return;
        if (node2 instanceof AST_SymbolRef)
          d.references.push(node2);
        d.fixed = false;
      });
      def_reduce_vars(AST_Accessor, function(tw, descend, compressor) {
        push(tw);
        reset_variables(tw, compressor, this);
        descend();
        pop(tw);
        return true;
      });
      def_reduce_vars(AST_Assign, function(tw, descend, compressor) {
        var node = this;
        if (node.left instanceof AST_Destructuring) {
          suppress(node.left);
          return;
        }
        const finish_walk = () => {
          if (node.logical) {
            node.left.walk(tw);
            push(tw);
            node.right.walk(tw);
            pop(tw);
            return true;
          }
        };
        var sym = node.left;
        if (!(sym instanceof AST_SymbolRef))
          return finish_walk();
        var def = sym.definition();
        var safe = safe_to_assign(tw, def, sym.scope, node.right);
        def.assignments++;
        if (!safe)
          return finish_walk();
        var fixed = def.fixed;
        if (!fixed && node.operator != "=" && !node.logical)
          return finish_walk();
        var eq = node.operator == "=";
        var value = eq ? node.right : node;
        if (is_modified(compressor, tw, node, value, 0))
          return finish_walk();
        def.references.push(sym);
        if (!node.logical) {
          if (!eq)
            def.chained = true;
          def.fixed = eq ? function() {
            return node.right;
          } : function() {
            return make_node(AST_Binary, node, {
              operator: node.operator.slice(0, -1),
              left: fixed instanceof AST_Node ? fixed : fixed(),
              right: node.right
            });
          };
        }
        if (node.logical) {
          mark(tw, def, false);
          push(tw);
          node.right.walk(tw);
          pop(tw);
          return true;
        }
        mark(tw, def, false);
        node.right.walk(tw);
        mark(tw, def, true);
        mark_escaped(tw, def, sym.scope, node, value, 0, 1);
        return true;
      });
      def_reduce_vars(AST_Binary, function(tw) {
        if (!lazy_op.has(this.operator))
          return;
        this.left.walk(tw);
        push(tw);
        this.right.walk(tw);
        pop(tw);
        return true;
      });
      def_reduce_vars(AST_Block, function(tw, descend, compressor) {
        reset_block_variables(compressor, this);
      });
      def_reduce_vars(AST_Case, function(tw) {
        push(tw);
        this.expression.walk(tw);
        pop(tw);
        push(tw);
        walk_body(this, tw);
        pop(tw);
        return true;
      });
      def_reduce_vars(AST_Class, function(tw, descend) {
        clear_flag(this, INLINED);
        push(tw);
        descend();
        pop(tw);
        return true;
      });
      def_reduce_vars(AST_ClassStaticBlock, function(tw, descend, compressor) {
        reset_block_variables(compressor, this);
      });
      def_reduce_vars(AST_Conditional, function(tw) {
        this.condition.walk(tw);
        push(tw);
        this.consequent.walk(tw);
        pop(tw);
        push(tw);
        this.alternative.walk(tw);
        pop(tw);
        return true;
      });
      def_reduce_vars(AST_Chain, function(tw, descend) {
        const safe_ids = tw.safe_ids;
        descend();
        tw.safe_ids = safe_ids;
        return true;
      });
      def_reduce_vars(AST_Call, function(tw) {
        this.expression.walk(tw);
        if (this.optional) {
          push(tw);
        }
        for (const arg of this.args)
          arg.walk(tw);
        return true;
      });
      def_reduce_vars(AST_PropAccess, function(tw) {
        if (!this.optional)
          return;
        this.expression.walk(tw);
        push(tw);
        if (this.property instanceof AST_Node)
          this.property.walk(tw);
        return true;
      });
      def_reduce_vars(AST_Default, function(tw, descend) {
        push(tw);
        descend();
        pop(tw);
        return true;
      });
      function mark_lambda(tw, descend, compressor) {
        clear_flag(this, INLINED);
        push(tw);
        reset_variables(tw, compressor, this);
        var iife;
        if (!this.name && !this.uses_arguments && !this.pinned() && (iife = tw.parent()) instanceof AST_Call && iife.expression === this && !iife.args.some((arg) => arg instanceof AST_Expansion) && this.argnames.every((arg_name) => arg_name instanceof AST_Symbol)) {
          this.argnames.forEach((arg, i) => {
            if (!arg.definition)
              return;
            var d = arg.definition();
            if (d.orig.length > 1)
              return;
            if (d.fixed === void 0 && (!this.uses_arguments || tw.has_directive("use strict"))) {
              d.fixed = function() {
                return iife.args[i] || make_node(AST_Undefined, iife);
              };
              tw.loop_ids.set(d.id, tw.in_loop);
              mark(tw, d, true);
            } else {
              d.fixed = false;
            }
          });
        }
        descend();
        pop(tw);
        handle_defined_after_hoist(this);
        return true;
      }
      function handle_defined_after_hoist(parent) {
        const defuns = [];
        walk(parent, (node) => {
          if (node === parent)
            return;
          if (node instanceof AST_Defun)
            defuns.push(node);
          if (node instanceof AST_Scope || node instanceof AST_SimpleStatement)
            return true;
        });
        const symbols_of_interest = /* @__PURE__ */ new Set();
        const defuns_of_interest = /* @__PURE__ */ new Set();
        const potential_conflicts = [];
        for (const defun of defuns) {
          const fname_def = defun.name.definition();
          const found_self_ref_in_other_defuns = defuns.some((d) => d !== defun && d.enclosed.indexOf(fname_def) !== -1);
          for (const def of defun.enclosed) {
            if (def.fixed === false || def === fname_def || def.scope.get_defun_scope() !== parent) {
              continue;
            }
            if (def.assignments === 0 && def.orig.length === 1 && def.orig[0] instanceof AST_SymbolDefun) {
              continue;
            }
            if (found_self_ref_in_other_defuns) {
              def.fixed = false;
              continue;
            }
            potential_conflicts.push({ defun, def, fname_def });
            symbols_of_interest.add(def.id);
            symbols_of_interest.add(fname_def.id);
            defuns_of_interest.add(defun);
          }
        }
        if (potential_conflicts.length) {
          const found_symbols = [];
          const found_symbol_writes = /* @__PURE__ */ new Set();
          const defun_ranges = /* @__PURE__ */ new Map();
          let tw;
          parent.walk(tw = new TreeWalker((node, descend) => {
            if (node instanceof AST_Defun && defuns_of_interest.has(node)) {
              const start = found_symbols.length;
              descend();
              const end = found_symbols.length;
              defun_ranges.set(node, { start, end });
              return true;
            }
            if (node instanceof AST_Symbol && node.thedef) {
              const id = node.definition().id;
              if (symbols_of_interest.has(id)) {
                if (node instanceof AST_SymbolDeclaration || is_lhs(node, tw)) {
                  found_symbol_writes.add(found_symbols.length);
                }
                found_symbols.push(id);
              }
            }
          }));
          for (const { def, defun, fname_def } of potential_conflicts) {
            const defun_range = defun_ranges.get(defun);
            const find = (sym_id, starting_at = 0, must_be_write = false) => {
              let index = starting_at;
              for (; ; ) {
                index = found_symbols.indexOf(sym_id, index);
                if (index === -1) {
                  break;
                } else if (index >= defun_range.start && index < defun_range.end) {
                  index = defun_range.end;
                  continue;
                } else if (must_be_write && !found_symbol_writes.has(index)) {
                  index++;
                  continue;
                } else {
                  break;
                }
              }
              return index;
            };
            const read_defun_at = find(fname_def.id);
            const wrote_def_at = find(def.id, read_defun_at + 1, true);
            const wrote_def_after_reading_defun = read_defun_at != -1 && wrote_def_at != -1 && wrote_def_at > read_defun_at;
            if (wrote_def_after_reading_defun) {
              def.fixed = false;
            }
          }
        }
      }
      def_reduce_vars(AST_Lambda, mark_lambda);
      def_reduce_vars(AST_Do, function(tw, descend, compressor) {
        reset_block_variables(compressor, this);
        const saved_loop = tw.in_loop;
        tw.in_loop = this;
        push(tw);
        this.body.walk(tw);
        if (has_break_or_continue(this)) {
          pop(tw);
          push(tw);
        }
        this.condition.walk(tw);
        pop(tw);
        tw.in_loop = saved_loop;
        return true;
      });
      def_reduce_vars(AST_For, function(tw, descend, compressor) {
        reset_block_variables(compressor, this);
        if (this.init)
          this.init.walk(tw);
        const saved_loop = tw.in_loop;
        tw.in_loop = this;
        push(tw);
        if (this.condition)
          this.condition.walk(tw);
        this.body.walk(tw);
        if (this.step) {
          if (has_break_or_continue(this)) {
            pop(tw);
            push(tw);
          }
          this.step.walk(tw);
        }
        pop(tw);
        tw.in_loop = saved_loop;
        return true;
      });
      def_reduce_vars(AST_ForIn, function(tw, descend, compressor) {
        reset_block_variables(compressor, this);
        suppress(this.init);
        this.object.walk(tw);
        const saved_loop = tw.in_loop;
        tw.in_loop = this;
        push(tw);
        this.body.walk(tw);
        pop(tw);
        tw.in_loop = saved_loop;
        return true;
      });
      def_reduce_vars(AST_If, function(tw) {
        this.condition.walk(tw);
        push(tw);
        this.body.walk(tw);
        pop(tw);
        if (this.alternative) {
          push(tw);
          this.alternative.walk(tw);
          pop(tw);
        }
        return true;
      });
      def_reduce_vars(AST_LabeledStatement, function(tw) {
        push(tw);
        this.body.walk(tw);
        pop(tw);
        return true;
      });
      def_reduce_vars(AST_SymbolCatch, function() {
        this.definition().fixed = false;
      });
      def_reduce_vars(AST_SymbolRef, function(tw, descend, compressor) {
        var d = this.definition();
        d.references.push(this);
        if (d.references.length == 1 && !d.fixed && d.orig[0] instanceof AST_SymbolDefun) {
          tw.loop_ids.set(d.id, tw.in_loop);
        }
        var fixed_value;
        if (d.fixed === void 0 || !safe_to_read(tw, d)) {
          d.fixed = false;
        } else if (d.fixed) {
          fixed_value = this.fixed_value();
          if (fixed_value instanceof AST_Lambda && is_recursive_ref(tw, d)) {
            d.recursive_refs++;
          } else if (fixed_value && !compressor.exposed(d) && ref_once(tw, compressor, d)) {
            d.single_use = fixed_value instanceof AST_Lambda && !fixed_value.pinned() || fixed_value instanceof AST_Class || d.scope === this.scope && fixed_value.is_constant_expression();
          } else {
            d.single_use = false;
          }
          if (is_modified(compressor, tw, this, fixed_value, 0, is_immutable(fixed_value))) {
            if (d.single_use) {
              d.single_use = "m";
            } else {
              d.fixed = false;
            }
          }
        }
        mark_escaped(tw, d, this.scope, this, fixed_value, 0, 1);
      });
      def_reduce_vars(AST_Toplevel, function(tw, descend, compressor) {
        this.globals.forEach(function(def) {
          reset_def(compressor, def);
        });
        reset_variables(tw, compressor, this);
        descend();
        handle_defined_after_hoist(this);
        return true;
      });
      def_reduce_vars(AST_Try, function(tw, descend, compressor) {
        reset_block_variables(compressor, this);
        push(tw);
        this.body.walk(tw);
        pop(tw);
        if (this.bcatch) {
          push(tw);
          this.bcatch.walk(tw);
          pop(tw);
        }
        if (this.bfinally)
          this.bfinally.walk(tw);
        return true;
      });
      def_reduce_vars(AST_Unary, function(tw) {
        var node = this;
        if (node.operator !== "++" && node.operator !== "--")
          return;
        var exp = node.expression;
        if (!(exp instanceof AST_SymbolRef))
          return;
        var def = exp.definition();
        var safe = safe_to_assign(tw, def, exp.scope, true);
        def.assignments++;
        if (!safe)
          return;
        var fixed = def.fixed;
        if (!fixed)
          return;
        def.references.push(exp);
        def.chained = true;
        def.fixed = function() {
          return make_node(AST_Binary, node, {
            operator: node.operator.slice(0, -1),
            left: make_node(AST_UnaryPrefix, node, {
              operator: "+",
              expression: fixed instanceof AST_Node ? fixed : fixed()
            }),
            right: make_node(AST_Number, node, {
              value: 1
            })
          });
        };
        mark(tw, def, true);
        return true;
      });
      def_reduce_vars(AST_VarDef, function(tw, descend) {
        var node = this;
        if (node.name instanceof AST_Destructuring) {
          suppress(node.name);
          return;
        }
        var d = node.name.definition();
        if (node.value) {
          if (safe_to_assign(tw, d, node.name.scope, node.value)) {
            d.fixed = function() {
              return node.value;
            };
            tw.loop_ids.set(d.id, tw.in_loop);
            mark(tw, d, false);
            descend();
            mark(tw, d, true);
            return true;
          } else {
            d.fixed = false;
          }
        }
      });
      def_reduce_vars(AST_While, function(tw, descend, compressor) {
        reset_block_variables(compressor, this);
        const saved_loop = tw.in_loop;
        tw.in_loop = this;
        push(tw);
        descend();
        pop(tw);
        tw.in_loop = saved_loop;
        return true;
      });
      function loop_body(x) {
        if (x instanceof AST_IterationStatement) {
          return x.body instanceof AST_BlockStatement ? x.body : x;
        }
        return x;
      }
      function is_lhs_read_only(lhs) {
        if (lhs instanceof AST_This)
          return true;
        if (lhs instanceof AST_SymbolRef)
          return lhs.definition().orig[0] instanceof AST_SymbolLambda;
        if (lhs instanceof AST_PropAccess) {
          lhs = lhs.expression;
          if (lhs instanceof AST_SymbolRef) {
            if (lhs.is_immutable())
              return false;
            lhs = lhs.fixed_value();
          }
          if (!lhs)
            return true;
          if (lhs instanceof AST_RegExp)
            return false;
          if (lhs instanceof AST_Constant)
            return true;
          return is_lhs_read_only(lhs);
        }
        return false;
      }
      function remove_initializers(var_statement) {
        var decls = [];
        var_statement.definitions.forEach(function(def) {
          if (def.name instanceof AST_SymbolDeclaration) {
            def.value = null;
            decls.push(def);
          } else {
            def.declarations_as_names().forEach((name) => {
              decls.push(make_node(AST_VarDef, def, {
                name,
                value: null
              }));
            });
          }
        });
        return decls.length ? make_node(AST_Var, var_statement, { definitions: decls }) : null;
      }
      function trim_unreachable_code(compressor, stat, target) {
        walk(stat, (node) => {
          if (node instanceof AST_Var) {
            const no_initializers = remove_initializers(node);
            if (no_initializers)
              target.push(no_initializers);
            return true;
          }
          if (node instanceof AST_Defun && (node === stat || !compressor.has_directive("use strict"))) {
            target.push(node === stat ? node : make_node(AST_Var, node, {
              definitions: [
                make_node(AST_VarDef, node, {
                  name: make_node(AST_SymbolVar, node.name, node.name),
                  value: null
                })
              ]
            }));
            return true;
          }
          if (node instanceof AST_Export || node instanceof AST_Import) {
            target.push(node);
            return true;
          }
          if (node instanceof AST_Scope) {
            return true;
          }
        });
      }
      function tighten_body(statements, compressor) {
        const nearest_scope = compressor.find_scope();
        const defun_scope = nearest_scope.get_defun_scope();
        const { in_loop, in_try } = find_loop_scope_try();
        var CHANGED, max_iter = 10;
        do {
          CHANGED = false;
          eliminate_spurious_blocks(statements);
          if (compressor.option("dead_code")) {
            eliminate_dead_code(statements, compressor);
          }
          if (compressor.option("if_return")) {
            handle_if_return(statements, compressor);
          }
          if (compressor.sequences_limit > 0) {
            sequencesize(statements, compressor);
            sequencesize_2(statements, compressor);
          }
          if (compressor.option("join_vars")) {
            join_consecutive_vars(statements);
          }
          if (compressor.option("collapse_vars")) {
            collapse(statements, compressor);
          }
        } while (CHANGED && max_iter-- > 0);
        function find_loop_scope_try() {
          var node = compressor.self(), level = 0, in_loop2 = false, in_try2 = false;
          do {
            if (node instanceof AST_IterationStatement) {
              in_loop2 = true;
            } else if (node instanceof AST_Scope) {
              break;
            } else if (node instanceof AST_TryBlock) {
              in_try2 = true;
            }
          } while (node = compressor.parent(level++));
          return { in_loop: in_loop2, in_try: in_try2 };
        }
        function collapse(statements2, compressor2) {
          if (nearest_scope.pinned() || defun_scope.pinned())
            return statements2;
          var args;
          var candidates = [];
          var stat_index = statements2.length;
          var scanner = new TreeTransformer(function(node) {
            if (abort)
              return node;
            if (!hit) {
              if (node !== hit_stack[hit_index])
                return node;
              hit_index++;
              if (hit_index < hit_stack.length)
                return handle_custom_scan_order(node);
              hit = true;
              stop_after = find_stop(node, 0);
              if (stop_after === node)
                abort = true;
              return node;
            }
            var parent = scanner.parent();
            if (node instanceof AST_Assign && (node.logical || node.operator != "=" && lhs.equivalent_to(node.left)) || node instanceof AST_Await || node instanceof AST_Call && lhs instanceof AST_PropAccess && lhs.equivalent_to(node.expression) || (node instanceof AST_Call || node instanceof AST_PropAccess) && node.optional || node instanceof AST_Debugger || node instanceof AST_Destructuring || node instanceof AST_Expansion && node.expression instanceof AST_Symbol && (node.expression instanceof AST_This || node.expression.definition().references.length > 1) || node instanceof AST_IterationStatement && !(node instanceof AST_For) || node instanceof AST_LoopControl || node instanceof AST_Try || node instanceof AST_With || node instanceof AST_Yield || node instanceof AST_Export || node instanceof AST_Class || parent instanceof AST_For && node !== parent.init || !replace_all && (node instanceof AST_SymbolRef && !node.is_declared(compressor2) && !pure_prop_access_globals.has(node)) || node instanceof AST_SymbolRef && parent instanceof AST_Call && has_annotation(parent, _NOINLINE)) {
              abort = true;
              return node;
            }
            if (!stop_if_hit && (!lhs_local || !replace_all) && (parent instanceof AST_Binary && lazy_op.has(parent.operator) && parent.left !== node || parent instanceof AST_Conditional && parent.condition !== node || parent instanceof AST_If && parent.condition !== node)) {
              stop_if_hit = parent;
            }
            if (can_replace && !(node instanceof AST_SymbolDeclaration) && lhs.equivalent_to(node) && !shadows(scanner.find_scope() || nearest_scope, lvalues)) {
              if (stop_if_hit) {
                abort = true;
                return node;
              }
              if (is_lhs(node, parent)) {
                if (value_def)
                  replaced++;
                return node;
              } else {
                replaced++;
                if (value_def && candidate instanceof AST_VarDef)
                  return node;
              }
              CHANGED = abort = true;
              if (candidate instanceof AST_UnaryPostfix) {
                return make_node(AST_UnaryPrefix, candidate, candidate);
              }
              if (candidate instanceof AST_VarDef) {
                var def2 = candidate.name.definition();
                var value = candidate.value;
                if (def2.references.length - def2.replaced == 1 && !compressor2.exposed(def2)) {
                  def2.replaced++;
                  if (funarg && is_identifier_atom(value)) {
                    return value.transform(compressor2);
                  } else {
                    return maintain_this_binding(parent, node, value);
                  }
                }
                return make_node(AST_Assign, candidate, {
                  operator: "=",
                  logical: false,
                  left: make_node(AST_SymbolRef, candidate.name, candidate.name),
                  right: value
                });
              }
              clear_flag(candidate, WRITE_ONLY);
              return candidate;
            }
            var sym;
            if (node instanceof AST_Call || node instanceof AST_Exit && (side_effects || lhs instanceof AST_PropAccess || may_modify(lhs)) || node instanceof AST_PropAccess && (side_effects || node.expression.may_throw_on_access(compressor2)) || node instanceof AST_SymbolRef && (lvalues.has(node.name) && lvalues.get(node.name).modified || side_effects && may_modify(node)) || node instanceof AST_VarDef && node.value && (lvalues.has(node.name.name) || side_effects && may_modify(node.name)) || (sym = is_lhs(node.left, node)) && (sym instanceof AST_PropAccess || lvalues.has(sym.name)) || may_throw && (in_try ? node.has_side_effects(compressor2) : side_effects_external(node))) {
              stop_after = node;
              if (node instanceof AST_Scope)
                abort = true;
            }
            return handle_custom_scan_order(node);
          }, function(node) {
            if (abort)
              return;
            if (stop_after === node)
              abort = true;
            if (stop_if_hit === node)
              stop_if_hit = null;
          });
          var multi_replacer = new TreeTransformer(function(node) {
            if (abort)
              return node;
            if (!hit) {
              if (node !== hit_stack[hit_index])
                return node;
              hit_index++;
              if (hit_index < hit_stack.length)
                return;
              hit = true;
              return node;
            }
            if (node instanceof AST_SymbolRef && node.name == def.name) {
              if (!--replaced)
                abort = true;
              if (is_lhs(node, multi_replacer.parent()))
                return node;
              def.replaced++;
              value_def.replaced--;
              return candidate.value;
            }
            if (node instanceof AST_Default || node instanceof AST_Scope)
              return node;
          });
          while (--stat_index >= 0) {
            if (stat_index == 0 && compressor2.option("unused"))
              extract_args();
            var hit_stack = [];
            extract_candidates(statements2[stat_index]);
            while (candidates.length > 0) {
              hit_stack = candidates.pop();
              var hit_index = 0;
              var candidate = hit_stack[hit_stack.length - 1];
              var value_def = null;
              var stop_after = null;
              var stop_if_hit = null;
              var lhs = get_lhs(candidate);
              if (!lhs || is_lhs_read_only(lhs) || lhs.has_side_effects(compressor2))
                continue;
              var lvalues = get_lvalues(candidate);
              var lhs_local = is_lhs_local(lhs);
              if (lhs instanceof AST_SymbolRef) {
                lvalues.set(lhs.name, { def: lhs.definition(), modified: false });
              }
              var side_effects = value_has_side_effects(candidate);
              var replace_all = replace_all_symbols();
              var may_throw = candidate.may_throw(compressor2);
              var funarg = candidate.name instanceof AST_SymbolFunarg;
              var hit = funarg;
              var abort = false, replaced = 0, can_replace = !args || !hit;
              if (!can_replace) {
                for (let j = compressor2.self().argnames.lastIndexOf(candidate.name) + 1; !abort && j < args.length; j++) {
                  args[j].transform(scanner);
                }
                can_replace = true;
              }
              for (var i = stat_index; !abort && i < statements2.length; i++) {
                statements2[i].transform(scanner);
              }
              if (value_def) {
                var def = candidate.name.definition();
                if (abort && def.references.length - def.replaced > replaced)
                  replaced = false;
                else {
                  abort = false;
                  hit_index = 0;
                  hit = funarg;
                  for (var i = stat_index; !abort && i < statements2.length; i++) {
                    statements2[i].transform(multi_replacer);
                  }
                  value_def.single_use = false;
                }
              }
              if (replaced && !remove_candidate(candidate))
                statements2.splice(stat_index, 1);
            }
          }
          function handle_custom_scan_order(node) {
            if (node instanceof AST_Scope)
              return node;
            if (node instanceof AST_Switch) {
              node.expression = node.expression.transform(scanner);
              for (var i2 = 0, len = node.body.length; !abort && i2 < len; i2++) {
                var branch = node.body[i2];
                if (branch instanceof AST_Case) {
                  if (!hit) {
                    if (branch !== hit_stack[hit_index])
                      continue;
                    hit_index++;
                  }
                  branch.expression = branch.expression.transform(scanner);
                  if (!replace_all)
                    break;
                }
              }
              abort = true;
              return node;
            }
          }
          function redefined_within_scope(def2, scope) {
            if (def2.global)
              return false;
            let cur_scope = def2.scope;
            while (cur_scope && cur_scope !== scope) {
              if (cur_scope.variables.has(def2.name)) {
                return true;
              }
              cur_scope = cur_scope.parent_scope;
            }
            return false;
          }
          function has_overlapping_symbol(fn, arg, fn_strict) {
            var found = false, scan_this = !(fn instanceof AST_Arrow);
            arg.walk(new TreeWalker(function(node, descend) {
              if (found)
                return true;
              if (node instanceof AST_SymbolRef && (fn.variables.has(node.name) || redefined_within_scope(node.definition(), fn))) {
                var s = node.definition().scope;
                if (s !== defun_scope)
                  while (s = s.parent_scope) {
                    if (s === defun_scope)
                      return true;
                  }
                return found = true;
              }
              if ((fn_strict || scan_this) && node instanceof AST_This) {
                return found = true;
              }
              if (node instanceof AST_Scope && !(node instanceof AST_Arrow)) {
                var prev = scan_this;
                scan_this = false;
                descend();
                scan_this = prev;
                return true;
              }
            }));
            return found;
          }
          function extract_args() {
            var iife, fn = compressor2.self();
            if (is_func_expr(fn) && !fn.name && !fn.uses_arguments && !fn.pinned() && (iife = compressor2.parent()) instanceof AST_Call && iife.expression === fn && iife.args.every((arg2) => !(arg2 instanceof AST_Expansion))) {
              var fn_strict = compressor2.has_directive("use strict");
              if (fn_strict && !member(fn_strict, fn.body))
                fn_strict = false;
              var len = fn.argnames.length;
              args = iife.args.slice(len);
              var names = /* @__PURE__ */ new Set();
              for (var i2 = len; --i2 >= 0; ) {
                var sym = fn.argnames[i2];
                var arg = iife.args[i2];
                const def2 = sym.definition && sym.definition();
                const is_reassigned = def2 && def2.orig.length > 1;
                if (is_reassigned)
                  continue;
                args.unshift(make_node(AST_VarDef, sym, {
                  name: sym,
                  value: arg
                }));
                if (names.has(sym.name))
                  continue;
                names.add(sym.name);
                if (sym instanceof AST_Expansion) {
                  var elements = iife.args.slice(i2);
                  if (elements.every((arg2) => !has_overlapping_symbol(fn, arg2, fn_strict))) {
                    candidates.unshift([make_node(AST_VarDef, sym, {
                      name: sym.expression,
                      value: make_node(AST_Array, iife, {
                        elements
                      })
                    })]);
                  }
                } else {
                  if (!arg) {
                    arg = make_node(AST_Undefined, sym).transform(compressor2);
                  } else if (arg instanceof AST_Lambda && arg.pinned() || has_overlapping_symbol(fn, arg, fn_strict)) {
                    arg = null;
                  }
                  if (arg)
                    candidates.unshift([make_node(AST_VarDef, sym, {
                      name: sym,
                      value: arg
                    })]);
                }
              }
            }
          }
          function extract_candidates(expr) {
            hit_stack.push(expr);
            if (expr instanceof AST_Assign) {
              if (!expr.left.has_side_effects(compressor2) && !(expr.right instanceof AST_Chain)) {
                candidates.push(hit_stack.slice());
              }
              extract_candidates(expr.right);
            } else if (expr instanceof AST_Binary) {
              extract_candidates(expr.left);
              extract_candidates(expr.right);
            } else if (expr instanceof AST_Call && !has_annotation(expr, _NOINLINE)) {
              extract_candidates(expr.expression);
              expr.args.forEach(extract_candidates);
            } else if (expr instanceof AST_Case) {
              extract_candidates(expr.expression);
            } else if (expr instanceof AST_Conditional) {
              extract_candidates(expr.condition);
              extract_candidates(expr.consequent);
              extract_candidates(expr.alternative);
            } else if (expr instanceof AST_Definitions) {
              var len = expr.definitions.length;
              var i2 = len - 200;
              if (i2 < 0)
                i2 = 0;
              for (; i2 < len; i2++) {
                extract_candidates(expr.definitions[i2]);
              }
            } else if (expr instanceof AST_DWLoop) {
              extract_candidates(expr.condition);
              if (!(expr.body instanceof AST_Block)) {
                extract_candidates(expr.body);
              }
            } else if (expr instanceof AST_Exit) {
              if (expr.value)
                extract_candidates(expr.value);
            } else if (expr instanceof AST_For) {
              if (expr.init)
                extract_candidates(expr.init);
              if (expr.condition)
                extract_candidates(expr.condition);
              if (expr.step)
                extract_candidates(expr.step);
              if (!(expr.body instanceof AST_Block)) {
                extract_candidates(expr.body);
              }
            } else if (expr instanceof AST_ForIn) {
              extract_candidates(expr.object);
              if (!(expr.body instanceof AST_Block)) {
                extract_candidates(expr.body);
              }
            } else if (expr instanceof AST_If) {
              extract_candidates(expr.condition);
              if (!(expr.body instanceof AST_Block)) {
                extract_candidates(expr.body);
              }
              if (expr.alternative && !(expr.alternative instanceof AST_Block)) {
                extract_candidates(expr.alternative);
              }
            } else if (expr instanceof AST_Sequence) {
              expr.expressions.forEach(extract_candidates);
            } else if (expr instanceof AST_SimpleStatement) {
              extract_candidates(expr.body);
            } else if (expr instanceof AST_Switch) {
              extract_candidates(expr.expression);
              expr.body.forEach(extract_candidates);
            } else if (expr instanceof AST_Unary) {
              if (expr.operator == "++" || expr.operator == "--") {
                candidates.push(hit_stack.slice());
              }
            } else if (expr instanceof AST_VarDef) {
              if (expr.value && !(expr.value instanceof AST_Chain)) {
                candidates.push(hit_stack.slice());
                extract_candidates(expr.value);
              }
            }
            hit_stack.pop();
          }
          function find_stop(node, level, write_only) {
            var parent = scanner.parent(level);
            if (parent instanceof AST_Assign) {
              if (write_only && !parent.logical && !(parent.left instanceof AST_PropAccess || lvalues.has(parent.left.name))) {
                return find_stop(parent, level + 1, write_only);
              }
              return node;
            }
            if (parent instanceof AST_Binary) {
              if (write_only && (!lazy_op.has(parent.operator) || parent.left === node)) {
                return find_stop(parent, level + 1, write_only);
              }
              return node;
            }
            if (parent instanceof AST_Call)
              return node;
            if (parent instanceof AST_Case)
              return node;
            if (parent instanceof AST_Conditional) {
              if (write_only && parent.condition === node) {
                return find_stop(parent, level + 1, write_only);
              }
              return node;
            }
            if (parent instanceof AST_Definitions) {
              return find_stop(parent, level + 1, true);
            }
            if (parent instanceof AST_Exit) {
              return write_only ? find_stop(parent, level + 1, write_only) : node;
            }
            if (parent instanceof AST_If) {
              if (write_only && parent.condition === node) {
                return find_stop(parent, level + 1, write_only);
              }
              return node;
            }
            if (parent instanceof AST_IterationStatement)
              return node;
            if (parent instanceof AST_Sequence) {
              return find_stop(parent, level + 1, parent.tail_node() !== node);
            }
            if (parent instanceof AST_SimpleStatement) {
              return find_stop(parent, level + 1, true);
            }
            if (parent instanceof AST_Switch)
              return node;
            if (parent instanceof AST_VarDef)
              return node;
            return null;
          }
          function mangleable_var(var_def) {
            var value = var_def.value;
            if (!(value instanceof AST_SymbolRef))
              return;
            if (value.name == "arguments")
              return;
            var def2 = value.definition();
            if (def2.undeclared)
              return;
            return value_def = def2;
          }
          function get_lhs(expr) {
            if (expr instanceof AST_Assign && expr.logical) {
              return false;
            } else if (expr instanceof AST_VarDef && expr.name instanceof AST_SymbolDeclaration) {
              var def2 = expr.name.definition();
              if (!member(expr.name, def2.orig))
                return;
              var referenced = def2.references.length - def2.replaced;
              if (!referenced)
                return;
              var declared = def2.orig.length - def2.eliminated;
              if (declared > 1 && !(expr.name instanceof AST_SymbolFunarg) || (referenced > 1 ? mangleable_var(expr) : !compressor2.exposed(def2))) {
                return make_node(AST_SymbolRef, expr.name, expr.name);
              }
            } else {
              const lhs2 = expr instanceof AST_Assign ? expr.left : expr.expression;
              return !is_ref_of(lhs2, AST_SymbolConst) && !is_ref_of(lhs2, AST_SymbolLet) && lhs2;
            }
          }
          function get_rvalue(expr) {
            if (expr instanceof AST_Assign) {
              return expr.right;
            } else {
              return expr.value;
            }
          }
          function get_lvalues(expr) {
            var lvalues2 = /* @__PURE__ */ new Map();
            if (expr instanceof AST_Unary)
              return lvalues2;
            var tw = new TreeWalker(function(node) {
              var sym = node;
              while (sym instanceof AST_PropAccess)
                sym = sym.expression;
              if (sym instanceof AST_SymbolRef) {
                const prev = lvalues2.get(sym.name);
                if (!prev || !prev.modified) {
                  lvalues2.set(sym.name, {
                    def: sym.definition(),
                    modified: is_modified(compressor2, tw, node, node, 0)
                  });
                }
              }
            });
            get_rvalue(expr).walk(tw);
            return lvalues2;
          }
          function remove_candidate(expr) {
            if (expr.name instanceof AST_SymbolFunarg) {
              var iife = compressor2.parent(), argnames = compressor2.self().argnames;
              var index = argnames.indexOf(expr.name);
              if (index < 0) {
                iife.args.length = Math.min(iife.args.length, argnames.length - 1);
              } else {
                var args2 = iife.args;
                if (args2[index])
                  args2[index] = make_node(AST_Number, args2[index], {
                    value: 0
                  });
              }
              return true;
            }
            var found = false;
            return statements2[stat_index].transform(new TreeTransformer(function(node, descend, in_list) {
              if (found)
                return node;
              if (node === expr || node.body === expr) {
                found = true;
                if (node instanceof AST_VarDef) {
                  node.value = node.name instanceof AST_SymbolConst ? make_node(AST_Undefined, node.value) : null;
                  return node;
                }
                return in_list ? MAP.skip : null;
              }
            }, function(node) {
              if (node instanceof AST_Sequence)
                switch (node.expressions.length) {
                  case 0:
                    return null;
                  case 1:
                    return node.expressions[0];
                }
            }));
          }
          function is_lhs_local(lhs2) {
            while (lhs2 instanceof AST_PropAccess)
              lhs2 = lhs2.expression;
            return lhs2 instanceof AST_SymbolRef && lhs2.definition().scope.get_defun_scope() === defun_scope && !(in_loop && (lvalues.has(lhs2.name) || candidate instanceof AST_Unary || candidate instanceof AST_Assign && !candidate.logical && candidate.operator != "="));
          }
          function value_has_side_effects(expr) {
            if (expr instanceof AST_Unary)
              return unary_side_effects.has(expr.operator);
            return get_rvalue(expr).has_side_effects(compressor2);
          }
          function replace_all_symbols() {
            if (side_effects)
              return false;
            if (value_def)
              return true;
            if (lhs instanceof AST_SymbolRef) {
              var def2 = lhs.definition();
              if (def2.references.length - def2.replaced == (candidate instanceof AST_VarDef ? 1 : 2)) {
                return true;
              }
            }
            return false;
          }
          function may_modify(sym) {
            if (!sym.definition)
              return true;
            var def2 = sym.definition();
            if (def2.orig.length == 1 && def2.orig[0] instanceof AST_SymbolDefun)
              return false;
            if (def2.scope.get_defun_scope() !== defun_scope)
              return true;
            return def2.references.some((ref) => ref.scope.get_defun_scope() !== defun_scope);
          }
          function side_effects_external(node, lhs2) {
            if (node instanceof AST_Assign)
              return side_effects_external(node.left, true);
            if (node instanceof AST_Unary)
              return side_effects_external(node.expression, true);
            if (node instanceof AST_VarDef)
              return node.value && side_effects_external(node.value);
            if (lhs2) {
              if (node instanceof AST_Dot)
                return side_effects_external(node.expression, true);
              if (node instanceof AST_Sub)
                return side_effects_external(node.expression, true);
              if (node instanceof AST_SymbolRef)
                return node.definition().scope.get_defun_scope() !== defun_scope;
            }
            return false;
          }
          function shadows(my_scope, lvalues2) {
            for (const { def: def2 } of lvalues2.values()) {
              const looked_up = my_scope.find_variable(def2.name);
              if (looked_up) {
                if (looked_up === def2)
                  continue;
                return true;
              }
            }
            return false;
          }
        }
        function eliminate_spurious_blocks(statements2) {
          var seen_dirs = [];
          for (var i = 0; i < statements2.length; ) {
            var stat = statements2[i];
            if (stat instanceof AST_BlockStatement && stat.body.every(can_be_evicted_from_block)) {
              CHANGED = true;
              eliminate_spurious_blocks(stat.body);
              statements2.splice(i, 1, ...stat.body);
              i += stat.body.length;
            } else if (stat instanceof AST_EmptyStatement) {
              CHANGED = true;
              statements2.splice(i, 1);
            } else if (stat instanceof AST_Directive) {
              if (seen_dirs.indexOf(stat.value) < 0) {
                i++;
                seen_dirs.push(stat.value);
              } else {
                CHANGED = true;
                statements2.splice(i, 1);
              }
            } else
              i++;
          }
        }
        function handle_if_return(statements2, compressor2) {
          var self2 = compressor2.self();
          var multiple_if_returns = has_multiple_if_returns(statements2);
          var in_lambda = self2 instanceof AST_Lambda;
          const iteration_start = Math.min(statements2.length, 500);
          for (var i = iteration_start; --i >= 0; ) {
            var stat = statements2[i];
            var j = next_index(i);
            var next = statements2[j];
            if (in_lambda && !next && stat instanceof AST_Return) {
              if (!stat.value) {
                CHANGED = true;
                statements2.splice(i, 1);
                continue;
              }
              if (stat.value instanceof AST_UnaryPrefix && stat.value.operator == "void") {
                CHANGED = true;
                statements2[i] = make_node(AST_SimpleStatement, stat, {
                  body: stat.value.expression
                });
                continue;
              }
            }
            if (stat instanceof AST_If) {
              let ab, new_else;
              ab = aborts(stat.body);
              if (can_merge_flow(ab) && (new_else = as_statement_array_with_return(stat.body, ab))) {
                if (ab.label) {
                  remove2(ab.label.thedef.references, ab);
                }
                CHANGED = true;
                stat = stat.clone();
                stat.condition = stat.condition.negate(compressor2);
                stat.body = make_node(AST_BlockStatement, stat, {
                  body: as_statement_array(stat.alternative).concat(extract_functions())
                });
                stat.alternative = make_node(AST_BlockStatement, stat, {
                  body: new_else
                });
                statements2[i] = stat.transform(compressor2);
                continue;
              }
              ab = aborts(stat.alternative);
              if (can_merge_flow(ab) && (new_else = as_statement_array_with_return(stat.alternative, ab))) {
                if (ab.label) {
                  remove2(ab.label.thedef.references, ab);
                }
                CHANGED = true;
                stat = stat.clone();
                stat.body = make_node(AST_BlockStatement, stat.body, {
                  body: as_statement_array(stat.body).concat(extract_functions())
                });
                stat.alternative = make_node(AST_BlockStatement, stat.alternative, {
                  body: new_else
                });
                statements2[i] = stat.transform(compressor2);
                continue;
              }
            }
            if (stat instanceof AST_If && stat.body instanceof AST_Return) {
              var value = stat.body.value;
              if (!value && !stat.alternative && (in_lambda && !next || next instanceof AST_Return && !next.value)) {
                CHANGED = true;
                statements2[i] = make_node(AST_SimpleStatement, stat.condition, {
                  body: stat.condition
                });
                continue;
              }
              if (value && !stat.alternative && next instanceof AST_Return && next.value) {
                CHANGED = true;
                stat = stat.clone();
                stat.alternative = next;
                statements2[i] = stat.transform(compressor2);
                statements2.splice(j, 1);
                continue;
              }
              if (value && !stat.alternative && (!next && in_lambda && multiple_if_returns || next instanceof AST_Return)) {
                CHANGED = true;
                stat = stat.clone();
                stat.alternative = next || make_node(AST_Return, stat, {
                  value: null
                });
                statements2[i] = stat.transform(compressor2);
                if (next)
                  statements2.splice(j, 1);
                continue;
              }
              var prev = statements2[prev_index(i)];
              if (compressor2.option("sequences") && in_lambda && !stat.alternative && prev instanceof AST_If && prev.body instanceof AST_Return && next_index(j) == statements2.length && next instanceof AST_SimpleStatement) {
                CHANGED = true;
                stat = stat.clone();
                stat.alternative = make_node(AST_BlockStatement, next, {
                  body: [
                    next,
                    make_node(AST_Return, next, {
                      value: null
                    })
                  ]
                });
                statements2[i] = stat.transform(compressor2);
                statements2.splice(j, 1);
                continue;
              }
            }
          }
          function has_multiple_if_returns(statements3) {
            var n = 0;
            for (var i2 = statements3.length; --i2 >= 0; ) {
              var stat2 = statements3[i2];
              if (stat2 instanceof AST_If && stat2.body instanceof AST_Return) {
                if (++n > 1)
                  return true;
              }
            }
            return false;
          }
          function is_return_void(value2) {
            return !value2 || value2 instanceof AST_UnaryPrefix && value2.operator == "void";
          }
          function can_merge_flow(ab) {
            if (!ab)
              return false;
            for (var j2 = i + 1, len = statements2.length; j2 < len; j2++) {
              var stat2 = statements2[j2];
              if (stat2 instanceof AST_Const || stat2 instanceof AST_Let)
                return false;
            }
            var lct = ab instanceof AST_LoopControl ? compressor2.loopcontrol_target(ab) : null;
            return ab instanceof AST_Return && in_lambda && is_return_void(ab.value) || ab instanceof AST_Continue && self2 === loop_body(lct) || ab instanceof AST_Break && lct instanceof AST_BlockStatement && self2 === lct;
          }
          function extract_functions() {
            var tail = statements2.slice(i + 1);
            statements2.length = i + 1;
            return tail.filter(function(stat2) {
              if (stat2 instanceof AST_Defun) {
                statements2.push(stat2);
                return false;
              }
              return true;
            });
          }
          function as_statement_array_with_return(node, ab) {
            var body = as_statement_array(node);
            if (ab !== body[body.length - 1]) {
              return void 0;
            }
            body = body.slice(0, -1);
            if (ab.value) {
              body.push(make_node(AST_SimpleStatement, ab.value, {
                body: ab.value.expression
              }));
            }
            return body;
          }
          function next_index(i2) {
            for (var j2 = i2 + 1, len = statements2.length; j2 < len; j2++) {
              var stat2 = statements2[j2];
              if (!(stat2 instanceof AST_Var && declarations_only(stat2))) {
                break;
              }
            }
            return j2;
          }
          function prev_index(i2) {
            for (var j2 = i2; --j2 >= 0; ) {
              var stat2 = statements2[j2];
              if (!(stat2 instanceof AST_Var && declarations_only(stat2))) {
                break;
              }
            }
            return j2;
          }
        }
        function eliminate_dead_code(statements2, compressor2) {
          var has_quit;
          var self2 = compressor2.self();
          for (var i = 0, n = 0, len = statements2.length; i < len; i++) {
            var stat = statements2[i];
            if (stat instanceof AST_LoopControl) {
              var lct = compressor2.loopcontrol_target(stat);
              if (stat instanceof AST_Break && !(lct instanceof AST_IterationStatement) && loop_body(lct) === self2 || stat instanceof AST_Continue && loop_body(lct) === self2) {
                if (stat.label) {
                  remove2(stat.label.thedef.references, stat);
                }
              } else {
                statements2[n++] = stat;
              }
            } else {
              statements2[n++] = stat;
            }
            if (aborts(stat)) {
              has_quit = statements2.slice(i + 1);
              break;
            }
          }
          statements2.length = n;
          CHANGED = n != len;
          if (has_quit)
            has_quit.forEach(function(stat2) {
              trim_unreachable_code(compressor2, stat2, statements2);
            });
        }
        function declarations_only(node) {
          return node.definitions.every((var_def) => !var_def.value);
        }
        function sequencesize(statements2, compressor2) {
          if (statements2.length < 2)
            return;
          var seq = [], n = 0;
          function push_seq() {
            if (!seq.length)
              return;
            var body2 = make_sequence(seq[0], seq);
            statements2[n++] = make_node(AST_SimpleStatement, body2, { body: body2 });
            seq = [];
          }
          for (var i = 0, len = statements2.length; i < len; i++) {
            var stat = statements2[i];
            if (stat instanceof AST_SimpleStatement) {
              if (seq.length >= compressor2.sequences_limit)
                push_seq();
              var body = stat.body;
              if (seq.length > 0)
                body = body.drop_side_effect_free(compressor2);
              if (body)
                merge_sequence(seq, body);
            } else if (stat instanceof AST_Definitions && declarations_only(stat) || stat instanceof AST_Defun) {
              statements2[n++] = stat;
            } else {
              push_seq();
              statements2[n++] = stat;
            }
          }
          push_seq();
          statements2.length = n;
          if (n != len)
            CHANGED = true;
        }
        function to_simple_statement(block, decls) {
          if (!(block instanceof AST_BlockStatement))
            return block;
          var stat = null;
          for (var i = 0, len = block.body.length; i < len; i++) {
            var line = block.body[i];
            if (line instanceof AST_Var && declarations_only(line)) {
              decls.push(line);
            } else if (stat || line instanceof AST_Const || line instanceof AST_Let) {
              return false;
            } else {
              stat = line;
            }
          }
          return stat;
        }
        function sequencesize_2(statements2, compressor2) {
          function cons_seq(right) {
            n--;
            CHANGED = true;
            var left = prev.body;
            return make_sequence(left, [left, right]).transform(compressor2);
          }
          var n = 0, prev;
          for (var i = 0; i < statements2.length; i++) {
            var stat = statements2[i];
            if (prev) {
              if (stat instanceof AST_Exit) {
                stat.value = cons_seq(stat.value || make_node(AST_Undefined, stat).transform(compressor2));
              } else if (stat instanceof AST_For) {
                if (!(stat.init instanceof AST_Definitions)) {
                  const abort = walk(prev.body, (node) => {
                    if (node instanceof AST_Scope)
                      return true;
                    if (node instanceof AST_Binary && node.operator === "in") {
                      return walk_abort;
                    }
                  });
                  if (!abort) {
                    if (stat.init)
                      stat.init = cons_seq(stat.init);
                    else {
                      stat.init = prev.body;
                      n--;
                      CHANGED = true;
                    }
                  }
                }
              } else if (stat instanceof AST_ForIn) {
                if (!(stat.init instanceof AST_Const) && !(stat.init instanceof AST_Let)) {
                  stat.object = cons_seq(stat.object);
                }
              } else if (stat instanceof AST_If) {
                stat.condition = cons_seq(stat.condition);
              } else if (stat instanceof AST_Switch) {
                stat.expression = cons_seq(stat.expression);
              } else if (stat instanceof AST_With) {
                stat.expression = cons_seq(stat.expression);
              }
            }
            if (compressor2.option("conditionals") && stat instanceof AST_If) {
              var decls = [];
              var body = to_simple_statement(stat.body, decls);
              var alt = to_simple_statement(stat.alternative, decls);
              if (body !== false && alt !== false && decls.length > 0) {
                var len = decls.length;
                decls.push(make_node(AST_If, stat, {
                  condition: stat.condition,
                  body: body || make_node(AST_EmptyStatement, stat.body),
                  alternative: alt
                }));
                decls.unshift(n, 1);
                [].splice.apply(statements2, decls);
                i += len;
                n += len + 1;
                prev = null;
                CHANGED = true;
                continue;
              }
            }
            statements2[n++] = stat;
            prev = stat instanceof AST_SimpleStatement ? stat : null;
          }
          statements2.length = n;
        }
        function join_object_assignments(defn, body) {
          if (!(defn instanceof AST_Definitions))
            return;
          var def = defn.definitions[defn.definitions.length - 1];
          if (!(def.value instanceof AST_Object))
            return;
          var exprs;
          if (body instanceof AST_Assign && !body.logical) {
            exprs = [body];
          } else if (body instanceof AST_Sequence) {
            exprs = body.expressions.slice();
          }
          if (!exprs)
            return;
          var trimmed = false;
          do {
            var node = exprs[0];
            if (!(node instanceof AST_Assign))
              break;
            if (node.operator != "=")
              break;
            if (!(node.left instanceof AST_PropAccess))
              break;
            var sym = node.left.expression;
            if (!(sym instanceof AST_SymbolRef))
              break;
            if (def.name.name != sym.name)
              break;
            if (!node.right.is_constant_expression(nearest_scope))
              break;
            var prop = node.left.property;
            if (prop instanceof AST_Node) {
              prop = prop.evaluate(compressor);
            }
            if (prop instanceof AST_Node)
              break;
            prop = "" + prop;
            var diff = compressor.option("ecma") < 2015 && compressor.has_directive("use strict") ? function(node2) {
              return node2.key != prop && (node2.key && node2.key.name != prop);
            } : function(node2) {
              return node2.key && node2.key.name != prop;
            };
            if (!def.value.properties.every(diff))
              break;
            var p = def.value.properties.filter(function(p2) {
              return p2.key === prop;
            })[0];
            if (!p) {
              def.value.properties.push(make_node(AST_ObjectKeyVal, node, {
                key: prop,
                value: node.right
              }));
            } else {
              p.value = new AST_Sequence({
                start: p.start,
                expressions: [p.value.clone(), node.right.clone()],
                end: p.end
              });
            }
            exprs.shift();
            trimmed = true;
          } while (exprs.length);
          return trimmed && exprs;
        }
        function join_consecutive_vars(statements2) {
          var defs;
          for (var i = 0, j = -1, len = statements2.length; i < len; i++) {
            var stat = statements2[i];
            var prev = statements2[j];
            if (stat instanceof AST_Definitions) {
              if (prev && prev.TYPE == stat.TYPE) {
                prev.definitions = prev.definitions.concat(stat.definitions);
                CHANGED = true;
              } else if (defs && defs.TYPE == stat.TYPE && declarations_only(stat)) {
                defs.definitions = defs.definitions.concat(stat.definitions);
                CHANGED = true;
              } else {
                statements2[++j] = stat;
                defs = stat;
              }
            } else if (stat instanceof AST_Exit) {
              stat.value = extract_object_assignments(stat.value);
            } else if (stat instanceof AST_For) {
              var exprs = join_object_assignments(prev, stat.init);
              if (exprs) {
                CHANGED = true;
                stat.init = exprs.length ? make_sequence(stat.init, exprs) : null;
                statements2[++j] = stat;
              } else if (prev instanceof AST_Var && (!stat.init || stat.init.TYPE == prev.TYPE)) {
                if (stat.init) {
                  prev.definitions = prev.definitions.concat(stat.init.definitions);
                }
                stat.init = prev;
                statements2[j] = stat;
                CHANGED = true;
              } else if (defs instanceof AST_Var && stat.init instanceof AST_Var && declarations_only(stat.init)) {
                defs.definitions = defs.definitions.concat(stat.init.definitions);
                stat.init = null;
                statements2[++j] = stat;
                CHANGED = true;
              } else {
                statements2[++j] = stat;
              }
            } else if (stat instanceof AST_ForIn) {
              stat.object = extract_object_assignments(stat.object);
            } else if (stat instanceof AST_If) {
              stat.condition = extract_object_assignments(stat.condition);
            } else if (stat instanceof AST_SimpleStatement) {
              var exprs = join_object_assignments(prev, stat.body);
              if (exprs) {
                CHANGED = true;
                if (!exprs.length)
                  continue;
                stat.body = make_sequence(stat.body, exprs);
              }
              statements2[++j] = stat;
            } else if (stat instanceof AST_Switch) {
              stat.expression = extract_object_assignments(stat.expression);
            } else if (stat instanceof AST_With) {
              stat.expression = extract_object_assignments(stat.expression);
            } else {
              statements2[++j] = stat;
            }
          }
          statements2.length = j + 1;
          function extract_object_assignments(value) {
            statements2[++j] = stat;
            var exprs2 = join_object_assignments(prev, value);
            if (exprs2) {
              CHANGED = true;
              if (exprs2.length) {
                return make_sequence(value, exprs2);
              } else if (value instanceof AST_Sequence) {
                return value.tail_node().left;
              } else {
                return value.left;
              }
            }
            return value;
          }
        }
      }
      function within_array_or_object_literal(compressor) {
        var node, level = 0;
        while (node = compressor.parent(level++)) {
          if (node instanceof AST_Statement)
            return false;
          if (node instanceof AST_Array || node instanceof AST_ObjectKeyVal || node instanceof AST_Object) {
            return true;
          }
        }
        return false;
      }
      function scope_encloses_variables_in_this_scope(scope, pulled_scope) {
        for (const enclosed of pulled_scope.enclosed) {
          if (pulled_scope.variables.has(enclosed.name)) {
            continue;
          }
          const looked_up = scope.find_variable(enclosed.name);
          if (looked_up) {
            if (looked_up === enclosed)
              continue;
            return true;
          }
        }
        return false;
      }
      function is_const_symbol_short_than_init_value(def, fixed_value) {
        if (def.orig.length === 1 && fixed_value) {
          const init_value_length = fixed_value.size();
          const identifer_length = def.name.length;
          return init_value_length > identifer_length;
        }
        return true;
      }
      function inline_into_symbolref(self2, compressor) {
        const parent = compressor.parent();
        const def = self2.definition();
        const nearest_scope = compressor.find_scope();
        let fixed = self2.fixed_value();
        if (compressor.top_retain && def.global && compressor.top_retain(def) && is_const_symbol_short_than_init_value(def, fixed)) {
          def.fixed = false;
          def.single_use = false;
          return self2;
        }
        let single_use = def.single_use && !(parent instanceof AST_Call && parent.is_callee_pure(compressor) || has_annotation(parent, _NOINLINE)) && !(parent instanceof AST_Export && fixed instanceof AST_Lambda && fixed.name);
        if (single_use && fixed instanceof AST_Node) {
          single_use = !fixed.has_side_effects(compressor) && !fixed.may_throw(compressor);
        }
        if (fixed instanceof AST_Class && def.scope !== self2.scope) {
          return self2;
        }
        if (single_use && (fixed instanceof AST_Lambda || fixed instanceof AST_Class)) {
          if (retain_top_func(fixed, compressor)) {
            single_use = false;
          } else if (def.scope !== self2.scope && (def.escaped == 1 || has_flag(fixed, INLINED) || within_array_or_object_literal(compressor) || !compressor.option("reduce_funcs"))) {
            single_use = false;
          } else if (is_recursive_ref(compressor, def)) {
            single_use = false;
          } else if (def.scope !== self2.scope || def.orig[0] instanceof AST_SymbolFunarg) {
            single_use = fixed.is_constant_expression(self2.scope);
            if (single_use == "f") {
              var scope = self2.scope;
              do {
                if (scope instanceof AST_Defun || is_func_expr(scope)) {
                  set_flag(scope, INLINED);
                }
              } while (scope = scope.parent_scope);
            }
          }
        }
        if (single_use && (fixed instanceof AST_Lambda || fixed instanceof AST_Class)) {
          single_use = def.scope === self2.scope && !scope_encloses_variables_in_this_scope(nearest_scope, fixed) || parent instanceof AST_Call && parent.expression === self2 && !scope_encloses_variables_in_this_scope(nearest_scope, fixed) && !(fixed.name && fixed.name.definition().recursive_refs > 0);
        }
        if (single_use && fixed) {
          if (fixed instanceof AST_DefClass) {
            set_flag(fixed, SQUEEZED);
            fixed = make_node(AST_ClassExpression, fixed, fixed);
          }
          if (fixed instanceof AST_Defun) {
            set_flag(fixed, SQUEEZED);
            fixed = make_node(AST_Function, fixed, fixed);
          }
          if (def.recursive_refs > 0 && fixed.name instanceof AST_SymbolDefun) {
            const defun_def = fixed.name.definition();
            let lambda_def = fixed.variables.get(fixed.name.name);
            let name = lambda_def && lambda_def.orig[0];
            if (!(name instanceof AST_SymbolLambda)) {
              name = make_node(AST_SymbolLambda, fixed.name, fixed.name);
              name.scope = fixed;
              fixed.name = name;
              lambda_def = fixed.def_function(name);
            }
            walk(fixed, (node) => {
              if (node instanceof AST_SymbolRef && node.definition() === defun_def) {
                node.thedef = lambda_def;
                lambda_def.references.push(node);
              }
            });
          }
          if ((fixed instanceof AST_Lambda || fixed instanceof AST_Class) && fixed.parent_scope !== nearest_scope) {
            fixed = fixed.clone(true, compressor.get_toplevel());
            nearest_scope.add_child_scope(fixed);
          }
          return fixed.optimize(compressor);
        }
        if (fixed) {
          let replace;
          if (fixed instanceof AST_This) {
            if (!(def.orig[0] instanceof AST_SymbolFunarg) && def.references.every((ref) => def.scope === ref.scope)) {
              replace = fixed;
            }
          } else {
            var ev = fixed.evaluate(compressor);
            if (ev !== fixed && (compressor.option("unsafe_regexp") || !(ev instanceof RegExp))) {
              replace = make_node_from_constant(ev, fixed);
            }
          }
          if (replace) {
            const name_length = self2.size(compressor);
            const replace_size = replace.size(compressor);
            let overhead = 0;
            if (compressor.option("unused") && !compressor.exposed(def)) {
              overhead = (name_length + 2 + replace_size) / (def.references.length - def.assignments);
            }
            if (replace_size <= name_length + overhead) {
              return replace;
            }
          }
        }
        return self2;
      }
      function inline_into_call(self2, compressor) {
        var exp = self2.expression;
        var fn = exp;
        var simple_args = self2.args.every((arg) => !(arg instanceof AST_Expansion));
        if (compressor.option("reduce_vars") && fn instanceof AST_SymbolRef && !has_annotation(self2, _NOINLINE)) {
          const fixed = fn.fixed_value();
          if (retain_top_func(fixed, compressor) || !compressor.toplevel.funcs && exp.definition().global) {
            return self2;
          }
          fn = fixed;
        }
        var is_func = fn instanceof AST_Lambda;
        var stat = is_func && fn.body[0];
        var is_regular_func = is_func && !fn.is_generator && !fn.async;
        var can_inline = is_regular_func && compressor.option("inline") && !self2.is_callee_pure(compressor);
        if (can_inline && stat instanceof AST_Return) {
          let returned = stat.value;
          if (!returned || returned.is_constant_expression()) {
            if (returned) {
              returned = returned.clone(true);
            } else {
              returned = make_node(AST_Undefined, self2);
            }
            const args2 = self2.args.concat(returned);
            return make_sequence(self2, args2).optimize(compressor);
          }
          if (fn.argnames.length === 1 && fn.argnames[0] instanceof AST_SymbolFunarg && self2.args.length < 2 && !(self2.args[0] instanceof AST_Expansion) && returned instanceof AST_SymbolRef && returned.name === fn.argnames[0].name) {
            const replacement = (self2.args[0] || make_node(AST_Undefined)).optimize(compressor);
            let parent;
            if (replacement instanceof AST_PropAccess && (parent = compressor.parent()) instanceof AST_Call && parent.expression === self2) {
              return make_sequence(self2, [
                make_node(AST_Number, self2, { value: 0 }),
                replacement
              ]);
            }
            return replacement;
          }
        }
        if (can_inline) {
          var scope, in_loop, level = -1;
          let def;
          let returned_value;
          let nearest_scope;
          if (simple_args && !fn.uses_arguments && !(compressor.parent() instanceof AST_Class) && !(fn.name && fn instanceof AST_Function) && (returned_value = can_flatten_body(stat)) && (exp === fn || has_annotation(self2, _INLINE) || compressor.option("unused") && (def = exp.definition()).references.length == 1 && !is_recursive_ref(compressor, def) && fn.is_constant_expression(exp.scope)) && !has_annotation(self2, _PURE | _NOINLINE) && !fn.contains_this() && can_inject_symbols() && (nearest_scope = compressor.find_scope()) && !scope_encloses_variables_in_this_scope(nearest_scope, fn) && !function in_default_assign() {
            let i = 0;
            let p;
            while (p = compressor.parent(i++)) {
              if (p instanceof AST_DefaultAssign)
                return true;
              if (p instanceof AST_Block)
                break;
            }
            return false;
          }() && !(scope instanceof AST_Class)) {
            set_flag(fn, SQUEEZED);
            nearest_scope.add_child_scope(fn);
            return make_sequence(self2, flatten_fn(returned_value)).optimize(compressor);
          }
        }
        if (can_inline && has_annotation(self2, _INLINE)) {
          set_flag(fn, SQUEEZED);
          fn = make_node(fn.CTOR === AST_Defun ? AST_Function : fn.CTOR, fn, fn);
          fn = fn.clone(true);
          fn.figure_out_scope({}, {
            parent_scope: compressor.find_scope(),
            toplevel: compressor.get_toplevel()
          });
          return make_node(AST_Call, self2, {
            expression: fn,
            args: self2.args
          }).optimize(compressor);
        }
        const can_drop_this_call = is_regular_func && compressor.option("side_effects") && fn.body.every(is_empty);
        if (can_drop_this_call) {
          var args = self2.args.concat(make_node(AST_Undefined, self2));
          return make_sequence(self2, args).optimize(compressor);
        }
        if (compressor.option("negate_iife") && compressor.parent() instanceof AST_SimpleStatement && is_iife_call(self2)) {
          return self2.negate(compressor, true);
        }
        var ev = self2.evaluate(compressor);
        if (ev !== self2) {
          ev = make_node_from_constant(ev, self2).optimize(compressor);
          return best_of(compressor, ev, self2);
        }
        return self2;
        function return_value(stat2) {
          if (!stat2)
            return make_node(AST_Undefined, self2);
          if (stat2 instanceof AST_Return) {
            if (!stat2.value)
              return make_node(AST_Undefined, self2);
            return stat2.value.clone(true);
          }
          if (stat2 instanceof AST_SimpleStatement) {
            return make_node(AST_UnaryPrefix, stat2, {
              operator: "void",
              expression: stat2.body.clone(true)
            });
          }
        }
        function can_flatten_body(stat2) {
          var body = fn.body;
          var len = body.length;
          if (compressor.option("inline") < 3) {
            return len == 1 && return_value(stat2);
          }
          stat2 = null;
          for (var i = 0; i < len; i++) {
            var line = body[i];
            if (line instanceof AST_Var) {
              if (stat2 && !line.definitions.every((var_def) => !var_def.value)) {
                return false;
              }
            } else if (stat2) {
              return false;
            } else if (!(line instanceof AST_EmptyStatement)) {
              stat2 = line;
            }
          }
          return return_value(stat2);
        }
        function can_inject_args(block_scoped, safe_to_inject) {
          for (var i = 0, len = fn.argnames.length; i < len; i++) {
            var arg = fn.argnames[i];
            if (arg instanceof AST_DefaultAssign) {
              if (has_flag(arg.left, UNUSED))
                continue;
              return false;
            }
            if (arg instanceof AST_Destructuring)
              return false;
            if (arg instanceof AST_Expansion) {
              if (has_flag(arg.expression, UNUSED))
                continue;
              return false;
            }
            if (has_flag(arg, UNUSED))
              continue;
            if (!safe_to_inject || block_scoped.has(arg.name) || identifier_atom.has(arg.name) || scope.conflicting_def(arg.name)) {
              return false;
            }
            if (in_loop)
              in_loop.push(arg.definition());
          }
          return true;
        }
        function can_inject_vars(block_scoped, safe_to_inject) {
          var len = fn.body.length;
          for (var i = 0; i < len; i++) {
            var stat2 = fn.body[i];
            if (!(stat2 instanceof AST_Var))
              continue;
            if (!safe_to_inject)
              return false;
            for (var j = stat2.definitions.length; --j >= 0; ) {
              var name = stat2.definitions[j].name;
              if (name instanceof AST_Destructuring || block_scoped.has(name.name) || identifier_atom.has(name.name) || scope.conflicting_def(name.name)) {
                return false;
              }
              if (in_loop)
                in_loop.push(name.definition());
            }
          }
          return true;
        }
        function can_inject_symbols() {
          var block_scoped = /* @__PURE__ */ new Set();
          do {
            scope = compressor.parent(++level);
            if (scope.is_block_scope() && scope.block_scope) {
              scope.block_scope.variables.forEach(function(variable) {
                block_scoped.add(variable.name);
              });
            }
            if (scope instanceof AST_Catch) {
              if (scope.argname) {
                block_scoped.add(scope.argname.name);
              }
            } else if (scope instanceof AST_IterationStatement) {
              in_loop = [];
            } else if (scope instanceof AST_SymbolRef) {
              if (scope.fixed_value() instanceof AST_Scope)
                return false;
            }
          } while (!(scope instanceof AST_Scope));
          var safe_to_inject = !(scope instanceof AST_Toplevel) || compressor.toplevel.vars;
          var inline = compressor.option("inline");
          if (!can_inject_vars(block_scoped, inline >= 3 && safe_to_inject))
            return false;
          if (!can_inject_args(block_scoped, inline >= 2 && safe_to_inject))
            return false;
          return !in_loop || in_loop.length == 0 || !is_reachable(fn, in_loop);
        }
        function append_var(decls, expressions, name, value) {
          var def = name.definition();
          const already_appended = scope.variables.has(name.name);
          if (!already_appended) {
            scope.variables.set(name.name, def);
            scope.enclosed.push(def);
            decls.push(make_node(AST_VarDef, name, {
              name,
              value: null
            }));
          }
          var sym = make_node(AST_SymbolRef, name, name);
          def.references.push(sym);
          if (value)
            expressions.push(make_node(AST_Assign, self2, {
              operator: "=",
              logical: false,
              left: sym,
              right: value.clone()
            }));
        }
        function flatten_args(decls, expressions) {
          var len = fn.argnames.length;
          for (var i = self2.args.length; --i >= len; ) {
            expressions.push(self2.args[i]);
          }
          for (i = len; --i >= 0; ) {
            var name = fn.argnames[i];
            var value = self2.args[i];
            if (has_flag(name, UNUSED) || !name.name || scope.conflicting_def(name.name)) {
              if (value)
                expressions.push(value);
            } else {
              var symbol = make_node(AST_SymbolVar, name, name);
              name.definition().orig.push(symbol);
              if (!value && in_loop)
                value = make_node(AST_Undefined, self2);
              append_var(decls, expressions, symbol, value);
            }
          }
          decls.reverse();
          expressions.reverse();
        }
        function flatten_vars(decls, expressions) {
          var pos = expressions.length;
          for (var i = 0, lines = fn.body.length; i < lines; i++) {
            var stat2 = fn.body[i];
            if (!(stat2 instanceof AST_Var))
              continue;
            for (var j = 0, defs = stat2.definitions.length; j < defs; j++) {
              var var_def = stat2.definitions[j];
              var name = var_def.name;
              append_var(decls, expressions, name, var_def.value);
              if (in_loop && fn.argnames.every((argname) => argname.name != name.name)) {
                var def = fn.variables.get(name.name);
                var sym = make_node(AST_SymbolRef, name, name);
                def.references.push(sym);
                expressions.splice(pos++, 0, make_node(AST_Assign, var_def, {
                  operator: "=",
                  logical: false,
                  left: sym,
                  right: make_node(AST_Undefined, name)
                }));
              }
            }
          }
        }
        function flatten_fn(returned_value) {
          var decls = [];
          var expressions = [];
          flatten_args(decls, expressions);
          flatten_vars(decls, expressions);
          expressions.push(returned_value);
          if (decls.length) {
            const i = scope.body.indexOf(compressor.parent(level - 1)) + 1;
            scope.body.splice(i, 0, make_node(AST_Var, fn, {
              definitions: decls
            }));
          }
          return expressions.map((exp2) => exp2.clone(true));
        }
      }
      (function(def_find_defs) {
        function to_node(value, orig) {
          if (value instanceof AST_Node) {
            if (!(value instanceof AST_Constant)) {
              value = value.clone(true);
            }
            return make_node(value.CTOR, orig, value);
          }
          if (Array.isArray(value))
            return make_node(AST_Array, orig, {
              elements: value.map(function(value2) {
                return to_node(value2, orig);
              })
            });
          if (value && typeof value == "object") {
            var props = [];
            for (var key in value)
              if (HOP(value, key)) {
                props.push(make_node(AST_ObjectKeyVal, orig, {
                  key,
                  value: to_node(value[key], orig)
                }));
              }
            return make_node(AST_Object, orig, {
              properties: props
            });
          }
          return make_node_from_constant(value, orig);
        }
        AST_Toplevel.DEFMETHOD("resolve_defines", function(compressor) {
          if (!compressor.option("global_defs"))
            return this;
          this.figure_out_scope({ ie8: compressor.option("ie8") });
          return this.transform(new TreeTransformer(function(node) {
            var def = node._find_defs(compressor, "");
            if (!def)
              return;
            var level = 0, child = node, parent;
            while (parent = this.parent(level++)) {
              if (!(parent instanceof AST_PropAccess))
                break;
              if (parent.expression !== child)
                break;
              child = parent;
            }
            if (is_lhs(child, parent)) {
              return;
            }
            return def;
          }));
        });
        def_find_defs(AST_Node, noop);
        def_find_defs(AST_Chain, function(compressor, suffix) {
          return this.expression._find_defs(compressor, suffix);
        });
        def_find_defs(AST_Dot, function(compressor, suffix) {
          return this.expression._find_defs(compressor, "." + this.property + suffix);
        });
        def_find_defs(AST_SymbolDeclaration, function() {
          if (!this.global())
            return;
        });
        def_find_defs(AST_SymbolRef, function(compressor, suffix) {
          if (!this.global())
            return;
          var defines = compressor.option("global_defs");
          var name = this.name + suffix;
          if (HOP(defines, name))
            return to_node(defines[name], this);
        });
        def_find_defs(AST_ImportMeta, function(compressor, suffix) {
          var defines = compressor.option("global_defs");
          var name = "import.meta" + suffix;
          if (HOP(defines, name))
            return to_node(defines[name], this);
        });
      })(function(node, func) {
        node.DEFMETHOD("_find_defs", func);
      });
      class Compressor extends TreeWalker {
        constructor(options, { false_by_default = false, mangle_options: mangle_options2 = false }) {
          super();
          if (options.defaults !== void 0 && !options.defaults)
            false_by_default = true;
          this.options = defaults(options, {
            arguments: false,
            arrows: !false_by_default,
            booleans: !false_by_default,
            booleans_as_integers: false,
            collapse_vars: !false_by_default,
            comparisons: !false_by_default,
            computed_props: !false_by_default,
            conditionals: !false_by_default,
            dead_code: !false_by_default,
            defaults: true,
            directives: !false_by_default,
            drop_console: false,
            drop_debugger: !false_by_default,
            ecma: 5,
            evaluate: !false_by_default,
            expression: false,
            global_defs: false,
            hoist_funs: false,
            hoist_props: !false_by_default,
            hoist_vars: false,
            ie8: false,
            if_return: !false_by_default,
            inline: !false_by_default,
            join_vars: !false_by_default,
            keep_classnames: false,
            keep_fargs: true,
            keep_fnames: false,
            keep_infinity: false,
            lhs_constants: !false_by_default,
            loops: !false_by_default,
            module: false,
            negate_iife: !false_by_default,
            passes: 1,
            properties: !false_by_default,
            pure_getters: !false_by_default && "strict",
            pure_funcs: null,
            pure_new: false,
            reduce_funcs: !false_by_default,
            reduce_vars: !false_by_default,
            sequences: !false_by_default,
            side_effects: !false_by_default,
            switches: !false_by_default,
            top_retain: null,
            toplevel: !!(options && options["top_retain"]),
            typeofs: !false_by_default,
            unsafe: false,
            unsafe_arrows: false,
            unsafe_comps: false,
            unsafe_Function: false,
            unsafe_math: false,
            unsafe_symbols: false,
            unsafe_methods: false,
            unsafe_proto: false,
            unsafe_regexp: false,
            unsafe_undefined: false,
            unused: !false_by_default,
            warnings: false
          }, true);
          var global_defs = this.options["global_defs"];
          if (typeof global_defs == "object")
            for (var key in global_defs) {
              if (key[0] === "@" && HOP(global_defs, key)) {
                global_defs[key.slice(1)] = parse(global_defs[key], {
                  expression: true
                });
              }
            }
          if (this.options["inline"] === true)
            this.options["inline"] = 3;
          var pure_funcs = this.options["pure_funcs"];
          if (typeof pure_funcs == "function") {
            this.pure_funcs = pure_funcs;
          } else {
            this.pure_funcs = pure_funcs ? function(node) {
              return !pure_funcs.includes(node.expression.print_to_string());
            } : return_true;
          }
          var top_retain = this.options["top_retain"];
          if (top_retain instanceof RegExp) {
            this.top_retain = function(def) {
              return top_retain.test(def.name);
            };
          } else if (typeof top_retain == "function") {
            this.top_retain = top_retain;
          } else if (top_retain) {
            if (typeof top_retain == "string") {
              top_retain = top_retain.split(/,/);
            }
            this.top_retain = function(def) {
              return top_retain.includes(def.name);
            };
          }
          if (this.options["module"]) {
            this.directives["use strict"] = true;
            this.options["toplevel"] = true;
          }
          var toplevel = this.options["toplevel"];
          this.toplevel = typeof toplevel == "string" ? {
            funcs: /funcs/.test(toplevel),
            vars: /vars/.test(toplevel)
          } : {
            funcs: toplevel,
            vars: toplevel
          };
          var sequences = this.options["sequences"];
          this.sequences_limit = sequences == 1 ? 800 : sequences | 0;
          this.evaluated_regexps = /* @__PURE__ */ new Map();
          this._toplevel = void 0;
          this._mangle_options = mangle_options2 ? format_mangler_options(mangle_options2) : mangle_options2;
        }
        mangle_options() {
          var nth_identifier = this._mangle_options && this._mangle_options.nth_identifier || base54;
          var module3 = this._mangle_options && this._mangle_options.module || this.option("module");
          return { ie8: this.option("ie8"), nth_identifier, module: module3 };
        }
        option(key) {
          return this.options[key];
        }
        exposed(def) {
          if (def.export)
            return true;
          if (def.global) {
            for (var i = 0, len = def.orig.length; i < len; i++)
              if (!this.toplevel[def.orig[i] instanceof AST_SymbolDefun ? "funcs" : "vars"])
                return true;
          }
          return false;
        }
        in_boolean_context() {
          if (!this.option("booleans"))
            return false;
          var self2 = this.self();
          for (var i = 0, p; p = this.parent(i); i++) {
            if (p instanceof AST_SimpleStatement || p instanceof AST_Conditional && p.condition === self2 || p instanceof AST_DWLoop && p.condition === self2 || p instanceof AST_For && p.condition === self2 || p instanceof AST_If && p.condition === self2 || p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self2) {
              return true;
            }
            if (p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||" || p.operator == "??") || p instanceof AST_Conditional || p.tail_node() === self2) {
              self2 = p;
            } else {
              return false;
            }
          }
        }
        get_toplevel() {
          return this._toplevel;
        }
        compress(toplevel) {
          toplevel = toplevel.resolve_defines(this);
          this._toplevel = toplevel;
          if (this.option("expression")) {
            this._toplevel.process_expression(true);
          }
          var passes = +this.options.passes || 1;
          var min_count = 1 / 0;
          var stopping = false;
          var mangle = this.mangle_options();
          for (var pass = 0; pass < passes; pass++) {
            this._toplevel.figure_out_scope(mangle);
            if (pass === 0 && this.option("drop_console")) {
              this._toplevel = this._toplevel.drop_console(this.option("drop_console"));
            }
            if (pass > 0 || this.option("reduce_vars")) {
              this._toplevel.reset_opt_flags(this);
            }
            this._toplevel = this._toplevel.transform(this);
            if (passes > 1) {
              let count = 0;
              walk(this._toplevel, () => {
                count++;
              });
              if (count < min_count) {
                min_count = count;
                stopping = false;
              } else if (stopping) {
                break;
              } else {
                stopping = true;
              }
            }
          }
          if (this.option("expression")) {
            this._toplevel.process_expression(false);
          }
          toplevel = this._toplevel;
          this._toplevel = void 0;
          return toplevel;
        }
        before(node, descend) {
          if (has_flag(node, SQUEEZED))
            return node;
          var was_scope = false;
          if (node instanceof AST_Scope) {
            node = node.hoist_properties(this);
            node = node.hoist_declarations(this);
            was_scope = true;
          }
          descend(node, this);
          descend(node, this);
          var opt = node.optimize(this);
          if (was_scope && opt instanceof AST_Scope) {
            opt.drop_unused(this);
            descend(opt, this);
          }
          if (opt === node)
            set_flag(opt, SQUEEZED);
          return opt;
        }
        is_lhs() {
          const self2 = this.stack[this.stack.length - 1];
          const parent = this.stack[this.stack.length - 2];
          return is_lhs(self2, parent);
        }
      }
      function def_optimize(node, optimizer) {
        node.DEFMETHOD("optimize", function(compressor) {
          var self2 = this;
          if (has_flag(self2, OPTIMIZED))
            return self2;
          if (compressor.has_directive("use asm"))
            return self2;
          var opt = optimizer(self2, compressor);
          set_flag(opt, OPTIMIZED);
          return opt;
        });
      }
      def_optimize(AST_Node, function(self2) {
        return self2;
      });
      AST_Toplevel.DEFMETHOD("drop_console", function(options) {
        var isArray = Array.isArray(options);
        return this.transform(new TreeTransformer(function(self2) {
          if (self2.TYPE !== "Call") {
            return;
          }
          var exp = self2.expression;
          if (!(exp instanceof AST_PropAccess)) {
            return;
          }
          if (isArray && options.indexOf(exp.property) === -1) {
            return;
          }
          var name = exp.expression;
          while (name.expression) {
            name = name.expression;
          }
          if (is_undeclared_ref(name) && name.name == "console") {
            return make_node(AST_Undefined, self2);
          }
        }));
      });
      AST_Node.DEFMETHOD("equivalent_to", function(node) {
        return equivalent_to(this, node);
      });
      AST_Scope.DEFMETHOD("process_expression", function(insert, compressor) {
        var self2 = this;
        var tt = new TreeTransformer(function(node) {
          if (insert && node instanceof AST_SimpleStatement) {
            return make_node(AST_Return, node, {
              value: node.body
            });
          }
          if (!insert && node instanceof AST_Return) {
            if (compressor) {
              var value = node.value && node.value.drop_side_effect_free(compressor, true);
              return value ? make_node(AST_SimpleStatement, node, { body: value }) : make_node(AST_EmptyStatement, node);
            }
            return make_node(AST_SimpleStatement, node, {
              body: node.value || make_node(AST_UnaryPrefix, node, {
                operator: "void",
                expression: make_node(AST_Number, node, {
                  value: 0
                })
              })
            });
          }
          if (node instanceof AST_Class || node instanceof AST_Lambda && node !== self2) {
            return node;
          }
          if (node instanceof AST_Block) {
            var index = node.body.length - 1;
            if (index >= 0) {
              node.body[index] = node.body[index].transform(tt);
            }
          } else if (node instanceof AST_If) {
            node.body = node.body.transform(tt);
            if (node.alternative) {
              node.alternative = node.alternative.transform(tt);
            }
          } else if (node instanceof AST_With) {
            node.body = node.body.transform(tt);
          }
          return node;
        });
        self2.transform(tt);
      });
      AST_Toplevel.DEFMETHOD("reset_opt_flags", function(compressor) {
        const self2 = this;
        const reduce_vars = compressor.option("reduce_vars");
        const preparation = new TreeWalker(function(node, descend) {
          clear_flag(node, CLEAR_BETWEEN_PASSES);
          if (reduce_vars) {
            if (compressor.top_retain && node instanceof AST_Defun && preparation.parent() === self2) {
              set_flag(node, TOP);
            }
            return node.reduce_vars(preparation, descend, compressor);
          }
        });
        preparation.safe_ids = /* @__PURE__ */ Object.create(null);
        preparation.in_loop = null;
        preparation.loop_ids = /* @__PURE__ */ new Map();
        preparation.defs_to_safe_ids = /* @__PURE__ */ new Map();
        self2.walk(preparation);
      });
      AST_Symbol.DEFMETHOD("fixed_value", function() {
        var fixed = this.thedef.fixed;
        if (!fixed || fixed instanceof AST_Node)
          return fixed;
        return fixed();
      });
      AST_SymbolRef.DEFMETHOD("is_immutable", function() {
        var orig = this.definition().orig;
        return orig.length == 1 && orig[0] instanceof AST_SymbolLambda;
      });
      function find_variable(compressor, name) {
        var scope, i = 0;
        while (scope = compressor.parent(i++)) {
          if (scope instanceof AST_Scope)
            break;
          if (scope instanceof AST_Catch && scope.argname) {
            scope = scope.argname.definition().scope;
            break;
          }
        }
        return scope.find_variable(name);
      }
      var global_names = makePredicate("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Math Number parseFloat parseInt RangeError ReferenceError RegExp Object setInterval setTimeout String SyntaxError TypeError unescape URIError");
      AST_SymbolRef.DEFMETHOD("is_declared", function(compressor) {
        return !this.definition().undeclared || compressor.option("unsafe") && global_names.has(this.name);
      });
      var directives = /* @__PURE__ */ new Set(["use asm", "use strict"]);
      def_optimize(AST_Directive, function(self2, compressor) {
        if (compressor.option("directives") && (!directives.has(self2.value) || compressor.has_directive(self2.value) !== self2)) {
          return make_node(AST_EmptyStatement, self2);
        }
        return self2;
      });
      def_optimize(AST_Debugger, function(self2, compressor) {
        if (compressor.option("drop_debugger"))
          return make_node(AST_EmptyStatement, self2);
        return self2;
      });
      def_optimize(AST_LabeledStatement, function(self2, compressor) {
        if (self2.body instanceof AST_Break && compressor.loopcontrol_target(self2.body) === self2.body) {
          return make_node(AST_EmptyStatement, self2);
        }
        return self2.label.references.length == 0 ? self2.body : self2;
      });
      def_optimize(AST_Block, function(self2, compressor) {
        tighten_body(self2.body, compressor);
        return self2;
      });
      function can_be_extracted_from_if_block(node) {
        return !(node instanceof AST_Const || node instanceof AST_Let || node instanceof AST_Class);
      }
      def_optimize(AST_BlockStatement, function(self2, compressor) {
        tighten_body(self2.body, compressor);
        switch (self2.body.length) {
          case 1:
            if (!compressor.has_directive("use strict") && compressor.parent() instanceof AST_If && can_be_extracted_from_if_block(self2.body[0]) || can_be_evicted_from_block(self2.body[0])) {
              return self2.body[0];
            }
            break;
          case 0:
            return make_node(AST_EmptyStatement, self2);
        }
        return self2;
      });
      function opt_AST_Lambda(self2, compressor) {
        tighten_body(self2.body, compressor);
        if (compressor.option("side_effects") && self2.body.length == 1 && self2.body[0] === compressor.has_directive("use strict")) {
          self2.body.length = 0;
        }
        return self2;
      }
      def_optimize(AST_Lambda, opt_AST_Lambda);
      AST_Scope.DEFMETHOD("hoist_declarations", function(compressor) {
        var self2 = this;
        if (compressor.has_directive("use asm"))
          return self2;
        var hoist_funs = compressor.option("hoist_funs");
        var hoist_vars = compressor.option("hoist_vars");
        if (hoist_funs || hoist_vars) {
          var dirs = [];
          var hoisted = [];
          var vars = /* @__PURE__ */ new Map(), vars_found = 0, var_decl = 0;
          walk(self2, (node) => {
            if (node instanceof AST_Scope && node !== self2)
              return true;
            if (node instanceof AST_Var) {
              ++var_decl;
              return true;
            }
          });
          hoist_vars = hoist_vars && var_decl > 1;
          var tt = new TreeTransformer(function before(node) {
            if (node !== self2) {
              if (node instanceof AST_Directive) {
                dirs.push(node);
                return make_node(AST_EmptyStatement, node);
              }
              if (hoist_funs && node instanceof AST_Defun && !(tt.parent() instanceof AST_Export) && tt.parent() === self2) {
                hoisted.push(node);
                return make_node(AST_EmptyStatement, node);
              }
              if (hoist_vars && node instanceof AST_Var && !node.definitions.some((def3) => def3.name instanceof AST_Destructuring)) {
                node.definitions.forEach(function(def3) {
                  vars.set(def3.name.name, def3);
                  ++vars_found;
                });
                var seq = node.to_assignments(compressor);
                var p = tt.parent();
                if (p instanceof AST_ForIn && p.init === node) {
                  if (seq == null) {
                    var def2 = node.definitions[0].name;
                    return make_node(AST_SymbolRef, def2, def2);
                  }
                  return seq;
                }
                if (p instanceof AST_For && p.init === node) {
                  return seq;
                }
                if (!seq)
                  return make_node(AST_EmptyStatement, node);
                return make_node(AST_SimpleStatement, node, {
                  body: seq
                });
              }
              if (node instanceof AST_Scope)
                return node;
            }
          });
          self2 = self2.transform(tt);
          if (vars_found > 0) {
            var defs = [];
            const is_lambda = self2 instanceof AST_Lambda;
            const args_as_names = is_lambda ? self2.args_as_names() : null;
            vars.forEach((def2, name) => {
              if (is_lambda && args_as_names.some((x) => x.name === def2.name.name)) {
                vars.delete(name);
              } else {
                def2 = def2.clone();
                def2.value = null;
                defs.push(def2);
                vars.set(name, def2);
              }
            });
            if (defs.length > 0) {
              for (var i = 0; i < self2.body.length; ) {
                if (self2.body[i] instanceof AST_SimpleStatement) {
                  var expr = self2.body[i].body, sym, assign;
                  if (expr instanceof AST_Assign && expr.operator == "=" && (sym = expr.left) instanceof AST_Symbol && vars.has(sym.name)) {
                    var def = vars.get(sym.name);
                    if (def.value)
                      break;
                    def.value = expr.right;
                    remove2(defs, def);
                    defs.push(def);
                    self2.body.splice(i, 1);
                    continue;
                  }
                  if (expr instanceof AST_Sequence && (assign = expr.expressions[0]) instanceof AST_Assign && assign.operator == "=" && (sym = assign.left) instanceof AST_Symbol && vars.has(sym.name)) {
                    var def = vars.get(sym.name);
                    if (def.value)
                      break;
                    def.value = assign.right;
                    remove2(defs, def);
                    defs.push(def);
                    self2.body[i].body = make_sequence(expr, expr.expressions.slice(1));
                    continue;
                  }
                }
                if (self2.body[i] instanceof AST_EmptyStatement) {
                  self2.body.splice(i, 1);
                  continue;
                }
                if (self2.body[i] instanceof AST_BlockStatement) {
                  self2.body.splice(i, 1, ...self2.body[i].body);
                  continue;
                }
                break;
              }
              defs = make_node(AST_Var, self2, {
                definitions: defs
              });
              hoisted.push(defs);
            }
          }
          self2.body = dirs.concat(hoisted, self2.body);
        }
        return self2;
      });
      AST_Scope.DEFMETHOD("hoist_properties", function(compressor) {
        var self2 = this;
        if (!compressor.option("hoist_props") || compressor.has_directive("use asm"))
          return self2;
        var top_retain = self2 instanceof AST_Toplevel && compressor.top_retain || return_false;
        var defs_by_id = /* @__PURE__ */ new Map();
        var hoister = new TreeTransformer(function(node, descend) {
          if (node instanceof AST_VarDef) {
            const sym = node.name;
            let def;
            let value;
            if (sym.scope === self2 && (def = sym.definition()).escaped != 1 && !def.assignments && !def.direct_access && !def.single_use && !compressor.exposed(def) && !top_retain(def) && (value = sym.fixed_value()) === node.value && value instanceof AST_Object && !value.properties.some((prop) => prop instanceof AST_Expansion || prop.computed_key())) {
              descend(node, this);
              const defs = /* @__PURE__ */ new Map();
              const assignments = [];
              value.properties.forEach(({ key, value: value2 }) => {
                const scope = hoister.find_scope();
                const symbol = self2.create_symbol(sym.CTOR, {
                  source: sym,
                  scope,
                  conflict_scopes: /* @__PURE__ */ new Set([
                    scope,
                    ...sym.definition().references.map((ref) => ref.scope)
                  ]),
                  tentative_name: sym.name + "_" + key
                });
                defs.set(String(key), symbol.definition());
                assignments.push(make_node(AST_VarDef, node, {
                  name: symbol,
                  value: value2
                }));
              });
              defs_by_id.set(def.id, defs);
              return MAP.splice(assignments);
            }
          } else if (node instanceof AST_PropAccess && node.expression instanceof AST_SymbolRef) {
            const defs = defs_by_id.get(node.expression.definition().id);
            if (defs) {
              const def = defs.get(String(get_simple_key(node.property)));
              const sym = make_node(AST_SymbolRef, node, {
                name: def.name,
                scope: node.expression.scope,
                thedef: def
              });
              sym.reference({});
              return sym;
            }
          }
        });
        return self2.transform(hoister);
      });
      def_optimize(AST_SimpleStatement, function(self2, compressor) {
        if (compressor.option("side_effects")) {
          var body = self2.body;
          var node = body.drop_side_effect_free(compressor, true);
          if (!node) {
            return make_node(AST_EmptyStatement, self2);
          }
          if (node !== body) {
            return make_node(AST_SimpleStatement, self2, { body: node });
          }
        }
        return self2;
      });
      def_optimize(AST_While, function(self2, compressor) {
        return compressor.option("loops") ? make_node(AST_For, self2, self2).optimize(compressor) : self2;
      });
      def_optimize(AST_Do, function(self2, compressor) {
        if (!compressor.option("loops"))
          return self2;
        var cond = self2.condition.tail_node().evaluate(compressor);
        if (!(cond instanceof AST_Node)) {
          if (cond)
            return make_node(AST_For, self2, {
              body: make_node(AST_BlockStatement, self2.body, {
                body: [
                  self2.body,
                  make_node(AST_SimpleStatement, self2.condition, {
                    body: self2.condition
                  })
                ]
              })
            }).optimize(compressor);
          if (!has_break_or_continue(self2, compressor.parent())) {
            return make_node(AST_BlockStatement, self2.body, {
              body: [
                self2.body,
                make_node(AST_SimpleStatement, self2.condition, {
                  body: self2.condition
                })
              ]
            }).optimize(compressor);
          }
        }
        return self2;
      });
      function if_break_in_loop(self2, compressor) {
        var first = self2.body instanceof AST_BlockStatement ? self2.body.body[0] : self2.body;
        if (compressor.option("dead_code") && is_break(first)) {
          var body = [];
          if (self2.init instanceof AST_Statement) {
            body.push(self2.init);
          } else if (self2.init) {
            body.push(make_node(AST_SimpleStatement, self2.init, {
              body: self2.init
            }));
          }
          if (self2.condition) {
            body.push(make_node(AST_SimpleStatement, self2.condition, {
              body: self2.condition
            }));
          }
          trim_unreachable_code(compressor, self2.body, body);
          return make_node(AST_BlockStatement, self2, {
            body
          });
        }
        if (first instanceof AST_If) {
          if (is_break(first.body)) {
            if (self2.condition) {
              self2.condition = make_node(AST_Binary, self2.condition, {
                left: self2.condition,
                operator: "&&",
                right: first.condition.negate(compressor)
              });
            } else {
              self2.condition = first.condition.negate(compressor);
            }
            drop_it(first.alternative);
          } else if (is_break(first.alternative)) {
            if (self2.condition) {
              self2.condition = make_node(AST_Binary, self2.condition, {
                left: self2.condition,
                operator: "&&",
                right: first.condition
              });
            } else {
              self2.condition = first.condition;
            }
            drop_it(first.body);
          }
        }
        return self2;
        function is_break(node) {
          return node instanceof AST_Break && compressor.loopcontrol_target(node) === compressor.self();
        }
        function drop_it(rest) {
          rest = as_statement_array(rest);
          if (self2.body instanceof AST_BlockStatement) {
            self2.body = self2.body.clone();
            self2.body.body = rest.concat(self2.body.body.slice(1));
            self2.body = self2.body.transform(compressor);
          } else {
            self2.body = make_node(AST_BlockStatement, self2.body, {
              body: rest
            }).transform(compressor);
          }
          self2 = if_break_in_loop(self2, compressor);
        }
      }
      def_optimize(AST_For, function(self2, compressor) {
        if (!compressor.option("loops"))
          return self2;
        if (compressor.option("side_effects") && self2.init) {
          self2.init = self2.init.drop_side_effect_free(compressor);
        }
        if (self2.condition) {
          var cond = self2.condition.evaluate(compressor);
          if (!(cond instanceof AST_Node)) {
            if (cond)
              self2.condition = null;
            else if (!compressor.option("dead_code")) {
              var orig = self2.condition;
              self2.condition = make_node_from_constant(cond, self2.condition);
              self2.condition = best_of_expression(self2.condition.transform(compressor), orig);
            }
          }
          if (compressor.option("dead_code")) {
            if (cond instanceof AST_Node)
              cond = self2.condition.tail_node().evaluate(compressor);
            if (!cond) {
              var body = [];
              trim_unreachable_code(compressor, self2.body, body);
              if (self2.init instanceof AST_Statement) {
                body.push(self2.init);
              } else if (self2.init) {
                body.push(make_node(AST_SimpleStatement, self2.init, {
                  body: self2.init
                }));
              }
              body.push(make_node(AST_SimpleStatement, self2.condition, {
                body: self2.condition
              }));
              return make_node(AST_BlockStatement, self2, { body }).optimize(compressor);
            }
          }
        }
        return if_break_in_loop(self2, compressor);
      });
      def_optimize(AST_If, function(self2, compressor) {
        if (is_empty(self2.alternative))
          self2.alternative = null;
        if (!compressor.option("conditionals"))
          return self2;
        var cond = self2.condition.evaluate(compressor);
        if (!compressor.option("dead_code") && !(cond instanceof AST_Node)) {
          var orig = self2.condition;
          self2.condition = make_node_from_constant(cond, orig);
          self2.condition = best_of_expression(self2.condition.transform(compressor), orig);
        }
        if (compressor.option("dead_code")) {
          if (cond instanceof AST_Node)
            cond = self2.condition.tail_node().evaluate(compressor);
          if (!cond) {
            var body = [];
            trim_unreachable_code(compressor, self2.body, body);
            body.push(make_node(AST_SimpleStatement, self2.condition, {
              body: self2.condition
            }));
            if (self2.alternative)
              body.push(self2.alternative);
            return make_node(AST_BlockStatement, self2, { body }).optimize(compressor);
          } else if (!(cond instanceof AST_Node)) {
            var body = [];
            body.push(make_node(AST_SimpleStatement, self2.condition, {
              body: self2.condition
            }));
            body.push(self2.body);
            if (self2.alternative) {
              trim_unreachable_code(compressor, self2.alternative, body);
            }
            return make_node(AST_BlockStatement, self2, { body }).optimize(compressor);
          }
        }
        var negated = self2.condition.negate(compressor);
        var self_condition_length = self2.condition.size();
        var negated_length = negated.size();
        var negated_is_best = negated_length < self_condition_length;
        if (self2.alternative && negated_is_best) {
          negated_is_best = false;
          self2.condition = negated;
          var tmp = self2.body;
          self2.body = self2.alternative || make_node(AST_EmptyStatement, self2);
          self2.alternative = tmp;
        }
        if (is_empty(self2.body) && is_empty(self2.alternative)) {
          return make_node(AST_SimpleStatement, self2.condition, {
            body: self2.condition.clone()
          }).optimize(compressor);
        }
        if (self2.body instanceof AST_SimpleStatement && self2.alternative instanceof AST_SimpleStatement) {
          return make_node(AST_SimpleStatement, self2, {
            body: make_node(AST_Conditional, self2, {
              condition: self2.condition,
              consequent: self2.body.body,
              alternative: self2.alternative.body
            })
          }).optimize(compressor);
        }
        if (is_empty(self2.alternative) && self2.body instanceof AST_SimpleStatement) {
          if (self_condition_length === negated_length && !negated_is_best && self2.condition instanceof AST_Binary && self2.condition.operator == "||") {
            negated_is_best = true;
          }
          if (negated_is_best)
            return make_node(AST_SimpleStatement, self2, {
              body: make_node(AST_Binary, self2, {
                operator: "||",
                left: negated,
                right: self2.body.body
              })
            }).optimize(compressor);
          return make_node(AST_SimpleStatement, self2, {
            body: make_node(AST_Binary, self2, {
              operator: "&&",
              left: self2.condition,
              right: self2.body.body
            })
          }).optimize(compressor);
        }
        if (self2.body instanceof AST_EmptyStatement && self2.alternative instanceof AST_SimpleStatement) {
          return make_node(AST_SimpleStatement, self2, {
            body: make_node(AST_Binary, self2, {
              operator: "||",
              left: self2.condition,
              right: self2.alternative.body
            })
          }).optimize(compressor);
        }
        if (self2.body instanceof AST_Exit && self2.alternative instanceof AST_Exit && self2.body.TYPE == self2.alternative.TYPE) {
          return make_node(self2.body.CTOR, self2, {
            value: make_node(AST_Conditional, self2, {
              condition: self2.condition,
              consequent: self2.body.value || make_node(AST_Undefined, self2.body),
              alternative: self2.alternative.value || make_node(AST_Undefined, self2.alternative)
            }).transform(compressor)
          }).optimize(compressor);
        }
        if (self2.body instanceof AST_If && !self2.body.alternative && !self2.alternative) {
          self2 = make_node(AST_If, self2, {
            condition: make_node(AST_Binary, self2.condition, {
              operator: "&&",
              left: self2.condition,
              right: self2.body.condition
            }),
            body: self2.body.body,
            alternative: null
          });
        }
        if (aborts(self2.body)) {
          if (self2.alternative) {
            var alt = self2.alternative;
            self2.alternative = null;
            return make_node(AST_BlockStatement, self2, {
              body: [self2, alt]
            }).optimize(compressor);
          }
        }
        if (aborts(self2.alternative)) {
          var body = self2.body;
          self2.body = self2.alternative;
          self2.condition = negated_is_best ? negated : self2.condition.negate(compressor);
          self2.alternative = null;
          return make_node(AST_BlockStatement, self2, {
            body: [self2, body]
          }).optimize(compressor);
        }
        return self2;
      });
      def_optimize(AST_Switch, function(self2, compressor) {
        if (!compressor.option("switches"))
          return self2;
        var branch;
        var value = self2.expression.evaluate(compressor);
        if (!(value instanceof AST_Node)) {
          var orig = self2.expression;
          self2.expression = make_node_from_constant(value, orig);
          self2.expression = best_of_expression(self2.expression.transform(compressor), orig);
        }
        if (!compressor.option("dead_code"))
          return self2;
        if (value instanceof AST_Node) {
          value = self2.expression.tail_node().evaluate(compressor);
        }
        var decl = [];
        var body = [];
        var default_branch;
        var exact_match;
        for (var i = 0, len = self2.body.length; i < len && !exact_match; i++) {
          branch = self2.body[i];
          if (branch instanceof AST_Default) {
            if (!default_branch) {
              default_branch = branch;
            } else {
              eliminate_branch(branch, body[body.length - 1]);
            }
          } else if (!(value instanceof AST_Node)) {
            var exp = branch.expression.evaluate(compressor);
            if (!(exp instanceof AST_Node) && exp !== value) {
              eliminate_branch(branch, body[body.length - 1]);
              continue;
            }
            if (exp instanceof AST_Node)
              exp = branch.expression.tail_node().evaluate(compressor);
            if (exp === value) {
              exact_match = branch;
              if (default_branch) {
                var default_index = body.indexOf(default_branch);
                body.splice(default_index, 1);
                eliminate_branch(default_branch, body[default_index - 1]);
                default_branch = null;
              }
            }
          }
          body.push(branch);
        }
        while (i < len)
          eliminate_branch(self2.body[i++], body[body.length - 1]);
        self2.body = body;
        let default_or_exact = default_branch || exact_match;
        default_branch = null;
        exact_match = null;
        if (body.every((branch2, i2) => (branch2 === default_or_exact || branch2.expression instanceof AST_Constant) && (branch2.body.length === 0 || aborts(branch2) || body.length - 1 === i2))) {
          for (let i2 = 0; i2 < body.length; i2++) {
            const branch2 = body[i2];
            for (let j = i2 + 1; j < body.length; j++) {
              const next = body[j];
              if (next.body.length === 0)
                continue;
              const last_branch = j === body.length - 1;
              const equivalentBranch = branches_equivalent(next, branch2, false);
              if (equivalentBranch || last_branch && branches_equivalent(next, branch2, true)) {
                if (!equivalentBranch && last_branch) {
                  next.body.push(make_node(AST_Break));
                }
                let x = j - 1;
                let fallthroughDepth = 0;
                while (x > i2) {
                  if (is_inert_body(body[x--])) {
                    fallthroughDepth++;
                  } else {
                    break;
                  }
                }
                const plucked = body.splice(j - fallthroughDepth, 1 + fallthroughDepth);
                body.splice(i2 + 1, 0, ...plucked);
                i2 += plucked.length;
              }
            }
          }
        }
        for (let i2 = 0; i2 < body.length; i2++) {
          let branch2 = body[i2];
          if (branch2.body.length === 0)
            continue;
          if (!aborts(branch2))
            continue;
          for (let j = i2 + 1; j < body.length; i2++, j++) {
            let next = body[j];
            if (next.body.length === 0)
              continue;
            if (branches_equivalent(next, branch2, false) || j === body.length - 1 && branches_equivalent(next, branch2, true)) {
              branch2.body = [];
              branch2 = next;
              continue;
            }
            break;
          }
        }
        {
          let i2 = body.length - 1;
          for (; i2 >= 0; i2--) {
            let bbody = body[i2].body;
            if (is_break(bbody[bbody.length - 1], compressor))
              bbody.pop();
            if (!is_inert_body(body[i2]))
              break;
          }
          i2++;
          if (!default_or_exact || body.indexOf(default_or_exact) >= i2) {
            for (let j = body.length - 1; j >= i2; j--) {
              let branch2 = body[j];
              if (branch2 === default_or_exact) {
                default_or_exact = null;
                body.pop();
              } else if (!branch2.expression.has_side_effects(compressor)) {
                body.pop();
              } else {
                break;
              }
            }
          }
        }
        DEFAULT:
          if (default_or_exact) {
            let default_index2 = body.indexOf(default_or_exact);
            let default_body_index = default_index2;
            for (; default_body_index < body.length - 1; default_body_index++) {
              if (!is_inert_body(body[default_body_index]))
                break;
            }
            if (default_body_index < body.length - 1) {
              break DEFAULT;
            }
            let side_effect_index = body.length - 1;
            for (; side_effect_index >= 0; side_effect_index--) {
              let branch2 = body[side_effect_index];
              if (branch2 === default_or_exact)
                continue;
              if (branch2.expression.has_side_effects(compressor))
                break;
            }
            if (default_body_index > side_effect_index) {
              let prev_body_index = default_index2 - 1;
              for (; prev_body_index >= 0; prev_body_index--) {
                if (!is_inert_body(body[prev_body_index]))
                  break;
              }
              let before = Math.max(side_effect_index, prev_body_index) + 1;
              let after = default_index2;
              if (side_effect_index > default_index2) {
                after = side_effect_index;
                body[side_effect_index].body = body[default_body_index].body;
              } else {
                default_or_exact.body = body[default_body_index].body;
              }
              body.splice(after + 1, default_body_index - after);
              body.splice(before, default_index2 - before);
            }
          }
        DEFAULT:
          if (default_or_exact) {
            let i2 = body.findIndex((branch2) => !is_inert_body(branch2));
            let caseBody;
            if (i2 === body.length - 1) {
              let branch2 = body[i2];
              if (has_nested_break(self2))
                break DEFAULT;
              caseBody = make_node(AST_BlockStatement, branch2, {
                body: branch2.body
              });
              branch2.body = [];
            } else if (i2 !== -1) {
              break DEFAULT;
            }
            let sideEffect = body.find((branch2) => {
              return branch2 !== default_or_exact && branch2.expression.has_side_effects(compressor);
            });
            if (!sideEffect) {
              return make_node(AST_BlockStatement, self2, {
                body: decl.concat(statement(self2.expression), default_or_exact.expression ? statement(default_or_exact.expression) : [], caseBody || [])
              }).optimize(compressor);
            }
            const default_index2 = body.indexOf(default_or_exact);
            body.splice(default_index2, 1);
            default_or_exact = null;
            if (caseBody) {
              return make_node(AST_BlockStatement, self2, {
                body: decl.concat(self2, caseBody)
              }).optimize(compressor);
            }
          }
        if (body.length > 0) {
          body[0].body = decl.concat(body[0].body);
        }
        if (body.length == 0) {
          return make_node(AST_BlockStatement, self2, {
            body: decl.concat(statement(self2.expression))
          }).optimize(compressor);
        }
        if (body.length == 1 && !has_nested_break(self2)) {
          let branch2 = body[0];
          return make_node(AST_If, self2, {
            condition: make_node(AST_Binary, self2, {
              operator: "===",
              left: self2.expression,
              right: branch2.expression
            }),
            body: make_node(AST_BlockStatement, branch2, {
              body: branch2.body
            }),
            alternative: null
          }).optimize(compressor);
        }
        if (body.length === 2 && default_or_exact && !has_nested_break(self2)) {
          let branch2 = body[0] === default_or_exact ? body[1] : body[0];
          let exact_exp = default_or_exact.expression && statement(default_or_exact.expression);
          if (aborts(body[0])) {
            let first = body[0];
            if (is_break(first.body[first.body.length - 1], compressor)) {
              first.body.pop();
            }
            return make_node(AST_If, self2, {
              condition: make_node(AST_Binary, self2, {
                operator: "===",
                left: self2.expression,
                right: branch2.expression
              }),
              body: make_node(AST_BlockStatement, branch2, {
                body: branch2.body
              }),
              alternative: make_node(AST_BlockStatement, default_or_exact, {
                body: [].concat(exact_exp || [], default_or_exact.body)
              })
            }).optimize(compressor);
          }
          let operator = "===";
          let consequent = make_node(AST_BlockStatement, branch2, {
            body: branch2.body
          });
          let always = make_node(AST_BlockStatement, default_or_exact, {
            body: [].concat(exact_exp || [], default_or_exact.body)
          });
          if (body[0] === default_or_exact) {
            operator = "!==";
            let tmp = always;
            always = consequent;
            consequent = tmp;
          }
          return make_node(AST_BlockStatement, self2, {
            body: [
              make_node(AST_If, self2, {
                condition: make_node(AST_Binary, self2, {
                  operator,
                  left: self2.expression,
                  right: branch2.expression
                }),
                body: consequent,
                alternative: null
              })
            ].concat(always)
          }).optimize(compressor);
        }
        return self2;
        function eliminate_branch(branch2, prev) {
          if (prev && !aborts(prev)) {
            prev.body = prev.body.concat(branch2.body);
          } else {
            trim_unreachable_code(compressor, branch2, decl);
          }
        }
        function branches_equivalent(branch2, prev, insertBreak) {
          let bbody = branch2.body;
          let pbody = prev.body;
          if (insertBreak) {
            bbody = bbody.concat(make_node(AST_Break));
          }
          if (bbody.length !== pbody.length)
            return false;
          let bblock = make_node(AST_BlockStatement, branch2, { body: bbody });
          let pblock = make_node(AST_BlockStatement, prev, { body: pbody });
          return bblock.equivalent_to(pblock);
        }
        function statement(expression) {
          return make_node(AST_SimpleStatement, expression, {
            body: expression
          });
        }
        function has_nested_break(root) {
          let has_break = false;
          let tw = new TreeWalker((node) => {
            if (has_break)
              return true;
            if (node instanceof AST_Lambda)
              return true;
            if (node instanceof AST_SimpleStatement)
              return true;
            if (!is_break(node, tw))
              return;
            let parent = tw.parent();
            if (parent instanceof AST_SwitchBranch && parent.body[parent.body.length - 1] === node) {
              return;
            }
            has_break = true;
          });
          root.walk(tw);
          return has_break;
        }
        function is_break(node, stack) {
          return node instanceof AST_Break && stack.loopcontrol_target(node) === self2;
        }
        function is_inert_body(branch2) {
          return !aborts(branch2) && !make_node(AST_BlockStatement, branch2, {
            body: branch2.body
          }).has_side_effects(compressor);
        }
      });
      def_optimize(AST_Try, function(self2, compressor) {
        if (self2.bcatch && self2.bfinally && self2.bfinally.body.every(is_empty))
          self2.bfinally = null;
        if (compressor.option("dead_code") && self2.body.body.every(is_empty)) {
          var body = [];
          if (self2.bcatch) {
            trim_unreachable_code(compressor, self2.bcatch, body);
          }
          if (self2.bfinally)
            body.push(...self2.bfinally.body);
          return make_node(AST_BlockStatement, self2, {
            body
          }).optimize(compressor);
        }
        return self2;
      });
      AST_Definitions.DEFMETHOD("to_assignments", function(compressor) {
        var reduce_vars = compressor.option("reduce_vars");
        var assignments = [];
        for (const def of this.definitions) {
          if (def.value) {
            var name = make_node(AST_SymbolRef, def.name, def.name);
            assignments.push(make_node(AST_Assign, def, {
              operator: "=",
              logical: false,
              left: name,
              right: def.value
            }));
            if (reduce_vars)
              name.definition().fixed = false;
          }
          const thedef = def.name.definition();
          thedef.eliminated++;
          thedef.replaced--;
        }
        if (assignments.length == 0)
          return null;
        return make_sequence(this, assignments);
      });
      def_optimize(AST_Definitions, function(self2) {
        if (self2.definitions.length == 0) {
          return make_node(AST_EmptyStatement, self2);
        }
        return self2;
      });
      def_optimize(AST_VarDef, function(self2, compressor) {
        if (self2.name instanceof AST_SymbolLet && self2.value != null && is_undefined(self2.value, compressor)) {
          self2.value = null;
        }
        return self2;
      });
      def_optimize(AST_Import, function(self2) {
        return self2;
      });
      def_optimize(AST_Call, function(self2, compressor) {
        var exp = self2.expression;
        var fn = exp;
        inline_array_like_spread(self2.args);
        var simple_args = self2.args.every((arg2) => !(arg2 instanceof AST_Expansion));
        if (compressor.option("reduce_vars") && fn instanceof AST_SymbolRef) {
          fn = fn.fixed_value();
        }
        var is_func = fn instanceof AST_Lambda;
        if (is_func && fn.pinned())
          return self2;
        if (compressor.option("unused") && simple_args && is_func && !fn.uses_arguments) {
          var pos = 0, last2 = 0;
          for (var i = 0, len = self2.args.length; i < len; i++) {
            if (fn.argnames[i] instanceof AST_Expansion) {
              if (has_flag(fn.argnames[i].expression, UNUSED))
                while (i < len) {
                  var node = self2.args[i++].drop_side_effect_free(compressor);
                  if (node) {
                    self2.args[pos++] = node;
                  }
                }
              else
                while (i < len) {
                  self2.args[pos++] = self2.args[i++];
                }
              last2 = pos;
              break;
            }
            var trim2 = i >= fn.argnames.length;
            if (trim2 || has_flag(fn.argnames[i], UNUSED)) {
              var node = self2.args[i].drop_side_effect_free(compressor);
              if (node) {
                self2.args[pos++] = node;
              } else if (!trim2) {
                self2.args[pos++] = make_node(AST_Number, self2.args[i], {
                  value: 0
                });
                continue;
              }
            } else {
              self2.args[pos++] = self2.args[i];
            }
            last2 = pos;
          }
          self2.args.length = last2;
        }
        if (compressor.option("unsafe") && !exp.contains_optional()) {
          if (exp instanceof AST_Dot && exp.start.value === "Array" && exp.property === "from" && self2.args.length === 1) {
            const [argument] = self2.args;
            if (argument instanceof AST_Array) {
              return make_node(AST_Array, argument, {
                elements: argument.elements
              }).optimize(compressor);
            }
          }
          if (is_undeclared_ref(exp))
            switch (exp.name) {
              case "Array":
                if (self2.args.length != 1) {
                  return make_node(AST_Array, self2, {
                    elements: self2.args
                  }).optimize(compressor);
                } else if (self2.args[0] instanceof AST_Number && self2.args[0].value <= 11) {
                  const elements2 = [];
                  for (let i2 = 0; i2 < self2.args[0].value; i2++)
                    elements2.push(new AST_Hole());
                  return new AST_Array({ elements: elements2 });
                }
                break;
              case "Object":
                if (self2.args.length == 0) {
                  return make_node(AST_Object, self2, {
                    properties: []
                  });
                }
                break;
              case "String":
                if (self2.args.length == 0)
                  return make_node(AST_String, self2, {
                    value: ""
                  });
                if (self2.args.length <= 1)
                  return make_node(AST_Binary, self2, {
                    left: self2.args[0],
                    operator: "+",
                    right: make_node(AST_String, self2, { value: "" })
                  }).optimize(compressor);
                break;
              case "Number":
                if (self2.args.length == 0)
                  return make_node(AST_Number, self2, {
                    value: 0
                  });
                if (self2.args.length == 1 && compressor.option("unsafe_math")) {
                  return make_node(AST_UnaryPrefix, self2, {
                    expression: self2.args[0],
                    operator: "+"
                  }).optimize(compressor);
                }
                break;
              case "Symbol":
                if (self2.args.length == 1 && self2.args[0] instanceof AST_String && compressor.option("unsafe_symbols"))
                  self2.args.length = 0;
                break;
              case "Boolean":
                if (self2.args.length == 0)
                  return make_node(AST_False, self2);
                if (self2.args.length == 1)
                  return make_node(AST_UnaryPrefix, self2, {
                    expression: make_node(AST_UnaryPrefix, self2, {
                      expression: self2.args[0],
                      operator: "!"
                    }),
                    operator: "!"
                  }).optimize(compressor);
                break;
              case "RegExp":
                var params = [];
                if (self2.args.length >= 1 && self2.args.length <= 2 && self2.args.every((arg2) => {
                  var value2 = arg2.evaluate(compressor);
                  params.push(value2);
                  return arg2 !== value2;
                }) && regexp_is_safe(params[0])) {
                  let [source, flags] = params;
                  source = regexp_source_fix(new RegExp(source).source);
                  const rx = make_node(AST_RegExp, self2, {
                    value: { source, flags }
                  });
                  if (rx._eval(compressor) !== rx) {
                    return rx;
                  }
                }
                break;
            }
          else if (exp instanceof AST_Dot)
            switch (exp.property) {
              case "toString":
                if (self2.args.length == 0 && !exp.expression.may_throw_on_access(compressor)) {
                  return make_node(AST_Binary, self2, {
                    left: make_node(AST_String, self2, { value: "" }),
                    operator: "+",
                    right: exp.expression
                  }).optimize(compressor);
                }
                break;
              case "join":
                if (exp.expression instanceof AST_Array)
                  EXIT: {
                    var separator;
                    if (self2.args.length > 0) {
                      separator = self2.args[0].evaluate(compressor);
                      if (separator === self2.args[0])
                        break EXIT;
                    }
                    var elements = [];
                    var consts = [];
                    for (var i = 0, len = exp.expression.elements.length; i < len; i++) {
                      var el = exp.expression.elements[i];
                      if (el instanceof AST_Expansion)
                        break EXIT;
                      var value = el.evaluate(compressor);
                      if (value !== el) {
                        consts.push(value);
                      } else {
                        if (consts.length > 0) {
                          elements.push(make_node(AST_String, self2, {
                            value: consts.join(separator)
                          }));
                          consts.length = 0;
                        }
                        elements.push(el);
                      }
                    }
                    if (consts.length > 0) {
                      elements.push(make_node(AST_String, self2, {
                        value: consts.join(separator)
                      }));
                    }
                    if (elements.length == 0)
                      return make_node(AST_String, self2, { value: "" });
                    if (elements.length == 1) {
                      if (elements[0].is_string(compressor)) {
                        return elements[0];
                      }
                      return make_node(AST_Binary, elements[0], {
                        operator: "+",
                        left: make_node(AST_String, self2, { value: "" }),
                        right: elements[0]
                      });
                    }
                    if (separator == "") {
                      var first;
                      if (elements[0].is_string(compressor) || elements[1].is_string(compressor)) {
                        first = elements.shift();
                      } else {
                        first = make_node(AST_String, self2, { value: "" });
                      }
                      return elements.reduce(function(prev, el2) {
                        return make_node(AST_Binary, el2, {
                          operator: "+",
                          left: prev,
                          right: el2
                        });
                      }, first).optimize(compressor);
                    }
                    var node = self2.clone();
                    node.expression = node.expression.clone();
                    node.expression.expression = node.expression.expression.clone();
                    node.expression.expression.elements = elements;
                    return best_of(compressor, self2, node);
                  }
                break;
              case "charAt":
                if (exp.expression.is_string(compressor)) {
                  var arg = self2.args[0];
                  var index = arg ? arg.evaluate(compressor) : 0;
                  if (index !== arg) {
                    return make_node(AST_Sub, exp, {
                      expression: exp.expression,
                      property: make_node_from_constant(index | 0, arg || exp)
                    }).optimize(compressor);
                  }
                }
                break;
              case "apply":
                if (self2.args.length == 2 && self2.args[1] instanceof AST_Array) {
                  var args = self2.args[1].elements.slice();
                  args.unshift(self2.args[0]);
                  return make_node(AST_Call, self2, {
                    expression: make_node(AST_Dot, exp, {
                      expression: exp.expression,
                      optional: false,
                      property: "call"
                    }),
                    args
                  }).optimize(compressor);
                }
                break;
              case "call":
                var func = exp.expression;
                if (func instanceof AST_SymbolRef) {
                  func = func.fixed_value();
                }
                if (func instanceof AST_Lambda && !func.contains_this()) {
                  return (self2.args.length ? make_sequence(this, [
                    self2.args[0],
                    make_node(AST_Call, self2, {
                      expression: exp.expression,
                      args: self2.args.slice(1)
                    })
                  ]) : make_node(AST_Call, self2, {
                    expression: exp.expression,
                    args: []
                  })).optimize(compressor);
                }
                break;
            }
        }
        if (compressor.option("unsafe_Function") && is_undeclared_ref(exp) && exp.name == "Function") {
          if (self2.args.length == 0)
            return make_node(AST_Function, self2, {
              argnames: [],
              body: []
            }).optimize(compressor);
          if (self2.args.every((x) => x instanceof AST_String)) {
            try {
              var code = "n(function(" + self2.args.slice(0, -1).map(function(arg2) {
                return arg2.value;
              }).join(",") + "){" + self2.args[self2.args.length - 1].value + "})";
              var ast = parse(code);
              var mangle = compressor.mangle_options();
              ast.figure_out_scope(mangle);
              var comp = new Compressor(compressor.options, {
                mangle_options: compressor._mangle_options
              });
              ast = ast.transform(comp);
              ast.figure_out_scope(mangle);
              ast.compute_char_frequency(mangle);
              ast.mangle_names(mangle);
              var fun;
              walk(ast, (node2) => {
                if (is_func_expr(node2)) {
                  fun = node2;
                  return walk_abort;
                }
              });
              var code = OutputStream();
              AST_BlockStatement.prototype._codegen.call(fun, fun, code);
              self2.args = [
                make_node(AST_String, self2, {
                  value: fun.argnames.map(function(arg2) {
                    return arg2.print_to_string();
                  }).join(",")
                }),
                make_node(AST_String, self2.args[self2.args.length - 1], {
                  value: code.get().replace(/^{|}$/g, "")
                })
              ];
              return self2;
            } catch (ex) {
              if (!(ex instanceof JS_Parse_Error)) {
                throw ex;
              }
            }
          }
        }
        return inline_into_call(self2, compressor);
      });
      AST_Node.DEFMETHOD("contains_optional", function() {
        if (this instanceof AST_PropAccess || this instanceof AST_Call || this instanceof AST_Chain) {
          if (this.optional) {
            return true;
          } else {
            return this.expression.contains_optional();
          }
        } else {
          return false;
        }
      });
      def_optimize(AST_New, function(self2, compressor) {
        if (compressor.option("unsafe") && is_undeclared_ref(self2.expression) && ["Object", "RegExp", "Function", "Error", "Array"].includes(self2.expression.name))
          return make_node(AST_Call, self2, self2).transform(compressor);
        return self2;
      });
      def_optimize(AST_Sequence, function(self2, compressor) {
        if (!compressor.option("side_effects"))
          return self2;
        var expressions = [];
        filter_for_side_effects();
        var end = expressions.length - 1;
        trim_right_for_undefined();
        if (end == 0) {
          self2 = maintain_this_binding(compressor.parent(), compressor.self(), expressions[0]);
          if (!(self2 instanceof AST_Sequence))
            self2 = self2.optimize(compressor);
          return self2;
        }
        self2.expressions = expressions;
        return self2;
        function filter_for_side_effects() {
          var first = first_in_statement(compressor);
          var last2 = self2.expressions.length - 1;
          self2.expressions.forEach(function(expr, index) {
            if (index < last2)
              expr = expr.drop_side_effect_free(compressor, first);
            if (expr) {
              merge_sequence(expressions, expr);
              first = false;
            }
          });
        }
        function trim_right_for_undefined() {
          while (end > 0 && is_undefined(expressions[end], compressor))
            end--;
          if (end < expressions.length - 1) {
            expressions[end] = make_node(AST_UnaryPrefix, self2, {
              operator: "void",
              expression: expressions[end]
            });
            expressions.length = end + 1;
          }
        }
      });
      AST_Unary.DEFMETHOD("lift_sequences", function(compressor) {
        if (compressor.option("sequences")) {
          if (this.expression instanceof AST_Sequence) {
            var x = this.expression.expressions.slice();
            var e = this.clone();
            e.expression = x.pop();
            x.push(e);
            return make_sequence(this, x).optimize(compressor);
          }
        }
        return this;
      });
      def_optimize(AST_UnaryPostfix, function(self2, compressor) {
        return self2.lift_sequences(compressor);
      });
      def_optimize(AST_UnaryPrefix, function(self2, compressor) {
        var e = self2.expression;
        if (self2.operator == "delete" && !(e instanceof AST_SymbolRef || e instanceof AST_PropAccess || e instanceof AST_Chain || is_identifier_atom(e))) {
          return make_sequence(self2, [e, make_node(AST_True, self2)]).optimize(compressor);
        }
        var seq = self2.lift_sequences(compressor);
        if (seq !== self2) {
          return seq;
        }
        if (compressor.option("side_effects") && self2.operator == "void") {
          e = e.drop_side_effect_free(compressor);
          if (e) {
            self2.expression = e;
            return self2;
          } else {
            return make_node(AST_Undefined, self2).optimize(compressor);
          }
        }
        if (compressor.in_boolean_context()) {
          switch (self2.operator) {
            case "!":
              if (e instanceof AST_UnaryPrefix && e.operator == "!") {
                return e.expression;
              }
              if (e instanceof AST_Binary) {
                self2 = best_of(compressor, self2, e.negate(compressor, first_in_statement(compressor)));
              }
              break;
            case "typeof":
              return (e instanceof AST_SymbolRef ? make_node(AST_True, self2) : make_sequence(self2, [
                e,
                make_node(AST_True, self2)
              ])).optimize(compressor);
          }
        }
        if (self2.operator == "-" && e instanceof AST_Infinity) {
          e = e.transform(compressor);
        }
        if (e instanceof AST_Binary && (self2.operator == "+" || self2.operator == "-") && (e.operator == "*" || e.operator == "/" || e.operator == "%")) {
          return make_node(AST_Binary, self2, {
            operator: e.operator,
            left: make_node(AST_UnaryPrefix, e.left, {
              operator: self2.operator,
              expression: e.left
            }),
            right: e.right
          });
        }
        if (self2.operator != "-" || !(e instanceof AST_Number || e instanceof AST_Infinity || e instanceof AST_BigInt)) {
          var ev = self2.evaluate(compressor);
          if (ev !== self2) {
            ev = make_node_from_constant(ev, self2).optimize(compressor);
            return best_of(compressor, ev, self2);
          }
        }
        return self2;
      });
      AST_Binary.DEFMETHOD("lift_sequences", function(compressor) {
        if (compressor.option("sequences")) {
          if (this.left instanceof AST_Sequence) {
            var x = this.left.expressions.slice();
            var e = this.clone();
            e.left = x.pop();
            x.push(e);
            return make_sequence(this, x).optimize(compressor);
          }
          if (this.right instanceof AST_Sequence && !this.left.has_side_effects(compressor)) {
            var assign = this.operator == "=" && this.left instanceof AST_SymbolRef;
            var x = this.right.expressions;
            var last2 = x.length - 1;
            for (var i = 0; i < last2; i++) {
              if (!assign && x[i].has_side_effects(compressor))
                break;
            }
            if (i == last2) {
              x = x.slice();
              var e = this.clone();
              e.right = x.pop();
              x.push(e);
              return make_sequence(this, x).optimize(compressor);
            } else if (i > 0) {
              var e = this.clone();
              e.right = make_sequence(this.right, x.slice(i));
              x = x.slice(0, i);
              x.push(e);
              return make_sequence(this, x).optimize(compressor);
            }
          }
        }
        return this;
      });
      var commutativeOperators = makePredicate("== === != !== * & | ^");
      function is_object(node) {
        return node instanceof AST_Array || node instanceof AST_Lambda || node instanceof AST_Object || node instanceof AST_Class;
      }
      def_optimize(AST_Binary, function(self2, compressor) {
        function reversible() {
          return self2.left.is_constant() || self2.right.is_constant() || !self2.left.has_side_effects(compressor) && !self2.right.has_side_effects(compressor);
        }
        function reverse(op) {
          if (reversible()) {
            if (op)
              self2.operator = op;
            var tmp = self2.left;
            self2.left = self2.right;
            self2.right = tmp;
          }
        }
        if (compressor.option("lhs_constants") && commutativeOperators.has(self2.operator)) {
          if (self2.right.is_constant() && !self2.left.is_constant()) {
            if (!(self2.left instanceof AST_Binary && PRECEDENCE[self2.left.operator] >= PRECEDENCE[self2.operator])) {
              reverse();
            }
          }
        }
        self2 = self2.lift_sequences(compressor);
        if (compressor.option("comparisons"))
          switch (self2.operator) {
            case "===":
            case "!==":
              var is_strict_comparison = true;
              if (self2.left.is_string(compressor) && self2.right.is_string(compressor) || self2.left.is_number(compressor) && self2.right.is_number(compressor) || self2.left.is_boolean() && self2.right.is_boolean() || self2.left.equivalent_to(self2.right)) {
                self2.operator = self2.operator.substr(0, 2);
              }
            case "==":
            case "!=":
              if (!is_strict_comparison && is_undefined(self2.left, compressor)) {
                self2.left = make_node(AST_Null, self2.left);
              } else if (!is_strict_comparison && is_undefined(self2.right, compressor)) {
                self2.right = make_node(AST_Null, self2.right);
              } else if (compressor.option("typeofs") && self2.left instanceof AST_String && self2.left.value == "undefined" && self2.right instanceof AST_UnaryPrefix && self2.right.operator == "typeof") {
                var expr = self2.right.expression;
                if (expr instanceof AST_SymbolRef ? expr.is_declared(compressor) : !(expr instanceof AST_PropAccess && compressor.option("ie8"))) {
                  self2.right = expr;
                  self2.left = make_node(AST_Undefined, self2.left).optimize(compressor);
                  if (self2.operator.length == 2)
                    self2.operator += "=";
                }
              } else if (compressor.option("typeofs") && self2.left instanceof AST_UnaryPrefix && self2.left.operator == "typeof" && self2.right instanceof AST_String && self2.right.value == "undefined") {
                var expr = self2.left.expression;
                if (expr instanceof AST_SymbolRef ? expr.is_declared(compressor) : !(expr instanceof AST_PropAccess && compressor.option("ie8"))) {
                  self2.left = expr;
                  self2.right = make_node(AST_Undefined, self2.right).optimize(compressor);
                  if (self2.operator.length == 2)
                    self2.operator += "=";
                }
              } else if (self2.left instanceof AST_SymbolRef && self2.right instanceof AST_SymbolRef && self2.left.definition() === self2.right.definition() && is_object(self2.left.fixed_value())) {
                return make_node(self2.operator[0] == "=" ? AST_True : AST_False, self2);
              }
              break;
            case "&&":
            case "||":
              var lhs = self2.left;
              if (lhs.operator == self2.operator) {
                lhs = lhs.right;
              }
              if (lhs instanceof AST_Binary && lhs.operator == (self2.operator == "&&" ? "!==" : "===") && self2.right instanceof AST_Binary && lhs.operator == self2.right.operator && (is_undefined(lhs.left, compressor) && self2.right.left instanceof AST_Null || lhs.left instanceof AST_Null && is_undefined(self2.right.left, compressor)) && !lhs.right.has_side_effects(compressor) && lhs.right.equivalent_to(self2.right.right)) {
                var combined = make_node(AST_Binary, self2, {
                  operator: lhs.operator.slice(0, -1),
                  left: make_node(AST_Null, self2),
                  right: lhs.right
                });
                if (lhs !== self2.left) {
                  combined = make_node(AST_Binary, self2, {
                    operator: self2.operator,
                    left: self2.left.left,
                    right: combined
                  });
                }
                return combined;
              }
              break;
          }
        if (self2.operator == "+" && compressor.in_boolean_context()) {
          var ll = self2.left.evaluate(compressor);
          var rr = self2.right.evaluate(compressor);
          if (ll && typeof ll == "string") {
            return make_sequence(self2, [
              self2.right,
              make_node(AST_True, self2)
            ]).optimize(compressor);
          }
          if (rr && typeof rr == "string") {
            return make_sequence(self2, [
              self2.left,
              make_node(AST_True, self2)
            ]).optimize(compressor);
          }
        }
        if (compressor.option("comparisons") && self2.is_boolean()) {
          if (!(compressor.parent() instanceof AST_Binary) || compressor.parent() instanceof AST_Assign) {
            var negated = make_node(AST_UnaryPrefix, self2, {
              operator: "!",
              expression: self2.negate(compressor, first_in_statement(compressor))
            });
            self2 = best_of(compressor, self2, negated);
          }
          if (compressor.option("unsafe_comps")) {
            switch (self2.operator) {
              case "<":
                reverse(">");
                break;
              case "<=":
                reverse(">=");
                break;
            }
          }
        }
        if (self2.operator == "+") {
          if (self2.right instanceof AST_String && self2.right.getValue() == "" && self2.left.is_string(compressor)) {
            return self2.left;
          }
          if (self2.left instanceof AST_String && self2.left.getValue() == "" && self2.right.is_string(compressor)) {
            return self2.right;
          }
          if (self2.left instanceof AST_Binary && self2.left.operator == "+" && self2.left.left instanceof AST_String && self2.left.left.getValue() == "" && self2.right.is_string(compressor)) {
            self2.left = self2.left.right;
            return self2;
          }
        }
        if (compressor.option("evaluate")) {
          switch (self2.operator) {
            case "&&":
              var ll = has_flag(self2.left, TRUTHY) ? true : has_flag(self2.left, FALSY) ? false : self2.left.evaluate(compressor);
              if (!ll) {
                return maintain_this_binding(compressor.parent(), compressor.self(), self2.left).optimize(compressor);
              } else if (!(ll instanceof AST_Node)) {
                return make_sequence(self2, [self2.left, self2.right]).optimize(compressor);
              }
              var rr = self2.right.evaluate(compressor);
              if (!rr) {
                if (compressor.in_boolean_context()) {
                  return make_sequence(self2, [
                    self2.left,
                    make_node(AST_False, self2)
                  ]).optimize(compressor);
                } else {
                  set_flag(self2, FALSY);
                }
              } else if (!(rr instanceof AST_Node)) {
                var parent = compressor.parent();
                if (parent.operator == "&&" && parent.left === compressor.self() || compressor.in_boolean_context()) {
                  return self2.left.optimize(compressor);
                }
              }
              if (self2.left.operator == "||") {
                var lr = self2.left.right.evaluate(compressor);
                if (!lr)
                  return make_node(AST_Conditional, self2, {
                    condition: self2.left.left,
                    consequent: self2.right,
                    alternative: self2.left.right
                  }).optimize(compressor);
              }
              break;
            case "||":
              var ll = has_flag(self2.left, TRUTHY) ? true : has_flag(self2.left, FALSY) ? false : self2.left.evaluate(compressor);
              if (!ll) {
                return make_sequence(self2, [self2.left, self2.right]).optimize(compressor);
              } else if (!(ll instanceof AST_Node)) {
                return maintain_this_binding(compressor.parent(), compressor.self(), self2.left).optimize(compressor);
              }
              var rr = self2.right.evaluate(compressor);
              if (!rr) {
                var parent = compressor.parent();
                if (parent.operator == "||" && parent.left === compressor.self() || compressor.in_boolean_context()) {
                  return self2.left.optimize(compressor);
                }
              } else if (!(rr instanceof AST_Node)) {
                if (compressor.in_boolean_context()) {
                  return make_sequence(self2, [
                    self2.left,
                    make_node(AST_True, self2)
                  ]).optimize(compressor);
                } else {
                  set_flag(self2, TRUTHY);
                }
              }
              if (self2.left.operator == "&&") {
                var lr = self2.left.right.evaluate(compressor);
                if (lr && !(lr instanceof AST_Node))
                  return make_node(AST_Conditional, self2, {
                    condition: self2.left.left,
                    consequent: self2.left.right,
                    alternative: self2.right
                  }).optimize(compressor);
              }
              break;
            case "??":
              if (is_nullish(self2.left, compressor)) {
                return self2.right;
              }
              var ll = self2.left.evaluate(compressor);
              if (!(ll instanceof AST_Node)) {
                return ll == null ? self2.right : self2.left;
              }
              if (compressor.in_boolean_context()) {
                const rr2 = self2.right.evaluate(compressor);
                if (!(rr2 instanceof AST_Node) && !rr2) {
                  return self2.left;
                }
              }
          }
          var associative = true;
          switch (self2.operator) {
            case "+":
              if (self2.right instanceof AST_Constant && self2.left instanceof AST_Binary && self2.left.operator == "+" && self2.left.is_string(compressor)) {
                var binary = make_node(AST_Binary, self2, {
                  operator: "+",
                  left: self2.left.right,
                  right: self2.right
                });
                var r = binary.optimize(compressor);
                if (binary !== r) {
                  self2 = make_node(AST_Binary, self2, {
                    operator: "+",
                    left: self2.left.left,
                    right: r
                  });
                }
              }
              if (self2.left instanceof AST_Binary && self2.left.operator == "+" && self2.left.is_string(compressor) && self2.right instanceof AST_Binary && self2.right.operator == "+" && self2.right.is_string(compressor)) {
                var binary = make_node(AST_Binary, self2, {
                  operator: "+",
                  left: self2.left.right,
                  right: self2.right.left
                });
                var m = binary.optimize(compressor);
                if (binary !== m) {
                  self2 = make_node(AST_Binary, self2, {
                    operator: "+",
                    left: make_node(AST_Binary, self2.left, {
                      operator: "+",
                      left: self2.left.left,
                      right: m
                    }),
                    right: self2.right.right
                  });
                }
              }
              if (self2.right instanceof AST_UnaryPrefix && self2.right.operator == "-" && self2.left.is_number(compressor)) {
                self2 = make_node(AST_Binary, self2, {
                  operator: "-",
                  left: self2.left,
                  right: self2.right.expression
                });
                break;
              }
              if (self2.left instanceof AST_UnaryPrefix && self2.left.operator == "-" && reversible() && self2.right.is_number(compressor)) {
                self2 = make_node(AST_Binary, self2, {
                  operator: "-",
                  left: self2.right,
                  right: self2.left.expression
                });
                break;
              }
              if (self2.left instanceof AST_TemplateString) {
                var l = self2.left;
                var r = self2.right.evaluate(compressor);
                if (r != self2.right) {
                  l.segments[l.segments.length - 1].value += String(r);
                  return l;
                }
              }
              if (self2.right instanceof AST_TemplateString) {
                var r = self2.right;
                var l = self2.left.evaluate(compressor);
                if (l != self2.left) {
                  r.segments[0].value = String(l) + r.segments[0].value;
                  return r;
                }
              }
              if (self2.left instanceof AST_TemplateString && self2.right instanceof AST_TemplateString) {
                var l = self2.left;
                var segments = l.segments;
                var r = self2.right;
                segments[segments.length - 1].value += r.segments[0].value;
                for (var i = 1; i < r.segments.length; i++) {
                  segments.push(r.segments[i]);
                }
                return l;
              }
            case "*":
              associative = compressor.option("unsafe_math");
            case "&":
            case "|":
            case "^":
              if (self2.left.is_number(compressor) && self2.right.is_number(compressor) && reversible() && !(self2.left instanceof AST_Binary && self2.left.operator != self2.operator && PRECEDENCE[self2.left.operator] >= PRECEDENCE[self2.operator])) {
                var reversed = make_node(AST_Binary, self2, {
                  operator: self2.operator,
                  left: self2.right,
                  right: self2.left
                });
                if (self2.right instanceof AST_Constant && !(self2.left instanceof AST_Constant)) {
                  self2 = best_of(compressor, reversed, self2);
                } else {
                  self2 = best_of(compressor, self2, reversed);
                }
              }
              if (associative && self2.is_number(compressor)) {
                if (self2.right instanceof AST_Binary && self2.right.operator == self2.operator) {
                  self2 = make_node(AST_Binary, self2, {
                    operator: self2.operator,
                    left: make_node(AST_Binary, self2.left, {
                      operator: self2.operator,
                      left: self2.left,
                      right: self2.right.left,
                      start: self2.left.start,
                      end: self2.right.left.end
                    }),
                    right: self2.right.right
                  });
                }
                if (self2.right instanceof AST_Constant && self2.left instanceof AST_Binary && self2.left.operator == self2.operator) {
                  if (self2.left.left instanceof AST_Constant) {
                    self2 = make_node(AST_Binary, self2, {
                      operator: self2.operator,
                      left: make_node(AST_Binary, self2.left, {
                        operator: self2.operator,
                        left: self2.left.left,
                        right: self2.right,
                        start: self2.left.left.start,
                        end: self2.right.end
                      }),
                      right: self2.left.right
                    });
                  } else if (self2.left.right instanceof AST_Constant) {
                    self2 = make_node(AST_Binary, self2, {
                      operator: self2.operator,
                      left: make_node(AST_Binary, self2.left, {
                        operator: self2.operator,
                        left: self2.left.right,
                        right: self2.right,
                        start: self2.left.right.start,
                        end: self2.right.end
                      }),
                      right: self2.left.left
                    });
                  }
                }
                if (self2.left instanceof AST_Binary && self2.left.operator == self2.operator && self2.left.right instanceof AST_Constant && self2.right instanceof AST_Binary && self2.right.operator == self2.operator && self2.right.left instanceof AST_Constant) {
                  self2 = make_node(AST_Binary, self2, {
                    operator: self2.operator,
                    left: make_node(AST_Binary, self2.left, {
                      operator: self2.operator,
                      left: make_node(AST_Binary, self2.left.left, {
                        operator: self2.operator,
                        left: self2.left.right,
                        right: self2.right.left,
                        start: self2.left.right.start,
                        end: self2.right.left.end
                      }),
                      right: self2.left.left
                    }),
                    right: self2.right.right
                  });
                }
              }
          }
        }
        if (self2.right instanceof AST_Binary && self2.right.operator == self2.operator && (lazy_op.has(self2.operator) || self2.operator == "+" && (self2.right.left.is_string(compressor) || self2.left.is_string(compressor) && self2.right.right.is_string(compressor)))) {
          self2.left = make_node(AST_Binary, self2.left, {
            operator: self2.operator,
            left: self2.left.transform(compressor),
            right: self2.right.left.transform(compressor)
          });
          self2.right = self2.right.right.transform(compressor);
          return self2.transform(compressor);
        }
        var ev = self2.evaluate(compressor);
        if (ev !== self2) {
          ev = make_node_from_constant(ev, self2).optimize(compressor);
          return best_of(compressor, ev, self2);
        }
        return self2;
      });
      def_optimize(AST_SymbolExport, function(self2) {
        return self2;
      });
      def_optimize(AST_SymbolRef, function(self2, compressor) {
        if (!compressor.option("ie8") && is_undeclared_ref(self2) && !compressor.find_parent(AST_With)) {
          switch (self2.name) {
            case "undefined":
              return make_node(AST_Undefined, self2).optimize(compressor);
            case "NaN":
              return make_node(AST_NaN, self2).optimize(compressor);
            case "Infinity":
              return make_node(AST_Infinity, self2).optimize(compressor);
          }
        }
        if (compressor.option("reduce_vars") && !compressor.is_lhs()) {
          return inline_into_symbolref(self2, compressor);
        } else {
          return self2;
        }
      });
      function is_atomic(lhs, self2) {
        return lhs instanceof AST_SymbolRef || lhs.TYPE === self2.TYPE;
      }
      def_optimize(AST_Undefined, function(self2, compressor) {
        if (compressor.option("unsafe_undefined")) {
          var undef = find_variable(compressor, "undefined");
          if (undef) {
            var ref = make_node(AST_SymbolRef, self2, {
              name: "undefined",
              scope: undef.scope,
              thedef: undef
            });
            set_flag(ref, UNDEFINED);
            return ref;
          }
        }
        var lhs = compressor.is_lhs();
        if (lhs && is_atomic(lhs, self2))
          return self2;
        return make_node(AST_UnaryPrefix, self2, {
          operator: "void",
          expression: make_node(AST_Number, self2, {
            value: 0
          })
        });
      });
      def_optimize(AST_Infinity, function(self2, compressor) {
        var lhs = compressor.is_lhs();
        if (lhs && is_atomic(lhs, self2))
          return self2;
        if (compressor.option("keep_infinity") && !(lhs && !is_atomic(lhs, self2)) && !find_variable(compressor, "Infinity")) {
          return self2;
        }
        return make_node(AST_Binary, self2, {
          operator: "/",
          left: make_node(AST_Number, self2, {
            value: 1
          }),
          right: make_node(AST_Number, self2, {
            value: 0
          })
        });
      });
      def_optimize(AST_NaN, function(self2, compressor) {
        var lhs = compressor.is_lhs();
        if (lhs && !is_atomic(lhs, self2) || find_variable(compressor, "NaN")) {
          return make_node(AST_Binary, self2, {
            operator: "/",
            left: make_node(AST_Number, self2, {
              value: 0
            }),
            right: make_node(AST_Number, self2, {
              value: 0
            })
          });
        }
        return self2;
      });
      const ASSIGN_OPS = makePredicate("+ - / * % >> << >>> | ^ &");
      const ASSIGN_OPS_COMMUTATIVE = makePredicate("* | ^ &");
      def_optimize(AST_Assign, function(self2, compressor) {
        if (self2.logical) {
          return self2.lift_sequences(compressor);
        }
        var def;
        if (self2.operator === "=" && self2.left instanceof AST_SymbolRef && self2.left.name !== "arguments" && !(def = self2.left.definition()).undeclared && self2.right.equivalent_to(self2.left)) {
          return self2.right;
        }
        if (compressor.option("dead_code") && self2.left instanceof AST_SymbolRef && (def = self2.left.definition()).scope === compressor.find_parent(AST_Lambda)) {
          var level = 0, node, parent = self2;
          do {
            node = parent;
            parent = compressor.parent(level++);
            if (parent instanceof AST_Exit) {
              if (in_try(level, parent))
                break;
              if (is_reachable(def.scope, [def]))
                break;
              if (self2.operator == "=")
                return self2.right;
              def.fixed = false;
              return make_node(AST_Binary, self2, {
                operator: self2.operator.slice(0, -1),
                left: self2.left,
                right: self2.right
              }).optimize(compressor);
            }
          } while (parent instanceof AST_Binary && parent.right === node || parent instanceof AST_Sequence && parent.tail_node() === node);
        }
        self2 = self2.lift_sequences(compressor);
        if (self2.operator == "=" && self2.left instanceof AST_SymbolRef && self2.right instanceof AST_Binary) {
          if (self2.right.left instanceof AST_SymbolRef && self2.right.left.name == self2.left.name && ASSIGN_OPS.has(self2.right.operator)) {
            self2.operator = self2.right.operator + "=";
            self2.right = self2.right.right;
          } else if (self2.right.right instanceof AST_SymbolRef && self2.right.right.name == self2.left.name && ASSIGN_OPS_COMMUTATIVE.has(self2.right.operator) && !self2.right.left.has_side_effects(compressor)) {
            self2.operator = self2.right.operator + "=";
            self2.right = self2.right.left;
          }
        }
        return self2;
        function in_try(level2, node2) {
          function may_assignment_throw() {
            const right = self2.right;
            self2.right = make_node(AST_Null, right);
            const may_throw = node2.may_throw(compressor);
            self2.right = right;
            return may_throw;
          }
          var stop_at = self2.left.definition().scope.get_defun_scope();
          var parent2;
          while ((parent2 = compressor.parent(level2++)) !== stop_at) {
            if (parent2 instanceof AST_Try) {
              if (parent2.bfinally)
                return true;
              if (parent2.bcatch && may_assignment_throw())
                return true;
            }
          }
        }
      });
      def_optimize(AST_DefaultAssign, function(self2, compressor) {
        if (!compressor.option("evaluate")) {
          return self2;
        }
        var evaluateRight = self2.right.evaluate(compressor);
        let lambda, iife;
        if (evaluateRight === void 0) {
          if ((lambda = compressor.parent()) instanceof AST_Lambda ? compressor.option("keep_fargs") === false || (iife = compressor.parent(1)).TYPE === "Call" && iife.expression === lambda : true) {
            self2 = self2.left;
          }
        } else if (evaluateRight !== self2.right) {
          evaluateRight = make_node_from_constant(evaluateRight, self2.right);
          self2.right = best_of_expression(evaluateRight, self2.right);
        }
        return self2;
      });
      function is_nullish_check(check, check_subject, compressor) {
        if (check_subject.may_throw(compressor))
          return false;
        let nullish_side;
        if (check instanceof AST_Binary && check.operator === "==" && ((nullish_side = is_nullish(check.left, compressor) && check.left) || (nullish_side = is_nullish(check.right, compressor) && check.right)) && (nullish_side === check.left ? check.right : check.left).equivalent_to(check_subject)) {
          return true;
        }
        if (check instanceof AST_Binary && check.operator === "||") {
          let null_cmp;
          let undefined_cmp;
          const find_comparison = (cmp) => {
            if (!(cmp instanceof AST_Binary && (cmp.operator === "===" || cmp.operator === "=="))) {
              return false;
            }
            let found = 0;
            let defined_side;
            if (cmp.left instanceof AST_Null) {
              found++;
              null_cmp = cmp;
              defined_side = cmp.right;
            }
            if (cmp.right instanceof AST_Null) {
              found++;
              null_cmp = cmp;
              defined_side = cmp.left;
            }
            if (is_undefined(cmp.left, compressor)) {
              found++;
              undefined_cmp = cmp;
              defined_side = cmp.right;
            }
            if (is_undefined(cmp.right, compressor)) {
              found++;
              undefined_cmp = cmp;
              defined_side = cmp.left;
            }
            if (found !== 1) {
              return false;
            }
            if (!defined_side.equivalent_to(check_subject)) {
              return false;
            }
            return true;
          };
          if (!find_comparison(check.left))
            return false;
          if (!find_comparison(check.right))
            return false;
          if (null_cmp && undefined_cmp && null_cmp !== undefined_cmp) {
            return true;
          }
        }
        return false;
      }
      def_optimize(AST_Conditional, function(self2, compressor) {
        if (!compressor.option("conditionals"))
          return self2;
        if (self2.condition instanceof AST_Sequence) {
          var expressions = self2.condition.expressions.slice();
          self2.condition = expressions.pop();
          expressions.push(self2);
          return make_sequence(self2, expressions);
        }
        var cond = self2.condition.evaluate(compressor);
        if (cond !== self2.condition) {
          if (cond) {
            return maintain_this_binding(compressor.parent(), compressor.self(), self2.consequent);
          } else {
            return maintain_this_binding(compressor.parent(), compressor.self(), self2.alternative);
          }
        }
        var negated = cond.negate(compressor, first_in_statement(compressor));
        if (best_of(compressor, cond, negated) === negated) {
          self2 = make_node(AST_Conditional, self2, {
            condition: negated,
            consequent: self2.alternative,
            alternative: self2.consequent
          });
        }
        var condition = self2.condition;
        var consequent = self2.consequent;
        var alternative = self2.alternative;
        if (condition instanceof AST_SymbolRef && consequent instanceof AST_SymbolRef && condition.definition() === consequent.definition()) {
          return make_node(AST_Binary, self2, {
            operator: "||",
            left: condition,
            right: alternative
          });
        }
        if (consequent instanceof AST_Assign && alternative instanceof AST_Assign && consequent.operator === alternative.operator && consequent.logical === alternative.logical && consequent.left.equivalent_to(alternative.left) && (!self2.condition.has_side_effects(compressor) || consequent.operator == "=" && !consequent.left.has_side_effects(compressor))) {
          return make_node(AST_Assign, self2, {
            operator: consequent.operator,
            left: consequent.left,
            logical: consequent.logical,
            right: make_node(AST_Conditional, self2, {
              condition: self2.condition,
              consequent: consequent.right,
              alternative: alternative.right
            })
          });
        }
        var arg_index;
        if (consequent instanceof AST_Call && alternative.TYPE === consequent.TYPE && consequent.args.length > 0 && consequent.args.length == alternative.args.length && consequent.expression.equivalent_to(alternative.expression) && !self2.condition.has_side_effects(compressor) && !consequent.expression.has_side_effects(compressor) && typeof (arg_index = single_arg_diff()) == "number") {
          var node = consequent.clone();
          node.args[arg_index] = make_node(AST_Conditional, self2, {
            condition: self2.condition,
            consequent: consequent.args[arg_index],
            alternative: alternative.args[arg_index]
          });
          return node;
        }
        if (alternative instanceof AST_Conditional && consequent.equivalent_to(alternative.consequent)) {
          return make_node(AST_Conditional, self2, {
            condition: make_node(AST_Binary, self2, {
              operator: "||",
              left: condition,
              right: alternative.condition
            }),
            consequent,
            alternative: alternative.alternative
          }).optimize(compressor);
        }
        if (compressor.option("ecma") >= 2020 && is_nullish_check(condition, alternative, compressor)) {
          return make_node(AST_Binary, self2, {
            operator: "??",
            left: alternative,
            right: consequent
          }).optimize(compressor);
        }
        if (alternative instanceof AST_Sequence && consequent.equivalent_to(alternative.expressions[alternative.expressions.length - 1])) {
          return make_sequence(self2, [
            make_node(AST_Binary, self2, {
              operator: "||",
              left: condition,
              right: make_sequence(self2, alternative.expressions.slice(0, -1))
            }),
            consequent
          ]).optimize(compressor);
        }
        if (alternative instanceof AST_Binary && alternative.operator == "&&" && consequent.equivalent_to(alternative.right)) {
          return make_node(AST_Binary, self2, {
            operator: "&&",
            left: make_node(AST_Binary, self2, {
              operator: "||",
              left: condition,
              right: alternative.left
            }),
            right: consequent
          }).optimize(compressor);
        }
        if (consequent instanceof AST_Conditional && consequent.alternative.equivalent_to(alternative)) {
          return make_node(AST_Conditional, self2, {
            condition: make_node(AST_Binary, self2, {
              left: self2.condition,
              operator: "&&",
              right: consequent.condition
            }),
            consequent: consequent.consequent,
            alternative
          });
        }
        if (consequent.equivalent_to(alternative)) {
          return make_sequence(self2, [
            self2.condition,
            consequent
          ]).optimize(compressor);
        }
        if (consequent instanceof AST_Binary && consequent.operator == "||" && consequent.right.equivalent_to(alternative)) {
          return make_node(AST_Binary, self2, {
            operator: "||",
            left: make_node(AST_Binary, self2, {
              operator: "&&",
              left: self2.condition,
              right: consequent.left
            }),
            right: alternative
          }).optimize(compressor);
        }
        const in_bool = compressor.in_boolean_context();
        if (is_true(self2.consequent)) {
          if (is_false(self2.alternative)) {
            return booleanize(self2.condition);
          }
          return make_node(AST_Binary, self2, {
            operator: "||",
            left: booleanize(self2.condition),
            right: self2.alternative
          });
        }
        if (is_false(self2.consequent)) {
          if (is_true(self2.alternative)) {
            return booleanize(self2.condition.negate(compressor));
          }
          return make_node(AST_Binary, self2, {
            operator: "&&",
            left: booleanize(self2.condition.negate(compressor)),
            right: self2.alternative
          });
        }
        if (is_true(self2.alternative)) {
          return make_node(AST_Binary, self2, {
            operator: "||",
            left: booleanize(self2.condition.negate(compressor)),
            right: self2.consequent
          });
        }
        if (is_false(self2.alternative)) {
          return make_node(AST_Binary, self2, {
            operator: "&&",
            left: booleanize(self2.condition),
            right: self2.consequent
          });
        }
        return self2;
        function booleanize(node2) {
          if (node2.is_boolean())
            return node2;
          return make_node(AST_UnaryPrefix, node2, {
            operator: "!",
            expression: node2.negate(compressor)
          });
        }
        function is_true(node2) {
          return node2 instanceof AST_True || in_bool && node2 instanceof AST_Constant && node2.getValue() || node2 instanceof AST_UnaryPrefix && node2.operator == "!" && node2.expression instanceof AST_Constant && !node2.expression.getValue();
        }
        function is_false(node2) {
          return node2 instanceof AST_False || in_bool && node2 instanceof AST_Constant && !node2.getValue() || node2 instanceof AST_UnaryPrefix && node2.operator == "!" && node2.expression instanceof AST_Constant && node2.expression.getValue();
        }
        function single_arg_diff() {
          var a = consequent.args;
          var b = alternative.args;
          for (var i = 0, len = a.length; i < len; i++) {
            if (a[i] instanceof AST_Expansion)
              return;
            if (!a[i].equivalent_to(b[i])) {
              if (b[i] instanceof AST_Expansion)
                return;
              for (var j = i + 1; j < len; j++) {
                if (a[j] instanceof AST_Expansion)
                  return;
                if (!a[j].equivalent_to(b[j]))
                  return;
              }
              return i;
            }
          }
        }
      });
      def_optimize(AST_Boolean, function(self2, compressor) {
        if (compressor.in_boolean_context())
          return make_node(AST_Number, self2, {
            value: +self2.value
          });
        var p = compressor.parent();
        if (compressor.option("booleans_as_integers")) {
          if (p instanceof AST_Binary && (p.operator == "===" || p.operator == "!==")) {
            p.operator = p.operator.replace(/=$/, "");
          }
          return make_node(AST_Number, self2, {
            value: +self2.value
          });
        }
        if (compressor.option("booleans")) {
          if (p instanceof AST_Binary && (p.operator == "==" || p.operator == "!=")) {
            return make_node(AST_Number, self2, {
              value: +self2.value
            });
          }
          return make_node(AST_UnaryPrefix, self2, {
            operator: "!",
            expression: make_node(AST_Number, self2, {
              value: 1 - self2.value
            })
          });
        }
        return self2;
      });
      function safe_to_flatten(value, compressor) {
        if (value instanceof AST_SymbolRef) {
          value = value.fixed_value();
        }
        if (!value)
          return false;
        if (!(value instanceof AST_Lambda || value instanceof AST_Class))
          return true;
        if (!(value instanceof AST_Lambda && value.contains_this()))
          return true;
        return compressor.parent() instanceof AST_New;
      }
      AST_PropAccess.DEFMETHOD("flatten_object", function(key, compressor) {
        if (!compressor.option("properties"))
          return;
        if (key === "__proto__")
          return;
        var arrows = compressor.option("unsafe_arrows") && compressor.option("ecma") >= 2015;
        var expr = this.expression;
        if (expr instanceof AST_Object) {
          var props = expr.properties;
          for (var i = props.length; --i >= 0; ) {
            var prop = props[i];
            if ("" + (prop instanceof AST_ConciseMethod ? prop.key.name : prop.key) == key) {
              const all_props_flattenable = props.every((p) => (p instanceof AST_ObjectKeyVal || arrows && p instanceof AST_ConciseMethod && !p.is_generator) && !p.computed_key());
              if (!all_props_flattenable)
                return;
              if (!safe_to_flatten(prop.value, compressor))
                return;
              return make_node(AST_Sub, this, {
                expression: make_node(AST_Array, expr, {
                  elements: props.map(function(prop2) {
                    var v = prop2.value;
                    if (v instanceof AST_Accessor) {
                      v = make_node(AST_Function, v, v);
                    }
                    var k = prop2.key;
                    if (k instanceof AST_Node && !(k instanceof AST_SymbolMethod)) {
                      return make_sequence(prop2, [k, v]);
                    }
                    return v;
                  })
                }),
                property: make_node(AST_Number, this, {
                  value: i
                })
              });
            }
          }
        }
      });
      def_optimize(AST_Sub, function(self2, compressor) {
        var expr = self2.expression;
        var prop = self2.property;
        if (compressor.option("properties")) {
          var key = prop.evaluate(compressor);
          if (key !== prop) {
            if (typeof key == "string") {
              if (key == "undefined") {
                key = void 0;
              } else {
                var value = parseFloat(key);
                if (value.toString() == key) {
                  key = value;
                }
              }
            }
            prop = self2.property = best_of_expression(prop, make_node_from_constant(key, prop).transform(compressor));
            var property = "" + key;
            if (is_basic_identifier_string(property) && property.length <= prop.size() + 1) {
              return make_node(AST_Dot, self2, {
                expression: expr,
                optional: self2.optional,
                property,
                quote: prop.quote
              }).optimize(compressor);
            }
          }
        }
        var fn;
        OPT_ARGUMENTS:
          if (compressor.option("arguments") && expr instanceof AST_SymbolRef && expr.name == "arguments" && expr.definition().orig.length == 1 && (fn = expr.scope) instanceof AST_Lambda && fn.uses_arguments && !(fn instanceof AST_Arrow) && prop instanceof AST_Number) {
            var index = prop.getValue();
            var params = /* @__PURE__ */ new Set();
            var argnames = fn.argnames;
            for (var n = 0; n < argnames.length; n++) {
              if (!(argnames[n] instanceof AST_SymbolFunarg)) {
                break OPT_ARGUMENTS;
              }
              var param = argnames[n].name;
              if (params.has(param)) {
                break OPT_ARGUMENTS;
              }
              params.add(param);
            }
            var argname = fn.argnames[index];
            if (argname && compressor.has_directive("use strict")) {
              var def = argname.definition();
              if (!compressor.option("reduce_vars") || def.assignments || def.orig.length > 1) {
                argname = null;
              }
            } else if (!argname && !compressor.option("keep_fargs") && index < fn.argnames.length + 5) {
              while (index >= fn.argnames.length) {
                argname = fn.create_symbol(AST_SymbolFunarg, {
                  source: fn,
                  scope: fn,
                  tentative_name: "argument_" + fn.argnames.length
                });
                fn.argnames.push(argname);
              }
            }
            if (argname) {
              var sym = make_node(AST_SymbolRef, self2, argname);
              sym.reference({});
              clear_flag(argname, UNUSED);
              return sym;
            }
          }
        if (compressor.is_lhs())
          return self2;
        if (key !== prop) {
          var sub = self2.flatten_object(property, compressor);
          if (sub) {
            expr = self2.expression = sub.expression;
            prop = self2.property = sub.property;
          }
        }
        if (compressor.option("properties") && compressor.option("side_effects") && prop instanceof AST_Number && expr instanceof AST_Array) {
          var index = prop.getValue();
          var elements = expr.elements;
          var retValue = elements[index];
          FLATTEN:
            if (safe_to_flatten(retValue, compressor)) {
              var flatten = true;
              var values = [];
              for (var i = elements.length; --i > index; ) {
                var value = elements[i].drop_side_effect_free(compressor);
                if (value) {
                  values.unshift(value);
                  if (flatten && value.has_side_effects(compressor))
                    flatten = false;
                }
              }
              if (retValue instanceof AST_Expansion)
                break FLATTEN;
              retValue = retValue instanceof AST_Hole ? make_node(AST_Undefined, retValue) : retValue;
              if (!flatten)
                values.unshift(retValue);
              while (--i >= 0) {
                var value = elements[i];
                if (value instanceof AST_Expansion)
                  break FLATTEN;
                value = value.drop_side_effect_free(compressor);
                if (value)
                  values.unshift(value);
                else
                  index--;
              }
              if (flatten) {
                values.push(retValue);
                return make_sequence(self2, values).optimize(compressor);
              } else
                return make_node(AST_Sub, self2, {
                  expression: make_node(AST_Array, expr, {
                    elements: values
                  }),
                  property: make_node(AST_Number, prop, {
                    value: index
                  })
                });
            }
        }
        var ev = self2.evaluate(compressor);
        if (ev !== self2) {
          ev = make_node_from_constant(ev, self2).optimize(compressor);
          return best_of(compressor, ev, self2);
        }
        return self2;
      });
      def_optimize(AST_Chain, function(self2, compressor) {
        if (is_nullish(self2.expression, compressor)) {
          let parent = compressor.parent();
          if (parent instanceof AST_UnaryPrefix && parent.operator === "delete") {
            return make_node_from_constant(0, self2);
          }
          return make_node(AST_Undefined, self2);
        }
        return self2;
      });
      def_optimize(AST_Dot, function(self2, compressor) {
        const parent = compressor.parent();
        if (compressor.is_lhs())
          return self2;
        if (compressor.option("unsafe_proto") && self2.expression instanceof AST_Dot && self2.expression.property == "prototype") {
          var exp = self2.expression.expression;
          if (is_undeclared_ref(exp))
            switch (exp.name) {
              case "Array":
                self2.expression = make_node(AST_Array, self2.expression, {
                  elements: []
                });
                break;
              case "Function":
                self2.expression = make_node(AST_Function, self2.expression, {
                  argnames: [],
                  body: []
                });
                break;
              case "Number":
                self2.expression = make_node(AST_Number, self2.expression, {
                  value: 0
                });
                break;
              case "Object":
                self2.expression = make_node(AST_Object, self2.expression, {
                  properties: []
                });
                break;
              case "RegExp":
                self2.expression = make_node(AST_RegExp, self2.expression, {
                  value: { source: "t", flags: "" }
                });
                break;
              case "String":
                self2.expression = make_node(AST_String, self2.expression, {
                  value: ""
                });
                break;
            }
        }
        if (!(parent instanceof AST_Call) || !has_annotation(parent, _NOINLINE)) {
          const sub = self2.flatten_object(self2.property, compressor);
          if (sub)
            return sub.optimize(compressor);
        }
        if (self2.expression instanceof AST_PropAccess && parent instanceof AST_PropAccess) {
          return self2;
        }
        let ev = self2.evaluate(compressor);
        if (ev !== self2) {
          ev = make_node_from_constant(ev, self2).optimize(compressor);
          return best_of(compressor, ev, self2);
        }
        return self2;
      });
      function literals_in_boolean_context(self2, compressor) {
        if (compressor.in_boolean_context()) {
          return best_of(compressor, self2, make_sequence(self2, [
            self2,
            make_node(AST_True, self2)
          ]).optimize(compressor));
        }
        return self2;
      }
      function inline_array_like_spread(elements) {
        for (var i = 0; i < elements.length; i++) {
          var el = elements[i];
          if (el instanceof AST_Expansion) {
            var expr = el.expression;
            if (expr instanceof AST_Array && !expr.elements.some((elm) => elm instanceof AST_Hole)) {
              elements.splice(i, 1, ...expr.elements);
              i--;
            }
          }
        }
      }
      def_optimize(AST_Array, function(self2, compressor) {
        var optimized = literals_in_boolean_context(self2, compressor);
        if (optimized !== self2) {
          return optimized;
        }
        inline_array_like_spread(self2.elements);
        return self2;
      });
      function inline_object_prop_spread(props, compressor) {
        for (var i = 0; i < props.length; i++) {
          var prop = props[i];
          if (prop instanceof AST_Expansion) {
            const expr = prop.expression;
            if (expr instanceof AST_Object && expr.properties.every((prop2) => prop2 instanceof AST_ObjectKeyVal)) {
              props.splice(i, 1, ...expr.properties);
              i--;
            } else if (expr instanceof AST_Constant && !(expr instanceof AST_String)) {
              props.splice(i, 1);
              i--;
            } else if (is_nullish(expr, compressor)) {
              props.splice(i, 1);
              i--;
            }
          }
        }
      }
      def_optimize(AST_Object, function(self2, compressor) {
        var optimized = literals_in_boolean_context(self2, compressor);
        if (optimized !== self2) {
          return optimized;
        }
        inline_object_prop_spread(self2.properties, compressor);
        return self2;
      });
      def_optimize(AST_RegExp, literals_in_boolean_context);
      def_optimize(AST_Return, function(self2, compressor) {
        if (self2.value && is_undefined(self2.value, compressor)) {
          self2.value = null;
        }
        return self2;
      });
      def_optimize(AST_Arrow, opt_AST_Lambda);
      def_optimize(AST_Function, function(self2, compressor) {
        self2 = opt_AST_Lambda(self2, compressor);
        if (compressor.option("unsafe_arrows") && compressor.option("ecma") >= 2015 && !self2.name && !self2.is_generator && !self2.uses_arguments && !self2.pinned()) {
          const uses_this = walk(self2, (node) => {
            if (node instanceof AST_This)
              return walk_abort;
          });
          if (!uses_this)
            return make_node(AST_Arrow, self2, self2).optimize(compressor);
        }
        return self2;
      });
      def_optimize(AST_Class, function(self2) {
        for (let i = 0; i < self2.properties.length; i++) {
          const prop = self2.properties[i];
          if (prop instanceof AST_ClassStaticBlock && prop.body.length == 0) {
            self2.properties.splice(i, 1);
            i--;
          }
        }
        return self2;
      });
      def_optimize(AST_ClassStaticBlock, function(self2, compressor) {
        tighten_body(self2.body, compressor);
        return self2;
      });
      def_optimize(AST_Yield, function(self2, compressor) {
        if (self2.expression && !self2.is_star && is_undefined(self2.expression, compressor)) {
          self2.expression = null;
        }
        return self2;
      });
      def_optimize(AST_TemplateString, function(self2, compressor) {
        if (!compressor.option("evaluate") || compressor.parent() instanceof AST_PrefixedTemplateString) {
          return self2;
        }
        var segments = [];
        for (var i = 0; i < self2.segments.length; i++) {
          var segment = self2.segments[i];
          if (segment instanceof AST_Node) {
            var result = segment.evaluate(compressor);
            if (result !== segment && (result + "").length <= segment.size() + "${}".length) {
              segments[segments.length - 1].value = segments[segments.length - 1].value + result + self2.segments[++i].value;
              continue;
            }
            if (segment instanceof AST_TemplateString) {
              var inners = segment.segments;
              segments[segments.length - 1].value += inners[0].value;
              for (var j = 1; j < inners.length; j++) {
                segment = inners[j];
                segments.push(segment);
              }
              continue;
            }
          }
          segments.push(segment);
        }
        self2.segments = segments;
        if (segments.length == 1) {
          return make_node(AST_String, self2, segments[0]);
        }
        if (segments.length === 3 && segments[1] instanceof AST_Node && (segments[1].is_string(compressor) || segments[1].is_number(compressor) || is_nullish(segments[1], compressor) || compressor.option("unsafe"))) {
          if (segments[2].value === "") {
            return make_node(AST_Binary, self2, {
              operator: "+",
              left: make_node(AST_String, self2, {
                value: segments[0].value
              }),
              right: segments[1]
            });
          }
          if (segments[0].value === "") {
            return make_node(AST_Binary, self2, {
              operator: "+",
              left: segments[1],
              right: make_node(AST_String, self2, {
                value: segments[2].value
              })
            });
          }
        }
        return self2;
      });
      def_optimize(AST_PrefixedTemplateString, function(self2) {
        return self2;
      });
      function lift_key(self2, compressor) {
        if (!compressor.option("computed_props"))
          return self2;
        if (!(self2.key instanceof AST_Constant))
          return self2;
        if (self2.key instanceof AST_String || self2.key instanceof AST_Number) {
          if (self2.key.value === "__proto__")
            return self2;
          if (self2.key.value == "constructor" && compressor.parent() instanceof AST_Class)
            return self2;
          if (self2 instanceof AST_ObjectKeyVal) {
            self2.quote = self2.key.quote;
            self2.key = self2.key.value;
          } else if (self2 instanceof AST_ClassProperty) {
            self2.quote = self2.key.quote;
            self2.key = make_node(AST_SymbolClassProperty, self2.key, {
              name: self2.key.value
            });
          } else {
            self2.quote = self2.key.quote;
            self2.key = make_node(AST_SymbolMethod, self2.key, {
              name: self2.key.value
            });
          }
        }
        return self2;
      }
      def_optimize(AST_ObjectProperty, lift_key);
      def_optimize(AST_ConciseMethod, function(self2, compressor) {
        lift_key(self2, compressor);
        if (compressor.option("arrows") && compressor.parent() instanceof AST_Object && !self2.is_generator && !self2.value.uses_arguments && !self2.value.pinned() && self2.value.body.length == 1 && self2.value.body[0] instanceof AST_Return && self2.value.body[0].value && !self2.value.contains_this()) {
          var arrow = make_node(AST_Arrow, self2.value, self2.value);
          arrow.async = self2.async;
          arrow.is_generator = self2.is_generator;
          return make_node(AST_ObjectKeyVal, self2, {
            key: self2.key instanceof AST_SymbolMethod ? self2.key.name : self2.key,
            value: arrow,
            quote: self2.quote
          });
        }
        return self2;
      });
      def_optimize(AST_ObjectKeyVal, function(self2, compressor) {
        lift_key(self2, compressor);
        var unsafe_methods = compressor.option("unsafe_methods");
        if (unsafe_methods && compressor.option("ecma") >= 2015 && (!(unsafe_methods instanceof RegExp) || unsafe_methods.test(self2.key + ""))) {
          var key = self2.key;
          var value = self2.value;
          var is_arrow_with_block = value instanceof AST_Arrow && Array.isArray(value.body) && !value.contains_this();
          if ((is_arrow_with_block || value instanceof AST_Function) && !value.name) {
            return make_node(AST_ConciseMethod, self2, {
              async: value.async,
              is_generator: value.is_generator,
              key: key instanceof AST_Node ? key : make_node(AST_SymbolMethod, self2, {
                name: key
              }),
              value: make_node(AST_Accessor, value, value),
              quote: self2.quote
            });
          }
        }
        return self2;
      });
      def_optimize(AST_Destructuring, function(self2, compressor) {
        if (compressor.option("pure_getters") == true && compressor.option("unused") && !self2.is_array && Array.isArray(self2.names) && !is_destructuring_export_decl(compressor) && !(self2.names[self2.names.length - 1] instanceof AST_Expansion)) {
          var keep = [];
          for (var i = 0; i < self2.names.length; i++) {
            var elem = self2.names[i];
            if (!(elem instanceof AST_ObjectKeyVal && typeof elem.key == "string" && elem.value instanceof AST_SymbolDeclaration && !should_retain(compressor, elem.value.definition()))) {
              keep.push(elem);
            }
          }
          if (keep.length != self2.names.length) {
            self2.names = keep;
          }
        }
        return self2;
        function is_destructuring_export_decl(compressor2) {
          var ancestors = [/^VarDef$/, /^(Const|Let|Var)$/, /^Export$/];
          for (var a = 0, p = 0, len = ancestors.length; a < len; p++) {
            var parent = compressor2.parent(p);
            if (!parent)
              return false;
            if (a === 0 && parent.TYPE == "Destructuring")
              continue;
            if (!ancestors[a].test(parent.TYPE)) {
              return false;
            }
            a++;
          }
          return true;
        }
        function should_retain(compressor2, def) {
          if (def.references.length)
            return true;
          if (!def.global)
            return false;
          if (compressor2.toplevel.vars) {
            if (compressor2.top_retain) {
              return compressor2.top_retain(def);
            }
            return false;
          }
          return true;
        }
      });
      function* SourceMap(options) {
        options = defaults(options, {
          file: null,
          root: null,
          orig: null,
          files: {}
        });
        var orig_map;
        var generator = new sourceMap.SourceMapGenerator({
          file: options.file,
          sourceRoot: options.root
        });
        let sourcesContent = { __proto__: null };
        let files = options.files;
        for (var name in files)
          if (HOP(files, name)) {
            sourcesContent[name] = files[name];
          }
        if (options.orig) {
          orig_map = yield new sourceMap.SourceMapConsumer(options.orig);
          if (orig_map.sourcesContent) {
            orig_map.sources.forEach(function(source, i) {
              var content = orig_map.sourcesContent[i];
              if (content) {
                sourcesContent[source] = content;
              }
            });
          }
        }
        function add(source, gen_line, gen_col, orig_line, orig_col, name2) {
          let generatedPos = { line: gen_line, column: gen_col };
          if (orig_map) {
            var info = orig_map.originalPositionFor({
              line: orig_line,
              column: orig_col
            });
            if (info.source === null) {
              generator.addMapping({
                generated: generatedPos,
                original: null,
                source: null,
                name: null
              });
              return;
            }
            source = info.source;
            orig_line = info.line;
            orig_col = info.column;
            name2 = info.name || name2;
          }
          generator.addMapping({
            generated: generatedPos,
            original: { line: orig_line, column: orig_col },
            source,
            name: name2
          });
          generator.setSourceContent(source, sourcesContent[source]);
        }
        function clean(map) {
          const allNull = map.sourcesContent && map.sourcesContent.every((c) => c == null);
          if (allNull)
            delete map.sourcesContent;
          if (map.file === void 0)
            delete map.file;
          if (map.sourceRoot === void 0)
            delete map.sourceRoot;
          return map;
        }
        function getDecoded() {
          if (!generator.toDecodedMap)
            return null;
          return clean(generator.toDecodedMap());
        }
        function getEncoded() {
          return clean(generator.toJSON());
        }
        function destroy() {
          if (orig_map && orig_map.destroy)
            orig_map.destroy();
        }
        return {
          add,
          getDecoded,
          getEncoded,
          destroy
        };
      }
      var domprops = [
        "$&",
        "$'",
        "$*",
        "$+",
        "$1",
        "$2",
        "$3",
        "$4",
        "$5",
        "$6",
        "$7",
        "$8",
        "$9",
        "$_",
        "$`",
        "$input",
        "-moz-animation",
        "-moz-animation-delay",
        "-moz-animation-direction",
        "-moz-animation-duration",
        "-moz-animation-fill-mode",
        "-moz-animation-iteration-count",
        "-moz-animation-name",
        "-moz-animation-play-state",
        "-moz-animation-timing-function",
        "-moz-appearance",
        "-moz-backface-visibility",
        "-moz-border-end",
        "-moz-border-end-color",
        "-moz-border-end-style",
        "-moz-border-end-width",
        "-moz-border-image",
        "-moz-border-start",
        "-moz-border-start-color",
        "-moz-border-start-style",
        "-moz-border-start-width",
        "-moz-box-align",
        "-moz-box-direction",
        "-moz-box-flex",
        "-moz-box-ordinal-group",
        "-moz-box-orient",
        "-moz-box-pack",
        "-moz-box-sizing",
        "-moz-float-edge",
        "-moz-font-feature-settings",
        "-moz-font-language-override",
        "-moz-force-broken-image-icon",
        "-moz-hyphens",
        "-moz-image-region",
        "-moz-margin-end",
        "-moz-margin-start",
        "-moz-orient",
        "-moz-osx-font-smoothing",
        "-moz-outline-radius",
        "-moz-outline-radius-bottomleft",
        "-moz-outline-radius-bottomright",
        "-moz-outline-radius-topleft",
        "-moz-outline-radius-topright",
        "-moz-padding-end",
        "-moz-padding-start",
        "-moz-perspective",
        "-moz-perspective-origin",
        "-moz-tab-size",
        "-moz-text-size-adjust",
        "-moz-transform",
        "-moz-transform-origin",
        "-moz-transform-style",
        "-moz-transition",
        "-moz-transition-delay",
        "-moz-transition-duration",
        "-moz-transition-property",
        "-moz-transition-timing-function",
        "-moz-user-focus",
        "-moz-user-input",
        "-moz-user-modify",
        "-moz-user-select",
        "-moz-window-dragging",
        "-webkit-align-content",
        "-webkit-align-items",
        "-webkit-align-self",
        "-webkit-animation",
        "-webkit-animation-delay",
        "-webkit-animation-direction",
        "-webkit-animation-duration",
        "-webkit-animation-fill-mode",
        "-webkit-animation-iteration-count",
        "-webkit-animation-name",
        "-webkit-animation-play-state",
        "-webkit-animation-timing-function",
        "-webkit-appearance",
        "-webkit-backface-visibility",
        "-webkit-background-clip",
        "-webkit-background-origin",
        "-webkit-background-size",
        "-webkit-border-bottom-left-radius",
        "-webkit-border-bottom-right-radius",
        "-webkit-border-image",
        "-webkit-border-radius",
        "-webkit-border-top-left-radius",
        "-webkit-border-top-right-radius",
        "-webkit-box-align",
        "-webkit-box-direction",
        "-webkit-box-flex",
        "-webkit-box-ordinal-group",
        "-webkit-box-orient",
        "-webkit-box-pack",
        "-webkit-box-shadow",
        "-webkit-box-sizing",
        "-webkit-filter",
        "-webkit-flex",
        "-webkit-flex-basis",
        "-webkit-flex-direction",
        "-webkit-flex-flow",
        "-webkit-flex-grow",
        "-webkit-flex-shrink",
        "-webkit-flex-wrap",
        "-webkit-justify-content",
        "-webkit-line-clamp",
        "-webkit-mask",
        "-webkit-mask-clip",
        "-webkit-mask-composite",
        "-webkit-mask-image",
        "-webkit-mask-origin",
        "-webkit-mask-position",
        "-webkit-mask-position-x",
        "-webkit-mask-position-y",
        "-webkit-mask-repeat",
        "-webkit-mask-size",
        "-webkit-order",
        "-webkit-perspective",
        "-webkit-perspective-origin",
        "-webkit-text-fill-color",
        "-webkit-text-size-adjust",
        "-webkit-text-stroke",
        "-webkit-text-stroke-color",
        "-webkit-text-stroke-width",
        "-webkit-transform",
        "-webkit-transform-origin",
        "-webkit-transform-style",
        "-webkit-transition",
        "-webkit-transition-delay",
        "-webkit-transition-duration",
        "-webkit-transition-property",
        "-webkit-transition-timing-function",
        "-webkit-user-select",
        "0",
        "1",
        "10",
        "11",
        "12",
        "13",
        "14",
        "15",
        "16",
        "17",
        "18",
        "19",
        "2",
        "20",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9",
        "@@iterator",
        "ABORT_ERR",
        "ACTIVE",
        "ACTIVE_ATTRIBUTES",
        "ACTIVE_TEXTURE",
        "ACTIVE_UNIFORMS",
        "ACTIVE_UNIFORM_BLOCKS",
        "ADDITION",
        "ALIASED_LINE_WIDTH_RANGE",
        "ALIASED_POINT_SIZE_RANGE",
        "ALL",
        "ALLOW_KEYBOARD_INPUT",
        "ALLPASS",
        "ALPHA",
        "ALPHA_BITS",
        "ALREADY_SIGNALED",
        "ALT_MASK",
        "ALWAYS",
        "ANY_SAMPLES_PASSED",
        "ANY_SAMPLES_PASSED_CONSERVATIVE",
        "ANY_TYPE",
        "ANY_UNORDERED_NODE_TYPE",
        "ARRAY_BUFFER",
        "ARRAY_BUFFER_BINDING",
        "ATTACHED_SHADERS",
        "ATTRIBUTE_NODE",
        "AT_TARGET",
        "AbortController",
        "AbortSignal",
        "AbsoluteOrientationSensor",
        "AbstractRange",
        "Accelerometer",
        "AddSearchProvider",
        "AggregateError",
        "AnalyserNode",
        "Animation",
        "AnimationEffect",
        "AnimationEvent",
        "AnimationPlaybackEvent",
        "AnimationTimeline",
        "AnonXMLHttpRequest",
        "Any",
        "ApplicationCache",
        "ApplicationCacheErrorEvent",
        "Array",
        "ArrayBuffer",
        "ArrayType",
        "Atomics",
        "Attr",
        "Audio",
        "AudioBuffer",
        "AudioBufferSourceNode",
        "AudioContext",
        "AudioDestinationNode",
        "AudioListener",
        "AudioNode",
        "AudioParam",
        "AudioParamMap",
        "AudioProcessingEvent",
        "AudioScheduledSourceNode",
        "AudioStreamTrack",
        "AudioWorklet",
        "AudioWorkletNode",
        "AuthenticatorAssertionResponse",
        "AuthenticatorAttestationResponse",
        "AuthenticatorResponse",
        "AutocompleteErrorEvent",
        "BACK",
        "BAD_BOUNDARYPOINTS_ERR",
        "BAD_REQUEST",
        "BANDPASS",
        "BLEND",
        "BLEND_COLOR",
        "BLEND_DST_ALPHA",
        "BLEND_DST_RGB",
        "BLEND_EQUATION",
        "BLEND_EQUATION_ALPHA",
        "BLEND_EQUATION_RGB",
        "BLEND_SRC_ALPHA",
        "BLEND_SRC_RGB",
        "BLUE",
        "BLUE_BITS",
        "BLUR",
        "BOOL",
        "BOOLEAN_TYPE",
        "BOOL_VEC2",
        "BOOL_VEC3",
        "BOOL_VEC4",
        "BOTH",
        "BROWSER_DEFAULT_WEBGL",
        "BUBBLING_PHASE",
        "BUFFER_SIZE",
        "BUFFER_USAGE",
        "BYTE",
        "BYTES_PER_ELEMENT",
        "BackgroundFetchManager",
        "BackgroundFetchRecord",
        "BackgroundFetchRegistration",
        "BarProp",
        "BarcodeDetector",
        "BaseAudioContext",
        "BaseHref",
        "BatteryManager",
        "BeforeInstallPromptEvent",
        "BeforeLoadEvent",
        "BeforeUnloadEvent",
        "BigInt",
        "BigInt64Array",
        "BigUint64Array",
        "BiquadFilterNode",
        "Blob",
        "BlobEvent",
        "Bluetooth",
        "BluetoothCharacteristicProperties",
        "BluetoothDevice",
        "BluetoothRemoteGATTCharacteristic",
        "BluetoothRemoteGATTDescriptor",
        "BluetoothRemoteGATTServer",
        "BluetoothRemoteGATTService",
        "BluetoothUUID",
        "Boolean",
        "BroadcastChannel",
        "ByteLengthQueuingStrategy",
        "CAPTURING_PHASE",
        "CCW",
        "CDATASection",
        "CDATA_SECTION_NODE",
        "CHANGE",
        "CHARSET_RULE",
        "CHECKING",
        "CLAMP_TO_EDGE",
        "CLICK",
        "CLOSED",
        "CLOSING",
        "COLOR",
        "COLOR_ATTACHMENT0",
        "COLOR_ATTACHMENT1",
        "COLOR_ATTACHMENT10",
        "COLOR_ATTACHMENT11",
        "COLOR_ATTACHMENT12",
        "COLOR_ATTACHMENT13",
        "COLOR_ATTACHMENT14",
        "COLOR_ATTACHMENT15",
        "COLOR_ATTACHMENT2",
        "COLOR_ATTACHMENT3",
        "COLOR_ATTACHMENT4",
        "COLOR_ATTACHMENT5",
        "COLOR_ATTACHMENT6",
        "COLOR_ATTACHMENT7",
        "COLOR_ATTACHMENT8",
        "COLOR_ATTACHMENT9",
        "COLOR_BUFFER_BIT",
        "COLOR_CLEAR_VALUE",
        "COLOR_WRITEMASK",
        "COMMENT_NODE",
        "COMPARE_REF_TO_TEXTURE",
        "COMPILE_STATUS",
        "COMPLETION_STATUS_KHR",
        "COMPRESSED_RGBA_S3TC_DXT1_EXT",
        "COMPRESSED_RGBA_S3TC_DXT3_EXT",
        "COMPRESSED_RGBA_S3TC_DXT5_EXT",
        "COMPRESSED_RGB_S3TC_DXT1_EXT",
        "COMPRESSED_TEXTURE_FORMATS",
        "COMPUTE",
        "CONDITION_SATISFIED",
        "CONFIGURATION_UNSUPPORTED",
        "CONNECTING",
        "CONSTANT_ALPHA",
        "CONSTANT_COLOR",
        "CONSTRAINT_ERR",
        "CONTEXT_LOST_WEBGL",
        "CONTROL_MASK",
        "COPY_DST",
        "COPY_READ_BUFFER",
        "COPY_READ_BUFFER_BINDING",
        "COPY_SRC",
        "COPY_WRITE_BUFFER",
        "COPY_WRITE_BUFFER_BINDING",
        "COUNTER_STYLE_RULE",
        "CSS",
        "CSS2Properties",
        "CSSAnimation",
        "CSSCharsetRule",
        "CSSConditionRule",
        "CSSCounterStyleRule",
        "CSSFontFaceRule",
        "CSSFontFeatureValuesRule",
        "CSSGroupingRule",
        "CSSImageValue",
        "CSSImportRule",
        "CSSKeyframeRule",
        "CSSKeyframesRule",
        "CSSKeywordValue",
        "CSSMathInvert",
        "CSSMathMax",
        "CSSMathMin",
        "CSSMathNegate",
        "CSSMathProduct",
        "CSSMathSum",
        "CSSMathValue",
        "CSSMatrixComponent",
        "CSSMediaRule",
        "CSSMozDocumentRule",
        "CSSNameSpaceRule",
        "CSSNamespaceRule",
        "CSSNumericArray",
        "CSSNumericValue",
        "CSSPageRule",
        "CSSPerspective",
        "CSSPositionValue",
        "CSSPrimitiveValue",
        "CSSRotate",
        "CSSRule",
        "CSSRuleList",
        "CSSScale",
        "CSSSkew",
        "CSSSkewX",
        "CSSSkewY",
        "CSSStyleDeclaration",
        "CSSStyleRule",
        "CSSStyleSheet",
        "CSSStyleValue",
        "CSSSupportsRule",
        "CSSTransformComponent",
        "CSSTransformValue",
        "CSSTransition",
        "CSSTranslate",
        "CSSUnitValue",
        "CSSUnknownRule",
        "CSSUnparsedValue",
        "CSSValue",
        "CSSValueList",
        "CSSVariableReferenceValue",
        "CSSVariablesDeclaration",
        "CSSVariablesRule",
        "CSSViewportRule",
        "CSS_ATTR",
        "CSS_CM",
        "CSS_COUNTER",
        "CSS_CUSTOM",
        "CSS_DEG",
        "CSS_DIMENSION",
        "CSS_EMS",
        "CSS_EXS",
        "CSS_FILTER_BLUR",
        "CSS_FILTER_BRIGHTNESS",
        "CSS_FILTER_CONTRAST",
        "CSS_FILTER_CUSTOM",
        "CSS_FILTER_DROP_SHADOW",
        "CSS_FILTER_GRAYSCALE",
        "CSS_FILTER_HUE_ROTATE",
        "CSS_FILTER_INVERT",
        "CSS_FILTER_OPACITY",
        "CSS_FILTER_REFERENCE",
        "CSS_FILTER_SATURATE",
        "CSS_FILTER_SEPIA",
        "CSS_GRAD",
        "CSS_HZ",
        "CSS_IDENT",
        "CSS_IN",
        "CSS_INHERIT",
        "CSS_KHZ",
        "CSS_MATRIX",
        "CSS_MATRIX3D",
        "CSS_MM",
        "CSS_MS",
        "CSS_NUMBER",
        "CSS_PC",
        "CSS_PERCENTAGE",
        "CSS_PERSPECTIVE",
        "CSS_PRIMITIVE_VALUE",
        "CSS_PT",
        "CSS_PX",
        "CSS_RAD",
        "CSS_RECT",
        "CSS_RGBCOLOR",
        "CSS_ROTATE",
        "CSS_ROTATE3D",
        "CSS_ROTATEX",
        "CSS_ROTATEY",
        "CSS_ROTATEZ",
        "CSS_S",
        "CSS_SCALE",
        "CSS_SCALE3D",
        "CSS_SCALEX",
        "CSS_SCALEY",
        "CSS_SCALEZ",
        "CSS_SKEW",
        "CSS_SKEWX",
        "CSS_SKEWY",
        "CSS_STRING",
        "CSS_TRANSLATE",
        "CSS_TRANSLATE3D",
        "CSS_TRANSLATEX",
        "CSS_TRANSLATEY",
        "CSS_TRANSLATEZ",
        "CSS_UNKNOWN",
        "CSS_URI",
        "CSS_VALUE_LIST",
        "CSS_VH",
        "CSS_VMAX",
        "CSS_VMIN",
        "CSS_VW",
        "CULL_FACE",
        "CULL_FACE_MODE",
        "CURRENT_PROGRAM",
        "CURRENT_QUERY",
        "CURRENT_VERTEX_ATTRIB",
        "CUSTOM",
        "CW",
        "Cache",
        "CacheStorage",
        "CanvasCaptureMediaStream",
        "CanvasCaptureMediaStreamTrack",
        "CanvasGradient",
        "CanvasPattern",
        "CanvasRenderingContext2D",
        "CaretPosition",
        "ChannelMergerNode",
        "ChannelSplitterNode",
        "CharacterData",
        "ClientRect",
        "ClientRectList",
        "Clipboard",
        "ClipboardEvent",
        "ClipboardItem",
        "CloseEvent",
        "Collator",
        "CommandEvent",
        "Comment",
        "CompileError",
        "CompositionEvent",
        "CompressionStream",
        "Console",
        "ConstantSourceNode",
        "Controllers",
        "ConvolverNode",
        "CountQueuingStrategy",
        "Counter",
        "Credential",
        "CredentialsContainer",
        "Crypto",
        "CryptoKey",
        "CustomElementRegistry",
        "CustomEvent",
        "DATABASE_ERR",
        "DATA_CLONE_ERR",
        "DATA_ERR",
        "DBLCLICK",
        "DECR",
        "DECR_WRAP",
        "DELETE_STATUS",
        "DEPTH",
        "DEPTH24_STENCIL8",
        "DEPTH32F_STENCIL8",
        "DEPTH_ATTACHMENT",
        "DEPTH_BITS",
        "DEPTH_BUFFER_BIT",
        "DEPTH_CLEAR_VALUE",
        "DEPTH_COMPONENT",
        "DEPTH_COMPONENT16",
        "DEPTH_COMPONENT24",
        "DEPTH_COMPONENT32F",
        "DEPTH_FUNC",
        "DEPTH_RANGE",
        "DEPTH_STENCIL",
        "DEPTH_STENCIL_ATTACHMENT",
        "DEPTH_TEST",
        "DEPTH_WRITEMASK",
        "DEVICE_INELIGIBLE",
        "DIRECTION_DOWN",
        "DIRECTION_LEFT",
        "DIRECTION_RIGHT",
        "DIRECTION_UP",
        "DISABLED",
        "DISPATCH_REQUEST_ERR",
        "DITHER",
        "DOCUMENT_FRAGMENT_NODE",
        "DOCUMENT_NODE",
        "DOCUMENT_POSITION_CONTAINED_BY",
        "DOCUMENT_POSITION_CONTAINS",
        "DOCUMENT_POSITION_DISCONNECTED",
        "DOCUMENT_POSITION_FOLLOWING",
        "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC",
        "DOCUMENT_POSITION_PRECEDING",
        "DOCUMENT_TYPE_NODE",
        "DOMCursor",
        "DOMError",
        "DOMException",
        "DOMImplementation",
        "DOMImplementationLS",
        "DOMMatrix",
        "DOMMatrixReadOnly",
        "DOMParser",
        "DOMPoint",
        "DOMPointReadOnly",
        "DOMQuad",
        "DOMRect",
        "DOMRectList",
        "DOMRectReadOnly",
        "DOMRequest",
        "DOMSTRING_SIZE_ERR",
        "DOMSettableTokenList",
        "DOMStringList",
        "DOMStringMap",
        "DOMTokenList",
        "DOMTransactionEvent",
        "DOM_DELTA_LINE",
        "DOM_DELTA_PAGE",
        "DOM_DELTA_PIXEL",
        "DOM_INPUT_METHOD_DROP",
        "DOM_INPUT_METHOD_HANDWRITING",
        "DOM_INPUT_METHOD_IME",
        "DOM_INPUT_METHOD_KEYBOARD",
        "DOM_INPUT_METHOD_MULTIMODAL",
        "DOM_INPUT_METHOD_OPTION",
        "DOM_INPUT_METHOD_PASTE",
        "DOM_INPUT_METHOD_SCRIPT",
        "DOM_INPUT_METHOD_UNKNOWN",
        "DOM_INPUT_METHOD_VOICE",
        "DOM_KEY_LOCATION_JOYSTICK",
        "DOM_KEY_LOCATION_LEFT",
        "DOM_KEY_LOCATION_MOBILE",
        "DOM_KEY_LOCATION_NUMPAD",
        "DOM_KEY_LOCATION_RIGHT",
        "DOM_KEY_LOCATION_STANDARD",
        "DOM_VK_0",
        "DOM_VK_1",
        "DOM_VK_2",
        "DOM_VK_3",
        "DOM_VK_4",
        "DOM_VK_5",
        "DOM_VK_6",
        "DOM_VK_7",
        "DOM_VK_8",
        "DOM_VK_9",
        "DOM_VK_A",
        "DOM_VK_ACCEPT",
        "DOM_VK_ADD",
        "DOM_VK_ALT",
        "DOM_VK_ALTGR",
        "DOM_VK_AMPERSAND",
        "DOM_VK_ASTERISK",
        "DOM_VK_AT",
        "DOM_VK_ATTN",
        "DOM_VK_B",
        "DOM_VK_BACKSPACE",
        "DOM_VK_BACK_QUOTE",
        "DOM_VK_BACK_SLASH",
        "DOM_VK_BACK_SPACE",
        "DOM_VK_C",
        "DOM_VK_CANCEL",
        "DOM_VK_CAPS_LOCK",
        "DOM_VK_CIRCUMFLEX",
        "DOM_VK_CLEAR",
        "DOM_VK_CLOSE_BRACKET",
        "DOM_VK_CLOSE_CURLY_BRACKET",
        "DOM_VK_CLOSE_PAREN",
        "DOM_VK_COLON",
        "DOM_VK_COMMA",
        "DOM_VK_CONTEXT_MENU",
        "DOM_VK_CONTROL",
        "DOM_VK_CONVERT",
        "DOM_VK_CRSEL",
        "DOM_VK_CTRL",
        "DOM_VK_D",
        "DOM_VK_DECIMAL",
        "DOM_VK_DELETE",
        "DOM_VK_DIVIDE",
        "DOM_VK_DOLLAR",
        "DOM_VK_DOUBLE_QUOTE",
        "DOM_VK_DOWN",
        "DOM_VK_E",
        "DOM_VK_EISU",
        "DOM_VK_END",
        "DOM_VK_ENTER",
        "DOM_VK_EQUALS",
        "DOM_VK_EREOF",
        "DOM_VK_ESCAPE",
        "DOM_VK_EXCLAMATION",
        "DOM_VK_EXECUTE",
        "DOM_VK_EXSEL",
        "DOM_VK_F",
        "DOM_VK_F1",
        "DOM_VK_F10",
        "DOM_VK_F11",
        "DOM_VK_F12",
        "DOM_VK_F13",
        "DOM_VK_F14",
        "DOM_VK_F15",
        "DOM_VK_F16",
        "DOM_VK_F17",
        "DOM_VK_F18",
        "DOM_VK_F19",
        "DOM_VK_F2",
        "DOM_VK_F20",
        "DOM_VK_F21",
        "DOM_VK_F22",
        "DOM_VK_F23",
        "DOM_VK_F24",
        "DOM_VK_F25",
        "DOM_VK_F26",
        "DOM_VK_F27",
        "DOM_VK_F28",
        "DOM_VK_F29",
        "DOM_VK_F3",
        "DOM_VK_F30",
        "DOM_VK_F31",
        "DOM_VK_F32",
        "DOM_VK_F33",
        "DOM_VK_F34",
        "DOM_VK_F35",
        "DOM_VK_F36",
        "DOM_VK_F4",
        "DOM_VK_F5",
        "DOM_VK_F6",
        "DOM_VK_F7",
        "DOM_VK_F8",
        "DOM_VK_F9",
        "DOM_VK_FINAL",
        "DOM_VK_FRONT",
        "DOM_VK_G",
        "DOM_VK_GREATER_THAN",
        "DOM_VK_H",
        "DOM_VK_HANGUL",
        "DOM_VK_HANJA",
        "DOM_VK_HASH",
        "DOM_VK_HELP",
        "DOM_VK_HK_TOGGLE",
        "DOM_VK_HOME",
        "DOM_VK_HYPHEN_MINUS",
        "DOM_VK_I",
        "DOM_VK_INSERT",
        "DOM_VK_J",
        "DOM_VK_JUNJA",
        "DOM_VK_K",
        "DOM_VK_KANA",
        "DOM_VK_KANJI",
        "DOM_VK_L",
        "DOM_VK_LEFT",
        "DOM_VK_LEFT_TAB",
        "DOM_VK_LESS_THAN",
        "DOM_VK_M",
        "DOM_VK_META",
        "DOM_VK_MODECHANGE",
        "DOM_VK_MULTIPLY",
        "DOM_VK_N",
        "DOM_VK_NONCONVERT",
        "DOM_VK_NUMPAD0",
        "DOM_VK_NUMPAD1",
        "DOM_VK_NUMPAD2",
        "DOM_VK_NUMPAD3",
        "DOM_VK_NUMPAD4",
        "DOM_VK_NUMPAD5",
        "DOM_VK_NUMPAD6",
        "DOM_VK_NUMPAD7",
        "DOM_VK_NUMPAD8",
        "DOM_VK_NUMPAD9",
        "DOM_VK_NUM_LOCK",
        "DOM_VK_O",
        "DOM_VK_OEM_1",
        "DOM_VK_OEM_102",
        "DOM_VK_OEM_2",
        "DOM_VK_OEM_3",
        "DOM_VK_OEM_4",
        "DOM_VK_OEM_5",
        "DOM_VK_OEM_6",
        "DOM_VK_OEM_7",
        "DOM_VK_OEM_8",
        "DOM_VK_OEM_COMMA",
        "DOM_VK_OEM_MINUS",
        "DOM_VK_OEM_PERIOD",
        "DOM_VK_OEM_PLUS",
        "DOM_VK_OPEN_BRACKET",
        "DOM_VK_OPEN_CURLY_BRACKET",
        "DOM_VK_OPEN_PAREN",
        "DOM_VK_P",
        "DOM_VK_PA1",
        "DOM_VK_PAGEDOWN",
        "DOM_VK_PAGEUP",
        "DOM_VK_PAGE_DOWN",
        "DOM_VK_PAGE_UP",
        "DOM_VK_PAUSE",
        "DOM_VK_PERCENT",
        "DOM_VK_PERIOD",
        "DOM_VK_PIPE",
        "DOM_VK_PLAY",
        "DOM_VK_PLUS",
        "DOM_VK_PRINT",
        "DOM_VK_PRINTSCREEN",
        "DOM_VK_PROCESSKEY",
        "DOM_VK_PROPERITES",
        "DOM_VK_Q",
        "DOM_VK_QUESTION_MARK",
        "DOM_VK_QUOTE",
        "DOM_VK_R",
        "DOM_VK_REDO",
        "DOM_VK_RETURN",
        "DOM_VK_RIGHT",
        "DOM_VK_S",
        "DOM_VK_SCROLL_LOCK",
        "DOM_VK_SELECT",
        "DOM_VK_SEMICOLON",
        "DOM_VK_SEPARATOR",
        "DOM_VK_SHIFT",
        "DOM_VK_SLASH",
        "DOM_VK_SLEEP",
        "DOM_VK_SPACE",
        "DOM_VK_SUBTRACT",
        "DOM_VK_T",
        "DOM_VK_TAB",
        "DOM_VK_TILDE",
        "DOM_VK_U",
        "DOM_VK_UNDERSCORE",
        "DOM_VK_UNDO",
        "DOM_VK_UNICODE",
        "DOM_VK_UP",
        "DOM_VK_V",
        "DOM_VK_VOLUME_DOWN",
        "DOM_VK_VOLUME_MUTE",
        "DOM_VK_VOLUME_UP",
        "DOM_VK_W",
        "DOM_VK_WIN",
        "DOM_VK_WINDOW",
        "DOM_VK_WIN_ICO_00",
        "DOM_VK_WIN_ICO_CLEAR",
        "DOM_VK_WIN_ICO_HELP",
        "DOM_VK_WIN_OEM_ATTN",
        "DOM_VK_WIN_OEM_AUTO",
        "DOM_VK_WIN_OEM_BACKTAB",
        "DOM_VK_WIN_OEM_CLEAR",
        "DOM_VK_WIN_OEM_COPY",
        "DOM_VK_WIN_OEM_CUSEL",
        "DOM_VK_WIN_OEM_ENLW",
        "DOM_VK_WIN_OEM_FINISH",
        "DOM_VK_WIN_OEM_FJ_JISHO",
        "DOM_VK_WIN_OEM_FJ_LOYA",
        "DOM_VK_WIN_OEM_FJ_MASSHOU",
        "DOM_VK_WIN_OEM_FJ_ROYA",
        "DOM_VK_WIN_OEM_FJ_TOUROKU",
        "DOM_VK_WIN_OEM_JUMP",
        "DOM_VK_WIN_OEM_PA1",
        "DOM_VK_WIN_OEM_PA2",
        "DOM_VK_WIN_OEM_PA3",
        "DOM_VK_WIN_OEM_RESET",
        "DOM_VK_WIN_OEM_WSCTRL",
        "DOM_VK_X",
        "DOM_VK_XF86XK_ADD_FAVORITE",
        "DOM_VK_XF86XK_APPLICATION_LEFT",
        "DOM_VK_XF86XK_APPLICATION_RIGHT",
        "DOM_VK_XF86XK_AUDIO_CYCLE_TRACK",
        "DOM_VK_XF86XK_AUDIO_FORWARD",
        "DOM_VK_XF86XK_AUDIO_LOWER_VOLUME",
        "DOM_VK_XF86XK_AUDIO_MEDIA",
        "DOM_VK_XF86XK_AUDIO_MUTE",
        "DOM_VK_XF86XK_AUDIO_NEXT",
        "DOM_VK_XF86XK_AUDIO_PAUSE",
        "DOM_VK_XF86XK_AUDIO_PLAY",
        "DOM_VK_XF86XK_AUDIO_PREV",
        "DOM_VK_XF86XK_AUDIO_RAISE_VOLUME",
        "DOM_VK_XF86XK_AUDIO_RANDOM_PLAY",
        "DOM_VK_XF86XK_AUDIO_RECORD",
        "DOM_VK_XF86XK_AUDIO_REPEAT",
        "DOM_VK_XF86XK_AUDIO_REWIND",
        "DOM_VK_XF86XK_AUDIO_STOP",
        "DOM_VK_XF86XK_AWAY",
        "DOM_VK_XF86XK_BACK",
        "DOM_VK_XF86XK_BACK_FORWARD",
        "DOM_VK_XF86XK_BATTERY",
        "DOM_VK_XF86XK_BLUE",
        "DOM_VK_XF86XK_BLUETOOTH",
        "DOM_VK_XF86XK_BOOK",
        "DOM_VK_XF86XK_BRIGHTNESS_ADJUST",
        "DOM_VK_XF86XK_CALCULATOR",
        "DOM_VK_XF86XK_CALENDAR",
        "DOM_VK_XF86XK_CD",
        "DOM_VK_XF86XK_CLOSE",
        "DOM_VK_XF86XK_COMMUNITY",
        "DOM_VK_XF86XK_CONTRAST_ADJUST",
        "DOM_VK_XF86XK_COPY",
        "DOM_VK_XF86XK_CUT",
        "DOM_VK_XF86XK_CYCLE_ANGLE",
        "DOM_VK_XF86XK_DISPLAY",
        "DOM_VK_XF86XK_DOCUMENTS",
        "DOM_VK_XF86XK_DOS",
        "DOM_VK_XF86XK_EJECT",
        "DOM_VK_XF86XK_EXCEL",
        "DOM_VK_XF86XK_EXPLORER",
        "DOM_VK_XF86XK_FAVORITES",
        "DOM_VK_XF86XK_FINANCE",
        "DOM_VK_XF86XK_FORWARD",
        "DOM_VK_XF86XK_FRAME_BACK",
        "DOM_VK_XF86XK_FRAME_FORWARD",
        "DOM_VK_XF86XK_GAME",
        "DOM_VK_XF86XK_GO",
        "DOM_VK_XF86XK_GREEN",
        "DOM_VK_XF86XK_HIBERNATE",
        "DOM_VK_XF86XK_HISTORY",
        "DOM_VK_XF86XK_HOME_PAGE",
        "DOM_VK_XF86XK_HOT_LINKS",
        "DOM_VK_XF86XK_I_TOUCH",
        "DOM_VK_XF86XK_KBD_BRIGHTNESS_DOWN",
        "DOM_VK_XF86XK_KBD_BRIGHTNESS_UP",
        "DOM_VK_XF86XK_KBD_LIGHT_ON_OFF",
        "DOM_VK_XF86XK_LAUNCH0",
        "DOM_VK_XF86XK_LAUNCH1",
        "DOM_VK_XF86XK_LAUNCH2",
        "DOM_VK_XF86XK_LAUNCH3",
        "DOM_VK_XF86XK_LAUNCH4",
        "DOM_VK_XF86XK_LAUNCH5",
        "DOM_VK_XF86XK_LAUNCH6",
        "DOM_VK_XF86XK_LAUNCH7",
        "DOM_VK_XF86XK_LAUNCH8",
        "DOM_VK_XF86XK_LAUNCH9",
        "DOM_VK_XF86XK_LAUNCH_A",
        "DOM_VK_XF86XK_LAUNCH_B",
        "DOM_VK_XF86XK_LAUNCH_C",
        "DOM_VK_XF86XK_LAUNCH_D",
        "DOM_VK_XF86XK_LAUNCH_E",
        "DOM_VK_XF86XK_LAUNCH_F",
        "DOM_VK_XF86XK_LIGHT_BULB",
        "DOM_VK_XF86XK_LOG_OFF",
        "DOM_VK_XF86XK_MAIL",
        "DOM_VK_XF86XK_MAIL_FORWARD",
        "DOM_VK_XF86XK_MARKET",
        "DOM_VK_XF86XK_MEETING",
        "DOM_VK_XF86XK_MEMO",
        "DOM_VK_XF86XK_MENU_KB",
        "DOM_VK_XF86XK_MENU_PB",
        "DOM_VK_XF86XK_MESSENGER",
        "DOM_VK_XF86XK_MON_BRIGHTNESS_DOWN",
        "DOM_VK_XF86XK_MON_BRIGHTNESS_UP",
        "DOM_VK_XF86XK_MUSIC",
        "DOM_VK_XF86XK_MY_COMPUTER",
        "DOM_VK_XF86XK_MY_SITES",
        "DOM_VK_XF86XK_NEW",
        "DOM_VK_XF86XK_NEWS",
        "DOM_VK_XF86XK_OFFICE_HOME",
        "DOM_VK_XF86XK_OPEN",
        "DOM_VK_XF86XK_OPEN_URL",
        "DOM_VK_XF86XK_OPTION",
        "DOM_VK_XF86XK_PASTE",
        "DOM_VK_XF86XK_PHONE",
        "DOM_VK_XF86XK_PICTURES",
        "DOM_VK_XF86XK_POWER_DOWN",
        "DOM_VK_XF86XK_POWER_OFF",
        "DOM_VK_XF86XK_RED",
        "DOM_VK_XF86XK_REFRESH",
        "DOM_VK_XF86XK_RELOAD",
        "DOM_VK_XF86XK_REPLY",
        "DOM_VK_XF86XK_ROCKER_DOWN",
        "DOM_VK_XF86XK_ROCKER_ENTER",
        "DOM_VK_XF86XK_ROCKER_UP",
        "DOM_VK_XF86XK_ROTATE_WINDOWS",
        "DOM_VK_XF86XK_ROTATION_KB",
        "DOM_VK_XF86XK_ROTATION_PB",
        "DOM_VK_XF86XK_SAVE",
        "DOM_VK_XF86XK_SCREEN_SAVER",
        "DOM_VK_XF86XK_SCROLL_CLICK",
        "DOM_VK_XF86XK_SCROLL_DOWN",
        "DOM_VK_XF86XK_SCROLL_UP",
        "DOM_VK_XF86XK_SEARCH",
        "DOM_VK_XF86XK_SEND",
        "DOM_VK_XF86XK_SHOP",
        "DOM_VK_XF86XK_SPELL",
        "DOM_VK_XF86XK_SPLIT_SCREEN",
        "DOM_VK_XF86XK_STANDBY",
        "DOM_VK_XF86XK_START",
        "DOM_VK_XF86XK_STOP",
        "DOM_VK_XF86XK_SUBTITLE",
        "DOM_VK_XF86XK_SUPPORT",
        "DOM_VK_XF86XK_SUSPEND",
        "DOM_VK_XF86XK_TASK_PANE",
        "DOM_VK_XF86XK_TERMINAL",
        "DOM_VK_XF86XK_TIME",
        "DOM_VK_XF86XK_TOOLS",
        "DOM_VK_XF86XK_TOP_MENU",
        "DOM_VK_XF86XK_TO_DO_LIST",
        "DOM_VK_XF86XK_TRAVEL",
        "DOM_VK_XF86XK_USER1KB",
        "DOM_VK_XF86XK_USER2KB",
        "DOM_VK_XF86XK_USER_PB",
        "DOM_VK_XF86XK_UWB",
        "DOM_VK_XF86XK_VENDOR_HOME",
        "DOM_VK_XF86XK_VIDEO",
        "DOM_VK_XF86XK_VIEW",
        "DOM_VK_XF86XK_WAKE_UP",
        "DOM_VK_XF86XK_WEB_CAM",
        "DOM_VK_XF86XK_WHEEL_BUTTON",
        "DOM_VK_XF86XK_WLAN",
        "DOM_VK_XF86XK_WORD",
        "DOM_VK_XF86XK_WWW",
        "DOM_VK_XF86XK_XFER",
        "DOM_VK_XF86XK_YELLOW",
        "DOM_VK_XF86XK_ZOOM_IN",
        "DOM_VK_XF86XK_ZOOM_OUT",
        "DOM_VK_Y",
        "DOM_VK_Z",
        "DOM_VK_ZOOM",
        "DONE",
        "DONT_CARE",
        "DOWNLOADING",
        "DRAGDROP",
        "DRAW_BUFFER0",
        "DRAW_BUFFER1",
        "DRAW_BUFFER10",
        "DRAW_BUFFER11",
        "DRAW_BUFFER12",
        "DRAW_BUFFER13",
        "DRAW_BUFFER14",
        "DRAW_BUFFER15",
        "DRAW_BUFFER2",
        "DRAW_BUFFER3",
        "DRAW_BUFFER4",
        "DRAW_BUFFER5",
        "DRAW_BUFFER6",
        "DRAW_BUFFER7",
        "DRAW_BUFFER8",
        "DRAW_BUFFER9",
        "DRAW_FRAMEBUFFER",
        "DRAW_FRAMEBUFFER_BINDING",
        "DST_ALPHA",
        "DST_COLOR",
        "DYNAMIC_COPY",
        "DYNAMIC_DRAW",
        "DYNAMIC_READ",
        "DataChannel",
        "DataTransfer",
        "DataTransferItem",
        "DataTransferItemList",
        "DataView",
        "Date",
        "DateTimeFormat",
        "DecompressionStream",
        "DelayNode",
        "DeprecationReportBody",
        "DesktopNotification",
        "DesktopNotificationCenter",
        "DeviceLightEvent",
        "DeviceMotionEvent",
        "DeviceMotionEventAcceleration",
        "DeviceMotionEventRotationRate",
        "DeviceOrientationEvent",
        "DeviceProximityEvent",
        "DeviceStorage",
        "DeviceStorageChangeEvent",
        "Directory",
        "DisplayNames",
        "Document",
        "DocumentFragment",
        "DocumentTimeline",
        "DocumentType",
        "DragEvent",
        "DynamicsCompressorNode",
        "E",
        "ELEMENT_ARRAY_BUFFER",
        "ELEMENT_ARRAY_BUFFER_BINDING",
        "ELEMENT_NODE",
        "EMPTY",
        "ENCODING_ERR",
        "ENDED",
        "END_TO_END",
        "END_TO_START",
        "ENTITY_NODE",
        "ENTITY_REFERENCE_NODE",
        "EPSILON",
        "EQUAL",
        "EQUALPOWER",
        "ERROR",
        "EXPONENTIAL_DISTANCE",
        "Element",
        "ElementInternals",
        "ElementQuery",
        "EnterPictureInPictureEvent",
        "Entity",
        "EntityReference",
        "Error",
        "ErrorEvent",
        "EvalError",
        "Event",
        "EventException",
        "EventSource",
        "EventTarget",
        "External",
        "FASTEST",
        "FIDOSDK",
        "FILTER_ACCEPT",
        "FILTER_INTERRUPT",
        "FILTER_REJECT",
        "FILTER_SKIP",
        "FINISHED_STATE",
        "FIRST_ORDERED_NODE_TYPE",
        "FLOAT",
        "FLOAT_32_UNSIGNED_INT_24_8_REV",
        "FLOAT_MAT2",
        "FLOAT_MAT2x3",
        "FLOAT_MAT2x4",
        "FLOAT_MAT3",
        "FLOAT_MAT3x2",
        "FLOAT_MAT3x4",
        "FLOAT_MAT4",
        "FLOAT_MAT4x2",
        "FLOAT_MAT4x3",
        "FLOAT_VEC2",
        "FLOAT_VEC3",
        "FLOAT_VEC4",
        "FOCUS",
        "FONT_FACE_RULE",
        "FONT_FEATURE_VALUES_RULE",
        "FRAGMENT",
        "FRAGMENT_SHADER",
        "FRAGMENT_SHADER_DERIVATIVE_HINT",
        "FRAGMENT_SHADER_DERIVATIVE_HINT_OES",
        "FRAMEBUFFER",
        "FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",
        "FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",
        "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",
        "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",
        "FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",
        "FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",
        "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",
        "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",
        "FRAMEBUFFER_ATTACHMENT_RED_SIZE",
        "FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",
        "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",
        "FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",
        "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",
        "FRAMEBUFFER_BINDING",
        "FRAMEBUFFER_COMPLETE",
        "FRAMEBUFFER_DEFAULT",
        "FRAMEBUFFER_INCOMPLETE_ATTACHMENT",
        "FRAMEBUFFER_INCOMPLETE_DIMENSIONS",
        "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",
        "FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",
        "FRAMEBUFFER_UNSUPPORTED",
        "FRONT",
        "FRONT_AND_BACK",
        "FRONT_FACE",
        "FUNC_ADD",
        "FUNC_REVERSE_SUBTRACT",
        "FUNC_SUBTRACT",
        "FeaturePolicy",
        "FeaturePolicyViolationReportBody",
        "FederatedCredential",
        "Feed",
        "FeedEntry",
        "File",
        "FileError",
        "FileList",
        "FileReader",
        "FileSystem",
        "FileSystemDirectoryEntry",
        "FileSystemDirectoryReader",
        "FileSystemEntry",
        "FileSystemFileEntry",
        "FinalizationRegistry",
        "FindInPage",
        "Float32Array",
        "Float64Array",
        "FocusEvent",
        "FontFace",
        "FontFaceSet",
        "FontFaceSetLoadEvent",
        "FormData",
        "FormDataEvent",
        "FragmentDirective",
        "Function",
        "GENERATE_MIPMAP_HINT",
        "GEQUAL",
        "GREATER",
        "GREEN",
        "GREEN_BITS",
        "GainNode",
        "Gamepad",
        "GamepadAxisMoveEvent",
        "GamepadButton",
        "GamepadButtonEvent",
        "GamepadEvent",
        "GamepadHapticActuator",
        "GamepadPose",
        "Geolocation",
        "GeolocationCoordinates",
        "GeolocationPosition",
        "GeolocationPositionError",
        "GestureEvent",
        "Global",
        "Gyroscope",
        "HALF_FLOAT",
        "HAVE_CURRENT_DATA",
        "HAVE_ENOUGH_DATA",
        "HAVE_FUTURE_DATA",
        "HAVE_METADATA",
        "HAVE_NOTHING",
        "HEADERS_RECEIVED",
        "HIDDEN",
        "HIERARCHY_REQUEST_ERR",
        "HIGHPASS",
        "HIGHSHELF",
        "HIGH_FLOAT",
        "HIGH_INT",
        "HORIZONTAL",
        "HORIZONTAL_AXIS",
        "HRTF",
        "HTMLAllCollection",
        "HTMLAnchorElement",
        "HTMLAppletElement",
        "HTMLAreaElement",
        "HTMLAudioElement",
        "HTMLBRElement",
        "HTMLBaseElement",
        "HTMLBaseFontElement",
        "HTMLBlockquoteElement",
        "HTMLBodyElement",
        "HTMLButtonElement",
        "HTMLCanvasElement",
        "HTMLCollection",
        "HTMLCommandElement",
        "HTMLContentElement",
        "HTMLDListElement",
        "HTMLDataElement",
        "HTMLDataListElement",
        "HTMLDetailsElement",
        "HTMLDialogElement",
        "HTMLDirectoryElement",
        "HTMLDivElement",
        "HTMLDocument",
        "HTMLElement",
        "HTMLEmbedElement",
        "HTMLFieldSetElement",
        "HTMLFontElement",
        "HTMLFormControlsCollection",
        "HTMLFormElement",
        "HTMLFrameElement",
        "HTMLFrameSetElement",
        "HTMLHRElement",
        "HTMLHeadElement",
        "HTMLHeadingElement",
        "HTMLHtmlElement",
        "HTMLIFrameElement",
        "HTMLImageElement",
        "HTMLInputElement",
        "HTMLIsIndexElement",
        "HTMLKeygenElement",
        "HTMLLIElement",
        "HTMLLabelElement",
        "HTMLLegendElement",
        "HTMLLinkElement",
        "HTMLMapElement",
        "HTMLMarqueeElement",
        "HTMLMediaElement",
        "HTMLMenuElement",
        "HTMLMenuItemElement",
        "HTMLMetaElement",
        "HTMLMeterElement",
        "HTMLModElement",
        "HTMLOListElement",
        "HTMLObjectElement",
        "HTMLOptGroupElement",
        "HTMLOptionElement",
        "HTMLOptionsCollection",
        "HTMLOutputElement",
        "HTMLParagraphElement",
        "HTMLParamElement",
        "HTMLPictureElement",
        "HTMLPreElement",
        "HTMLProgressElement",
        "HTMLPropertiesCollection",
        "HTMLQuoteElement",
        "HTMLScriptElement",
        "HTMLSelectElement",
        "HTMLShadowElement",
        "HTMLSlotElement",
        "HTMLSourceElement",
        "HTMLSpanElement",
        "HTMLStyleElement",
        "HTMLTableCaptionElement",
        "HTMLTableCellElement",
        "HTMLTableColElement",
        "HTMLTableElement",
        "HTMLTableRowElement",
        "HTMLTableSectionElement",
        "HTMLTemplateElement",
        "HTMLTextAreaElement",
        "HTMLTimeElement",
        "HTMLTitleElement",
        "HTMLTrackElement",
        "HTMLUListElement",
        "HTMLUnknownElement",
        "HTMLVideoElement",
        "HashChangeEvent",
        "Headers",
        "History",
        "Hz",
        "ICE_CHECKING",
        "ICE_CLOSED",
        "ICE_COMPLETED",
        "ICE_CONNECTED",
        "ICE_FAILED",
        "ICE_GATHERING",
        "ICE_WAITING",
        "IDBCursor",
        "IDBCursorWithValue",
        "IDBDatabase",
        "IDBDatabaseException",
        "IDBFactory",
        "IDBFileHandle",
        "IDBFileRequest",
        "IDBIndex",
        "IDBKeyRange",
        "IDBMutableFile",
        "IDBObjectStore",
        "IDBOpenDBRequest",
        "IDBRequest",
        "IDBTransaction",
        "IDBVersionChangeEvent",
        "IDLE",
        "IIRFilterNode",
        "IMPLEMENTATION_COLOR_READ_FORMAT",
        "IMPLEMENTATION_COLOR_READ_TYPE",
        "IMPORT_RULE",
        "INCR",
        "INCR_WRAP",
        "INDEX",
        "INDEX_SIZE_ERR",
        "INDIRECT",
        "INT",
        "INTERLEAVED_ATTRIBS",
        "INT_2_10_10_10_REV",
        "INT_SAMPLER_2D",
        "INT_SAMPLER_2D_ARRAY",
        "INT_SAMPLER_3D",
        "INT_SAMPLER_CUBE",
        "INT_VEC2",
        "INT_VEC3",
        "INT_VEC4",
        "INUSE_ATTRIBUTE_ERR",
        "INVALID_ACCESS_ERR",
        "INVALID_CHARACTER_ERR",
        "INVALID_ENUM",
        "INVALID_EXPRESSION_ERR",
        "INVALID_FRAMEBUFFER_OPERATION",
        "INVALID_INDEX",
        "INVALID_MODIFICATION_ERR",
        "INVALID_NODE_TYPE_ERR",
        "INVALID_OPERATION",
        "INVALID_STATE_ERR",
        "INVALID_VALUE",
        "INVERSE_DISTANCE",
        "INVERT",
        "IceCandidate",
        "IdleDeadline",
        "Image",
        "ImageBitmap",
        "ImageBitmapRenderingContext",
        "ImageCapture",
        "ImageData",
        "Infinity",
        "InputDeviceCapabilities",
        "InputDeviceInfo",
        "InputEvent",
        "InputMethodContext",
        "InstallTrigger",
        "InstallTriggerImpl",
        "Instance",
        "Int16Array",
        "Int32Array",
        "Int8Array",
        "Intent",
        "InternalError",
        "IntersectionObserver",
        "IntersectionObserverEntry",
        "Intl",
        "IsSearchProviderInstalled",
        "Iterator",
        "JSON",
        "KEEP",
        "KEYDOWN",
        "KEYFRAMES_RULE",
        "KEYFRAME_RULE",
        "KEYPRESS",
        "KEYUP",
        "KeyEvent",
        "Keyboard",
        "KeyboardEvent",
        "KeyboardLayoutMap",
        "KeyframeEffect",
        "LENGTHADJUST_SPACING",
        "LENGTHADJUST_SPACINGANDGLYPHS",
        "LENGTHADJUST_UNKNOWN",
        "LEQUAL",
        "LESS",
        "LINEAR",
        "LINEAR_DISTANCE",
        "LINEAR_MIPMAP_LINEAR",
        "LINEAR_MIPMAP_NEAREST",
        "LINES",
        "LINE_LOOP",
        "LINE_STRIP",
        "LINE_WIDTH",
        "LINK_STATUS",
        "LIVE",
        "LN10",
        "LN2",
        "LOADED",
        "LOADING",
        "LOG10E",
        "LOG2E",
        "LOWPASS",
        "LOWSHELF",
        "LOW_FLOAT",
        "LOW_INT",
        "LSException",
        "LSParserFilter",
        "LUMINANCE",
        "LUMINANCE_ALPHA",
        "LargestContentfulPaint",
        "LayoutShift",
        "LayoutShiftAttribution",
        "LinearAccelerationSensor",
        "LinkError",
        "ListFormat",
        "LocalMediaStream",
        "Locale",
        "Location",
        "Lock",
        "LockManager",
        "MAP_READ",
        "MAP_WRITE",
        "MAX",
        "MAX_3D_TEXTURE_SIZE",
        "MAX_ARRAY_TEXTURE_LAYERS",
        "MAX_CLIENT_WAIT_TIMEOUT_WEBGL",
        "MAX_COLOR_ATTACHMENTS",
        "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",
        "MAX_COMBINED_TEXTURE_IMAGE_UNITS",
        "MAX_COMBINED_UNIFORM_BLOCKS",
        "MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",
        "MAX_CUBE_MAP_TEXTURE_SIZE",
        "MAX_DRAW_BUFFERS",
        "MAX_ELEMENTS_INDICES",
        "MAX_ELEMENTS_VERTICES",
        "MAX_ELEMENT_INDEX",
        "MAX_FRAGMENT_INPUT_COMPONENTS",
        "MAX_FRAGMENT_UNIFORM_BLOCKS",
        "MAX_FRAGMENT_UNIFORM_COMPONENTS",
        "MAX_FRAGMENT_UNIFORM_VECTORS",
        "MAX_PROGRAM_TEXEL_OFFSET",
        "MAX_RENDERBUFFER_SIZE",
        "MAX_SAFE_INTEGER",
        "MAX_SAMPLES",
        "MAX_SERVER_WAIT_TIMEOUT",
        "MAX_TEXTURE_IMAGE_UNITS",
        "MAX_TEXTURE_LOD_BIAS",
        "MAX_TEXTURE_MAX_ANISOTROPY_EXT",
        "MAX_TEXTURE_SIZE",
        "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",
        "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",
        "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",
        "MAX_UNIFORM_BLOCK_SIZE",
        "MAX_UNIFORM_BUFFER_BINDINGS",
        "MAX_VALUE",
        "MAX_VARYING_COMPONENTS",
        "MAX_VARYING_VECTORS",
        "MAX_VERTEX_ATTRIBS",
        "MAX_VERTEX_OUTPUT_COMPONENTS",
        "MAX_VERTEX_TEXTURE_IMAGE_UNITS",
        "MAX_VERTEX_UNIFORM_BLOCKS",
        "MAX_VERTEX_UNIFORM_COMPONENTS",
        "MAX_VERTEX_UNIFORM_VECTORS",
        "MAX_VIEWPORT_DIMS",
        "MEDIA_ERR_ABORTED",
        "MEDIA_ERR_DECODE",
        "MEDIA_ERR_ENCRYPTED",
        "MEDIA_ERR_NETWORK",
        "MEDIA_ERR_SRC_NOT_SUPPORTED",
        "MEDIA_KEYERR_CLIENT",
        "MEDIA_KEYERR_DOMAIN",
        "MEDIA_KEYERR_HARDWARECHANGE",
        "MEDIA_KEYERR_OUTPUT",
        "MEDIA_KEYERR_SERVICE",
        "MEDIA_KEYERR_UNKNOWN",
        "MEDIA_RULE",
        "MEDIUM_FLOAT",
        "MEDIUM_INT",
        "META_MASK",
        "MIDIAccess",
        "MIDIConnectionEvent",
        "MIDIInput",
        "MIDIInputMap",
        "MIDIMessageEvent",
        "MIDIOutput",
        "MIDIOutputMap",
        "MIDIPort",
        "MIN",
        "MIN_PROGRAM_TEXEL_OFFSET",
        "MIN_SAFE_INTEGER",
        "MIN_VALUE",
        "MIRRORED_REPEAT",
        "MODE_ASYNCHRONOUS",
        "MODE_SYNCHRONOUS",
        "MODIFICATION",
        "MOUSEDOWN",
        "MOUSEDRAG",
        "MOUSEMOVE",
        "MOUSEOUT",
        "MOUSEOVER",
        "MOUSEUP",
        "MOZ_KEYFRAMES_RULE",
        "MOZ_KEYFRAME_RULE",
        "MOZ_SOURCE_CURSOR",
        "MOZ_SOURCE_ERASER",
        "MOZ_SOURCE_KEYBOARD",
        "MOZ_SOURCE_MOUSE",
        "MOZ_SOURCE_PEN",
        "MOZ_SOURCE_TOUCH",
        "MOZ_SOURCE_UNKNOWN",
        "MSGESTURE_FLAG_BEGIN",
        "MSGESTURE_FLAG_CANCEL",
        "MSGESTURE_FLAG_END",
        "MSGESTURE_FLAG_INERTIA",
        "MSGESTURE_FLAG_NONE",
        "MSPOINTER_TYPE_MOUSE",
        "MSPOINTER_TYPE_PEN",
        "MSPOINTER_TYPE_TOUCH",
        "MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE",
        "MS_ASYNC_CALLBACK_STATUS_CANCEL",
        "MS_ASYNC_CALLBACK_STATUS_CHOOSEANY",
        "MS_ASYNC_CALLBACK_STATUS_ERROR",
        "MS_ASYNC_CALLBACK_STATUS_JOIN",
        "MS_ASYNC_OP_STATUS_CANCELED",
        "MS_ASYNC_OP_STATUS_ERROR",
        "MS_ASYNC_OP_STATUS_SUCCESS",
        "MS_MANIPULATION_STATE_ACTIVE",
        "MS_MANIPULATION_STATE_CANCELLED",
        "MS_MANIPULATION_STATE_COMMITTED",
        "MS_MANIPULATION_STATE_DRAGGING",
        "MS_MANIPULATION_STATE_INERTIA",
        "MS_MANIPULATION_STATE_PRESELECT",
        "MS_MANIPULATION_STATE_SELECTING",
        "MS_MANIPULATION_STATE_STOPPED",
        "MS_MEDIA_ERR_ENCRYPTED",
        "MS_MEDIA_KEYERR_CLIENT",
        "MS_MEDIA_KEYERR_DOMAIN",
        "MS_MEDIA_KEYERR_HARDWARECHANGE",
        "MS_MEDIA_KEYERR_OUTPUT",
        "MS_MEDIA_KEYERR_SERVICE",
        "MS_MEDIA_KEYERR_UNKNOWN",
        "Map",
        "Math",
        "MathMLElement",
        "MediaCapabilities",
        "MediaCapabilitiesInfo",
        "MediaController",
        "MediaDeviceInfo",
        "MediaDevices",
        "MediaElementAudioSourceNode",
        "MediaEncryptedEvent",
        "MediaError",
        "MediaKeyError",
        "MediaKeyEvent",
        "MediaKeyMessageEvent",
        "MediaKeyNeededEvent",
        "MediaKeySession",
        "MediaKeyStatusMap",
        "MediaKeySystemAccess",
        "MediaKeys",
        "MediaList",
        "MediaMetadata",
        "MediaQueryList",
        "MediaQueryListEvent",
        "MediaRecorder",
        "MediaRecorderErrorEvent",
        "MediaSession",
        "MediaSettingsRange",
        "MediaSource",
        "MediaStream",
        "MediaStreamAudioDestinationNode",
        "MediaStreamAudioSourceNode",
        "MediaStreamEvent",
        "MediaStreamTrack",
        "MediaStreamTrackAudioSourceNode",
        "MediaStreamTrackEvent",
        "Memory",
        "MessageChannel",
        "MessageEvent",
        "MessagePort",
        "Methods",
        "MimeType",
        "MimeTypeArray",
        "Module",
        "MouseEvent",
        "MouseScrollEvent",
        "MozAnimation",
        "MozAnimationDelay",
        "MozAnimationDirection",
        "MozAnimationDuration",
        "MozAnimationFillMode",
        "MozAnimationIterationCount",
        "MozAnimationName",
        "MozAnimationPlayState",
        "MozAnimationTimingFunction",
        "MozAppearance",
        "MozBackfaceVisibility",
        "MozBinding",
        "MozBorderBottomColors",
        "MozBorderEnd",
        "MozBorderEndColor",
        "MozBorderEndStyle",
        "MozBorderEndWidth",
        "MozBorderImage",
        "MozBorderLeftColors",
        "MozBorderRightColors",
        "MozBorderStart",
        "MozBorderStartColor",
        "MozBorderStartStyle",
        "MozBorderStartWidth",
        "MozBorderTopColors",
        "MozBoxAlign",
        "MozBoxDirection",
        "MozBoxFlex",
        "MozBoxOrdinalGroup",
        "MozBoxOrient",
        "MozBoxPack",
        "MozBoxSizing",
        "MozCSSKeyframeRule",
        "MozCSSKeyframesRule",
        "MozColumnCount",
        "MozColumnFill",
        "MozColumnGap",
        "MozColumnRule",
        "MozColumnRuleColor",
        "MozColumnRuleStyle",
        "MozColumnRuleWidth",
        "MozColumnWidth",
        "MozColumns",
        "MozContactChangeEvent",
        "MozFloatEdge",
        "MozFontFeatureSettings",
        "MozFontLanguageOverride",
        "MozForceBrokenImageIcon",
        "MozHyphens",
        "MozImageRegion",
        "MozMarginEnd",
        "MozMarginStart",
        "MozMmsEvent",
        "MozMmsMessage",
        "MozMobileMessageThread",
        "MozOSXFontSmoothing",
        "MozOrient",
        "MozOsxFontSmoothing",
        "MozOutlineRadius",
        "MozOutlineRadiusBottomleft",
        "MozOutlineRadiusBottomright",
        "MozOutlineRadiusTopleft",
        "MozOutlineRadiusTopright",
        "MozPaddingEnd",
        "MozPaddingStart",
        "MozPerspective",
        "MozPerspectiveOrigin",
        "MozPowerManager",
        "MozSettingsEvent",
        "MozSmsEvent",
        "MozSmsMessage",
        "MozStackSizing",
        "MozTabSize",
        "MozTextAlignLast",
        "MozTextDecorationColor",
        "MozTextDecorationLine",
        "MozTextDecorationStyle",
        "MozTextSizeAdjust",
        "MozTransform",
        "MozTransformOrigin",
        "MozTransformStyle",
        "MozTransition",
        "MozTransitionDelay",
        "MozTransitionDuration",
        "MozTransitionProperty",
        "MozTransitionTimingFunction",
        "MozUserFocus",
        "MozUserInput",
        "MozUserModify",
        "MozUserSelect",
        "MozWindowDragging",
        "MozWindowShadow",
        "MutationEvent",
        "MutationObserver",
        "MutationRecord",
        "NAMESPACE_ERR",
        "NAMESPACE_RULE",
        "NEAREST",
        "NEAREST_MIPMAP_LINEAR",
        "NEAREST_MIPMAP_NEAREST",
        "NEGATIVE_INFINITY",
        "NETWORK_EMPTY",
        "NETWORK_ERR",
        "NETWORK_IDLE",
        "NETWORK_LOADED",
        "NETWORK_LOADING",
        "NETWORK_NO_SOURCE",
        "NEVER",
        "NEW",
        "NEXT",
        "NEXT_NO_DUPLICATE",
        "NICEST",
        "NODE_AFTER",
        "NODE_BEFORE",
        "NODE_BEFORE_AND_AFTER",
        "NODE_INSIDE",
        "NONE",
        "NON_TRANSIENT_ERR",
        "NOTATION_NODE",
        "NOTCH",
        "NOTEQUAL",
        "NOT_ALLOWED_ERR",
        "NOT_FOUND_ERR",
        "NOT_READABLE_ERR",
        "NOT_SUPPORTED_ERR",
        "NO_DATA_ALLOWED_ERR",
        "NO_ERR",
        "NO_ERROR",
        "NO_MODIFICATION_ALLOWED_ERR",
        "NUMBER_TYPE",
        "NUM_COMPRESSED_TEXTURE_FORMATS",
        "NaN",
        "NamedNodeMap",
        "NavigationPreloadManager",
        "Navigator",
        "NearbyLinks",
        "NetworkInformation",
        "Node",
        "NodeFilter",
        "NodeIterator",
        "NodeList",
        "Notation",
        "Notification",
        "NotifyPaintEvent",
        "Number",
        "NumberFormat",
        "OBJECT_TYPE",
        "OBSOLETE",
        "OK",
        "ONE",
        "ONE_MINUS_CONSTANT_ALPHA",
        "ONE_MINUS_CONSTANT_COLOR",
        "ONE_MINUS_DST_ALPHA",
        "ONE_MINUS_DST_COLOR",
        "ONE_MINUS_SRC_ALPHA",
        "ONE_MINUS_SRC_COLOR",
        "OPEN",
        "OPENED",
        "OPENING",
        "ORDERED_NODE_ITERATOR_TYPE",
        "ORDERED_NODE_SNAPSHOT_TYPE",
        "OTHER_ERROR",
        "OUT_OF_MEMORY",
        "Object",
        "OfflineAudioCompletionEvent",
        "OfflineAudioContext",
        "OfflineResourceList",
        "OffscreenCanvas",
        "OffscreenCanvasRenderingContext2D",
        "Option",
        "OrientationSensor",
        "OscillatorNode",
        "OverconstrainedError",
        "OverflowEvent",
        "PACK_ALIGNMENT",
        "PACK_ROW_LENGTH",
        "PACK_SKIP_PIXELS",
        "PACK_SKIP_ROWS",
        "PAGE_RULE",
        "PARSE_ERR",
        "PATHSEG_ARC_ABS",
        "PATHSEG_ARC_REL",
        "PATHSEG_CLOSEPATH",
        "PATHSEG_CURVETO_CUBIC_ABS",
        "PATHSEG_CURVETO_CUBIC_REL",
        "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS",
        "PATHSEG_CURVETO_CUBIC_SMOOTH_REL",
        "PATHSEG_CURVETO_QUADRATIC_ABS",
        "PATHSEG_CURVETO_QUADRATIC_REL",
        "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS",
        "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL",
        "PATHSEG_LINETO_ABS",
        "PATHSEG_LINETO_HORIZONTAL_ABS",
        "PATHSEG_LINETO_HORIZONTAL_REL",
        "PATHSEG_LINETO_REL",
        "PATHSEG_LINETO_VERTICAL_ABS",
        "PATHSEG_LINETO_VERTICAL_REL",
        "PATHSEG_MOVETO_ABS",
        "PATHSEG_MOVETO_REL",
        "PATHSEG_UNKNOWN",
        "PATH_EXISTS_ERR",
        "PEAKING",
        "PERMISSION_DENIED",
        "PERSISTENT",
        "PI",
        "PIXEL_PACK_BUFFER",
        "PIXEL_PACK_BUFFER_BINDING",
        "PIXEL_UNPACK_BUFFER",
        "PIXEL_UNPACK_BUFFER_BINDING",
        "PLAYING_STATE",
        "POINTS",
        "POLYGON_OFFSET_FACTOR",
        "POLYGON_OFFSET_FILL",
        "POLYGON_OFFSET_UNITS",
        "POSITION_UNAVAILABLE",
        "POSITIVE_INFINITY",
        "PREV",
        "PREV_NO_DUPLICATE",
        "PROCESSING_INSTRUCTION_NODE",
        "PageChangeEvent",
        "PageTransitionEvent",
        "PaintRequest",
        "PaintRequestList",
        "PannerNode",
        "PasswordCredential",
        "Path2D",
        "PaymentAddress",
        "PaymentInstruments",
        "PaymentManager",
        "PaymentMethodChangeEvent",
        "PaymentRequest",
        "PaymentRequestUpdateEvent",
        "PaymentResponse",
        "Performance",
        "PerformanceElementTiming",
        "PerformanceEntry",
        "PerformanceEventTiming",
        "PerformanceLongTaskTiming",
        "PerformanceMark",
        "PerformanceMeasure",
        "PerformanceNavigation",
        "PerformanceNavigationTiming",
        "PerformanceObserver",
        "PerformanceObserverEntryList",
        "PerformancePaintTiming",
        "PerformanceResourceTiming",
        "PerformanceServerTiming",
        "PerformanceTiming",
        "PeriodicSyncManager",
        "PeriodicWave",
        "PermissionStatus",
        "Permissions",
        "PhotoCapabilities",
        "PictureInPictureWindow",
        "Plugin",
        "PluginArray",
        "PluralRules",
        "PointerEvent",
        "PopStateEvent",
        "PopupBlockedEvent",
        "Presentation",
        "PresentationAvailability",
        "PresentationConnection",
        "PresentationConnectionAvailableEvent",
        "PresentationConnectionCloseEvent",
        "PresentationConnectionList",
        "PresentationReceiver",
        "PresentationRequest",
        "ProcessingInstruction",
        "ProgressEvent",
        "Promise",
        "PromiseRejectionEvent",
        "PropertyNodeList",
        "Proxy",
        "PublicKeyCredential",
        "PushManager",
        "PushSubscription",
        "PushSubscriptionOptions",
        "Q",
        "QUERY_RESOLVE",
        "QUERY_RESULT",
        "QUERY_RESULT_AVAILABLE",
        "QUOTA_ERR",
        "QUOTA_EXCEEDED_ERR",
        "QueryInterface",
        "R11F_G11F_B10F",
        "R16F",
        "R16I",
        "R16UI",
        "R32F",
        "R32I",
        "R32UI",
        "R8",
        "R8I",
        "R8UI",
        "R8_SNORM",
        "RASTERIZER_DISCARD",
        "READ",
        "READ_BUFFER",
        "READ_FRAMEBUFFER",
        "READ_FRAMEBUFFER_BINDING",
        "READ_ONLY",
        "READ_ONLY_ERR",
        "READ_WRITE",
        "RED",
        "RED_BITS",
        "RED_INTEGER",
        "REMOVAL",
        "RENDERBUFFER",
        "RENDERBUFFER_ALPHA_SIZE",
        "RENDERBUFFER_BINDING",
        "RENDERBUFFER_BLUE_SIZE",
        "RENDERBUFFER_DEPTH_SIZE",
        "RENDERBUFFER_GREEN_SIZE",
        "RENDERBUFFER_HEIGHT",
        "RENDERBUFFER_INTERNAL_FORMAT",
        "RENDERBUFFER_RED_SIZE",
        "RENDERBUFFER_SAMPLES",
        "RENDERBUFFER_STENCIL_SIZE",
        "RENDERBUFFER_WIDTH",
        "RENDERER",
        "RENDERING_INTENT_ABSOLUTE_COLORIMETRIC",
        "RENDERING_INTENT_AUTO",
        "RENDERING_INTENT_PERCEPTUAL",
        "RENDERING_INTENT_RELATIVE_COLORIMETRIC",
        "RENDERING_INTENT_SATURATION",
        "RENDERING_INTENT_UNKNOWN",
        "RENDER_ATTACHMENT",
        "REPEAT",
        "REPLACE",
        "RG",
        "RG16F",
        "RG16I",
        "RG16UI",
        "RG32F",
        "RG32I",
        "RG32UI",
        "RG8",
        "RG8I",
        "RG8UI",
        "RG8_SNORM",
        "RGB",
        "RGB10_A2",
        "RGB10_A2UI",
        "RGB16F",
        "RGB16I",
        "RGB16UI",
        "RGB32F",
        "RGB32I",
        "RGB32UI",
        "RGB565",
        "RGB5_A1",
        "RGB8",
        "RGB8I",
        "RGB8UI",
        "RGB8_SNORM",
        "RGB9_E5",
        "RGBA",
        "RGBA16F",
        "RGBA16I",
        "RGBA16UI",
        "RGBA32F",
        "RGBA32I",
        "RGBA32UI",
        "RGBA4",
        "RGBA8",
        "RGBA8I",
        "RGBA8UI",
        "RGBA8_SNORM",
        "RGBA_INTEGER",
        "RGBColor",
        "RGB_INTEGER",
        "RG_INTEGER",
        "ROTATION_CLOCKWISE",
        "ROTATION_COUNTERCLOCKWISE",
        "RTCCertificate",
        "RTCDTMFSender",
        "RTCDTMFToneChangeEvent",
        "RTCDataChannel",
        "RTCDataChannelEvent",
        "RTCDtlsTransport",
        "RTCError",
        "RTCErrorEvent",
        "RTCIceCandidate",
        "RTCIceTransport",
        "RTCPeerConnection",
        "RTCPeerConnectionIceErrorEvent",
        "RTCPeerConnectionIceEvent",
        "RTCRtpReceiver",
        "RTCRtpSender",
        "RTCRtpTransceiver",
        "RTCSctpTransport",
        "RTCSessionDescription",
        "RTCStatsReport",
        "RTCTrackEvent",
        "RadioNodeList",
        "Range",
        "RangeError",
        "RangeException",
        "ReadableStream",
        "ReadableStreamDefaultReader",
        "RecordErrorEvent",
        "Rect",
        "ReferenceError",
        "Reflect",
        "RegExp",
        "RelativeOrientationSensor",
        "RelativeTimeFormat",
        "RemotePlayback",
        "Report",
        "ReportBody",
        "ReportingObserver",
        "Request",
        "ResizeObserver",
        "ResizeObserverEntry",
        "ResizeObserverSize",
        "Response",
        "RuntimeError",
        "SAMPLER_2D",
        "SAMPLER_2D_ARRAY",
        "SAMPLER_2D_ARRAY_SHADOW",
        "SAMPLER_2D_SHADOW",
        "SAMPLER_3D",
        "SAMPLER_BINDING",
        "SAMPLER_CUBE",
        "SAMPLER_CUBE_SHADOW",
        "SAMPLES",
        "SAMPLE_ALPHA_TO_COVERAGE",
        "SAMPLE_BUFFERS",
        "SAMPLE_COVERAGE",
        "SAMPLE_COVERAGE_INVERT",
        "SAMPLE_COVERAGE_VALUE",
        "SAWTOOTH",
        "SCHEDULED_STATE",
        "SCISSOR_BOX",
        "SCISSOR_TEST",
        "SCROLL_PAGE_DOWN",
        "SCROLL_PAGE_UP",
        "SDP_ANSWER",
        "SDP_OFFER",
        "SDP_PRANSWER",
        "SECURITY_ERR",
        "SELECT",
        "SEPARATE_ATTRIBS",
        "SERIALIZE_ERR",
        "SEVERITY_ERROR",
        "SEVERITY_FATAL_ERROR",
        "SEVERITY_WARNING",
        "SHADER_COMPILER",
        "SHADER_TYPE",
        "SHADING_LANGUAGE_VERSION",
        "SHIFT_MASK",
        "SHORT",
        "SHOWING",
        "SHOW_ALL",
        "SHOW_ATTRIBUTE",
        "SHOW_CDATA_SECTION",
        "SHOW_COMMENT",
        "SHOW_DOCUMENT",
        "SHOW_DOCUMENT_FRAGMENT",
        "SHOW_DOCUMENT_TYPE",
        "SHOW_ELEMENT",
        "SHOW_ENTITY",
        "SHOW_ENTITY_REFERENCE",
        "SHOW_NOTATION",
        "SHOW_PROCESSING_INSTRUCTION",
        "SHOW_TEXT",
        "SIGNALED",
        "SIGNED_NORMALIZED",
        "SINE",
        "SOUNDFIELD",
        "SQLException",
        "SQRT1_2",
        "SQRT2",
        "SQUARE",
        "SRC_ALPHA",
        "SRC_ALPHA_SATURATE",
        "SRC_COLOR",
        "SRGB",
        "SRGB8",
        "SRGB8_ALPHA8",
        "START_TO_END",
        "START_TO_START",
        "STATIC_COPY",
        "STATIC_DRAW",
        "STATIC_READ",
        "STENCIL",
        "STENCIL_ATTACHMENT",
        "STENCIL_BACK_FAIL",
        "STENCIL_BACK_FUNC",
        "STENCIL_BACK_PASS_DEPTH_FAIL",
        "STENCIL_BACK_PASS_DEPTH_PASS",
        "STENCIL_BACK_REF",
        "STENCIL_BACK_VALUE_MASK",
        "STENCIL_BACK_WRITEMASK",
        "STENCIL_BITS",
        "STENCIL_BUFFER_BIT",
        "STENCIL_CLEAR_VALUE",
        "STENCIL_FAIL",
        "STENCIL_FUNC",
        "STENCIL_INDEX",
        "STENCIL_INDEX8",
        "STENCIL_PASS_DEPTH_FAIL",
        "STENCIL_PASS_DEPTH_PASS",
        "STENCIL_REF",
        "STENCIL_TEST",
        "STENCIL_VALUE_MASK",
        "STENCIL_WRITEMASK",
        "STORAGE",
        "STORAGE_BINDING",
        "STREAM_COPY",
        "STREAM_DRAW",
        "STREAM_READ",
        "STRING_TYPE",
        "STYLE_RULE",
        "SUBPIXEL_BITS",
        "SUPPORTS_RULE",
        "SVGAElement",
        "SVGAltGlyphDefElement",
        "SVGAltGlyphElement",
        "SVGAltGlyphItemElement",
        "SVGAngle",
        "SVGAnimateColorElement",
        "SVGAnimateElement",
        "SVGAnimateMotionElement",
        "SVGAnimateTransformElement",
        "SVGAnimatedAngle",
        "SVGAnimatedBoolean",
        "SVGAnimatedEnumeration",
        "SVGAnimatedInteger",
        "SVGAnimatedLength",
        "SVGAnimatedLengthList",
        "SVGAnimatedNumber",
        "SVGAnimatedNumberList",
        "SVGAnimatedPreserveAspectRatio",
        "SVGAnimatedRect",
        "SVGAnimatedString",
        "SVGAnimatedTransformList",
        "SVGAnimationElement",
        "SVGCircleElement",
        "SVGClipPathElement",
        "SVGColor",
        "SVGComponentTransferFunctionElement",
        "SVGCursorElement",
        "SVGDefsElement",
        "SVGDescElement",
        "SVGDiscardElement",
        "SVGDocument",
        "SVGElement",
        "SVGElementInstance",
        "SVGElementInstanceList",
        "SVGEllipseElement",
        "SVGException",
        "SVGFEBlendElement",
        "SVGFEColorMatrixElement",
        "SVGFEComponentTransferElement",
        "SVGFECompositeElement",
        "SVGFEConvolveMatrixElement",
        "SVGFEDiffuseLightingElement",
        "SVGFEDisplacementMapElement",
        "SVGFEDistantLightElement",
        "SVGFEDropShadowElement",
        "SVGFEFloodElement",
        "SVGFEFuncAElement",
        "SVGFEFuncBElement",
        "SVGFEFuncGElement",
        "SVGFEFuncRElement",
        "SVGFEGaussianBlurElement",
        "SVGFEImageElement",
        "SVGFEMergeElement",
        "SVGFEMergeNodeElement",
        "SVGFEMorphologyElement",
        "SVGFEOffsetElement",
        "SVGFEPointLightElement",
        "SVGFESpecularLightingElement",
        "SVGFESpotLightElement",
        "SVGFETileElement",
        "SVGFETurbulenceElement",
        "SVGFilterElement",
        "SVGFontElement",
        "SVGFontFaceElement",
        "SVGFontFaceFormatElement",
        "SVGFontFaceNameElement",
        "SVGFontFaceSrcElement",
        "SVGFontFaceUriElement",
        "SVGForeignObjectElement",
        "SVGGElement",
        "SVGGeometryElement",
        "SVGGlyphElement",
        "SVGGlyphRefElement",
        "SVGGradientElement",
        "SVGGraphicsElement",
        "SVGHKernElement",
        "SVGImageElement",
        "SVGLength",
        "SVGLengthList",
        "SVGLineElement",
        "SVGLinearGradientElement",
        "SVGMPathElement",
        "SVGMarkerElement",
        "SVGMaskElement",
        "SVGMatrix",
        "SVGMetadataElement",
        "SVGMissingGlyphElement",
        "SVGNumber",
        "SVGNumberList",
        "SVGPaint",
        "SVGPathElement",
        "SVGPathSeg",
        "SVGPathSegArcAbs",
        "SVGPathSegArcRel",
        "SVGPathSegClosePath",
        "SVGPathSegCurvetoCubicAbs",
        "SVGPathSegCurvetoCubicRel",
        "SVGPathSegCurvetoCubicSmoothAbs",
        "SVGPathSegCurvetoCubicSmoothRel",
        "SVGPathSegCurvetoQuadraticAbs",
        "SVGPathSegCurvetoQuadraticRel",
        "SVGPathSegCurvetoQuadraticSmoothAbs",
        "SVGPathSegCurvetoQuadraticSmoothRel",
        "SVGPathSegLinetoAbs",
        "SVGPathSegLinetoHorizontalAbs",
        "SVGPathSegLinetoHorizontalRel",
        "SVGPathSegLinetoRel",
        "SVGPathSegLinetoVerticalAbs",
        "SVGPathSegLinetoVerticalRel",
        "SVGPathSegList",
        "SVGPathSegMovetoAbs",
        "SVGPathSegMovetoRel",
        "SVGPatternElement",
        "SVGPoint",
        "SVGPointList",
        "SVGPolygonElement",
        "SVGPolylineElement",
        "SVGPreserveAspectRatio",
        "SVGRadialGradientElement",
        "SVGRect",
        "SVGRectElement",
        "SVGRenderingIntent",
        "SVGSVGElement",
        "SVGScriptElement",
        "SVGSetElement",
        "SVGStopElement",
        "SVGStringList",
        "SVGStyleElement",
        "SVGSwitchElement",
        "SVGSymbolElement",
        "SVGTRefElement",
        "SVGTSpanElement",
        "SVGTextContentElement",
        "SVGTextElement",
        "SVGTextPathElement",
        "SVGTextPositioningElement",
        "SVGTitleElement",
        "SVGTransform",
        "SVGTransformList",
        "SVGUnitTypes",
        "SVGUseElement",
        "SVGVKernElement",
        "SVGViewElement",
        "SVGViewSpec",
        "SVGZoomAndPan",
        "SVGZoomEvent",
        "SVG_ANGLETYPE_DEG",
        "SVG_ANGLETYPE_GRAD",
        "SVG_ANGLETYPE_RAD",
        "SVG_ANGLETYPE_UNKNOWN",
        "SVG_ANGLETYPE_UNSPECIFIED",
        "SVG_CHANNEL_A",
        "SVG_CHANNEL_B",
        "SVG_CHANNEL_G",
        "SVG_CHANNEL_R",
        "SVG_CHANNEL_UNKNOWN",
        "SVG_COLORTYPE_CURRENTCOLOR",
        "SVG_COLORTYPE_RGBCOLOR",
        "SVG_COLORTYPE_RGBCOLOR_ICCCOLOR",
        "SVG_COLORTYPE_UNKNOWN",
        "SVG_EDGEMODE_DUPLICATE",
        "SVG_EDGEMODE_NONE",
        "SVG_EDGEMODE_UNKNOWN",
        "SVG_EDGEMODE_WRAP",
        "SVG_FEBLEND_MODE_COLOR",
        "SVG_FEBLEND_MODE_COLOR_BURN",
        "SVG_FEBLEND_MODE_COLOR_DODGE",
        "SVG_FEBLEND_MODE_DARKEN",
        "SVG_FEBLEND_MODE_DIFFERENCE",
        "SVG_FEBLEND_MODE_EXCLUSION",
        "SVG_FEBLEND_MODE_HARD_LIGHT",
        "SVG_FEBLEND_MODE_HUE",
        "SVG_FEBLEND_MODE_LIGHTEN",
        "SVG_FEBLEND_MODE_LUMINOSITY",
        "SVG_FEBLEND_MODE_MULTIPLY",
        "SVG_FEBLEND_MODE_NORMAL",
        "SVG_FEBLEND_MODE_OVERLAY",
        "SVG_FEBLEND_MODE_SATURATION",
        "SVG_FEBLEND_MODE_SCREEN",
        "SVG_FEBLEND_MODE_SOFT_LIGHT",
        "SVG_FEBLEND_MODE_UNKNOWN",
        "SVG_FECOLORMATRIX_TYPE_HUEROTATE",
        "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA",
        "SVG_FECOLORMATRIX_TYPE_MATRIX",
        "SVG_FECOLORMATRIX_TYPE_SATURATE",
        "SVG_FECOLORMATRIX_TYPE_UNKNOWN",
        "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE",
        "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA",
        "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY",
        "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR",
        "SVG_FECOMPONENTTRANSFER_TYPE_TABLE",
        "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN",
        "SVG_FECOMPOSITE_OPERATOR_ARITHMETIC",
        "SVG_FECOMPOSITE_OPERATOR_ATOP",
        "SVG_FECOMPOSITE_OPERATOR_IN",
        "SVG_FECOMPOSITE_OPERATOR_OUT",
        "SVG_FECOMPOSITE_OPERATOR_OVER",
        "SVG_FECOMPOSITE_OPERATOR_UNKNOWN",
        "SVG_FECOMPOSITE_OPERATOR_XOR",
        "SVG_INVALID_VALUE_ERR",
        "SVG_LENGTHTYPE_CM",
        "SVG_LENGTHTYPE_EMS",
        "SVG_LENGTHTYPE_EXS",
        "SVG_LENGTHTYPE_IN",
        "SVG_LENGTHTYPE_MM",
        "SVG_LENGTHTYPE_NUMBER",
        "SVG_LENGTHTYPE_PC",
        "SVG_LENGTHTYPE_PERCENTAGE",
        "SVG_LENGTHTYPE_PT",
        "SVG_LENGTHTYPE_PX",
        "SVG_LENGTHTYPE_UNKNOWN",
        "SVG_MARKERUNITS_STROKEWIDTH",
        "SVG_MARKERUNITS_UNKNOWN",
        "SVG_MARKERUNITS_USERSPACEONUSE",
        "SVG_MARKER_ORIENT_ANGLE",
        "SVG_MARKER_ORIENT_AUTO",
        "SVG_MARKER_ORIENT_UNKNOWN",
        "SVG_MASKTYPE_ALPHA",
        "SVG_MASKTYPE_LUMINANCE",
        "SVG_MATRIX_NOT_INVERTABLE",
        "SVG_MEETORSLICE_MEET",
        "SVG_MEETORSLICE_SLICE",
        "SVG_MEETORSLICE_UNKNOWN",
        "SVG_MORPHOLOGY_OPERATOR_DILATE",
        "SVG_MORPHOLOGY_OPERATOR_ERODE",
        "SVG_MORPHOLOGY_OPERATOR_UNKNOWN",
        "SVG_PAINTTYPE_CURRENTCOLOR",
        "SVG_PAINTTYPE_NONE",
        "SVG_PAINTTYPE_RGBCOLOR",
        "SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR",
        "SVG_PAINTTYPE_UNKNOWN",
        "SVG_PAINTTYPE_URI",
        "SVG_PAINTTYPE_URI_CURRENTCOLOR",
        "SVG_PAINTTYPE_URI_NONE",
        "SVG_PAINTTYPE_URI_RGBCOLOR",
        "SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR",
        "SVG_PRESERVEASPECTRATIO_NONE",
        "SVG_PRESERVEASPECTRATIO_UNKNOWN",
        "SVG_PRESERVEASPECTRATIO_XMAXYMAX",
        "SVG_PRESERVEASPECTRATIO_XMAXYMID",
        "SVG_PRESERVEASPECTRATIO_XMAXYMIN",
        "SVG_PRESERVEASPECTRATIO_XMIDYMAX",
        "SVG_PRESERVEASPECTRATIO_XMIDYMID",
        "SVG_PRESERVEASPECTRATIO_XMIDYMIN",
        "SVG_PRESERVEASPECTRATIO_XMINYMAX",
        "SVG_PRESERVEASPECTRATIO_XMINYMID",
        "SVG_PRESERVEASPECTRATIO_XMINYMIN",
        "SVG_SPREADMETHOD_PAD",
        "SVG_SPREADMETHOD_REFLECT",
        "SVG_SPREADMETHOD_REPEAT",
        "SVG_SPREADMETHOD_UNKNOWN",
        "SVG_STITCHTYPE_NOSTITCH",
        "SVG_STITCHTYPE_STITCH",
        "SVG_STITCHTYPE_UNKNOWN",
        "SVG_TRANSFORM_MATRIX",
        "SVG_TRANSFORM_ROTATE",
        "SVG_TRANSFORM_SCALE",
        "SVG_TRANSFORM_SKEWX",
        "SVG_TRANSFORM_SKEWY",
        "SVG_TRANSFORM_TRANSLATE",
        "SVG_TRANSFORM_UNKNOWN",
        "SVG_TURBULENCE_TYPE_FRACTALNOISE",
        "SVG_TURBULENCE_TYPE_TURBULENCE",
        "SVG_TURBULENCE_TYPE_UNKNOWN",
        "SVG_UNIT_TYPE_OBJECTBOUNDINGBOX",
        "SVG_UNIT_TYPE_UNKNOWN",
        "SVG_UNIT_TYPE_USERSPACEONUSE",
        "SVG_WRONG_TYPE_ERR",
        "SVG_ZOOMANDPAN_DISABLE",
        "SVG_ZOOMANDPAN_MAGNIFY",
        "SVG_ZOOMANDPAN_UNKNOWN",
        "SYNC_CONDITION",
        "SYNC_FENCE",
        "SYNC_FLAGS",
        "SYNC_FLUSH_COMMANDS_BIT",
        "SYNC_GPU_COMMANDS_COMPLETE",
        "SYNC_STATUS",
        "SYNTAX_ERR",
        "SavedPages",
        "Screen",
        "ScreenOrientation",
        "Script",
        "ScriptProcessorNode",
        "ScrollAreaEvent",
        "SecurityPolicyViolationEvent",
        "Selection",
        "Sensor",
        "SensorErrorEvent",
        "ServiceWorker",
        "ServiceWorkerContainer",
        "ServiceWorkerRegistration",
        "SessionDescription",
        "Set",
        "ShadowRoot",
        "SharedArrayBuffer",
        "SharedWorker",
        "SimpleGestureEvent",
        "SourceBuffer",
        "SourceBufferList",
        "SpeechSynthesis",
        "SpeechSynthesisErrorEvent",
        "SpeechSynthesisEvent",
        "SpeechSynthesisUtterance",
        "SpeechSynthesisVoice",
        "StaticRange",
        "StereoPannerNode",
        "StopIteration",
        "Storage",
        "StorageEvent",
        "StorageManager",
        "String",
        "StructType",
        "StylePropertyMap",
        "StylePropertyMapReadOnly",
        "StyleSheet",
        "StyleSheetList",
        "SubmitEvent",
        "SubtleCrypto",
        "Symbol",
        "SyncManager",
        "SyntaxError",
        "TEMPORARY",
        "TEXTPATH_METHODTYPE_ALIGN",
        "TEXTPATH_METHODTYPE_STRETCH",
        "TEXTPATH_METHODTYPE_UNKNOWN",
        "TEXTPATH_SPACINGTYPE_AUTO",
        "TEXTPATH_SPACINGTYPE_EXACT",
        "TEXTPATH_SPACINGTYPE_UNKNOWN",
        "TEXTURE",
        "TEXTURE0",
        "TEXTURE1",
        "TEXTURE10",
        "TEXTURE11",
        "TEXTURE12",
        "TEXTURE13",
        "TEXTURE14",
        "TEXTURE15",
        "TEXTURE16",
        "TEXTURE17",
        "TEXTURE18",
        "TEXTURE19",
        "TEXTURE2",
        "TEXTURE20",
        "TEXTURE21",
        "TEXTURE22",
        "TEXTURE23",
        "TEXTURE24",
        "TEXTURE25",
        "TEXTURE26",
        "TEXTURE27",
        "TEXTURE28",
        "TEXTURE29",
        "TEXTURE3",
        "TEXTURE30",
        "TEXTURE31",
        "TEXTURE4",
        "TEXTURE5",
        "TEXTURE6",
        "TEXTURE7",
        "TEXTURE8",
        "TEXTURE9",
        "TEXTURE_2D",
        "TEXTURE_2D_ARRAY",
        "TEXTURE_3D",
        "TEXTURE_BASE_LEVEL",
        "TEXTURE_BINDING",
        "TEXTURE_BINDING_2D",
        "TEXTURE_BINDING_2D_ARRAY",
        "TEXTURE_BINDING_3D",
        "TEXTURE_BINDING_CUBE_MAP",
        "TEXTURE_COMPARE_FUNC",
        "TEXTURE_COMPARE_MODE",
        "TEXTURE_CUBE_MAP",
        "TEXTURE_CUBE_MAP_NEGATIVE_X",
        "TEXTURE_CUBE_MAP_NEGATIVE_Y",
        "TEXTURE_CUBE_MAP_NEGATIVE_Z",
        "TEXTURE_CUBE_MAP_POSITIVE_X",
        "TEXTURE_CUBE_MAP_POSITIVE_Y",
        "TEXTURE_CUBE_MAP_POSITIVE_Z",
        "TEXTURE_IMMUTABLE_FORMAT",
        "TEXTURE_IMMUTABLE_LEVELS",
        "TEXTURE_MAG_FILTER",
        "TEXTURE_MAX_ANISOTROPY_EXT",
        "TEXTURE_MAX_LEVEL",
        "TEXTURE_MAX_LOD",
        "TEXTURE_MIN_FILTER",
        "TEXTURE_MIN_LOD",
        "TEXTURE_WRAP_R",
        "TEXTURE_WRAP_S",
        "TEXTURE_WRAP_T",
        "TEXT_NODE",
        "TIMEOUT",
        "TIMEOUT_ERR",
        "TIMEOUT_EXPIRED",
        "TIMEOUT_IGNORED",
        "TOO_LARGE_ERR",
        "TRANSACTION_INACTIVE_ERR",
        "TRANSFORM_FEEDBACK",
        "TRANSFORM_FEEDBACK_ACTIVE",
        "TRANSFORM_FEEDBACK_BINDING",
        "TRANSFORM_FEEDBACK_BUFFER",
        "TRANSFORM_FEEDBACK_BUFFER_BINDING",
        "TRANSFORM_FEEDBACK_BUFFER_MODE",
        "TRANSFORM_FEEDBACK_BUFFER_SIZE",
        "TRANSFORM_FEEDBACK_BUFFER_START",
        "TRANSFORM_FEEDBACK_PAUSED",
        "TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",
        "TRANSFORM_FEEDBACK_VARYINGS",
        "TRIANGLE",
        "TRIANGLES",
        "TRIANGLE_FAN",
        "TRIANGLE_STRIP",
        "TYPE_BACK_FORWARD",
        "TYPE_ERR",
        "TYPE_MISMATCH_ERR",
        "TYPE_NAVIGATE",
        "TYPE_RELOAD",
        "TYPE_RESERVED",
        "Table",
        "TaskAttributionTiming",
        "Text",
        "TextDecoder",
        "TextDecoderStream",
        "TextEncoder",
        "TextEncoderStream",
        "TextEvent",
        "TextMetrics",
        "TextTrack",
        "TextTrackCue",
        "TextTrackCueList",
        "TextTrackList",
        "TimeEvent",
        "TimeRanges",
        "Touch",
        "TouchEvent",
        "TouchList",
        "TrackEvent",
        "TransformStream",
        "TransitionEvent",
        "TreeWalker",
        "TrustedHTML",
        "TrustedScript",
        "TrustedScriptURL",
        "TrustedTypePolicy",
        "TrustedTypePolicyFactory",
        "TypeError",
        "TypedObject",
        "U2F",
        "UIEvent",
        "UNCACHED",
        "UNIFORM",
        "UNIFORM_ARRAY_STRIDE",
        "UNIFORM_BLOCK_ACTIVE_UNIFORMS",
        "UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",
        "UNIFORM_BLOCK_BINDING",
        "UNIFORM_BLOCK_DATA_SIZE",
        "UNIFORM_BLOCK_INDEX",
        "UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",
        "UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",
        "UNIFORM_BUFFER",
        "UNIFORM_BUFFER_BINDING",
        "UNIFORM_BUFFER_OFFSET_ALIGNMENT",
        "UNIFORM_BUFFER_SIZE",
        "UNIFORM_BUFFER_START",
        "UNIFORM_IS_ROW_MAJOR",
        "UNIFORM_MATRIX_STRIDE",
        "UNIFORM_OFFSET",
        "UNIFORM_SIZE",
        "UNIFORM_TYPE",
        "UNKNOWN_ERR",
        "UNKNOWN_RULE",
        "UNMASKED_RENDERER_WEBGL",
        "UNMASKED_VENDOR_WEBGL",
        "UNORDERED_NODE_ITERATOR_TYPE",
        "UNORDERED_NODE_SNAPSHOT_TYPE",
        "UNPACK_ALIGNMENT",
        "UNPACK_COLORSPACE_CONVERSION_WEBGL",
        "UNPACK_FLIP_Y_WEBGL",
        "UNPACK_IMAGE_HEIGHT",
        "UNPACK_PREMULTIPLY_ALPHA_WEBGL",
        "UNPACK_ROW_LENGTH",
        "UNPACK_SKIP_IMAGES",
        "UNPACK_SKIP_PIXELS",
        "UNPACK_SKIP_ROWS",
        "UNSCHEDULED_STATE",
        "UNSENT",
        "UNSIGNALED",
        "UNSIGNED_BYTE",
        "UNSIGNED_INT",
        "UNSIGNED_INT_10F_11F_11F_REV",
        "UNSIGNED_INT_24_8",
        "UNSIGNED_INT_2_10_10_10_REV",
        "UNSIGNED_INT_5_9_9_9_REV",
        "UNSIGNED_INT_SAMPLER_2D",
        "UNSIGNED_INT_SAMPLER_2D_ARRAY",
        "UNSIGNED_INT_SAMPLER_3D",
        "UNSIGNED_INT_SAMPLER_CUBE",
        "UNSIGNED_INT_VEC2",
        "UNSIGNED_INT_VEC3",
        "UNSIGNED_INT_VEC4",
        "UNSIGNED_NORMALIZED",
        "UNSIGNED_SHORT",
        "UNSIGNED_SHORT_4_4_4_4",
        "UNSIGNED_SHORT_5_5_5_1",
        "UNSIGNED_SHORT_5_6_5",
        "UNSPECIFIED_EVENT_TYPE_ERR",
        "UPDATEREADY",
        "URIError",
        "URL",
        "URLSearchParams",
        "URLUnencoded",
        "URL_MISMATCH_ERR",
        "USB",
        "USBAlternateInterface",
        "USBConfiguration",
        "USBConnectionEvent",
        "USBDevice",
        "USBEndpoint",
        "USBInTransferResult",
        "USBInterface",
        "USBIsochronousInTransferPacket",
        "USBIsochronousInTransferResult",
        "USBIsochronousOutTransferPacket",
        "USBIsochronousOutTransferResult",
        "USBOutTransferResult",
        "UTC",
        "Uint16Array",
        "Uint32Array",
        "Uint8Array",
        "Uint8ClampedArray",
        "UserActivation",
        "UserMessageHandler",
        "UserMessageHandlersNamespace",
        "UserProximityEvent",
        "VALIDATE_STATUS",
        "VALIDATION_ERR",
        "VARIABLES_RULE",
        "VENDOR",
        "VERSION",
        "VERSION_CHANGE",
        "VERSION_ERR",
        "VERTEX",
        "VERTEX_ARRAY_BINDING",
        "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",
        "VERTEX_ATTRIB_ARRAY_DIVISOR",
        "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE",
        "VERTEX_ATTRIB_ARRAY_ENABLED",
        "VERTEX_ATTRIB_ARRAY_INTEGER",
        "VERTEX_ATTRIB_ARRAY_NORMALIZED",
        "VERTEX_ATTRIB_ARRAY_POINTER",
        "VERTEX_ATTRIB_ARRAY_SIZE",
        "VERTEX_ATTRIB_ARRAY_STRIDE",
        "VERTEX_ATTRIB_ARRAY_TYPE",
        "VERTEX_SHADER",
        "VERTICAL",
        "VERTICAL_AXIS",
        "VER_ERR",
        "VIEWPORT",
        "VIEWPORT_RULE",
        "VRDisplay",
        "VRDisplayCapabilities",
        "VRDisplayEvent",
        "VREyeParameters",
        "VRFieldOfView",
        "VRFrameData",
        "VRPose",
        "VRStageParameters",
        "VTTCue",
        "VTTRegion",
        "ValidityState",
        "VideoPlaybackQuality",
        "VideoStreamTrack",
        "VisualViewport",
        "WAIT_FAILED",
        "WEBKIT_FILTER_RULE",
        "WEBKIT_KEYFRAMES_RULE",
        "WEBKIT_KEYFRAME_RULE",
        "WEBKIT_REGION_RULE",
        "WRITE",
        "WRONG_DOCUMENT_ERR",
        "WakeLock",
        "WakeLockSentinel",
        "WasmAnyRef",
        "WaveShaperNode",
        "WeakMap",
        "WeakRef",
        "WeakSet",
        "WebAssembly",
        "WebGL2RenderingContext",
        "WebGLActiveInfo",
        "WebGLBuffer",
        "WebGLContextEvent",
        "WebGLFramebuffer",
        "WebGLProgram",
        "WebGLQuery",
        "WebGLRenderbuffer",
        "WebGLRenderingContext",
        "WebGLSampler",
        "WebGLShader",
        "WebGLShaderPrecisionFormat",
        "WebGLSync",
        "WebGLTexture",
        "WebGLTransformFeedback",
        "WebGLUniformLocation",
        "WebGLVertexArray",
        "WebGLVertexArrayObject",
        "WebKitAnimationEvent",
        "WebKitBlobBuilder",
        "WebKitCSSFilterRule",
        "WebKitCSSFilterValue",
        "WebKitCSSKeyframeRule",
        "WebKitCSSKeyframesRule",
        "WebKitCSSMatrix",
        "WebKitCSSRegionRule",
        "WebKitCSSTransformValue",
        "WebKitDataCue",
        "WebKitGamepad",
        "WebKitMediaKeyError",
        "WebKitMediaKeyMessageEvent",
        "WebKitMediaKeySession",
        "WebKitMediaKeys",
        "WebKitMediaSource",
        "WebKitMutationObserver",
        "WebKitNamespace",
        "WebKitPlaybackTargetAvailabilityEvent",
        "WebKitPoint",
        "WebKitShadowRoot",
        "WebKitSourceBuffer",
        "WebKitSourceBufferList",
        "WebKitTransitionEvent",
        "WebSocket",
        "WebkitAlignContent",
        "WebkitAlignItems",
        "WebkitAlignSelf",
        "WebkitAnimation",
        "WebkitAnimationDelay",
        "WebkitAnimationDirection",
        "WebkitAnimationDuration",
        "WebkitAnimationFillMode",
        "WebkitAnimationIterationCount",
        "WebkitAnimationName",
        "WebkitAnimationPlayState",
        "WebkitAnimationTimingFunction",
        "WebkitAppearance",
        "WebkitBackfaceVisibility",
        "WebkitBackgroundClip",
        "WebkitBackgroundOrigin",
        "WebkitBackgroundSize",
        "WebkitBorderBottomLeftRadius",
        "WebkitBorderBottomRightRadius",
        "WebkitBorderImage",
        "WebkitBorderRadius",
        "WebkitBorderTopLeftRadius",
        "WebkitBorderTopRightRadius",
        "WebkitBoxAlign",
        "WebkitBoxDirection",
        "WebkitBoxFlex",
        "WebkitBoxOrdinalGroup",
        "WebkitBoxOrient",
        "WebkitBoxPack",
        "WebkitBoxShadow",
        "WebkitBoxSizing",
        "WebkitFilter",
        "WebkitFlex",
        "WebkitFlexBasis",
        "WebkitFlexDirection",
        "WebkitFlexFlow",
        "WebkitFlexGrow",
        "WebkitFlexShrink",
        "WebkitFlexWrap",
        "WebkitJustifyContent",
        "WebkitLineClamp",
        "WebkitMask",
        "WebkitMaskClip",
        "WebkitMaskComposite",
        "WebkitMaskImage",
        "WebkitMaskOrigin",
        "WebkitMaskPosition",
        "WebkitMaskPositionX",
        "WebkitMaskPositionY",
        "WebkitMaskRepeat",
        "WebkitMaskSize",
        "WebkitOrder",
        "WebkitPerspective",
        "WebkitPerspectiveOrigin",
        "WebkitTextFillColor",
        "WebkitTextSizeAdjust",
        "WebkitTextStroke",
        "WebkitTextStrokeColor",
        "WebkitTextStrokeWidth",
        "WebkitTransform",
        "WebkitTransformOrigin",
        "WebkitTransformStyle",
        "WebkitTransition",
        "WebkitTransitionDelay",
        "WebkitTransitionDuration",
        "WebkitTransitionProperty",
        "WebkitTransitionTimingFunction",
        "WebkitUserSelect",
        "WheelEvent",
        "Window",
        "Worker",
        "Worklet",
        "WritableStream",
        "WritableStreamDefaultWriter",
        "XMLDocument",
        "XMLHttpRequest",
        "XMLHttpRequestEventTarget",
        "XMLHttpRequestException",
        "XMLHttpRequestProgressEvent",
        "XMLHttpRequestUpload",
        "XMLSerializer",
        "XMLStylesheetProcessingInstruction",
        "XPathEvaluator",
        "XPathException",
        "XPathExpression",
        "XPathNSResolver",
        "XPathResult",
        "XRBoundedReferenceSpace",
        "XRDOMOverlayState",
        "XRFrame",
        "XRHitTestResult",
        "XRHitTestSource",
        "XRInputSource",
        "XRInputSourceArray",
        "XRInputSourceEvent",
        "XRInputSourcesChangeEvent",
        "XRLayer",
        "XRPose",
        "XRRay",
        "XRReferenceSpace",
        "XRReferenceSpaceEvent",
        "XRRenderState",
        "XRRigidTransform",
        "XRSession",
        "XRSessionEvent",
        "XRSpace",
        "XRSystem",
        "XRTransientInputHitTestResult",
        "XRTransientInputHitTestSource",
        "XRView",
        "XRViewerPose",
        "XRViewport",
        "XRWebGLLayer",
        "XSLTProcessor",
        "ZERO",
        "_XD0M_",
        "_YD0M_",
        "__brand",
        "__defineGetter__",
        "__defineSetter__",
        "__lookupGetter__",
        "__lookupSetter__",
        "__opera",
        "__proto__",
        "_browserjsran",
        "a",
        "aLink",
        "abbr",
        "abort",
        "aborted",
        "abs",
        "absolute",
        "acceleration",
        "accelerationIncludingGravity",
        "accelerator",
        "accept",
        "acceptCharset",
        "acceptNode",
        "access",
        "accessKey",
        "accessKeyLabel",
        "accuracy",
        "acos",
        "acosh",
        "action",
        "actionURL",
        "actions",
        "activated",
        "active",
        "activeCues",
        "activeElement",
        "activeSourceBuffers",
        "activeSourceCount",
        "activeTexture",
        "activeVRDisplays",
        "actualBoundingBoxAscent",
        "actualBoundingBoxDescent",
        "actualBoundingBoxLeft",
        "actualBoundingBoxRight",
        "add",
        "addAll",
        "addBehavior",
        "addCandidate",
        "addColorStop",
        "addCue",
        "addElement",
        "addEventListener",
        "addFilter",
        "addFromString",
        "addFromUri",
        "addIceCandidate",
        "addImport",
        "addListener",
        "addModule",
        "addNamed",
        "addPageRule",
        "addPath",
        "addPointer",
        "addRange",
        "addRegion",
        "addRule",
        "addSearchEngine",
        "addSourceBuffer",
        "addStream",
        "addTextTrack",
        "addTrack",
        "addTransceiver",
        "addWakeLockListener",
        "added",
        "addedNodes",
        "additionalName",
        "additiveSymbols",
        "addons",
        "address",
        "addressLine",
        "addressModeU",
        "addressModeV",
        "addressModeW",
        "adoptNode",
        "adoptedStyleSheets",
        "adr",
        "advance",
        "after",
        "album",
        "alert",
        "algorithm",
        "align",
        "align-content",
        "align-items",
        "align-self",
        "alignContent",
        "alignItems",
        "alignSelf",
        "alignmentBaseline",
        "alinkColor",
        "all",
        "allSettled",
        "allow",
        "allowFullscreen",
        "allowPaymentRequest",
        "allowedDirections",
        "allowedFeatures",
        "allowedToPlay",
        "allowsFeature",
        "alpha",
        "alphaMode",
        "alphaToCoverageEnabled",
        "alt",
        "altGraphKey",
        "altHtml",
        "altKey",
        "altLeft",
        "alternate",
        "alternateSetting",
        "alternates",
        "altitude",
        "altitudeAccuracy",
        "amplitude",
        "ancestorOrigins",
        "anchor",
        "anchorNode",
        "anchorOffset",
        "anchors",
        "and",
        "angle",
        "angularAcceleration",
        "angularVelocity",
        "animVal",
        "animate",
        "animatedInstanceRoot",
        "animatedNormalizedPathSegList",
        "animatedPathSegList",
        "animatedPoints",
        "animation",
        "animation-delay",
        "animation-direction",
        "animation-duration",
        "animation-fill-mode",
        "animation-iteration-count",
        "animation-name",
        "animation-play-state",
        "animation-timing-function",
        "animationDelay",
        "animationDirection",
        "animationDuration",
        "animationFillMode",
        "animationIterationCount",
        "animationName",
        "animationPlayState",
        "animationStartTime",
        "animationTimingFunction",
        "animationsPaused",
        "anniversary",
        "antialias",
        "anticipatedRemoval",
        "any",
        "app",
        "appCodeName",
        "appMinorVersion",
        "appName",
        "appNotifications",
        "appVersion",
        "appearance",
        "append",
        "appendBuffer",
        "appendChild",
        "appendData",
        "appendItem",
        "appendMedium",
        "appendNamed",
        "appendRule",
        "appendStream",
        "appendWindowEnd",
        "appendWindowStart",
        "applets",
        "applicationCache",
        "applicationServerKey",
        "apply",
        "applyConstraints",
        "applyElement",
        "arc",
        "arcTo",
        "architecture",
        "archive",
        "areas",
        "arguments",
        "ariaAtomic",
        "ariaAutoComplete",
        "ariaBusy",
        "ariaChecked",
        "ariaColCount",
        "ariaColIndex",
        "ariaColSpan",
        "ariaCurrent",
        "ariaDescription",
        "ariaDisabled",
        "ariaExpanded",
        "ariaHasPopup",
        "ariaHidden",
        "ariaKeyShortcuts",
        "ariaLabel",
        "ariaLevel",
        "ariaLive",
        "ariaModal",
        "ariaMultiLine",
        "ariaMultiSelectable",
        "ariaOrientation",
        "ariaPlaceholder",
        "ariaPosInSet",
        "ariaPressed",
        "ariaReadOnly",
        "ariaRelevant",
        "ariaRequired",
        "ariaRoleDescription",
        "ariaRowCount",
        "ariaRowIndex",
        "ariaRowSpan",
        "ariaSelected",
        "ariaSetSize",
        "ariaSort",
        "ariaValueMax",
        "ariaValueMin",
        "ariaValueNow",
        "ariaValueText",
        "arrayBuffer",
        "arrayLayerCount",
        "arrayStride",
        "artist",
        "artwork",
        "as",
        "asIntN",
        "asUintN",
        "asin",
        "asinh",
        "aspect",
        "assert",
        "assign",
        "assignedElements",
        "assignedNodes",
        "assignedSlot",
        "async",
        "asyncIterator",
        "atEnd",
        "atan",
        "atan2",
        "atanh",
        "atob",
        "attachEvent",
        "attachInternals",
        "attachShader",
        "attachShadow",
        "attachments",
        "attack",
        "attestationObject",
        "attrChange",
        "attrName",
        "attributeFilter",
        "attributeName",
        "attributeNamespace",
        "attributeOldValue",
        "attributeStyleMap",
        "attributes",
        "attribution",
        "audioBitsPerSecond",
        "audioTracks",
        "audioWorklet",
        "authenticatedSignedWrites",
        "authenticatorData",
        "autoIncrement",
        "autobuffer",
        "autocapitalize",
        "autocomplete",
        "autocorrect",
        "autofocus",
        "automationRate",
        "autoplay",
        "availHeight",
        "availLeft",
        "availTop",
        "availWidth",
        "availability",
        "available",
        "aversion",
        "ax",
        "axes",
        "axis",
        "ay",
        "azimuth",
        "b",
        "back",
        "backface-visibility",
        "backfaceVisibility",
        "background",
        "background-attachment",
        "background-blend-mode",
        "background-clip",
        "background-color",
        "background-image",
        "background-origin",
        "background-position",
        "background-position-x",
        "background-position-y",
        "background-repeat",
        "background-size",
        "backgroundAttachment",
        "backgroundBlendMode",
        "backgroundClip",
        "backgroundColor",
        "backgroundFetch",
        "backgroundImage",
        "backgroundOrigin",
        "backgroundPosition",
        "backgroundPositionX",
        "backgroundPositionY",
        "backgroundRepeat",
        "backgroundSize",
        "badInput",
        "badge",
        "balance",
        "baseArrayLayer",
        "baseFrequencyX",
        "baseFrequencyY",
        "baseLatency",
        "baseLayer",
        "baseMipLevel",
        "baseNode",
        "baseOffset",
        "baseURI",
        "baseVal",
        "baselineShift",
        "battery",
        "bday",
        "before",
        "beginComputePass",
        "beginElement",
        "beginElementAt",
        "beginOcclusionQuery",
        "beginPath",
        "beginQuery",
        "beginRenderPass",
        "beginTransformFeedback",
        "beginningOfPassWriteIndex",
        "behavior",
        "behaviorCookie",
        "behaviorPart",
        "behaviorUrns",
        "beta",
        "bezierCurveTo",
        "bgColor",
        "bgProperties",
        "bias",
        "big",
        "bigint64",
        "biguint64",
        "binaryType",
        "bind",
        "bindAttribLocation",
        "bindBuffer",
        "bindBufferBase",
        "bindBufferRange",
        "bindFramebuffer",
        "bindGroupLayouts",
        "bindRenderbuffer",
        "bindSampler",
        "bindTexture",
        "bindTransformFeedback",
        "bindVertexArray",
        "binding",
        "bitness",
        "blend",
        "blendColor",
        "blendEquation",
        "blendEquationSeparate",
        "blendFunc",
        "blendFuncSeparate",
        "blink",
        "blitFramebuffer",
        "blob",
        "block-size",
        "blockDirection",
        "blockSize",
        "blockedURI",
        "blue",
        "bluetooth",
        "blur",
        "body",
        "bodyUsed",
        "bold",
        "bookmarks",
        "booleanValue",
        "border",
        "border-block",
        "border-block-color",
        "border-block-end",
        "border-block-end-color",
        "border-block-end-style",
        "border-block-end-width",
        "border-block-start",
        "border-block-start-color",
        "border-block-start-style",
        "border-block-start-width",
        "border-block-style",
        "border-block-width",
        "border-bottom",
        "border-bottom-color",
        "border-bottom-left-radius",
        "border-bottom-right-radius",
        "border-bottom-style",
        "border-bottom-width",
        "border-collapse",
        "border-color",
        "border-end-end-radius",
        "border-end-start-radius",
        "border-image",
        "border-image-outset",
        "border-image-repeat",
        "border-image-slice",
        "border-image-source",
        "border-image-width",
        "border-inline",
        "border-inline-color",
        "border-inline-end",
        "border-inline-end-color",
        "border-inline-end-style",
        "border-inline-end-width",
        "border-inline-start",
        "border-inline-start-color",
        "border-inline-start-style",
        "border-inline-start-width",
        "border-inline-style",
        "border-inline-width",
        "border-left",
        "border-left-color",
        "border-left-style",
        "border-left-width",
        "border-radius",
        "border-right",
        "border-right-color",
        "border-right-style",
        "border-right-width",
        "border-spacing",
        "border-start-end-radius",
        "border-start-start-radius",
        "border-style",
        "border-top",
        "border-top-color",
        "border-top-left-radius",
        "border-top-right-radius",
        "border-top-style",
        "border-top-width",
        "border-width",
        "borderBlock",
        "borderBlockColor",
        "borderBlockEnd",
        "borderBlockEndColor",
        "borderBlockEndStyle",
        "borderBlockEndWidth",
        "borderBlockStart",
        "borderBlockStartColor",
        "borderBlockStartStyle",
        "borderBlockStartWidth",
        "borderBlockStyle",
        "borderBlockWidth",
        "borderBottom",
        "borderBottomColor",
        "borderBottomLeftRadius",
        "borderBottomRightRadius",
        "borderBottomStyle",
        "borderBottomWidth",
        "borderBoxSize",
        "borderCollapse",
        "borderColor",
        "borderColorDark",
        "borderColorLight",
        "borderEndEndRadius",
        "borderEndStartRadius",
        "borderImage",
        "borderImageOutset",
        "borderImageRepeat",
        "borderImageSlice",
        "borderImageSource",
        "borderImageWidth",
        "borderInline",
        "borderInlineColor",
        "borderInlineEnd",
        "borderInlineEndColor",
        "borderInlineEndStyle",
        "borderInlineEndWidth",
        "borderInlineStart",
        "borderInlineStartColor",
        "borderInlineStartStyle",
        "borderInlineStartWidth",
        "borderInlineStyle",
        "borderInlineWidth",
        "borderLeft",
        "borderLeftColor",
        "borderLeftStyle",
        "borderLeftWidth",
        "borderRadius",
        "borderRight",
        "borderRightColor",
        "borderRightStyle",
        "borderRightWidth",
        "borderSpacing",
        "borderStartEndRadius",
        "borderStartStartRadius",
        "borderStyle",
        "borderTop",
        "borderTopColor",
        "borderTopLeftRadius",
        "borderTopRightRadius",
        "borderTopStyle",
        "borderTopWidth",
        "borderWidth",
        "bottom",
        "bottomMargin",
        "bound",
        "boundElements",
        "boundingClientRect",
        "boundingHeight",
        "boundingLeft",
        "boundingTop",
        "boundingWidth",
        "bounds",
        "boundsGeometry",
        "box-decoration-break",
        "box-shadow",
        "box-sizing",
        "boxDecorationBreak",
        "boxShadow",
        "boxSizing",
        "brand",
        "brands",
        "break-after",
        "break-before",
        "break-inside",
        "breakAfter",
        "breakBefore",
        "breakInside",
        "broadcast",
        "browserLanguage",
        "btoa",
        "bubbles",
        "buffer",
        "bufferData",
        "bufferDepth",
        "bufferSize",
        "bufferSubData",
        "buffered",
        "bufferedAmount",
        "bufferedAmountLowThreshold",
        "buffers",
        "buildID",
        "buildNumber",
        "button",
        "buttonID",
        "buttons",
        "byteLength",
        "byteOffset",
        "bytesPerRow",
        "bytesWritten",
        "c",
        "cache",
        "caches",
        "call",
        "caller",
        "canBeFormatted",
        "canBeMounted",
        "canBeShared",
        "canHaveChildren",
        "canHaveHTML",
        "canInsertDTMF",
        "canMakePayment",
        "canPlayType",
        "canPresent",
        "canTrickleIceCandidates",
        "cancel",
        "cancelAndHoldAtTime",
        "cancelAnimationFrame",
        "cancelBubble",
        "cancelIdleCallback",
        "cancelScheduledValues",
        "cancelVideoFrameCallback",
        "cancelWatchAvailability",
        "cancelable",
        "candidate",
        "canonicalUUID",
        "canvas",
        "capabilities",
        "caption",
        "caption-side",
        "captionSide",
        "capture",
        "captureEvents",
        "captureStackTrace",
        "captureStream",
        "caret-color",
        "caretBidiLevel",
        "caretColor",
        "caretPositionFromPoint",
        "caretRangeFromPoint",
        "cast",
        "catch",
        "category",
        "cbrt",
        "cd",
        "ceil",
        "cellIndex",
        "cellPadding",
        "cellSpacing",
        "cells",
        "ch",
        "chOff",
        "chain",
        "challenge",
        "changeType",
        "changedTouches",
        "channel",
        "channelCount",
        "channelCountMode",
        "channelInterpretation",
        "char",
        "charAt",
        "charCode",
        "charCodeAt",
        "charIndex",
        "charLength",
        "characterData",
        "characterDataOldValue",
        "characterSet",
        "characteristic",
        "charging",
        "chargingTime",
        "charset",
        "check",
        "checkEnclosure",
        "checkFramebufferStatus",
        "checkIntersection",
        "checkValidity",
        "checked",
        "childElementCount",
        "childList",
        "childNodes",
        "children",
        "chrome",
        "ciphertext",
        "cite",
        "city",
        "claimInterface",
        "claimed",
        "classList",
        "className",
        "classid",
        "clear",
        "clearAppBadge",
        "clearAttributes",
        "clearBuffer",
        "clearBufferfi",
        "clearBufferfv",
        "clearBufferiv",
        "clearBufferuiv",
        "clearColor",
        "clearData",
        "clearDepth",
        "clearHalt",
        "clearImmediate",
        "clearInterval",
        "clearLiveSeekableRange",
        "clearMarks",
        "clearMaxGCPauseAccumulator",
        "clearMeasures",
        "clearParameters",
        "clearRect",
        "clearResourceTimings",
        "clearShadow",
        "clearStencil",
        "clearTimeout",
        "clearValue",
        "clearWatch",
        "click",
        "clickCount",
        "clientDataJSON",
        "clientHeight",
        "clientInformation",
        "clientLeft",
        "clientRect",
        "clientRects",
        "clientTop",
        "clientWaitSync",
        "clientWidth",
        "clientX",
        "clientY",
        "clip",
        "clip-path",
        "clip-rule",
        "clipBottom",
        "clipLeft",
        "clipPath",
        "clipPathUnits",
        "clipRight",
        "clipRule",
        "clipTop",
        "clipboard",
        "clipboardData",
        "clone",
        "cloneContents",
        "cloneNode",
        "cloneRange",
        "close",
        "closePath",
        "closed",
        "closest",
        "clz",
        "clz32",
        "cm",
        "cmp",
        "code",
        "codeBase",
        "codePointAt",
        "codeType",
        "colSpan",
        "collapse",
        "collapseToEnd",
        "collapseToStart",
        "collapsed",
        "collect",
        "colno",
        "color",
        "color-adjust",
        "color-interpolation",
        "color-interpolation-filters",
        "colorAdjust",
        "colorAttachments",
        "colorDepth",
        "colorFormats",
        "colorInterpolation",
        "colorInterpolationFilters",
        "colorMask",
        "colorSpace",
        "colorType",
        "cols",
        "column-count",
        "column-fill",
        "column-gap",
        "column-rule",
        "column-rule-color",
        "column-rule-style",
        "column-rule-width",
        "column-span",
        "column-width",
        "columnCount",
        "columnFill",
        "columnGap",
        "columnNumber",
        "columnRule",
        "columnRuleColor",
        "columnRuleStyle",
        "columnRuleWidth",
        "columnSpan",
        "columnWidth",
        "columns",
        "command",
        "commit",
        "commitPreferences",
        "commitStyles",
        "commonAncestorContainer",
        "compact",
        "compare",
        "compareBoundaryPoints",
        "compareDocumentPosition",
        "compareEndPoints",
        "compareExchange",
        "compareNode",
        "comparePoint",
        "compatMode",
        "compatible",
        "compile",
        "compileShader",
        "compileStreaming",
        "complete",
        "component",
        "componentFromPoint",
        "composed",
        "composedPath",
        "composite",
        "compositionEndOffset",
        "compositionStartOffset",
        "compressedTexImage2D",
        "compressedTexImage3D",
        "compressedTexSubImage2D",
        "compressedTexSubImage3D",
        "compute",
        "computedStyleMap",
        "concat",
        "conditionText",
        "coneInnerAngle",
        "coneOuterAngle",
        "coneOuterGain",
        "configurable",
        "configuration",
        "configurationName",
        "configurationValue",
        "configurations",
        "configure",
        "confirm",
        "confirmComposition",
        "confirmSiteSpecificTrackingException",
        "confirmWebWideTrackingException",
        "connect",
        "connectEnd",
        "connectShark",
        "connectStart",
        "connected",
        "connection",
        "connectionList",
        "connectionSpeed",
        "connectionState",
        "connections",
        "console",
        "consolidate",
        "constants",
        "constraint",
        "constrictionActive",
        "construct",
        "constructor",
        "contactID",
        "contain",
        "containerId",
        "containerName",
        "containerSrc",
        "containerType",
        "contains",
        "containsNode",
        "content",
        "contentBoxSize",
        "contentDocument",
        "contentEditable",
        "contentHint",
        "contentOverflow",
        "contentRect",
        "contentScriptType",
        "contentStyleType",
        "contentType",
        "contentWindow",
        "context",
        "contextMenu",
        "contextmenu",
        "continue",
        "continuePrimaryKey",
        "continuous",
        "control",
        "controlTransferIn",
        "controlTransferOut",
        "controller",
        "controls",
        "controlsList",
        "convertPointFromNode",
        "convertQuadFromNode",
        "convertRectFromNode",
        "convertToBlob",
        "convertToSpecifiedUnits",
        "cookie",
        "cookieEnabled",
        "coords",
        "copyBufferSubData",
        "copyBufferToBuffer",
        "copyBufferToTexture",
        "copyExternalImageToTexture",
        "copyFromChannel",
        "copyTexImage2D",
        "copyTexSubImage2D",
        "copyTexSubImage3D",
        "copyTextureToBuffer",
        "copyTextureToTexture",
        "copyToChannel",
        "copyWithin",
        "correspondingElement",
        "correspondingUseElement",
        "corruptedVideoFrames",
        "cos",
        "cosh",
        "count",
        "countReset",
        "counter-increment",
        "counter-reset",
        "counter-set",
        "counterIncrement",
        "counterReset",
        "counterSet",
        "country",
        "cpuClass",
        "cpuSleepAllowed",
        "create",
        "createAnalyser",
        "createAnswer",
        "createAttribute",
        "createAttributeNS",
        "createBindGroup",
        "createBindGroupLayout",
        "createBiquadFilter",
        "createBuffer",
        "createBufferSource",
        "createCDATASection",
        "createCSSStyleSheet",
        "createCaption",
        "createChannelMerger",
        "createChannelSplitter",
        "createCommandEncoder",
        "createComment",
        "createComputePipeline",
        "createComputePipelineAsync",
        "createConstantSource",
        "createContextualFragment",
        "createControlRange",
        "createConvolver",
        "createDTMFSender",
        "createDataChannel",
        "createDelay",
        "createDelayNode",
        "createDocument",
        "createDocumentFragment",
        "createDocumentType",
        "createDynamicsCompressor",
        "createElement",
        "createElementNS",
        "createEntityReference",
        "createEvent",
        "createEventObject",
        "createExpression",
        "createFramebuffer",
        "createFunction",
        "createGain",
        "createGainNode",
        "createHTML",
        "createHTMLDocument",
        "createIIRFilter",
        "createImageBitmap",
        "createImageData",
        "createIndex",
        "createJavaScriptNode",
        "createLinearGradient",
        "createMediaElementSource",
        "createMediaKeys",
        "createMediaStreamDestination",
        "createMediaStreamSource",
        "createMediaStreamTrackSource",
        "createMutableFile",
        "createNSResolver",
        "createNodeIterator",
        "createNotification",
        "createObjectStore",
        "createObjectURL",
        "createOffer",
        "createOscillator",
        "createPanner",
        "createPattern",
        "createPeriodicWave",
        "createPipelineLayout",
        "createPolicy",
        "createPopup",
        "createProcessingInstruction",
        "createProgram",
        "createQuery",
        "createQuerySet",
        "createRadialGradient",
        "createRange",
        "createRangeCollection",
        "createReader",
        "createRenderBundleEncoder",
        "createRenderPipeline",
        "createRenderPipelineAsync",
        "createRenderbuffer",
        "createSVGAngle",
        "createSVGLength",
        "createSVGMatrix",
        "createSVGNumber",
        "createSVGPathSegArcAbs",
        "createSVGPathSegArcRel",
        "createSVGPathSegClosePath",
        "createSVGPathSegCurvetoCubicAbs",
        "createSVGPathSegCurvetoCubicRel",
        "createSVGPathSegCurvetoCubicSmoothAbs",
        "createSVGPathSegCurvetoCubicSmoothRel",
        "createSVGPathSegCurvetoQuadraticAbs",
        "createSVGPathSegCurvetoQuadraticRel",
        "createSVGPathSegCurvetoQuadraticSmoothAbs",
        "createSVGPathSegCurvetoQuadraticSmoothRel",
        "createSVGPathSegLinetoAbs",
        "createSVGPathSegLinetoHorizontalAbs",
        "createSVGPathSegLinetoHorizontalRel",
        "createSVGPathSegLinetoRel",
        "createSVGPathSegLinetoVerticalAbs",
        "createSVGPathSegLinetoVerticalRel",
        "createSVGPathSegMovetoAbs",
        "createSVGPathSegMovetoRel",
        "createSVGPoint",
        "createSVGRect",
        "createSVGTransform",
        "createSVGTransformFromMatrix",
        "createSampler",
        "createScript",
        "createScriptProcessor",
        "createScriptURL",
        "createSession",
        "createShader",
        "createShaderModule",
        "createShadowRoot",
        "createStereoPanner",
        "createStyleSheet",
        "createTBody",
        "createTFoot",
        "createTHead",
        "createTextNode",
        "createTextRange",
        "createTexture",
        "createTouch",
        "createTouchList",
        "createTransformFeedback",
        "createTreeWalker",
        "createVertexArray",
        "createView",
        "createWaveShaper",
        "creationTime",
        "credentials",
        "crossOrigin",
        "crossOriginIsolated",
        "crypto",
        "csi",
        "csp",
        "cssFloat",
        "cssRules",
        "cssText",
        "cssValueType",
        "ctrlKey",
        "ctrlLeft",
        "cues",
        "cullFace",
        "cullMode",
        "currentDirection",
        "currentLocalDescription",
        "currentNode",
        "currentPage",
        "currentRect",
        "currentRemoteDescription",
        "currentScale",
        "currentScript",
        "currentSrc",
        "currentState",
        "currentStyle",
        "currentTarget",
        "currentTime",
        "currentTranslate",
        "currentView",
        "cursor",
        "curve",
        "customElements",
        "customError",
        "cx",
        "cy",
        "d",
        "data",
        "dataFld",
        "dataFormatAs",
        "dataLoss",
        "dataLossMessage",
        "dataPageSize",
        "dataSrc",
        "dataTransfer",
        "database",
        "databases",
        "dataset",
        "dateTime",
        "db",
        "debug",
        "debuggerEnabled",
        "declare",
        "decode",
        "decodeAudioData",
        "decodeURI",
        "decodeURIComponent",
        "decodedBodySize",
        "decoding",
        "decodingInfo",
        "decrypt",
        "default",
        "defaultCharset",
        "defaultChecked",
        "defaultMuted",
        "defaultPlaybackRate",
        "defaultPolicy",
        "defaultPrevented",
        "defaultQueue",
        "defaultRequest",
        "defaultSelected",
        "defaultStatus",
        "defaultURL",
        "defaultValue",
        "defaultView",
        "defaultstatus",
        "defer",
        "define",
        "defineMagicFunction",
        "defineMagicVariable",
        "defineProperties",
        "defineProperty",
        "deg",
        "delay",
        "delayTime",
        "delegatesFocus",
        "delete",
        "deleteBuffer",
        "deleteCaption",
        "deleteCell",
        "deleteContents",
        "deleteData",
        "deleteDatabase",
        "deleteFramebuffer",
        "deleteFromDocument",
        "deleteIndex",
        "deleteMedium",
        "deleteObjectStore",
        "deleteProgram",
        "deleteProperty",
        "deleteQuery",
        "deleteRenderbuffer",
        "deleteRow",
        "deleteRule",
        "deleteSampler",
        "deleteShader",
        "deleteSync",
        "deleteTFoot",
        "deleteTHead",
        "deleteTexture",
        "deleteTransformFeedback",
        "deleteVertexArray",
        "deliverChangeRecords",
        "delivery",
        "deliveryInfo",
        "deliveryStatus",
        "deliveryTimestamp",
        "delta",
        "deltaMode",
        "deltaX",
        "deltaY",
        "deltaZ",
        "dependentLocality",
        "depthBias",
        "depthBiasClamp",
        "depthBiasSlopeScale",
        "depthClearValue",
        "depthCompare",
        "depthFailOp",
        "depthFar",
        "depthFunc",
        "depthLoadOp",
        "depthMask",
        "depthNear",
        "depthOrArrayLayers",
        "depthRange",
        "depthReadOnly",
        "depthStencil",
        "depthStencilAttachment",
        "depthStencilFormat",
        "depthStoreOp",
        "depthWriteEnabled",
        "deref",
        "deriveBits",
        "deriveKey",
        "description",
        "deselectAll",
        "designMode",
        "desiredSize",
        "destination",
        "destinationURL",
        "destroy",
        "detach",
        "detachEvent",
        "detachShader",
        "detail",
        "details",
        "detect",
        "detune",
        "device",
        "deviceClass",
        "deviceId",
        "deviceMemory",
        "devicePixelContentBoxSize",
        "devicePixelRatio",
        "deviceProtocol",
        "deviceSubclass",
        "deviceVersionMajor",
        "deviceVersionMinor",
        "deviceVersionSubminor",
        "deviceXDPI",
        "deviceYDPI",
        "didTimeout",
        "diffuseConstant",
        "digest",
        "dimension",
        "dimensions",
        "dir",
        "dirName",
        "direction",
        "dirxml",
        "disable",
        "disablePictureInPicture",
        "disableRemotePlayback",
        "disableVertexAttribArray",
        "disabled",
        "dischargingTime",
        "disconnect",
        "disconnectShark",
        "dispatchEvent",
        "dispatchWorkgroups",
        "dispatchWorkgroupsIndirect",
        "display",
        "displayId",
        "displayName",
        "disposition",
        "distanceModel",
        "div",
        "divisor",
        "djsapi",
        "djsproxy",
        "doImport",
        "doNotTrack",
        "doScroll",
        "doctype",
        "document",
        "documentElement",
        "documentMode",
        "documentURI",
        "dolphin",
        "dolphinGameCenter",
        "dolphininfo",
        "dolphinmeta",
        "domComplete",
        "domContentLoadedEventEnd",
        "domContentLoadedEventStart",
        "domInteractive",
        "domLoading",
        "domOverlayState",
        "domain",
        "domainLookupEnd",
        "domainLookupStart",
        "dominant-baseline",
        "dominantBaseline",
        "done",
        "dopplerFactor",
        "dotAll",
        "downDegrees",
        "downlink",
        "download",
        "downloadTotal",
        "downloaded",
        "dpcm",
        "dpi",
        "dppx",
        "dragDrop",
        "draggable",
        "draw",
        "drawArrays",
        "drawArraysInstanced",
        "drawArraysInstancedANGLE",
        "drawBuffers",
        "drawCustomFocusRing",
        "drawElements",
        "drawElementsInstanced",
        "drawElementsInstancedANGLE",
        "drawFocusIfNeeded",
        "drawImage",
        "drawImageFromRect",
        "drawIndexed",
        "drawIndexedIndirect",
        "drawIndirect",
        "drawRangeElements",
        "drawSystemFocusRing",
        "drawingBufferHeight",
        "drawingBufferWidth",
        "dropEffect",
        "droppedVideoFrames",
        "dropzone",
        "dstFactor",
        "dtmf",
        "dump",
        "dumpProfile",
        "duplicate",
        "durability",
        "duration",
        "dvname",
        "dvnum",
        "dx",
        "dy",
        "dynsrc",
        "e",
        "edgeMode",
        "effect",
        "effectAllowed",
        "effectiveDirective",
        "effectiveType",
        "elapsedTime",
        "element",
        "elementFromPoint",
        "elementTiming",
        "elements",
        "elementsFromPoint",
        "elevation",
        "ellipse",
        "em",
        "email",
        "embeds",
        "emma",
        "empty",
        "empty-cells",
        "emptyCells",
        "emptyHTML",
        "emptyScript",
        "emulatedPosition",
        "enable",
        "enableBackground",
        "enableDelegations",
        "enableStyleSheetsForSet",
        "enableVertexAttribArray",
        "enabled",
        "enabledPlugin",
        "encode",
        "encodeInto",
        "encodeURI",
        "encodeURIComponent",
        "encodedBodySize",
        "encoding",
        "encodingInfo",
        "encrypt",
        "enctype",
        "end",
        "endContainer",
        "endElement",
        "endElementAt",
        "endOcclusionQuery",
        "endOfPassWriteIndex",
        "endOfStream",
        "endOffset",
        "endQuery",
        "endTime",
        "endTransformFeedback",
        "ended",
        "endpoint",
        "endpointNumber",
        "endpoints",
        "endsWith",
        "enterKeyHint",
        "entities",
        "entries",
        "entryPoint",
        "entryType",
        "enumerable",
        "enumerate",
        "enumerateDevices",
        "enumerateEditable",
        "environmentBlendMode",
        "equals",
        "error",
        "errorCode",
        "errorDetail",
        "errorText",
        "escape",
        "estimate",
        "eval",
        "evaluate",
        "event",
        "eventPhase",
        "every",
        "ex",
        "exception",
        "exchange",
        "exec",
        "execCommand",
        "execCommandShowHelp",
        "execScript",
        "executeBundles",
        "exitFullscreen",
        "exitPictureInPicture",
        "exitPointerLock",
        "exitPresent",
        "exp",
        "expand",
        "expandEntityReferences",
        "expando",
        "expansion",
        "expiration",
        "expirationTime",
        "expires",
        "expiryDate",
        "explicitOriginalTarget",
        "expm1",
        "exponent",
        "exponentialRampToValueAtTime",
        "exportKey",
        "exports",
        "extend",
        "extensions",
        "extentNode",
        "extentOffset",
        "external",
        "externalResourcesRequired",
        "externalTexture",
        "extractContents",
        "extractable",
        "eye",
        "f",
        "face",
        "factoryReset",
        "failOp",
        "failureReason",
        "fallback",
        "family",
        "familyName",
        "farthestViewportElement",
        "fastSeek",
        "fatal",
        "featureId",
        "featurePolicy",
        "featureSettings",
        "features",
        "fenceSync",
        "fetch",
        "fetchStart",
        "fftSize",
        "fgColor",
        "fieldOfView",
        "file",
        "fileCreatedDate",
        "fileHandle",
        "fileModifiedDate",
        "fileName",
        "fileSize",
        "fileUpdatedDate",
        "filename",
        "files",
        "filesystem",
        "fill",
        "fill-opacity",
        "fill-rule",
        "fillLightMode",
        "fillOpacity",
        "fillRect",
        "fillRule",
        "fillStyle",
        "fillText",
        "filter",
        "filterResX",
        "filterResY",
        "filterUnits",
        "filters",
        "finally",
        "find",
        "findIndex",
        "findRule",
        "findText",
        "finish",
        "finished",
        "fireEvent",
        "firesTouchEvents",
        "firstChild",
        "firstElementChild",
        "firstPage",
        "fixed",
        "flags",
        "flat",
        "flatMap",
        "flex",
        "flex-basis",
        "flex-direction",
        "flex-flow",
        "flex-grow",
        "flex-shrink",
        "flex-wrap",
        "flexBasis",
        "flexDirection",
        "flexFlow",
        "flexGrow",
        "flexShrink",
        "flexWrap",
        "flipX",
        "flipY",
        "float",
        "float32",
        "float64",
        "flood-color",
        "flood-opacity",
        "floodColor",
        "floodOpacity",
        "floor",
        "flush",
        "focus",
        "focusNode",
        "focusOffset",
        "font",
        "font-family",
        "font-feature-settings",
        "font-kerning",
        "font-language-override",
        "font-optical-sizing",
        "font-size",
        "font-size-adjust",
        "font-stretch",
        "font-style",
        "font-synthesis",
        "font-variant",
        "font-variant-alternates",
        "font-variant-caps",
        "font-variant-east-asian",
        "font-variant-ligatures",
        "font-variant-numeric",
        "font-variant-position",
        "font-variation-settings",
        "font-weight",
        "fontFamily",
        "fontFeatureSettings",
        "fontKerning",
        "fontLanguageOverride",
        "fontOpticalSizing",
        "fontSize",
        "fontSizeAdjust",
        "fontSmoothingEnabled",
        "fontStretch",
        "fontStyle",
        "fontSynthesis",
        "fontVariant",
        "fontVariantAlternates",
        "fontVariantCaps",
        "fontVariantEastAsian",
        "fontVariantLigatures",
        "fontVariantNumeric",
        "fontVariantPosition",
        "fontVariationSettings",
        "fontWeight",
        "fontcolor",
        "fontfaces",
        "fonts",
        "fontsize",
        "for",
        "forEach",
        "force",
        "forceFallbackAdapter",
        "forceRedraw",
        "form",
        "formAction",
        "formData",
        "formEnctype",
        "formMethod",
        "formNoValidate",
        "formTarget",
        "format",
        "formatToParts",
        "forms",
        "forward",
        "forwardX",
        "forwardY",
        "forwardZ",
        "foundation",
        "fr",
        "fragment",
        "fragmentDirective",
        "frame",
        "frameBorder",
        "frameElement",
        "frameSpacing",
        "framebuffer",
        "framebufferHeight",
        "framebufferRenderbuffer",
        "framebufferTexture2D",
        "framebufferTextureLayer",
        "framebufferWidth",
        "frames",
        "freeSpace",
        "freeze",
        "frequency",
        "frequencyBinCount",
        "from",
        "fromCharCode",
        "fromCodePoint",
        "fromElement",
        "fromEntries",
        "fromFloat32Array",
        "fromFloat64Array",
        "fromMatrix",
        "fromPoint",
        "fromQuad",
        "fromRect",
        "frontFace",
        "fround",
        "fullPath",
        "fullScreen",
        "fullVersionList",
        "fullscreen",
        "fullscreenElement",
        "fullscreenEnabled",
        "fx",
        "fy",
        "g",
        "gain",
        "gamepad",
        "gamma",
        "gap",
        "gatheringState",
        "gatt",
        "genderIdentity",
        "generateCertificate",
        "generateKey",
        "generateMipmap",
        "generateRequest",
        "geolocation",
        "gestureObject",
        "get",
        "getActiveAttrib",
        "getActiveUniform",
        "getActiveUniformBlockName",
        "getActiveUniformBlockParameter",
        "getActiveUniforms",
        "getAdjacentText",
        "getAll",
        "getAllKeys",
        "getAllResponseHeaders",
        "getAllowlistForFeature",
        "getAnimations",
        "getAsFile",
        "getAsString",
        "getAttachedShaders",
        "getAttribLocation",
        "getAttribute",
        "getAttributeNS",
        "getAttributeNames",
        "getAttributeNode",
        "getAttributeNodeNS",
        "getAttributeType",
        "getAudioTracks",
        "getAvailability",
        "getBBox",
        "getBattery",
        "getBigInt64",
        "getBigUint64",
        "getBindGroupLayout",
        "getBlob",
        "getBookmark",
        "getBoundingClientRect",
        "getBounds",
        "getBoxQuads",
        "getBufferParameter",
        "getBufferSubData",
        "getByteFrequencyData",
        "getByteTimeDomainData",
        "getCSSCanvasContext",
        "getCTM",
        "getCandidateWindowClientRect",
        "getCanonicalLocales",
        "getCapabilities",
        "getChannelData",
        "getCharNumAtPosition",
        "getCharacteristic",
        "getCharacteristics",
        "getClientExtensionResults",
        "getClientRect",
        "getClientRects",
        "getCoalescedEvents",
        "getCompilationInfo",
        "getCompositionAlternatives",
        "getComputedStyle",
        "getComputedTextLength",
        "getComputedTiming",
        "getConfiguration",
        "getConstraints",
        "getContext",
        "getContextAttributes",
        "getContributingSources",
        "getCounterValue",
        "getCueAsHTML",
        "getCueById",
        "getCurrentPosition",
        "getCurrentTexture",
        "getCurrentTime",
        "getData",
        "getDatabaseNames",
        "getDate",
        "getDay",
        "getDefaultComputedStyle",
        "getDescriptor",
        "getDescriptors",
        "getDestinationInsertionPoints",
        "getDevices",
        "getDirectory",
        "getDisplayMedia",
        "getDistributedNodes",
        "getEditable",
        "getElementById",
        "getElementsByClassName",
        "getElementsByName",
        "getElementsByTagName",
        "getElementsByTagNameNS",
        "getEnclosureList",
        "getEndPositionOfChar",
        "getEntries",
        "getEntriesByName",
        "getEntriesByType",
        "getError",
        "getExtension",
        "getExtentOfChar",
        "getEyeParameters",
        "getFeature",
        "getFile",
        "getFiles",
        "getFilesAndDirectories",
        "getFingerprints",
        "getFloat32",
        "getFloat64",
        "getFloatFrequencyData",
        "getFloatTimeDomainData",
        "getFloatValue",
        "getFragDataLocation",
        "getFrameData",
        "getFramebufferAttachmentParameter",
        "getFrequencyResponse",
        "getFullYear",
        "getGamepads",
        "getHighEntropyValues",
        "getHitTestResults",
        "getHitTestResultsForTransientInput",
        "getHours",
        "getIdentityAssertion",
        "getIds",
        "getImageData",
        "getIndexedParameter",
        "getInstalledRelatedApps",
        "getInt16",
        "getInt32",
        "getInt8",
        "getInternalformatParameter",
        "getIntersectionList",
        "getItem",
        "getItems",
        "getKey",
        "getKeyframes",
        "getLayers",
        "getLayoutMap",
        "getLineDash",
        "getLocalCandidates",
        "getLocalParameters",
        "getLocalStreams",
        "getMappedRange",
        "getMarks",
        "getMatchedCSSRules",
        "getMaxGCPauseSinceClear",
        "getMeasures",
        "getMetadata",
        "getMilliseconds",
        "getMinutes",
        "getModifierState",
        "getMonth",
        "getNamedItem",
        "getNamedItemNS",
        "getNativeFramebufferScaleFactor",
        "getNotifications",
        "getNotifier",
        "getNumberOfChars",
        "getOffsetReferenceSpace",
        "getOutputTimestamp",
        "getOverrideHistoryNavigationMode",
        "getOverrideStyle",
        "getOwnPropertyDescriptor",
        "getOwnPropertyDescriptors",
        "getOwnPropertyNames",
        "getOwnPropertySymbols",
        "getParameter",
        "getParameters",
        "getParent",
        "getPathSegAtLength",
        "getPhotoCapabilities",
        "getPhotoSettings",
        "getPointAtLength",
        "getPose",
        "getPredictedEvents",
        "getPreference",
        "getPreferenceDefault",
        "getPreferredCanvasFormat",
        "getPresentationAttribute",
        "getPreventDefault",
        "getPrimaryService",
        "getPrimaryServices",
        "getProgramInfoLog",
        "getProgramParameter",
        "getPropertyCSSValue",
        "getPropertyPriority",
        "getPropertyShorthand",
        "getPropertyType",
        "getPropertyValue",
        "getPrototypeOf",
        "getQuery",
        "getQueryParameter",
        "getRGBColorValue",
        "getRandomValues",
        "getRangeAt",
        "getReader",
        "getReceivers",
        "getRectValue",
        "getRegistration",
        "getRegistrations",
        "getRemoteCandidates",
        "getRemoteCertificates",
        "getRemoteParameters",
        "getRemoteStreams",
        "getRenderbufferParameter",
        "getResponseHeader",
        "getRoot",
        "getRootNode",
        "getRotationOfChar",
        "getSVGDocument",
        "getSamplerParameter",
        "getScreenCTM",
        "getSeconds",
        "getSelectedCandidatePair",
        "getSelection",
        "getSenders",
        "getService",
        "getSettings",
        "getShaderInfoLog",
        "getShaderParameter",
        "getShaderPrecisionFormat",
        "getShaderSource",
        "getSimpleDuration",
        "getSiteIcons",
        "getSources",
        "getSpeculativeParserUrls",
        "getStartPositionOfChar",
        "getStartTime",
        "getState",
        "getStats",
        "getStatusForPolicy",
        "getStorageUpdates",
        "getStreamById",
        "getStringValue",
        "getSubStringLength",
        "getSubscription",
        "getSupportedConstraints",
        "getSupportedExtensions",
        "getSupportedFormats",
        "getSyncParameter",
        "getSynchronizationSources",
        "getTags",
        "getTargetRanges",
        "getTexParameter",
        "getTime",
        "getTimezoneOffset",
        "getTiming",
        "getTotalLength",
        "getTrackById",
        "getTracks",
        "getTransceivers",
        "getTransform",
        "getTransformFeedbackVarying",
        "getTransformToElement",
        "getTransports",
        "getType",
        "getTypeMapping",
        "getUTCDate",
        "getUTCDay",
        "getUTCFullYear",
        "getUTCHours",
        "getUTCMilliseconds",
        "getUTCMinutes",
        "getUTCMonth",
        "getUTCSeconds",
        "getUint16",
        "getUint32",
        "getUint8",
        "getUniform",
        "getUniformBlockIndex",
        "getUniformIndices",
        "getUniformLocation",
        "getUserMedia",
        "getVRDisplays",
        "getValues",
        "getVarDate",
        "getVariableValue",
        "getVertexAttrib",
        "getVertexAttribOffset",
        "getVideoPlaybackQuality",
        "getVideoTracks",
        "getViewerPose",
        "getViewport",
        "getVoices",
        "getWakeLockState",
        "getWriter",
        "getYear",
        "givenName",
        "global",
        "globalAlpha",
        "globalCompositeOperation",
        "globalThis",
        "glyphOrientationHorizontal",
        "glyphOrientationVertical",
        "glyphRef",
        "go",
        "gpu",
        "grabFrame",
        "grad",
        "gradientTransform",
        "gradientUnits",
        "grammars",
        "green",
        "grid",
        "grid-area",
        "grid-auto-columns",
        "grid-auto-flow",
        "grid-auto-rows",
        "grid-column",
        "grid-column-end",
        "grid-column-gap",
        "grid-column-start",
        "grid-gap",
        "grid-row",
        "grid-row-end",
        "grid-row-gap",
        "grid-row-start",
        "grid-template",
        "grid-template-areas",
        "grid-template-columns",
        "grid-template-rows",
        "gridArea",
        "gridAutoColumns",
        "gridAutoFlow",
        "gridAutoRows",
        "gridColumn",
        "gridColumnEnd",
        "gridColumnGap",
        "gridColumnStart",
        "gridGap",
        "gridRow",
        "gridRowEnd",
        "gridRowGap",
        "gridRowStart",
        "gridTemplate",
        "gridTemplateAreas",
        "gridTemplateColumns",
        "gridTemplateRows",
        "gripSpace",
        "group",
        "groups",
        "groupCollapsed",
        "groupEnd",
        "groupId",
        "hadRecentInput",
        "hand",
        "handedness",
        "hapticActuators",
        "hardwareConcurrency",
        "has",
        "hasAttribute",
        "hasAttributeNS",
        "hasAttributes",
        "hasBeenActive",
        "hasChildNodes",
        "hasComposition",
        "hasDynamicOffset",
        "hasEnrolledInstrument",
        "hasExtension",
        "hasExternalDisplay",
        "hasFeature",
        "hasFocus",
        "hasInstance",
        "hasLayout",
        "hasOrientation",
        "hasOwnProperty",
        "hasPointerCapture",
        "hasPosition",
        "hasReading",
        "hasStorageAccess",
        "hash",
        "head",
        "headers",
        "heading",
        "height",
        "hidden",
        "hide",
        "hideFocus",
        "high",
        "highWaterMark",
        "hint",
        "hints",
        "history",
        "honorificPrefix",
        "honorificSuffix",
        "horizontalOverflow",
        "host",
        "hostCandidate",
        "hostname",
        "href",
        "hrefTranslate",
        "hreflang",
        "hspace",
        "html5TagCheckInerface",
        "htmlFor",
        "htmlText",
        "httpEquiv",
        "httpRequestStatusCode",
        "hwTimestamp",
        "hyphens",
        "hypot",
        "iccId",
        "iceConnectionState",
        "iceGatheringState",
        "iceTransport",
        "icon",
        "iconURL",
        "id",
        "identifier",
        "identity",
        "idpLoginUrl",
        "ignoreBOM",
        "ignoreCase",
        "ignoreDepthValues",
        "image-orientation",
        "image-rendering",
        "imageHeight",
        "imageOrientation",
        "imageRendering",
        "imageSizes",
        "imageSmoothingEnabled",
        "imageSmoothingQuality",
        "imageSrcset",
        "imageWidth",
        "images",
        "ime-mode",
        "imeMode",
        "implementation",
        "importExternalTexture",
        "importKey",
        "importNode",
        "importStylesheet",
        "imports",
        "impp",
        "imul",
        "in",
        "in1",
        "in2",
        "inBandMetadataTrackDispatchType",
        "inRange",
        "includes",
        "incremental",
        "indeterminate",
        "index",
        "indexNames",
        "indexOf",
        "indexedDB",
        "indicate",
        "indices",
        "inert",
        "inertiaDestinationX",
        "inertiaDestinationY",
        "info",
        "init",
        "initAnimationEvent",
        "initBeforeLoadEvent",
        "initClipboardEvent",
        "initCloseEvent",
        "initCommandEvent",
        "initCompositionEvent",
        "initCustomEvent",
        "initData",
        "initDataType",
        "initDeviceMotionEvent",
        "initDeviceOrientationEvent",
        "initDragEvent",
        "initErrorEvent",
        "initEvent",
        "initFocusEvent",
        "initGestureEvent",
        "initHashChangeEvent",
        "initKeyEvent",
        "initKeyboardEvent",
        "initMSManipulationEvent",
        "initMessageEvent",
        "initMouseEvent",
        "initMouseScrollEvent",
        "initMouseWheelEvent",
        "initMutationEvent",
        "initNSMouseEvent",
        "initOverflowEvent",
        "initPageEvent",
        "initPageTransitionEvent",
        "initPointerEvent",
        "initPopStateEvent",
        "initProgressEvent",
        "initScrollAreaEvent",
        "initSimpleGestureEvent",
        "initStorageEvent",
        "initTextEvent",
        "initTimeEvent",
        "initTouchEvent",
        "initTransitionEvent",
        "initUIEvent",
        "initWebKitAnimationEvent",
        "initWebKitTransitionEvent",
        "initWebKitWheelEvent",
        "initWheelEvent",
        "initialTime",
        "initialize",
        "initiatorType",
        "inline-size",
        "inlineSize",
        "inlineVerticalFieldOfView",
        "inner",
        "innerHTML",
        "innerHeight",
        "innerText",
        "innerWidth",
        "input",
        "inputBuffer",
        "inputEncoding",
        "inputMethod",
        "inputMode",
        "inputSource",
        "inputSources",
        "inputType",
        "inputs",
        "insertAdjacentElement",
        "insertAdjacentHTML",
        "insertAdjacentText",
        "insertBefore",
        "insertCell",
        "insertDTMF",
        "insertData",
        "insertDebugMarker",
        "insertItemBefore",
        "insertNode",
        "insertRow",
        "insertRule",
        "inset",
        "inset-block",
        "inset-block-end",
        "inset-block-start",
        "inset-inline",
        "inset-inline-end",
        "inset-inline-start",
        "insetBlock",
        "insetBlockEnd",
        "insetBlockStart",
        "insetInline",
        "insetInlineEnd",
        "insetInlineStart",
        "installing",
        "instanceRoot",
        "instantiate",
        "instantiateStreaming",
        "instruments",
        "int16",
        "int32",
        "int8",
        "integrity",
        "interactionMode",
        "intercept",
        "interfaceClass",
        "interfaceName",
        "interfaceNumber",
        "interfaceProtocol",
        "interfaceSubclass",
        "interfaces",
        "interimResults",
        "internalSubset",
        "interpretation",
        "intersectionRatio",
        "intersectionRect",
        "intersectsNode",
        "interval",
        "invalidIteratorState",
        "invalidateFramebuffer",
        "invalidateSubFramebuffer",
        "inverse",
        "invertSelf",
        "is",
        "is2D",
        "isActive",
        "isAlternate",
        "isArray",
        "isBingCurrentSearchDefault",
        "isBuffer",
        "isCandidateWindowVisible",
        "isChar",
        "isCollapsed",
        "isComposing",
        "isConcatSpreadable",
        "isConnected",
        "isContentEditable",
        "isContentHandlerRegistered",
        "isContextLost",
        "isDefaultNamespace",
        "isDirectory",
        "isDisabled",
        "isEnabled",
        "isEqual",
        "isEqualNode",
        "isExtensible",
        "isExternalCTAP2SecurityKeySupported",
        "isFallbackAdapter",
        "isFile",
        "isFinite",
        "isFramebuffer",
        "isFrozen",
        "isGenerator",
        "isHTML",
        "isHistoryNavigation",
        "isId",
        "isIdentity",
        "isInjected",
        "isInteger",
        "isIntersecting",
        "isLockFree",
        "isMap",
        "isMultiLine",
        "isNaN",
        "isOpen",
        "isPointInFill",
        "isPointInPath",
        "isPointInRange",
        "isPointInStroke",
        "isPrefAlternate",
        "isPresenting",
        "isPrimary",
        "isProgram",
        "isPropertyImplicit",
        "isProtocolHandlerRegistered",
        "isPrototypeOf",
        "isQuery",
        "isRenderbuffer",
        "isSafeInteger",
        "isSameNode",
        "isSampler",
        "isScript",
        "isScriptURL",
        "isSealed",
        "isSecureContext",
        "isSessionSupported",
        "isShader",
        "isSupported",
        "isSync",
        "isTextEdit",
        "isTexture",
        "isTransformFeedback",
        "isTrusted",
        "isTypeSupported",
        "isUserVerifyingPlatformAuthenticatorAvailable",
        "isVertexArray",
        "isView",
        "isVisible",
        "isochronousTransferIn",
        "isochronousTransferOut",
        "isolation",
        "italics",
        "item",
        "itemId",
        "itemProp",
        "itemRef",
        "itemScope",
        "itemType",
        "itemValue",
        "items",
        "iterateNext",
        "iterationComposite",
        "iterator",
        "javaEnabled",
        "jobTitle",
        "join",
        "json",
        "justify-content",
        "justify-items",
        "justify-self",
        "justifyContent",
        "justifyItems",
        "justifySelf",
        "k1",
        "k2",
        "k3",
        "k4",
        "kHz",
        "keepalive",
        "kernelMatrix",
        "kernelUnitLengthX",
        "kernelUnitLengthY",
        "kerning",
        "key",
        "keyCode",
        "keyFor",
        "keyIdentifier",
        "keyLightEnabled",
        "keyLocation",
        "keyPath",
        "keyStatuses",
        "keySystem",
        "keyText",
        "keyUsage",
        "keyboard",
        "keys",
        "keytype",
        "kind",
        "knee",
        "label",
        "labels",
        "lang",
        "language",
        "languages",
        "largeArcFlag",
        "lastChild",
        "lastElementChild",
        "lastEventId",
        "lastIndex",
        "lastIndexOf",
        "lastInputTime",
        "lastMatch",
        "lastMessageSubject",
        "lastMessageType",
        "lastModified",
        "lastModifiedDate",
        "lastPage",
        "lastParen",
        "lastState",
        "lastStyleSheetSet",
        "latitude",
        "layerX",
        "layerY",
        "layout",
        "layoutFlow",
        "layoutGrid",
        "layoutGridChar",
        "layoutGridLine",
        "layoutGridMode",
        "layoutGridType",
        "lbound",
        "left",
        "leftContext",
        "leftDegrees",
        "leftMargin",
        "leftProjectionMatrix",
        "leftViewMatrix",
        "length",
        "lengthAdjust",
        "lengthComputable",
        "letter-spacing",
        "letterSpacing",
        "level",
        "lighting-color",
        "lightingColor",
        "limitingConeAngle",
        "limits",
        "line",
        "line-break",
        "line-height",
        "lineAlign",
        "lineBreak",
        "lineCap",
        "lineDashOffset",
        "lineHeight",
        "lineJoin",
        "lineNum",
        "lineNumber",
        "linePos",
        "lineTo",
        "lineWidth",
        "linearAcceleration",
        "linearRampToValueAtTime",
        "linearVelocity",
        "lineno",
        "lines",
        "link",
        "linkColor",
        "linkProgram",
        "links",
        "list",
        "list-style",
        "list-style-image",
        "list-style-position",
        "list-style-type",
        "listStyle",
        "listStyleImage",
        "listStylePosition",
        "listStyleType",
        "listener",
        "load",
        "loadEventEnd",
        "loadEventStart",
        "loadOp",
        "loadTime",
        "loadTimes",
        "loaded",
        "loading",
        "localDescription",
        "localName",
        "localService",
        "localStorage",
        "locale",
        "localeCompare",
        "location",
        "locationbar",
        "lock",
        "locked",
        "lockedFile",
        "locks",
        "lodMaxClamp",
        "lodMinClamp",
        "log",
        "log10",
        "log1p",
        "log2",
        "logicalXDPI",
        "logicalYDPI",
        "longDesc",
        "longitude",
        "lookupNamespaceURI",
        "lookupPrefix",
        "loop",
        "loopEnd",
        "loopStart",
        "looping",
        "lost",
        "low",
        "lower",
        "lowerBound",
        "lowerOpen",
        "lowsrc",
        "m11",
        "m12",
        "m13",
        "m14",
        "m21",
        "m22",
        "m23",
        "m24",
        "m31",
        "m32",
        "m33",
        "m34",
        "m41",
        "m42",
        "m43",
        "m44",
        "magFilter",
        "makeXRCompatible",
        "manifest",
        "manufacturer",
        "manufacturerName",
        "map",
        "mapAsync",
        "mapState",
        "mappedAtCreation",
        "mapping",
        "margin",
        "margin-block",
        "margin-block-end",
        "margin-block-start",
        "margin-bottom",
        "margin-inline",
        "margin-inline-end",
        "margin-inline-start",
        "margin-left",
        "margin-right",
        "margin-top",
        "marginBlock",
        "marginBlockEnd",
        "marginBlockStart",
        "marginBottom",
        "marginHeight",
        "marginInline",
        "marginInlineEnd",
        "marginInlineStart",
        "marginLeft",
        "marginRight",
        "marginTop",
        "marginWidth",
        "mark",
        "marker",
        "marker-end",
        "marker-mid",
        "marker-offset",
        "marker-start",
        "markerEnd",
        "markerHeight",
        "markerMid",
        "markerOffset",
        "markerStart",
        "markerUnits",
        "markerWidth",
        "marks",
        "mask",
        "mask-clip",
        "mask-composite",
        "mask-image",
        "mask-mode",
        "mask-origin",
        "mask-position",
        "mask-position-x",
        "mask-position-y",
        "mask-repeat",
        "mask-size",
        "mask-type",
        "maskClip",
        "maskComposite",
        "maskContentUnits",
        "maskImage",
        "maskMode",
        "maskOrigin",
        "maskPosition",
        "maskPositionX",
        "maskPositionY",
        "maskRepeat",
        "maskSize",
        "maskType",
        "maskUnits",
        "match",
        "matchAll",
        "matchMedia",
        "matchMedium",
        "matches",
        "matrix",
        "matrixTransform",
        "max",
        "max-block-size",
        "max-height",
        "max-inline-size",
        "max-width",
        "maxActions",
        "maxAlternatives",
        "maxAnisotropy",
        "maxBindGroups",
        "maxBindGroupsPlusVertexBuffers",
        "maxBindingsPerBindGroup",
        "maxBlockSize",
        "maxBufferSize",
        "maxChannelCount",
        "maxChannels",
        "maxColorAttachmentBytesPerSample",
        "maxColorAttachments",
        "maxComputeInvocationsPerWorkgroup",
        "maxComputeWorkgroupSizeX",
        "maxComputeWorkgroupSizeY",
        "maxComputeWorkgroupSizeZ",
        "maxComputeWorkgroupStorageSize",
        "maxComputeWorkgroupsPerDimension",
        "maxConnectionsPerServer",
        "maxDecibels",
        "maxDistance",
        "maxDrawCount",
        "maxDynamicStorageBuffersPerPipelineLayout",
        "maxDynamicUniformBuffersPerPipelineLayout",
        "maxHeight",
        "maxInlineSize",
        "maxInterStageShaderComponents",
        "maxInterStageShaderVariables",
        "maxLayers",
        "maxLength",
        "maxMessageSize",
        "maxPacketLifeTime",
        "maxRetransmits",
        "maxSampledTexturesPerShaderStage",
        "maxSamplersPerShaderStage",
        "maxStorageBufferBindingSize",
        "maxStorageBuffersPerShaderStage",
        "maxStorageTexturesPerShaderStage",
        "maxTextureArrayLayers",
        "maxTextureDimension1D",
        "maxTextureDimension2D",
        "maxTextureDimension3D",
        "maxTouchPoints",
        "maxUniformBufferBindingSize",
        "maxUniformBuffersPerShaderStage",
        "maxValue",
        "maxVertexAttributes",
        "maxVertexBufferArrayStride",
        "maxVertexBuffers",
        "maxWidth",
        "measure",
        "measureText",
        "media",
        "mediaCapabilities",
        "mediaDevices",
        "mediaElement",
        "mediaGroup",
        "mediaKeys",
        "mediaSession",
        "mediaStream",
        "mediaText",
        "meetOrSlice",
        "memory",
        "menubar",
        "mergeAttributes",
        "message",
        "messageClass",
        "messageHandlers",
        "messageType",
        "messages",
        "metaKey",
        "metadata",
        "method",
        "methodDetails",
        "methodName",
        "mid",
        "mimeType",
        "mimeTypes",
        "min",
        "min-block-size",
        "min-height",
        "min-inline-size",
        "min-width",
        "minBindingSize",
        "minBlockSize",
        "minDecibels",
        "minFilter",
        "minHeight",
        "minInlineSize",
        "minLength",
        "minStorageBufferOffsetAlignment",
        "minUniformBufferOffsetAlignment",
        "minValue",
        "minWidth",
        "mipLevel",
        "mipLevelCount",
        "mipmapFilter",
        "miterLimit",
        "mix-blend-mode",
        "mixBlendMode",
        "mm",
        "mobile",
        "mode",
        "model",
        "modify",
        "module",
        "mount",
        "move",
        "moveBy",
        "moveEnd",
        "moveFirst",
        "moveFocusDown",
        "moveFocusLeft",
        "moveFocusRight",
        "moveFocusUp",
        "moveNext",
        "moveRow",
        "moveStart",
        "moveTo",
        "moveToBookmark",
        "moveToElementText",
        "moveToPoint",
        "movementX",
        "movementY",
        "mozAdd",
        "mozAnimationStartTime",
        "mozAnon",
        "mozApps",
        "mozAudioCaptured",
        "mozAudioChannelType",
        "mozAutoplayEnabled",
        "mozCancelAnimationFrame",
        "mozCancelFullScreen",
        "mozCancelRequestAnimationFrame",
        "mozCaptureStream",
        "mozCaptureStreamUntilEnded",
        "mozClearDataAt",
        "mozContact",
        "mozContacts",
        "mozCreateFileHandle",
        "mozCurrentTransform",
        "mozCurrentTransformInverse",
        "mozCursor",
        "mozDash",
        "mozDashOffset",
        "mozDecodedFrames",
        "mozExitPointerLock",
        "mozFillRule",
        "mozFragmentEnd",
        "mozFrameDelay",
        "mozFullScreen",
        "mozFullScreenElement",
        "mozFullScreenEnabled",
        "mozGetAll",
        "mozGetAllKeys",
        "mozGetAsFile",
        "mozGetDataAt",
        "mozGetMetadata",
        "mozGetUserMedia",
        "mozHasAudio",
        "mozHasItem",
        "mozHidden",
        "mozImageSmoothingEnabled",
        "mozIndexedDB",
        "mozInnerScreenX",
        "mozInnerScreenY",
        "mozInputSource",
        "mozIsTextField",
        "mozItem",
        "mozItemCount",
        "mozItems",
        "mozLength",
        "mozLockOrientation",
        "mozMatchesSelector",
        "mozMovementX",
        "mozMovementY",
        "mozOpaque",
        "mozOrientation",
        "mozPaintCount",
        "mozPaintedFrames",
        "mozParsedFrames",
        "mozPay",
        "mozPointerLockElement",
        "mozPresentedFrames",
        "mozPreservesPitch",
        "mozPressure",
        "mozPrintCallback",
        "mozRTCIceCandidate",
        "mozRTCPeerConnection",
        "mozRTCSessionDescription",
        "mozRemove",
        "mozRequestAnimationFrame",
        "mozRequestFullScreen",
        "mozRequestPointerLock",
        "mozSetDataAt",
        "mozSetImageElement",
        "mozSourceNode",
        "mozSrcObject",
        "mozSystem",
        "mozTCPSocket",
        "mozTextStyle",
        "mozTypesAt",
        "mozUnlockOrientation",
        "mozUserCancelled",
        "mozVisibilityState",
        "ms",
        "msAnimation",
        "msAnimationDelay",
        "msAnimationDirection",
        "msAnimationDuration",
        "msAnimationFillMode",
        "msAnimationIterationCount",
        "msAnimationName",
        "msAnimationPlayState",
        "msAnimationStartTime",
        "msAnimationTimingFunction",
        "msBackfaceVisibility",
        "msBlockProgression",
        "msCSSOMElementFloatMetrics",
        "msCaching",
        "msCachingEnabled",
        "msCancelRequestAnimationFrame",
        "msCapsLockWarningOff",
        "msClearImmediate",
        "msClose",
        "msContentZoomChaining",
        "msContentZoomFactor",
        "msContentZoomLimit",
        "msContentZoomLimitMax",
        "msContentZoomLimitMin",
        "msContentZoomSnap",
        "msContentZoomSnapPoints",
        "msContentZoomSnapType",
        "msContentZooming",
        "msConvertURL",
        "msCrypto",
        "msDoNotTrack",
        "msElementsFromPoint",
        "msElementsFromRect",
        "msExitFullscreen",
        "msExtendedCode",
        "msFillRule",
        "msFirstPaint",
        "msFlex",
        "msFlexAlign",
        "msFlexDirection",
        "msFlexFlow",
        "msFlexItemAlign",
        "msFlexLinePack",
        "msFlexNegative",
        "msFlexOrder",
        "msFlexPack",
        "msFlexPositive",
        "msFlexPreferredSize",
        "msFlexWrap",
        "msFlowFrom",
        "msFlowInto",
        "msFontFeatureSettings",
        "msFullscreenElement",
        "msFullscreenEnabled",
        "msGetInputContext",
        "msGetRegionContent",
        "msGetUntransformedBounds",
        "msGraphicsTrustStatus",
        "msGridColumn",
        "msGridColumnAlign",
        "msGridColumnSpan",
        "msGridColumns",
        "msGridRow",
        "msGridRowAlign",
        "msGridRowSpan",
        "msGridRows",
        "msHidden",
        "msHighContrastAdjust",
        "msHyphenateLimitChars",
        "msHyphenateLimitLines",
        "msHyphenateLimitZone",
        "msHyphens",
        "msImageSmoothingEnabled",
        "msImeAlign",
        "msIndexedDB",
        "msInterpolationMode",
        "msIsStaticHTML",
        "msKeySystem",
        "msKeys",
        "msLaunchUri",
        "msLockOrientation",
        "msManipulationViewsEnabled",
        "msMatchMedia",
        "msMatchesSelector",
        "msMaxTouchPoints",
        "msOrientation",
        "msOverflowStyle",
        "msPerspective",
        "msPerspectiveOrigin",
        "msPlayToDisabled",
        "msPlayToPreferredSourceUri",
        "msPlayToPrimary",
        "msPointerEnabled",
        "msRegionOverflow",
        "msReleasePointerCapture",
        "msRequestAnimationFrame",
        "msRequestFullscreen",
        "msSaveBlob",
        "msSaveOrOpenBlob",
        "msScrollChaining",
        "msScrollLimit",
        "msScrollLimitXMax",
        "msScrollLimitXMin",
        "msScrollLimitYMax",
        "msScrollLimitYMin",
        "msScrollRails",
        "msScrollSnapPointsX",
        "msScrollSnapPointsY",
        "msScrollSnapType",
        "msScrollSnapX",
        "msScrollSnapY",
        "msScrollTranslation",
        "msSetImmediate",
        "msSetMediaKeys",
        "msSetPointerCapture",
        "msTextCombineHorizontal",
        "msTextSizeAdjust",
        "msToBlob",
        "msTouchAction",
        "msTouchSelect",
        "msTraceAsyncCallbackCompleted",
        "msTraceAsyncCallbackStarting",
        "msTraceAsyncOperationCompleted",
        "msTraceAsyncOperationStarting",
        "msTransform",
        "msTransformOrigin",
        "msTransformStyle",
        "msTransition",
        "msTransitionDelay",
        "msTransitionDuration",
        "msTransitionProperty",
        "msTransitionTimingFunction",
        "msUnlockOrientation",
        "msUpdateAsyncCallbackRelation",
        "msUserSelect",
        "msVisibilityState",
        "msWrapFlow",
        "msWrapMargin",
        "msWrapThrough",
        "msWriteProfilerMark",
        "msZoom",
        "msZoomTo",
        "mt",
        "mul",
        "multiEntry",
        "multiSelectionObj",
        "multiline",
        "multiple",
        "multiply",
        "multiplySelf",
        "multisample",
        "multisampled",
        "mutableFile",
        "muted",
        "n",
        "name",
        "nameProp",
        "namedItem",
        "namedRecordset",
        "names",
        "namespaceURI",
        "namespaces",
        "naturalHeight",
        "naturalWidth",
        "navigate",
        "navigation",
        "navigationMode",
        "navigationPreload",
        "navigationStart",
        "navigator",
        "near",
        "nearestViewportElement",
        "negative",
        "negotiated",
        "netscape",
        "networkState",
        "newScale",
        "newTranslate",
        "newURL",
        "newValue",
        "newValueSpecifiedUnits",
        "newVersion",
        "newhome",
        "next",
        "nextElementSibling",
        "nextHopProtocol",
        "nextNode",
        "nextPage",
        "nextSibling",
        "nickname",
        "noHref",
        "noModule",
        "noResize",
        "noShade",
        "noValidate",
        "noWrap",
        "node",
        "nodeName",
        "nodeType",
        "nodeValue",
        "nonce",
        "normalize",
        "normalizedPathSegList",
        "notationName",
        "notations",
        "note",
        "noteGrainOn",
        "noteOff",
        "noteOn",
        "notify",
        "now",
        "numOctaves",
        "number",
        "numberOfChannels",
        "numberOfInputs",
        "numberOfItems",
        "numberOfOutputs",
        "numberValue",
        "oMatchesSelector",
        "object",
        "object-fit",
        "object-position",
        "objectFit",
        "objectPosition",
        "objectStore",
        "objectStoreNames",
        "objectType",
        "observe",
        "occlusionQuerySet",
        "of",
        "offscreenBuffering",
        "offset",
        "offset-anchor",
        "offset-distance",
        "offset-path",
        "offset-rotate",
        "offsetAnchor",
        "offsetDistance",
        "offsetHeight",
        "offsetLeft",
        "offsetNode",
        "offsetParent",
        "offsetPath",
        "offsetRotate",
        "offsetTop",
        "offsetWidth",
        "offsetX",
        "offsetY",
        "ok",
        "oldURL",
        "oldValue",
        "oldVersion",
        "olderShadowRoot",
        "onLine",
        "onSubmittedWorkDone",
        "onabort",
        "onabsolutedeviceorientation",
        "onactivate",
        "onactive",
        "onaddsourcebuffer",
        "onaddstream",
        "onaddtrack",
        "onafterprint",
        "onafterscriptexecute",
        "onafterupdate",
        "onanimationcancel",
        "onanimationend",
        "onanimationiteration",
        "onanimationstart",
        "onappinstalled",
        "onaudioend",
        "onaudioprocess",
        "onaudiostart",
        "onautocomplete",
        "onautocompleteerror",
        "onauxclick",
        "onbeforeactivate",
        "onbeforecopy",
        "onbeforecut",
        "onbeforedeactivate",
        "onbeforeeditfocus",
        "onbeforeinstallprompt",
        "onbeforepaste",
        "onbeforeprint",
        "onbeforescriptexecute",
        "onbeforeunload",
        "onbeforeupdate",
        "onbeforexrselect",
        "onbegin",
        "onblocked",
        "onblur",
        "onbounce",
        "onboundary",
        "onbufferedamountlow",
        "oncached",
        "oncancel",
        "oncandidatewindowhide",
        "oncandidatewindowshow",
        "oncandidatewindowupdate",
        "oncanplay",
        "oncanplaythrough",
        "once",
        "oncellchange",
        "onchange",
        "oncharacteristicvaluechanged",
        "onchargingchange",
        "onchargingtimechange",
        "onchecking",
        "onclick",
        "onclose",
        "onclosing",
        "oncompassneedscalibration",
        "oncomplete",
        "onconnect",
        "onconnecting",
        "onconnectionavailable",
        "onconnectionstatechange",
        "oncontextmenu",
        "oncontrollerchange",
        "oncontrolselect",
        "oncopy",
        "oncuechange",
        "oncut",
        "ondataavailable",
        "ondatachannel",
        "ondatasetchanged",
        "ondatasetcomplete",
        "ondblclick",
        "ondeactivate",
        "ondevicechange",
        "ondevicelight",
        "ondevicemotion",
        "ondeviceorientation",
        "ondeviceorientationabsolute",
        "ondeviceproximity",
        "ondischargingtimechange",
        "ondisconnect",
        "ondisplay",
        "ondownloading",
        "ondrag",
        "ondragend",
        "ondragenter",
        "ondragexit",
        "ondragleave",
        "ondragover",
        "ondragstart",
        "ondrop",
        "ondurationchange",
        "onemptied",
        "onencrypted",
        "onend",
        "onended",
        "onenter",
        "onenterpictureinpicture",
        "onerror",
        "onerrorupdate",
        "onexit",
        "onfilterchange",
        "onfinish",
        "onfocus",
        "onfocusin",
        "onfocusout",
        "onformdata",
        "onfreeze",
        "onfullscreenchange",
        "onfullscreenerror",
        "ongatheringstatechange",
        "ongattserverdisconnected",
        "ongesturechange",
        "ongestureend",
        "ongesturestart",
        "ongotpointercapture",
        "onhashchange",
        "onhelp",
        "onicecandidate",
        "onicecandidateerror",
        "oniceconnectionstatechange",
        "onicegatheringstatechange",
        "oninactive",
        "oninput",
        "oninputsourceschange",
        "oninvalid",
        "onkeydown",
        "onkeypress",
        "onkeystatuseschange",
        "onkeyup",
        "onlanguagechange",
        "onlayoutcomplete",
        "onleavepictureinpicture",
        "onlevelchange",
        "onload",
        "onloadeddata",
        "onloadedmetadata",
        "onloadend",
        "onloading",
        "onloadingdone",
        "onloadingerror",
        "onloadstart",
        "onlosecapture",
        "onlostpointercapture",
        "only",
        "onmark",
        "onmessage",
        "onmessageerror",
        "onmidimessage",
        "onmousedown",
        "onmouseenter",
        "onmouseleave",
        "onmousemove",
        "onmouseout",
        "onmouseover",
        "onmouseup",
        "onmousewheel",
        "onmove",
        "onmoveend",
        "onmovestart",
        "onmozfullscreenchange",
        "onmozfullscreenerror",
        "onmozorientationchange",
        "onmozpointerlockchange",
        "onmozpointerlockerror",
        "onmscontentzoom",
        "onmsfullscreenchange",
        "onmsfullscreenerror",
        "onmsgesturechange",
        "onmsgesturedoubletap",
        "onmsgestureend",
        "onmsgesturehold",
        "onmsgesturestart",
        "onmsgesturetap",
        "onmsgotpointercapture",
        "onmsinertiastart",
        "onmslostpointercapture",
        "onmsmanipulationstatechanged",
        "onmsneedkey",
        "onmsorientationchange",
        "onmspointercancel",
        "onmspointerdown",
        "onmspointerenter",
        "onmspointerhover",
        "onmspointerleave",
        "onmspointermove",
        "onmspointerout",
        "onmspointerover",
        "onmspointerup",
        "onmssitemodejumplistitemremoved",
        "onmsthumbnailclick",
        "onmute",
        "onnegotiationneeded",
        "onnomatch",
        "onnoupdate",
        "onobsolete",
        "onoffline",
        "ononline",
        "onopen",
        "onorientationchange",
        "onpagechange",
        "onpagehide",
        "onpageshow",
        "onpaste",
        "onpause",
        "onpayerdetailchange",
        "onpaymentmethodchange",
        "onplay",
        "onplaying",
        "onpluginstreamstart",
        "onpointercancel",
        "onpointerdown",
        "onpointerenter",
        "onpointerleave",
        "onpointerlockchange",
        "onpointerlockerror",
        "onpointermove",
        "onpointerout",
        "onpointerover",
        "onpointerrawupdate",
        "onpointerup",
        "onpopstate",
        "onprocessorerror",
        "onprogress",
        "onpropertychange",
        "onratechange",
        "onreading",
        "onreadystatechange",
        "onrejectionhandled",
        "onrelease",
        "onremove",
        "onremovesourcebuffer",
        "onremovestream",
        "onremovetrack",
        "onrepeat",
        "onreset",
        "onresize",
        "onresizeend",
        "onresizestart",
        "onresourcetimingbufferfull",
        "onresult",
        "onresume",
        "onrowenter",
        "onrowexit",
        "onrowsdelete",
        "onrowsinserted",
        "onscroll",
        "onsearch",
        "onsecuritypolicyviolation",
        "onseeked",
        "onseeking",
        "onselect",
        "onselectedcandidatepairchange",
        "onselectend",
        "onselectionchange",
        "onselectstart",
        "onshippingaddresschange",
        "onshippingoptionchange",
        "onshow",
        "onsignalingstatechange",
        "onsoundend",
        "onsoundstart",
        "onsourceclose",
        "onsourceclosed",
        "onsourceended",
        "onsourceopen",
        "onspeechend",
        "onspeechstart",
        "onsqueeze",
        "onsqueezeend",
        "onsqueezestart",
        "onstalled",
        "onstart",
        "onstatechange",
        "onstop",
        "onstorage",
        "onstoragecommit",
        "onsubmit",
        "onsuccess",
        "onsuspend",
        "onterminate",
        "ontextinput",
        "ontimeout",
        "ontimeupdate",
        "ontoggle",
        "ontonechange",
        "ontouchcancel",
        "ontouchend",
        "ontouchmove",
        "ontouchstart",
        "ontrack",
        "ontransitioncancel",
        "ontransitionend",
        "ontransitionrun",
        "ontransitionstart",
        "onuncapturederror",
        "onunhandledrejection",
        "onunload",
        "onunmute",
        "onupdate",
        "onupdateend",
        "onupdatefound",
        "onupdateready",
        "onupdatestart",
        "onupgradeneeded",
        "onuserproximity",
        "onversionchange",
        "onvisibilitychange",
        "onvoiceschanged",
        "onvolumechange",
        "onvrdisplayactivate",
        "onvrdisplayconnect",
        "onvrdisplaydeactivate",
        "onvrdisplaydisconnect",
        "onvrdisplaypresentchange",
        "onwaiting",
        "onwaitingforkey",
        "onwarning",
        "onwebkitanimationend",
        "onwebkitanimationiteration",
        "onwebkitanimationstart",
        "onwebkitcurrentplaybacktargetiswirelesschanged",
        "onwebkitfullscreenchange",
        "onwebkitfullscreenerror",
        "onwebkitkeyadded",
        "onwebkitkeyerror",
        "onwebkitkeymessage",
        "onwebkitneedkey",
        "onwebkitorientationchange",
        "onwebkitplaybacktargetavailabilitychanged",
        "onwebkitpointerlockchange",
        "onwebkitpointerlockerror",
        "onwebkitresourcetimingbufferfull",
        "onwebkittransitionend",
        "onwheel",
        "onzoom",
        "opacity",
        "open",
        "openCursor",
        "openDatabase",
        "openKeyCursor",
        "opened",
        "opener",
        "opera",
        "operation",
        "operationType",
        "operator",
        "opr",
        "optimum",
        "options",
        "or",
        "order",
        "orderX",
        "orderY",
        "ordered",
        "org",
        "organization",
        "orient",
        "orientAngle",
        "orientType",
        "orientation",
        "orientationX",
        "orientationY",
        "orientationZ",
        "origin",
        "originalPolicy",
        "originalTarget",
        "orphans",
        "oscpu",
        "outerHTML",
        "outerHeight",
        "outerText",
        "outerWidth",
        "outline",
        "outline-color",
        "outline-offset",
        "outline-style",
        "outline-width",
        "outlineColor",
        "outlineOffset",
        "outlineStyle",
        "outlineWidth",
        "outputBuffer",
        "outputChannelCount",
        "outputLatency",
        "outputs",
        "overflow",
        "overflow-anchor",
        "overflow-block",
        "overflow-inline",
        "overflow-wrap",
        "overflow-x",
        "overflow-y",
        "overflowAnchor",
        "overflowBlock",
        "overflowInline",
        "overflowWrap",
        "overflowX",
        "overflowY",
        "overrideMimeType",
        "oversample",
        "overscroll-behavior",
        "overscroll-behavior-block",
        "overscroll-behavior-inline",
        "overscroll-behavior-x",
        "overscroll-behavior-y",
        "overscrollBehavior",
        "overscrollBehaviorBlock",
        "overscrollBehaviorInline",
        "overscrollBehaviorX",
        "overscrollBehaviorY",
        "ownKeys",
        "ownerDocument",
        "ownerElement",
        "ownerNode",
        "ownerRule",
        "ownerSVGElement",
        "owningElement",
        "p1",
        "p2",
        "p3",
        "p4",
        "packetSize",
        "packets",
        "pad",
        "padEnd",
        "padStart",
        "padding",
        "padding-block",
        "padding-block-end",
        "padding-block-start",
        "padding-bottom",
        "padding-inline",
        "padding-inline-end",
        "padding-inline-start",
        "padding-left",
        "padding-right",
        "padding-top",
        "paddingBlock",
        "paddingBlockEnd",
        "paddingBlockStart",
        "paddingBottom",
        "paddingInline",
        "paddingInlineEnd",
        "paddingInlineStart",
        "paddingLeft",
        "paddingRight",
        "paddingTop",
        "page",
        "page-break-after",
        "page-break-before",
        "page-break-inside",
        "pageBreakAfter",
        "pageBreakBefore",
        "pageBreakInside",
        "pageCount",
        "pageLeft",
        "pageTop",
        "pageX",
        "pageXOffset",
        "pageY",
        "pageYOffset",
        "pages",
        "paint-order",
        "paintOrder",
        "paintRequests",
        "paintType",
        "paintWorklet",
        "palette",
        "pan",
        "panningModel",
        "parameterData",
        "parameters",
        "parent",
        "parentElement",
        "parentNode",
        "parentRule",
        "parentStyleSheet",
        "parentTextEdit",
        "parentWindow",
        "parse",
        "parseAll",
        "parseFloat",
        "parseFromString",
        "parseInt",
        "part",
        "participants",
        "passOp",
        "passive",
        "password",
        "pasteHTML",
        "path",
        "pathLength",
        "pathSegList",
        "pathSegType",
        "pathSegTypeAsLetter",
        "pathname",
        "pattern",
        "patternContentUnits",
        "patternMismatch",
        "patternTransform",
        "patternUnits",
        "pause",
        "pauseAnimations",
        "pauseOnExit",
        "pauseProfilers",
        "pauseTransformFeedback",
        "paused",
        "payerEmail",
        "payerName",
        "payerPhone",
        "paymentManager",
        "pc",
        "peerIdentity",
        "pending",
        "pendingLocalDescription",
        "pendingRemoteDescription",
        "percent",
        "performance",
        "periodicSync",
        "permission",
        "permissionState",
        "permissions",
        "persist",
        "persisted",
        "personalbar",
        "perspective",
        "perspective-origin",
        "perspectiveOrigin",
        "phone",
        "phoneticFamilyName",
        "phoneticGivenName",
        "photo",
        "pictureInPictureElement",
        "pictureInPictureEnabled",
        "pictureInPictureWindow",
        "ping",
        "pipeThrough",
        "pipeTo",
        "pitch",
        "pixelBottom",
        "pixelDepth",
        "pixelHeight",
        "pixelLeft",
        "pixelRight",
        "pixelStorei",
        "pixelTop",
        "pixelUnitToMillimeterX",
        "pixelUnitToMillimeterY",
        "pixelWidth",
        "place-content",
        "place-items",
        "place-self",
        "placeContent",
        "placeItems",
        "placeSelf",
        "placeholder",
        "platform",
        "platformVersion",
        "platforms",
        "play",
        "playEffect",
        "playState",
        "playbackRate",
        "playbackState",
        "playbackTime",
        "played",
        "playoutDelayHint",
        "playsInline",
        "plugins",
        "pluginspage",
        "pname",
        "pointer-events",
        "pointerBeforeReferenceNode",
        "pointerEnabled",
        "pointerEvents",
        "pointerId",
        "pointerLockElement",
        "pointerType",
        "points",
        "pointsAtX",
        "pointsAtY",
        "pointsAtZ",
        "polygonOffset",
        "pop",
        "popDebugGroup",
        "popErrorScope",
        "populateMatrix",
        "popupWindowFeatures",
        "popupWindowName",
        "popupWindowURI",
        "port",
        "port1",
        "port2",
        "ports",
        "posBottom",
        "posHeight",
        "posLeft",
        "posRight",
        "posTop",
        "posWidth",
        "pose",
        "position",
        "positionAlign",
        "positionX",
        "positionY",
        "positionZ",
        "postError",
        "postMessage",
        "postalCode",
        "poster",
        "pow",
        "powerEfficient",
        "powerOff",
        "powerPreference",
        "preMultiplySelf",
        "precision",
        "preferredStyleSheetSet",
        "preferredStylesheetSet",
        "prefix",
        "preload",
        "premultipliedAlpha",
        "prepend",
        "presentation",
        "preserveAlpha",
        "preserveAspectRatio",
        "preserveAspectRatioString",
        "pressed",
        "pressure",
        "prevValue",
        "preventDefault",
        "preventExtensions",
        "preventSilentAccess",
        "previousElementSibling",
        "previousNode",
        "previousPage",
        "previousRect",
        "previousScale",
        "previousSibling",
        "previousTranslate",
        "primaryKey",
        "primitive",
        "primitiveType",
        "primitiveUnits",
        "principals",
        "print",
        "priority",
        "privateKey",
        "probablySupportsContext",
        "process",
        "processIceMessage",
        "processingEnd",
        "processingStart",
        "processorOptions",
        "product",
        "productId",
        "productName",
        "productSub",
        "profile",
        "profileEnd",
        "profiles",
        "projectionMatrix",
        "promise",
        "prompt",
        "properties",
        "propertyIsEnumerable",
        "propertyName",
        "protocol",
        "protocolLong",
        "prototype",
        "provider",
        "pseudoClass",
        "pseudoElement",
        "pt",
        "publicId",
        "publicKey",
        "published",
        "pulse",
        "push",
        "pushDebugGroup",
        "pushErrorScope",
        "pushManager",
        "pushNotification",
        "pushState",
        "put",
        "putImageData",
        "px",
        "quadraticCurveTo",
        "qualifier",
        "quaternion",
        "query",
        "queryCommandEnabled",
        "queryCommandIndeterm",
        "queryCommandState",
        "queryCommandSupported",
        "queryCommandText",
        "queryCommandValue",
        "querySelector",
        "querySelectorAll",
        "querySet",
        "queue",
        "queueMicrotask",
        "quote",
        "quotes",
        "r",
        "r1",
        "r2",
        "race",
        "rad",
        "radiogroup",
        "radiusX",
        "radiusY",
        "random",
        "range",
        "rangeCount",
        "rangeMax",
        "rangeMin",
        "rangeOffset",
        "rangeOverflow",
        "rangeParent",
        "rangeUnderflow",
        "rate",
        "ratio",
        "raw",
        "rawId",
        "read",
        "readAsArrayBuffer",
        "readAsBinaryString",
        "readAsBlob",
        "readAsDataURL",
        "readAsText",
        "readBuffer",
        "readEntries",
        "readOnly",
        "readPixels",
        "readReportRequested",
        "readText",
        "readValue",
        "readable",
        "ready",
        "readyState",
        "reason",
        "reboot",
        "receivedAlert",
        "receiver",
        "receivers",
        "recipient",
        "reconnect",
        "recordNumber",
        "recordsAvailable",
        "recordset",
        "rect",
        "red",
        "redEyeReduction",
        "redirect",
        "redirectCount",
        "redirectEnd",
        "redirectStart",
        "redirected",
        "reduce",
        "reduceRight",
        "reduction",
        "refDistance",
        "refX",
        "refY",
        "referenceNode",
        "referenceSpace",
        "referrer",
        "referrerPolicy",
        "refresh",
        "region",
        "regionAnchorX",
        "regionAnchorY",
        "regionId",
        "regions",
        "register",
        "registerContentHandler",
        "registerElement",
        "registerProperty",
        "registerProtocolHandler",
        "reject",
        "rel",
        "relList",
        "relatedAddress",
        "relatedNode",
        "relatedPort",
        "relatedTarget",
        "release",
        "releaseCapture",
        "releaseEvents",
        "releaseInterface",
        "releaseLock",
        "releasePointerCapture",
        "releaseShaderCompiler",
        "reliable",
        "reliableWrite",
        "reload",
        "rem",
        "remainingSpace",
        "remote",
        "remoteDescription",
        "remove",
        "removeAllRanges",
        "removeAttribute",
        "removeAttributeNS",
        "removeAttributeNode",
        "removeBehavior",
        "removeChild",
        "removeCue",
        "removeEventListener",
        "removeFilter",
        "removeImport",
        "removeItem",
        "removeListener",
        "removeNamedItem",
        "removeNamedItemNS",
        "removeNode",
        "removeParameter",
        "removeProperty",
        "removeRange",
        "removeRegion",
        "removeRule",
        "removeSiteSpecificTrackingException",
        "removeSourceBuffer",
        "removeStream",
        "removeTrack",
        "removeVariable",
        "removeWakeLockListener",
        "removeWebWideTrackingException",
        "removed",
        "removedNodes",
        "renderHeight",
        "renderState",
        "renderTime",
        "renderWidth",
        "renderbufferStorage",
        "renderbufferStorageMultisample",
        "renderedBuffer",
        "renderingMode",
        "renotify",
        "repeat",
        "replace",
        "replaceAdjacentText",
        "replaceAll",
        "replaceChild",
        "replaceChildren",
        "replaceData",
        "replaceId",
        "replaceItem",
        "replaceNode",
        "replaceState",
        "replaceSync",
        "replaceTrack",
        "replaceWholeText",
        "replaceWith",
        "reportValidity",
        "request",
        "requestAdapter",
        "requestAdapterInfo",
        "requestAnimationFrame",
        "requestAutocomplete",
        "requestData",
        "requestDevice",
        "requestFrame",
        "requestFullscreen",
        "requestHitTestSource",
        "requestHitTestSourceForTransientInput",
        "requestId",
        "requestIdleCallback",
        "requestMIDIAccess",
        "requestMediaKeySystemAccess",
        "requestPermission",
        "requestPictureInPicture",
        "requestPointerLock",
        "requestPresent",
        "requestReferenceSpace",
        "requestSession",
        "requestStart",
        "requestStorageAccess",
        "requestSubmit",
        "requestVideoFrameCallback",
        "requestingWindow",
        "requireInteraction",
        "required",
        "requiredExtensions",
        "requiredFeatures",
        "requiredLimits",
        "reset",
        "resetPose",
        "resetTransform",
        "resize",
        "resizeBy",
        "resizeTo",
        "resolve",
        "resolveQuerySet",
        "resolveTarget",
        "resource",
        "response",
        "responseBody",
        "responseEnd",
        "responseReady",
        "responseStart",
        "responseText",
        "responseType",
        "responseURL",
        "responseXML",
        "restartIce",
        "restore",
        "result",
        "resultIndex",
        "resultType",
        "results",
        "resume",
        "resumeProfilers",
        "resumeTransformFeedback",
        "retry",
        "returnValue",
        "rev",
        "reverse",
        "reversed",
        "revocable",
        "revokeObjectURL",
        "rgbColor",
        "right",
        "rightContext",
        "rightDegrees",
        "rightMargin",
        "rightProjectionMatrix",
        "rightViewMatrix",
        "role",
        "rolloffFactor",
        "root",
        "rootBounds",
        "rootElement",
        "rootMargin",
        "rotate",
        "rotateAxisAngle",
        "rotateAxisAngleSelf",
        "rotateFromVector",
        "rotateFromVectorSelf",
        "rotateSelf",
        "rotation",
        "rotationAngle",
        "rotationRate",
        "round",
        "roundRect",
        "row-gap",
        "rowGap",
        "rowIndex",
        "rowSpan",
        "rows",
        "rowsPerImage",
        "rtcpTransport",
        "rtt",
        "ruby-align",
        "ruby-position",
        "rubyAlign",
        "rubyOverhang",
        "rubyPosition",
        "rules",
        "runtime",
        "runtimeStyle",
        "rx",
        "ry",
        "s",
        "safari",
        "sample",
        "sampleCount",
        "sampleCoverage",
        "sampleRate",
        "sampleType",
        "sampler",
        "samplerParameterf",
        "samplerParameteri",
        "sandbox",
        "save",
        "saveData",
        "scale",
        "scale3d",
        "scale3dSelf",
        "scaleNonUniform",
        "scaleNonUniformSelf",
        "scaleSelf",
        "scheme",
        "scissor",
        "scope",
        "scopeName",
        "scoped",
        "screen",
        "screenBrightness",
        "screenEnabled",
        "screenLeft",
        "screenPixelToMillimeterX",
        "screenPixelToMillimeterY",
        "screenTop",
        "screenX",
        "screenY",
        "scriptURL",
        "scripts",
        "scroll",
        "scroll-behavior",
        "scroll-margin",
        "scroll-margin-block",
        "scroll-margin-block-end",
        "scroll-margin-block-start",
        "scroll-margin-bottom",
        "scroll-margin-inline",
        "scroll-margin-inline-end",
        "scroll-margin-inline-start",
        "scroll-margin-left",
        "scroll-margin-right",
        "scroll-margin-top",
        "scroll-padding",
        "scroll-padding-block",
        "scroll-padding-block-end",
        "scroll-padding-block-start",
        "scroll-padding-bottom",
        "scroll-padding-inline",
        "scroll-padding-inline-end",
        "scroll-padding-inline-start",
        "scroll-padding-left",
        "scroll-padding-right",
        "scroll-padding-top",
        "scroll-snap-align",
        "scroll-snap-type",
        "scrollAmount",
        "scrollBehavior",
        "scrollBy",
        "scrollByLines",
        "scrollByPages",
        "scrollDelay",
        "scrollHeight",
        "scrollIntoView",
        "scrollIntoViewIfNeeded",
        "scrollLeft",
        "scrollLeftMax",
        "scrollMargin",
        "scrollMarginBlock",
        "scrollMarginBlockEnd",
        "scrollMarginBlockStart",
        "scrollMarginBottom",
        "scrollMarginInline",
        "scrollMarginInlineEnd",
        "scrollMarginInlineStart",
        "scrollMarginLeft",
        "scrollMarginRight",
        "scrollMarginTop",
        "scrollMaxX",
        "scrollMaxY",
        "scrollPadding",
        "scrollPaddingBlock",
        "scrollPaddingBlockEnd",
        "scrollPaddingBlockStart",
        "scrollPaddingBottom",
        "scrollPaddingInline",
        "scrollPaddingInlineEnd",
        "scrollPaddingInlineStart",
        "scrollPaddingLeft",
        "scrollPaddingRight",
        "scrollPaddingTop",
        "scrollRestoration",
        "scrollSnapAlign",
        "scrollSnapType",
        "scrollTo",
        "scrollTop",
        "scrollTopMax",
        "scrollWidth",
        "scrollX",
        "scrollY",
        "scrollbar-color",
        "scrollbar-width",
        "scrollbar3dLightColor",
        "scrollbarArrowColor",
        "scrollbarBaseColor",
        "scrollbarColor",
        "scrollbarDarkShadowColor",
        "scrollbarFaceColor",
        "scrollbarHighlightColor",
        "scrollbarShadowColor",
        "scrollbarTrackColor",
        "scrollbarWidth",
        "scrollbars",
        "scrolling",
        "scrollingElement",
        "sctp",
        "sctpCauseCode",
        "sdp",
        "sdpLineNumber",
        "sdpMLineIndex",
        "sdpMid",
        "seal",
        "search",
        "searchBox",
        "searchBoxJavaBridge_",
        "searchParams",
        "sectionRowIndex",
        "secureConnectionStart",
        "security",
        "seed",
        "seekToNextFrame",
        "seekable",
        "seeking",
        "select",
        "selectAllChildren",
        "selectAlternateInterface",
        "selectConfiguration",
        "selectNode",
        "selectNodeContents",
        "selectNodes",
        "selectSingleNode",
        "selectSubString",
        "selected",
        "selectedIndex",
        "selectedOptions",
        "selectedStyleSheetSet",
        "selectedStylesheetSet",
        "selection",
        "selectionDirection",
        "selectionEnd",
        "selectionStart",
        "selector",
        "selectorText",
        "self",
        "send",
        "sendAsBinary",
        "sendBeacon",
        "sender",
        "sentAlert",
        "sentTimestamp",
        "separator",
        "serialNumber",
        "serializeToString",
        "serverTiming",
        "service",
        "serviceWorker",
        "session",
        "sessionId",
        "sessionStorage",
        "set",
        "setActionHandler",
        "setActive",
        "setAlpha",
        "setAppBadge",
        "setAttribute",
        "setAttributeNS",
        "setAttributeNode",
        "setAttributeNodeNS",
        "setBaseAndExtent",
        "setBigInt64",
        "setBigUint64",
        "setBindGroup",
        "setBingCurrentSearchDefault",
        "setBlendConstant",
        "setCapture",
        "setCodecPreferences",
        "setColor",
        "setCompositeOperation",
        "setConfiguration",
        "setCurrentTime",
        "setCustomValidity",
        "setData",
        "setDate",
        "setDragImage",
        "setEnd",
        "setEndAfter",
        "setEndBefore",
        "setEndPoint",
        "setFillColor",
        "setFilterRes",
        "setFloat32",
        "setFloat64",
        "setFloatValue",
        "setFormValue",
        "setFullYear",
        "setHeaderValue",
        "setHours",
        "setIdentityProvider",
        "setImmediate",
        "setIndexBuffer",
        "setInt16",
        "setInt32",
        "setInt8",
        "setInterval",
        "setItem",
        "setKeyframes",
        "setLineCap",
        "setLineDash",
        "setLineJoin",
        "setLineWidth",
        "setLiveSeekableRange",
        "setLocalDescription",
        "setMatrix",
        "setMatrixValue",
        "setMediaKeys",
        "setMilliseconds",
        "setMinutes",
        "setMiterLimit",
        "setMonth",
        "setNamedItem",
        "setNamedItemNS",
        "setNonUserCodeExceptions",
        "setOrientToAngle",
        "setOrientToAuto",
        "setOrientation",
        "setOverrideHistoryNavigationMode",
        "setPaint",
        "setParameter",
        "setParameters",
        "setPeriodicWave",
        "setPipeline",
        "setPointerCapture",
        "setPosition",
        "setPositionState",
        "setPreference",
        "setProperty",
        "setPrototypeOf",
        "setRGBColor",
        "setRGBColorICCColor",
        "setRadius",
        "setRangeText",
        "setRemoteDescription",
        "setRequestHeader",
        "setResizable",
        "setResourceTimingBufferSize",
        "setRotate",
        "setScale",
        "setScissorRect",
        "setSeconds",
        "setSelectionRange",
        "setServerCertificate",
        "setShadow",
        "setSinkId",
        "setSkewX",
        "setSkewY",
        "setStart",
        "setStartAfter",
        "setStartBefore",
        "setStdDeviation",
        "setStencilReference",
        "setStreams",
        "setStringValue",
        "setStrokeColor",
        "setSuggestResult",
        "setTargetAtTime",
        "setTargetValueAtTime",
        "setTime",
        "setTimeout",
        "setTransform",
        "setTranslate",
        "setUTCDate",
        "setUTCFullYear",
        "setUTCHours",
        "setUTCMilliseconds",
        "setUTCMinutes",
        "setUTCMonth",
        "setUTCSeconds",
        "setUint16",
        "setUint32",
        "setUint8",
        "setUri",
        "setValidity",
        "setValueAtTime",
        "setValueCurveAtTime",
        "setVariable",
        "setVelocity",
        "setVersion",
        "setVertexBuffer",
        "setViewport",
        "setYear",
        "settingName",
        "settingValue",
        "sex",
        "shaderLocation",
        "shaderSource",
        "shadowBlur",
        "shadowColor",
        "shadowOffsetX",
        "shadowOffsetY",
        "shadowRoot",
        "shape",
        "shape-image-threshold",
        "shape-margin",
        "shape-outside",
        "shape-rendering",
        "shapeImageThreshold",
        "shapeMargin",
        "shapeOutside",
        "shapeRendering",
        "sheet",
        "shift",
        "shiftKey",
        "shiftLeft",
        "shippingAddress",
        "shippingOption",
        "shippingType",
        "show",
        "showHelp",
        "showModal",
        "showModalDialog",
        "showModelessDialog",
        "showNotification",
        "sidebar",
        "sign",
        "signal",
        "signalingState",
        "signature",
        "silent",
        "sin",
        "singleNodeValue",
        "sinh",
        "sinkId",
        "sittingToStandingTransform",
        "size",
        "sizeToContent",
        "sizeX",
        "sizeZ",
        "sizes",
        "skewX",
        "skewXSelf",
        "skewY",
        "skewYSelf",
        "slice",
        "slope",
        "slot",
        "small",
        "smil",
        "smooth",
        "smoothingTimeConstant",
        "snapToLines",
        "snapshotItem",
        "snapshotLength",
        "some",
        "sort",
        "sortingCode",
        "source",
        "sourceBuffer",
        "sourceBuffers",
        "sourceCapabilities",
        "sourceFile",
        "sourceIndex",
        "sourceMap",
        "sources",
        "spacing",
        "span",
        "speak",
        "speakAs",
        "speaking",
        "species",
        "specified",
        "specularConstant",
        "specularExponent",
        "speechSynthesis",
        "speed",
        "speedOfSound",
        "spellcheck",
        "splice",
        "split",
        "splitText",
        "spreadMethod",
        "sqrt",
        "src",
        "srcElement",
        "srcFactor",
        "srcFilter",
        "srcObject",
        "srcUrn",
        "srcdoc",
        "srclang",
        "srcset",
        "stack",
        "stackTraceLimit",
        "stacktrace",
        "stageParameters",
        "standalone",
        "standby",
        "start",
        "startContainer",
        "startIce",
        "startMessages",
        "startNotifications",
        "startOffset",
        "startProfiling",
        "startRendering",
        "startShark",
        "startTime",
        "startsWith",
        "state",
        "status",
        "statusCode",
        "statusMessage",
        "statusText",
        "statusbar",
        "stdDeviationX",
        "stdDeviationY",
        "stencilBack",
        "stencilClearValue",
        "stencilFront",
        "stencilFunc",
        "stencilFuncSeparate",
        "stencilLoadOp",
        "stencilMask",
        "stencilMaskSeparate",
        "stencilOp",
        "stencilOpSeparate",
        "stencilReadMask",
        "stencilReadOnly",
        "stencilStoreOp",
        "stencilWriteMask",
        "step",
        "stepDown",
        "stepMismatch",
        "stepMode",
        "stepUp",
        "sticky",
        "stitchTiles",
        "stop",
        "stop-color",
        "stop-opacity",
        "stopColor",
        "stopImmediatePropagation",
        "stopNotifications",
        "stopOpacity",
        "stopProfiling",
        "stopPropagation",
        "stopShark",
        "stopped",
        "storage",
        "storageArea",
        "storageName",
        "storageStatus",
        "storageTexture",
        "store",
        "storeOp",
        "storeSiteSpecificTrackingException",
        "storeWebWideTrackingException",
        "stpVersion",
        "stream",
        "streams",
        "stretch",
        "strike",
        "string",
        "stringValue",
        "stringify",
        "stripIndexFormat",
        "stroke",
        "stroke-dasharray",
        "stroke-dashoffset",
        "stroke-linecap",
        "stroke-linejoin",
        "stroke-miterlimit",
        "stroke-opacity",
        "stroke-width",
        "strokeDasharray",
        "strokeDashoffset",
        "strokeLinecap",
        "strokeLinejoin",
        "strokeMiterlimit",
        "strokeOpacity",
        "strokeRect",
        "strokeStyle",
        "strokeText",
        "strokeWidth",
        "style",
        "styleFloat",
        "styleMap",
        "styleMedia",
        "styleSheet",
        "styleSheetSets",
        "styleSheets",
        "sub",
        "subarray",
        "subject",
        "submit",
        "submitFrame",
        "submitter",
        "subscribe",
        "substr",
        "substring",
        "substringData",
        "subtle",
        "subtree",
        "suffix",
        "suffixes",
        "summary",
        "sup",
        "supported",
        "supportedContentEncodings",
        "supportedEntryTypes",
        "supports",
        "supportsSession",
        "surfaceScale",
        "surroundContents",
        "suspend",
        "suspendRedraw",
        "swapCache",
        "swapNode",
        "sweepFlag",
        "symbols",
        "sync",
        "sysexEnabled",
        "system",
        "systemCode",
        "systemId",
        "systemLanguage",
        "systemXDPI",
        "systemYDPI",
        "tBodies",
        "tFoot",
        "tHead",
        "tabIndex",
        "table",
        "table-layout",
        "tableLayout",
        "tableValues",
        "tag",
        "tagName",
        "tagUrn",
        "tags",
        "taintEnabled",
        "takePhoto",
        "takeRecords",
        "tan",
        "tangentialPressure",
        "tanh",
        "target",
        "targetElement",
        "targetRayMode",
        "targetRaySpace",
        "targetTouches",
        "targetX",
        "targetY",
        "targets",
        "tcpType",
        "tee",
        "tel",
        "terminate",
        "test",
        "texImage2D",
        "texImage3D",
        "texParameterf",
        "texParameteri",
        "texStorage2D",
        "texStorage3D",
        "texSubImage2D",
        "texSubImage3D",
        "text",
        "text-align",
        "text-align-last",
        "text-anchor",
        "text-combine-upright",
        "text-decoration",
        "text-decoration-color",
        "text-decoration-line",
        "text-decoration-skip-ink",
        "text-decoration-style",
        "text-decoration-thickness",
        "text-emphasis",
        "text-emphasis-color",
        "text-emphasis-position",
        "text-emphasis-style",
        "text-indent",
        "text-justify",
        "text-orientation",
        "text-overflow",
        "text-rendering",
        "text-shadow",
        "text-transform",
        "text-underline-offset",
        "text-underline-position",
        "textAlign",
        "textAlignLast",
        "textAnchor",
        "textAutospace",
        "textBaseline",
        "textCombineUpright",
        "textContent",
        "textDecoration",
        "textDecorationBlink",
        "textDecorationColor",
        "textDecorationLine",
        "textDecorationLineThrough",
        "textDecorationNone",
        "textDecorationOverline",
        "textDecorationSkipInk",
        "textDecorationStyle",
        "textDecorationThickness",
        "textDecorationUnderline",
        "textEmphasis",
        "textEmphasisColor",
        "textEmphasisPosition",
        "textEmphasisStyle",
        "textIndent",
        "textJustify",
        "textJustifyTrim",
        "textKashida",
        "textKashidaSpace",
        "textLength",
        "textOrientation",
        "textOverflow",
        "textRendering",
        "textShadow",
        "textTracks",
        "textTransform",
        "textUnderlineOffset",
        "textUnderlinePosition",
        "texture",
        "then",
        "threadId",
        "threshold",
        "thresholds",
        "tiltX",
        "tiltY",
        "time",
        "timeEnd",
        "timeLog",
        "timeOrigin",
        "timeRemaining",
        "timeStamp",
        "timecode",
        "timeline",
        "timelineTime",
        "timeout",
        "timestamp",
        "timestampOffset",
        "timestampWrites",
        "timing",
        "title",
        "to",
        "toArray",
        "toBlob",
        "toDataURL",
        "toDateString",
        "toElement",
        "toExponential",
        "toFixed",
        "toFloat32Array",
        "toFloat64Array",
        "toGMTString",
        "toISOString",
        "toJSON",
        "toLocaleDateString",
        "toLocaleFormat",
        "toLocaleLowerCase",
        "toLocaleString",
        "toLocaleTimeString",
        "toLocaleUpperCase",
        "toLowerCase",
        "toMatrix",
        "toMethod",
        "toPrecision",
        "toPrimitive",
        "toSdp",
        "toSource",
        "toStaticHTML",
        "toString",
        "toStringTag",
        "toSum",
        "toTimeString",
        "toUTCString",
        "toUpperCase",
        "toggle",
        "toggleAttribute",
        "toggleLongPressEnabled",
        "tone",
        "toneBuffer",
        "tooLong",
        "tooShort",
        "toolbar",
        "top",
        "topMargin",
        "topology",
        "total",
        "totalFrameDelay",
        "totalVideoFrames",
        "touch-action",
        "touchAction",
        "touched",
        "touches",
        "trace",
        "track",
        "trackVisibility",
        "transaction",
        "transactions",
        "transceiver",
        "transferControlToOffscreen",
        "transferFromImageBitmap",
        "transferImageBitmap",
        "transferIn",
        "transferOut",
        "transferSize",
        "transferToImageBitmap",
        "transform",
        "transform-box",
        "transform-origin",
        "transform-style",
        "transformBox",
        "transformFeedbackVaryings",
        "transformOrigin",
        "transformPoint",
        "transformString",
        "transformStyle",
        "transformToDocument",
        "transformToFragment",
        "transition",
        "transition-delay",
        "transition-duration",
        "transition-property",
        "transition-timing-function",
        "transitionDelay",
        "transitionDuration",
        "transitionProperty",
        "transitionTimingFunction",
        "translate",
        "translateSelf",
        "translationX",
        "translationY",
        "transport",
        "trim",
        "trimEnd",
        "trimLeft",
        "trimRight",
        "trimStart",
        "trueSpeed",
        "trunc",
        "truncate",
        "trustedTypes",
        "turn",
        "twist",
        "type",
        "typeDetail",
        "typeMismatch",
        "typeMustMatch",
        "types",
        "u2f",
        "ubound",
        "uint16",
        "uint32",
        "uint8",
        "uint8Clamped",
        "unclippedDepth",
        "unconfigure",
        "undefined",
        "unescape",
        "uneval",
        "unicode",
        "unicode-bidi",
        "unicodeBidi",
        "unicodeRange",
        "uniform1f",
        "uniform1fv",
        "uniform1i",
        "uniform1iv",
        "uniform1ui",
        "uniform1uiv",
        "uniform2f",
        "uniform2fv",
        "uniform2i",
        "uniform2iv",
        "uniform2ui",
        "uniform2uiv",
        "uniform3f",
        "uniform3fv",
        "uniform3i",
        "uniform3iv",
        "uniform3ui",
        "uniform3uiv",
        "uniform4f",
        "uniform4fv",
        "uniform4i",
        "uniform4iv",
        "uniform4ui",
        "uniform4uiv",
        "uniformBlockBinding",
        "uniformMatrix2fv",
        "uniformMatrix2x3fv",
        "uniformMatrix2x4fv",
        "uniformMatrix3fv",
        "uniformMatrix3x2fv",
        "uniformMatrix3x4fv",
        "uniformMatrix4fv",
        "uniformMatrix4x2fv",
        "uniformMatrix4x3fv",
        "unique",
        "uniqueID",
        "uniqueNumber",
        "unit",
        "unitType",
        "units",
        "unloadEventEnd",
        "unloadEventStart",
        "unlock",
        "unmap",
        "unmount",
        "unobserve",
        "unpause",
        "unpauseAnimations",
        "unreadCount",
        "unregister",
        "unregisterContentHandler",
        "unregisterProtocolHandler",
        "unscopables",
        "unselectable",
        "unshift",
        "unsubscribe",
        "unsuspendRedraw",
        "unsuspendRedrawAll",
        "unwatch",
        "unwrapKey",
        "upDegrees",
        "upX",
        "upY",
        "upZ",
        "update",
        "updateCommands",
        "updateIce",
        "updateInterval",
        "updatePlaybackRate",
        "updateRenderState",
        "updateSettings",
        "updateTiming",
        "updateViaCache",
        "updateWith",
        "updated",
        "updating",
        "upgrade",
        "upload",
        "uploadTotal",
        "uploaded",
        "upper",
        "upperBound",
        "upperOpen",
        "uri",
        "url",
        "urn",
        "urns",
        "usage",
        "usages",
        "usb",
        "usbVersionMajor",
        "usbVersionMinor",
        "usbVersionSubminor",
        "useCurrentView",
        "useMap",
        "useProgram",
        "usedSpace",
        "user-select",
        "userActivation",
        "userAgent",
        "userAgentData",
        "userChoice",
        "userHandle",
        "userHint",
        "userLanguage",
        "userSelect",
        "userVisibleOnly",
        "username",
        "usernameFragment",
        "utterance",
        "uuid",
        "v8BreakIterator",
        "vAlign",
        "vLink",
        "valid",
        "validate",
        "validateProgram",
        "validationMessage",
        "validity",
        "value",
        "valueAsDate",
        "valueAsNumber",
        "valueAsString",
        "valueInSpecifiedUnits",
        "valueMissing",
        "valueOf",
        "valueText",
        "valueType",
        "values",
        "variable",
        "variant",
        "variationSettings",
        "vector-effect",
        "vectorEffect",
        "velocityAngular",
        "velocityExpansion",
        "velocityX",
        "velocityY",
        "vendor",
        "vendorId",
        "vendorSub",
        "verify",
        "version",
        "vertex",
        "vertexAttrib1f",
        "vertexAttrib1fv",
        "vertexAttrib2f",
        "vertexAttrib2fv",
        "vertexAttrib3f",
        "vertexAttrib3fv",
        "vertexAttrib4f",
        "vertexAttrib4fv",
        "vertexAttribDivisor",
        "vertexAttribDivisorANGLE",
        "vertexAttribI4i",
        "vertexAttribI4iv",
        "vertexAttribI4ui",
        "vertexAttribI4uiv",
        "vertexAttribIPointer",
        "vertexAttribPointer",
        "vertical",
        "vertical-align",
        "verticalAlign",
        "verticalOverflow",
        "vh",
        "vibrate",
        "vibrationActuator",
        "videoBitsPerSecond",
        "videoHeight",
        "videoTracks",
        "videoWidth",
        "view",
        "viewBox",
        "viewBoxString",
        "viewDimension",
        "viewFormats",
        "viewTarget",
        "viewTargetString",
        "viewport",
        "viewportAnchorX",
        "viewportAnchorY",
        "viewportElement",
        "views",
        "violatedDirective",
        "visibility",
        "visibilityState",
        "visible",
        "visualViewport",
        "vlinkColor",
        "vmax",
        "vmin",
        "voice",
        "voiceURI",
        "volume",
        "vrml",
        "vspace",
        "vw",
        "w",
        "wait",
        "waitSync",
        "waiting",
        "wake",
        "wakeLock",
        "wand",
        "warn",
        "wasClean",
        "wasDiscarded",
        "watch",
        "watchAvailability",
        "watchPosition",
        "webdriver",
        "webkitAddKey",
        "webkitAlignContent",
        "webkitAlignItems",
        "webkitAlignSelf",
        "webkitAnimation",
        "webkitAnimationDelay",
        "webkitAnimationDirection",
        "webkitAnimationDuration",
        "webkitAnimationFillMode",
        "webkitAnimationIterationCount",
        "webkitAnimationName",
        "webkitAnimationPlayState",
        "webkitAnimationTimingFunction",
        "webkitAppearance",
        "webkitAudioContext",
        "webkitAudioDecodedByteCount",
        "webkitAudioPannerNode",
        "webkitBackfaceVisibility",
        "webkitBackground",
        "webkitBackgroundAttachment",
        "webkitBackgroundClip",
        "webkitBackgroundColor",
        "webkitBackgroundImage",
        "webkitBackgroundOrigin",
        "webkitBackgroundPosition",
        "webkitBackgroundPositionX",
        "webkitBackgroundPositionY",
        "webkitBackgroundRepeat",
        "webkitBackgroundSize",
        "webkitBackingStorePixelRatio",
        "webkitBorderBottomLeftRadius",
        "webkitBorderBottomRightRadius",
        "webkitBorderImage",
        "webkitBorderImageOutset",
        "webkitBorderImageRepeat",
        "webkitBorderImageSlice",
        "webkitBorderImageSource",
        "webkitBorderImageWidth",
        "webkitBorderRadius",
        "webkitBorderTopLeftRadius",
        "webkitBorderTopRightRadius",
        "webkitBoxAlign",
        "webkitBoxDirection",
        "webkitBoxFlex",
        "webkitBoxOrdinalGroup",
        "webkitBoxOrient",
        "webkitBoxPack",
        "webkitBoxShadow",
        "webkitBoxSizing",
        "webkitCancelAnimationFrame",
        "webkitCancelFullScreen",
        "webkitCancelKeyRequest",
        "webkitCancelRequestAnimationFrame",
        "webkitClearResourceTimings",
        "webkitClosedCaptionsVisible",
        "webkitConvertPointFromNodeToPage",
        "webkitConvertPointFromPageToNode",
        "webkitCreateShadowRoot",
        "webkitCurrentFullScreenElement",
        "webkitCurrentPlaybackTargetIsWireless",
        "webkitDecodedFrameCount",
        "webkitDirectionInvertedFromDevice",
        "webkitDisplayingFullscreen",
        "webkitDroppedFrameCount",
        "webkitEnterFullScreen",
        "webkitEnterFullscreen",
        "webkitEntries",
        "webkitExitFullScreen",
        "webkitExitFullscreen",
        "webkitExitPointerLock",
        "webkitFilter",
        "webkitFlex",
        "webkitFlexBasis",
        "webkitFlexDirection",
        "webkitFlexFlow",
        "webkitFlexGrow",
        "webkitFlexShrink",
        "webkitFlexWrap",
        "webkitFullScreenKeyboardInputAllowed",
        "webkitFullscreenElement",
        "webkitFullscreenEnabled",
        "webkitGenerateKeyRequest",
        "webkitGetAsEntry",
        "webkitGetDatabaseNames",
        "webkitGetEntries",
        "webkitGetEntriesByName",
        "webkitGetEntriesByType",
        "webkitGetFlowByName",
        "webkitGetGamepads",
        "webkitGetImageDataHD",
        "webkitGetNamedFlows",
        "webkitGetRegionFlowRanges",
        "webkitGetUserMedia",
        "webkitHasClosedCaptions",
        "webkitHidden",
        "webkitIDBCursor",
        "webkitIDBDatabase",
        "webkitIDBDatabaseError",
        "webkitIDBDatabaseException",
        "webkitIDBFactory",
        "webkitIDBIndex",
        "webkitIDBKeyRange",
        "webkitIDBObjectStore",
        "webkitIDBRequest",
        "webkitIDBTransaction",
        "webkitImageSmoothingEnabled",
        "webkitIndexedDB",
        "webkitInitMessageEvent",
        "webkitIsFullScreen",
        "webkitJustifyContent",
        "webkitKeys",
        "webkitLineClamp",
        "webkitLineDashOffset",
        "webkitLockOrientation",
        "webkitMask",
        "webkitMaskClip",
        "webkitMaskComposite",
        "webkitMaskImage",
        "webkitMaskOrigin",
        "webkitMaskPosition",
        "webkitMaskPositionX",
        "webkitMaskPositionY",
        "webkitMaskRepeat",
        "webkitMaskSize",
        "webkitMatchesSelector",
        "webkitMediaStream",
        "webkitNotifications",
        "webkitOfflineAudioContext",
        "webkitOrder",
        "webkitOrientation",
        "webkitPeerConnection00",
        "webkitPersistentStorage",
        "webkitPerspective",
        "webkitPerspectiveOrigin",
        "webkitPointerLockElement",
        "webkitPostMessage",
        "webkitPreservesPitch",
        "webkitPutImageDataHD",
        "webkitRTCPeerConnection",
        "webkitRegionOverset",
        "webkitRelativePath",
        "webkitRequestAnimationFrame",
        "webkitRequestFileSystem",
        "webkitRequestFullScreen",
        "webkitRequestFullscreen",
        "webkitRequestPointerLock",
        "webkitResolveLocalFileSystemURL",
        "webkitSetMediaKeys",
        "webkitSetResourceTimingBufferSize",
        "webkitShadowRoot",
        "webkitShowPlaybackTargetPicker",
        "webkitSlice",
        "webkitSpeechGrammar",
        "webkitSpeechGrammarList",
        "webkitSpeechRecognition",
        "webkitSpeechRecognitionError",
        "webkitSpeechRecognitionEvent",
        "webkitStorageInfo",
        "webkitSupportsFullscreen",
        "webkitTemporaryStorage",
        "webkitTextFillColor",
        "webkitTextSizeAdjust",
        "webkitTextStroke",
        "webkitTextStrokeColor",
        "webkitTextStrokeWidth",
        "webkitTransform",
        "webkitTransformOrigin",
        "webkitTransformStyle",
        "webkitTransition",
        "webkitTransitionDelay",
        "webkitTransitionDuration",
        "webkitTransitionProperty",
        "webkitTransitionTimingFunction",
        "webkitURL",
        "webkitUnlockOrientation",
        "webkitUserSelect",
        "webkitVideoDecodedByteCount",
        "webkitVisibilityState",
        "webkitWirelessVideoPlaybackDisabled",
        "webkitdirectory",
        "webkitdropzone",
        "webstore",
        "weight",
        "wgslLanguageFeatures",
        "whatToShow",
        "wheelDelta",
        "wheelDeltaX",
        "wheelDeltaY",
        "whenDefined",
        "which",
        "white-space",
        "whiteSpace",
        "wholeText",
        "widows",
        "width",
        "will-change",
        "willChange",
        "willValidate",
        "window",
        "withCredentials",
        "word-break",
        "word-spacing",
        "word-wrap",
        "wordBreak",
        "wordSpacing",
        "wordWrap",
        "workerStart",
        "wow64",
        "wrap",
        "wrapKey",
        "writable",
        "writableAuxiliaries",
        "write",
        "writeBuffer",
        "writeMask",
        "writeText",
        "writeTexture",
        "writeTimestamp",
        "writeValue",
        "writeWithoutResponse",
        "writeln",
        "writing-mode",
        "writingMode",
        "x",
        "x1",
        "x2",
        "xChannelSelector",
        "xmlEncoding",
        "xmlStandalone",
        "xmlVersion",
        "xmlbase",
        "xmllang",
        "xmlspace",
        "xor",
        "xr",
        "y",
        "y1",
        "y2",
        "yChannelSelector",
        "yandex",
        "z",
        "z-index",
        "zIndex",
        "zoom",
        "zoomAndPan",
        "zoomRectScreen"
      ];
      function find_builtins(reserved) {
        domprops.forEach(add);
        var new_globals = ["Symbol", "Map", "Promise", "Proxy", "Reflect", "Set", "WeakMap", "WeakSet"];
        var objects = {};
        var global_ref = typeof global === "object" ? global : self;
        new_globals.forEach(function(new_global) {
          objects[new_global] = global_ref[new_global] || function() {
          };
        });
        [
          "null",
          "true",
          "false",
          "NaN",
          "Infinity",
          "-Infinity",
          "undefined"
        ].forEach(add);
        [
          Object,
          Array,
          Function,
          Number,
          String,
          Boolean,
          Error,
          Math,
          Date,
          RegExp,
          objects.Symbol,
          ArrayBuffer,
          DataView,
          decodeURI,
          decodeURIComponent,
          encodeURI,
          encodeURIComponent,
          eval,
          EvalError,
          Float32Array,
          Float64Array,
          Int8Array,
          Int16Array,
          Int32Array,
          isFinite,
          isNaN,
          JSON,
          objects.Map,
          parseFloat,
          parseInt,
          objects.Promise,
          objects.Proxy,
          RangeError,
          ReferenceError,
          objects.Reflect,
          objects.Set,
          SyntaxError,
          TypeError,
          Uint8Array,
          Uint8ClampedArray,
          Uint16Array,
          Uint32Array,
          URIError,
          objects.WeakMap,
          objects.WeakSet
        ].forEach(function(ctor) {
          Object.getOwnPropertyNames(ctor).map(add);
          if (ctor.prototype) {
            Object.getOwnPropertyNames(ctor.prototype).map(add);
          }
        });
        function add(name) {
          reserved.add(name);
        }
      }
      function reserve_quoted_keys(ast, reserved) {
        function add(name) {
          push_uniq(reserved, name);
        }
        ast.walk(new TreeWalker(function(node) {
          if (node instanceof AST_ObjectKeyVal && node.quote) {
            add(node.key);
          } else if (node instanceof AST_ObjectProperty && node.quote) {
            add(node.key.name);
          } else if (node instanceof AST_Sub) {
            addStrings(node.property, add);
          }
        }));
      }
      function addStrings(node, add) {
        node.walk(new TreeWalker(function(node2) {
          if (node2 instanceof AST_Sequence) {
            addStrings(node2.tail_node(), add);
          } else if (node2 instanceof AST_String) {
            add(node2.value);
          } else if (node2 instanceof AST_Conditional) {
            addStrings(node2.consequent, add);
            addStrings(node2.alternative, add);
          }
          return true;
        }));
      }
      function mangle_private_properties(ast, options) {
        var cprivate = -1;
        var private_cache = /* @__PURE__ */ new Map();
        var nth_identifier = options.nth_identifier || base54;
        ast = ast.transform(new TreeTransformer(function(node) {
          if (node instanceof AST_ClassPrivateProperty || node instanceof AST_PrivateMethod || node instanceof AST_PrivateGetter || node instanceof AST_PrivateSetter || node instanceof AST_PrivateIn) {
            node.key.name = mangle_private(node.key.name);
          } else if (node instanceof AST_DotHash) {
            node.property = mangle_private(node.property);
          }
        }));
        return ast;
        function mangle_private(name) {
          let mangled = private_cache.get(name);
          if (!mangled) {
            mangled = nth_identifier.get(++cprivate);
            private_cache.set(name, mangled);
          }
          return mangled;
        }
      }
      function find_annotated_props(ast) {
        var annotated_props = /* @__PURE__ */ new Set();
        walk(ast, (node) => {
          if (node instanceof AST_ClassPrivateProperty || node instanceof AST_PrivateMethod || node instanceof AST_PrivateGetter || node instanceof AST_PrivateSetter || node instanceof AST_DotHash)
            ;
          else if (node instanceof AST_ObjectKeyVal) {
            if (typeof node.key == "string" && has_annotation(node, _MANGLEPROP)) {
              annotated_props.add(node.key);
            }
          } else if (node instanceof AST_ObjectProperty) {
            if (has_annotation(node, _MANGLEPROP)) {
              annotated_props.add(node.key.name);
            }
          } else if (node instanceof AST_Dot) {
            if (has_annotation(node, _MANGLEPROP)) {
              annotated_props.add(node.property);
            }
          } else if (node instanceof AST_Sub) {
            if (node.property instanceof AST_String && has_annotation(node, _MANGLEPROP)) {
              annotated_props.add(node.property.value);
            }
          }
        });
        return annotated_props;
      }
      function mangle_properties(ast, options, annotated_props = find_annotated_props(ast)) {
        options = defaults(options, {
          builtins: false,
          cache: null,
          debug: false,
          keep_quoted: false,
          nth_identifier: base54,
          only_cache: false,
          regex: null,
          reserved: null,
          undeclared: false,
          only_annotated: false
        }, true);
        var nth_identifier = options.nth_identifier;
        var reserved_option = options.reserved;
        if (!Array.isArray(reserved_option))
          reserved_option = [reserved_option];
        var reserved = new Set(reserved_option);
        if (!options.builtins)
          find_builtins(reserved);
        var cname = -1;
        var cache;
        if (options.cache) {
          cache = options.cache.props;
        } else {
          cache = /* @__PURE__ */ new Map();
        }
        var only_annotated = options.only_annotated;
        var regex = options.regex && new RegExp(options.regex);
        var debug = options.debug !== false;
        var debug_name_suffix;
        if (debug) {
          debug_name_suffix = options.debug === true ? "" : options.debug;
        }
        var names_to_mangle = /* @__PURE__ */ new Set();
        var unmangleable = /* @__PURE__ */ new Set();
        cache.forEach((mangled_name) => unmangleable.add(mangled_name));
        var keep_quoted = !!options.keep_quoted;
        ast.walk(new TreeWalker(function(node) {
          if (node instanceof AST_ClassPrivateProperty || node instanceof AST_PrivateMethod || node instanceof AST_PrivateGetter || node instanceof AST_PrivateSetter || node instanceof AST_DotHash)
            ;
          else if (node instanceof AST_ObjectKeyVal) {
            if (typeof node.key == "string" && (!keep_quoted || !node.quote)) {
              add(node.key);
            }
          } else if (node instanceof AST_ObjectProperty) {
            if (!keep_quoted || !node.quote) {
              add(node.key.name);
            }
          } else if (node instanceof AST_Dot) {
            var declared = !!options.undeclared;
            if (!declared) {
              var root = node;
              while (root.expression) {
                root = root.expression;
              }
              declared = !(root.thedef && root.thedef.undeclared);
            }
            if (declared && (!keep_quoted || !node.quote)) {
              add(node.property);
            }
          } else if (node instanceof AST_Sub) {
            if (!keep_quoted) {
              addStrings(node.property, add);
            }
          } else if (node instanceof AST_Call && node.expression.print_to_string() == "Object.defineProperty") {
            addStrings(node.args[1], add);
          } else if (node instanceof AST_Binary && node.operator === "in") {
            addStrings(node.left, add);
          } else if (node instanceof AST_String && has_annotation(node, _KEY)) {
            add(node.value);
          }
        }));
        return ast.transform(new TreeTransformer(function(node) {
          if (node instanceof AST_ClassPrivateProperty || node instanceof AST_PrivateMethod || node instanceof AST_PrivateGetter || node instanceof AST_PrivateSetter || node instanceof AST_DotHash)
            ;
          else if (node instanceof AST_ObjectKeyVal) {
            if (typeof node.key == "string" && (!keep_quoted || !node.quote)) {
              node.key = mangle(node.key);
            }
          } else if (node instanceof AST_ObjectProperty) {
            if (!keep_quoted || !node.quote) {
              node.key.name = mangle(node.key.name);
            }
          } else if (node instanceof AST_Dot) {
            if (!keep_quoted || !node.quote) {
              node.property = mangle(node.property);
            }
          } else if (!keep_quoted && node instanceof AST_Sub) {
            node.property = mangleStrings(node.property);
          } else if (node instanceof AST_Call && node.expression.print_to_string() == "Object.defineProperty") {
            node.args[1] = mangleStrings(node.args[1]);
          } else if (node instanceof AST_Binary && node.operator === "in") {
            node.left = mangleStrings(node.left);
          } else if (node instanceof AST_String && has_annotation(node, _KEY)) {
            clear_annotation(node, _KEY);
            node.value = mangle(node.value);
          }
        }));
        function can_mangle(name) {
          if (unmangleable.has(name))
            return false;
          if (reserved.has(name))
            return false;
          if (options.only_cache) {
            return cache.has(name);
          }
          if (/^-?[0-9]+(\.[0-9]+)?(e[+-][0-9]+)?$/.test(name))
            return false;
          return true;
        }
        function should_mangle(name) {
          if (only_annotated && !annotated_props.has(name))
            return false;
          if (regex && !regex.test(name)) {
            return annotated_props.has(name);
          }
          if (reserved.has(name))
            return false;
          return cache.has(name) || names_to_mangle.has(name);
        }
        function add(name) {
          if (can_mangle(name)) {
            names_to_mangle.add(name);
          }
          if (!should_mangle(name)) {
            unmangleable.add(name);
          }
        }
        function mangle(name) {
          if (!should_mangle(name)) {
            return name;
          }
          var mangled = cache.get(name);
          if (!mangled) {
            if (debug) {
              var debug_mangled = "_$" + name + "$" + debug_name_suffix + "_";
              if (can_mangle(debug_mangled)) {
                mangled = debug_mangled;
              }
            }
            if (!mangled) {
              do {
                mangled = nth_identifier.get(++cname);
              } while (!can_mangle(mangled));
            }
            cache.set(name, mangled);
          }
          return mangled;
        }
        function mangleStrings(node) {
          return node.transform(new TreeTransformer(function(node2) {
            if (node2 instanceof AST_Sequence) {
              var last2 = node2.expressions.length - 1;
              node2.expressions[last2] = mangleStrings(node2.expressions[last2]);
            } else if (node2 instanceof AST_String) {
              clear_annotation(node2, _KEY);
              node2.value = mangle(node2.value);
            } else if (node2 instanceof AST_Conditional) {
              node2.consequent = mangleStrings(node2.consequent);
              node2.alternative = mangleStrings(node2.alternative);
            }
            return node2;
          }));
        }
      }
      var to_ascii = typeof Buffer !== "undefined" ? (b64) => Buffer.from(b64, "base64").toString() : (b64) => decodeURIComponent(escape(atob(b64)));
      var to_base64 = typeof Buffer !== "undefined" ? (str) => Buffer.from(str).toString("base64") : (str) => btoa(unescape(encodeURIComponent(str)));
      function read_source_map(code) {
        var match = /(?:^|[^.])\/\/# sourceMappingURL=data:application\/json(;[\w=-]*)?;base64,([+/0-9A-Za-z]*=*)\s*$/.exec(code);
        if (!match) {
          console.warn("inline source map not found");
          return null;
        }
        return to_ascii(match[2]);
      }
      function set_shorthand(name, options, keys) {
        if (options[name]) {
          keys.forEach(function(key) {
            if (options[key]) {
              if (typeof options[key] != "object")
                options[key] = {};
              if (!(name in options[key]))
                options[key][name] = options[name];
            }
          });
        }
      }
      function init_cache(cache) {
        if (!cache)
          return;
        if (!("props" in cache)) {
          cache.props = /* @__PURE__ */ new Map();
        } else if (!(cache.props instanceof Map)) {
          cache.props = map_from_object(cache.props);
        }
      }
      function cache_to_json(cache) {
        return {
          props: map_to_object(cache.props)
        };
      }
      function log_input(files, options, fs2, debug_folder) {
        if (!(fs2 && fs2.writeFileSync && fs2.mkdirSync)) {
          return;
        }
        try {
          fs2.mkdirSync(debug_folder);
        } catch (e) {
          if (e.code !== "EEXIST")
            throw e;
        }
        const log_path = `${debug_folder}/terser-debug-${Math.random() * 9999999 | 0}.log`;
        options = options || {};
        const options_str = JSON.stringify(options, (_key, thing) => {
          if (typeof thing === "function")
            return "[Function " + thing.toString() + "]";
          if (thing instanceof RegExp)
            return "[RegExp " + thing.toString() + "]";
          return thing;
        }, 4);
        const files_str = (file) => {
          if (typeof file === "object" && options.parse && options.parse.spidermonkey) {
            return JSON.stringify(file, null, 2);
          } else if (typeof file === "object") {
            return Object.keys(file).map((key) => key + ": " + files_str(file[key])).join("\n\n");
          } else if (typeof file === "string") {
            return "```\n" + file + "\n```";
          } else {
            return file;
          }
        };
        fs2.writeFileSync(log_path, "Options: \n" + options_str + "\n\nInput files:\n\n" + files_str(files) + "\n");
      }
      function* minify_sync_or_async(files, options, _fs_module) {
        if (_fs_module && typeof process === "object" && process.env && typeof process.env.TERSER_DEBUG_DIR === "string") {
          log_input(files, options, _fs_module, process.env.TERSER_DEBUG_DIR);
        }
        options = defaults(options, {
          compress: {},
          ecma: void 0,
          enclose: false,
          ie8: false,
          keep_classnames: void 0,
          keep_fnames: false,
          mangle: {},
          module: false,
          nameCache: null,
          output: null,
          format: null,
          parse: {},
          rename: void 0,
          safari10: false,
          sourceMap: false,
          spidermonkey: false,
          timings: false,
          toplevel: false,
          warnings: false,
          wrap: false
        }, true);
        var timings = options.timings && {
          start: Date.now()
        };
        if (options.keep_classnames === void 0) {
          options.keep_classnames = options.keep_fnames;
        }
        if (options.rename === void 0) {
          options.rename = options.compress && options.mangle;
        }
        if (options.output && options.format) {
          throw new Error("Please only specify either output or format option, preferrably format.");
        }
        options.format = options.format || options.output || {};
        set_shorthand("ecma", options, ["parse", "compress", "format"]);
        set_shorthand("ie8", options, ["compress", "mangle", "format"]);
        set_shorthand("keep_classnames", options, ["compress", "mangle"]);
        set_shorthand("keep_fnames", options, ["compress", "mangle"]);
        set_shorthand("module", options, ["parse", "compress", "mangle"]);
        set_shorthand("safari10", options, ["mangle", "format"]);
        set_shorthand("toplevel", options, ["compress", "mangle"]);
        set_shorthand("warnings", options, ["compress"]);
        var quoted_props;
        if (options.mangle) {
          options.mangle = defaults(options.mangle, {
            cache: options.nameCache && (options.nameCache.vars || {}),
            eval: false,
            ie8: false,
            keep_classnames: false,
            keep_fnames: false,
            module: false,
            nth_identifier: base54,
            properties: false,
            reserved: [],
            safari10: false,
            toplevel: false
          }, true);
          if (options.mangle.properties) {
            if (typeof options.mangle.properties != "object") {
              options.mangle.properties = {};
            }
            if (options.mangle.properties.keep_quoted) {
              quoted_props = options.mangle.properties.reserved;
              if (!Array.isArray(quoted_props))
                quoted_props = [];
              options.mangle.properties.reserved = quoted_props;
            }
            if (options.nameCache && !("cache" in options.mangle.properties)) {
              options.mangle.properties.cache = options.nameCache.props || {};
            }
          }
          init_cache(options.mangle.cache);
          init_cache(options.mangle.properties.cache);
        }
        if (options.sourceMap) {
          options.sourceMap = defaults(options.sourceMap, {
            asObject: false,
            content: null,
            filename: null,
            includeSources: false,
            root: null,
            url: null
          }, true);
        }
        if (timings)
          timings.parse = Date.now();
        var toplevel;
        if (files instanceof AST_Toplevel) {
          toplevel = files;
        } else {
          if (typeof files == "string" || options.parse.spidermonkey && !Array.isArray(files)) {
            files = [files];
          }
          options.parse = options.parse || {};
          options.parse.toplevel = null;
          if (options.parse.spidermonkey) {
            options.parse.toplevel = AST_Node.from_mozilla_ast(Object.keys(files).reduce(function(toplevel2, name2) {
              if (!toplevel2)
                return files[name2];
              toplevel2.body = toplevel2.body.concat(files[name2].body);
              return toplevel2;
            }, null));
          } else {
            delete options.parse.spidermonkey;
            for (var name in files)
              if (HOP(files, name)) {
                options.parse.filename = name;
                options.parse.toplevel = parse(files[name], options.parse);
                if (options.sourceMap && options.sourceMap.content == "inline") {
                  if (Object.keys(files).length > 1)
                    throw new Error("inline source map only works with singular input");
                  options.sourceMap.content = read_source_map(files[name]);
                }
              }
          }
          if (options.parse.toplevel === null) {
            throw new Error("no source file given");
          }
          toplevel = options.parse.toplevel;
        }
        if (quoted_props && options.mangle.properties.keep_quoted !== "strict") {
          reserve_quoted_keys(toplevel, quoted_props);
        }
        var annotated_props;
        if (options.mangle && options.mangle.properties) {
          annotated_props = find_annotated_props(toplevel);
        }
        if (options.wrap) {
          toplevel = toplevel.wrap_commonjs(options.wrap);
        }
        if (options.enclose) {
          toplevel = toplevel.wrap_enclose(options.enclose);
        }
        if (timings)
          timings.rename = Date.now();
        if (timings)
          timings.compress = Date.now();
        if (options.compress) {
          toplevel = new Compressor(options.compress, {
            mangle_options: options.mangle
          }).compress(toplevel);
        }
        if (timings)
          timings.scope = Date.now();
        if (options.mangle)
          toplevel.figure_out_scope(options.mangle);
        if (timings)
          timings.mangle = Date.now();
        if (options.mangle) {
          toplevel.compute_char_frequency(options.mangle);
          toplevel.mangle_names(options.mangle);
          toplevel = mangle_private_properties(toplevel, options.mangle);
        }
        if (timings)
          timings.properties = Date.now();
        if (options.mangle && options.mangle.properties) {
          toplevel = mangle_properties(toplevel, options.mangle.properties, annotated_props);
        }
        if (timings)
          timings.format = Date.now();
        var result = {};
        if (options.format.ast) {
          result.ast = toplevel;
        }
        if (options.format.spidermonkey) {
          result.ast = toplevel.to_mozilla_ast();
        }
        let format_options;
        if (!HOP(options.format, "code") || options.format.code) {
          format_options = { ...options.format };
          if (!format_options.ast) {
            format_options._destroy_ast = true;
            walk(toplevel, (node) => {
              if (node instanceof AST_Scope) {
                node.variables = void 0;
                node.enclosed = void 0;
                node.parent_scope = void 0;
              }
              if (node.block_scope) {
                node.block_scope.variables = void 0;
                node.block_scope.enclosed = void 0;
                node.parent_scope = void 0;
              }
            });
          }
          if (options.sourceMap) {
            if (options.sourceMap.includeSources && files instanceof AST_Toplevel) {
              throw new Error("original source content unavailable");
            }
            format_options.source_map = yield* SourceMap({
              file: options.sourceMap.filename,
              orig: options.sourceMap.content,
              root: options.sourceMap.root,
              files: options.sourceMap.includeSources ? files : null
            });
          }
          delete format_options.ast;
          delete format_options.code;
          delete format_options.spidermonkey;
          var stream = OutputStream(format_options);
          toplevel.print(stream);
          result.code = stream.get();
          if (options.sourceMap) {
            Object.defineProperty(result, "map", {
              configurable: true,
              enumerable: true,
              get() {
                const map = format_options.source_map.getEncoded();
                return result.map = options.sourceMap.asObject ? map : JSON.stringify(map);
              },
              set(value) {
                Object.defineProperty(result, "map", {
                  value,
                  writable: true
                });
              }
            });
            result.decoded_map = format_options.source_map.getDecoded();
            if (options.sourceMap.url == "inline") {
              var sourceMap2 = typeof result.map === "object" ? JSON.stringify(result.map) : result.map;
              result.code += "\n//# sourceMappingURL=data:application/json;charset=utf-8;base64," + to_base64(sourceMap2);
            } else if (options.sourceMap.url) {
              result.code += "\n//# sourceMappingURL=" + options.sourceMap.url;
            }
          }
        }
        if (options.nameCache && options.mangle) {
          if (options.mangle.cache)
            options.nameCache.vars = cache_to_json(options.mangle.cache);
          if (options.mangle.properties && options.mangle.properties.cache) {
            options.nameCache.props = cache_to_json(options.mangle.properties.cache);
          }
        }
        if (format_options && format_options.source_map) {
          format_options.source_map.destroy();
        }
        if (timings) {
          timings.end = Date.now();
          result.timings = {
            parse: 1e-3 * (timings.rename - timings.parse),
            rename: 1e-3 * (timings.compress - timings.rename),
            compress: 1e-3 * (timings.scope - timings.compress),
            scope: 1e-3 * (timings.mangle - timings.scope),
            mangle: 1e-3 * (timings.properties - timings.mangle),
            properties: 1e-3 * (timings.format - timings.properties),
            format: 1e-3 * (timings.end - timings.format),
            total: 1e-3 * (timings.end - timings.start)
          };
        }
        return result;
      }
      async function minify2(files, options, _fs_module) {
        const gen = minify_sync_or_async(files, options, _fs_module);
        let yielded;
        let val;
        do {
          val = gen.next(await yielded);
          yielded = val.value;
        } while (!val.done);
        return val.value;
      }
      function minify_sync(files, options, _fs_module) {
        const gen = minify_sync_or_async(files, options, _fs_module);
        let yielded;
        let val;
        do {
          if (yielded && typeof yielded.then === "function") {
            throw new Error("minify_sync cannot be used with the legacy source-map module");
          }
          val = gen.next(yielded);
          yielded = val.value;
        } while (!val.done);
        return val.value;
      }
      async function run_cli({ program, packageJson, fs: fs2, path }) {
        const skip_keys = /* @__PURE__ */ new Set(["cname", "parent_scope", "scope", "uses_eval", "uses_with"]);
        var files = {};
        var options = {
          compress: false,
          mangle: false
        };
        const default_options = await _default_options();
        program.version(packageJson.name + " " + packageJson.version);
        program.parseArgv = program.parse;
        program.parse = void 0;
        if (process.argv.includes("ast"))
          program.helpInformation = describe_ast;
        else if (process.argv.includes("options"))
          program.helpInformation = function() {
            var text = [];
            for (var option in default_options) {
              text.push("--" + (option === "sourceMap" ? "source-map" : option) + " options:");
              text.push(format_object(default_options[option]));
              text.push("");
            }
            return text.join("\n");
          };
        program.option("-p, --parse <options>", "Specify parser options.", parse_js());
        program.option("-c, --compress [options]", "Enable compressor/specify compressor options.", parse_js());
        program.option("-m, --mangle [options]", "Mangle names/specify mangler options.", parse_js());
        program.option("--mangle-props [options]", "Mangle properties/specify mangler options.", parse_js());
        program.option("-f, --format [options]", "Format options.", parse_js());
        program.option("-b, --beautify [options]", "Alias for --format.", parse_js());
        program.option("-o, --output <file>", "Output file (default STDOUT).");
        program.option("--comments [filter]", "Preserve copyright comments in the output.");
        program.option("--config-file <file>", "Read minify() options from JSON file.");
        program.option("-d, --define <expr>[=value]", "Global definitions.", parse_js("define"));
        program.option("--ecma <version>", "Specify ECMAScript release: 5, 2015, 2016 or 2017...");
        program.option("-e, --enclose [arg[,...][:value[,...]]]", "Embed output in a big function with configurable arguments and values.");
        program.option("--ie8", "Support non-standard Internet Explorer 8.");
        program.option("--keep-classnames", "Do not mangle/drop class names.");
        program.option("--keep-fnames", "Do not mangle/drop function names. Useful for code relying on Function.prototype.name.");
        program.option("--module", "Input is an ES6 module");
        program.option("--name-cache <file>", "File to hold mangled name mappings.");
        program.option("--rename", "Force symbol expansion.");
        program.option("--no-rename", "Disable symbol expansion.");
        program.option("--safari10", "Support non-standard Safari 10.");
        program.option("--source-map [options]", "Enable source map/specify source map options.", parse_js());
        program.option("--timings", "Display operations run time on STDERR.");
        program.option("--toplevel", "Compress and/or mangle variables in toplevel scope.");
        program.option("--wrap <name>", "Embed everything as a function with \u201Cexports\u201D corresponding to \u201Cname\u201D globally.");
        program.arguments("[files...]").parseArgv(process.argv);
        if (program.configFile) {
          options = JSON.parse(read_file(program.configFile));
        }
        if (!program.output && program.sourceMap && program.sourceMap.url != "inline") {
          fatal("ERROR: cannot write source map to STDOUT");
        }
        [
          "compress",
          "enclose",
          "ie8",
          "mangle",
          "module",
          "safari10",
          "sourceMap",
          "toplevel",
          "wrap"
        ].forEach(function(name) {
          if (name in program) {
            options[name] = program[name];
          }
        });
        if ("ecma" in program) {
          if (program.ecma != (program.ecma | 0))
            fatal("ERROR: ecma must be an integer");
          const ecma = program.ecma | 0;
          if (ecma > 5 && ecma < 2015)
            options.ecma = ecma + 2009;
          else
            options.ecma = ecma;
        }
        if (program.format || program.beautify) {
          const chosenOption = program.format || program.beautify;
          options.format = typeof chosenOption === "object" ? chosenOption : {};
        }
        if (program.comments) {
          if (typeof options.format != "object")
            options.format = {};
          options.format.comments = typeof program.comments == "string" ? program.comments == "false" ? false : program.comments : "some";
        }
        if (program.define) {
          if (typeof options.compress != "object")
            options.compress = {};
          if (typeof options.compress.global_defs != "object")
            options.compress.global_defs = {};
          for (var expr in program.define) {
            options.compress.global_defs[expr] = program.define[expr];
          }
        }
        if (program.keepClassnames) {
          options.keep_classnames = true;
        }
        if (program.keepFnames) {
          options.keep_fnames = true;
        }
        if (program.mangleProps) {
          if (program.mangleProps.domprops) {
            delete program.mangleProps.domprops;
          } else {
            if (typeof program.mangleProps != "object")
              program.mangleProps = {};
            if (!Array.isArray(program.mangleProps.reserved))
              program.mangleProps.reserved = [];
          }
          if (typeof options.mangle != "object")
            options.mangle = {};
          options.mangle.properties = program.mangleProps;
        }
        if (program.nameCache) {
          options.nameCache = JSON.parse(read_file(program.nameCache, "{}"));
        }
        if (program.output == "ast") {
          options.format = {
            ast: true,
            code: false
          };
        }
        if (program.parse) {
          if (!program.parse.acorn && !program.parse.spidermonkey) {
            options.parse = program.parse;
          } else if (program.sourceMap && program.sourceMap.content == "inline") {
            fatal("ERROR: inline source map only works with built-in parser");
          }
        }
        if (~program.rawArgs.indexOf("--rename")) {
          options.rename = true;
        } else if (!program.rename) {
          options.rename = false;
        }
        let convert_path = (name) => name;
        if (typeof program.sourceMap == "object" && "base" in program.sourceMap) {
          convert_path = function() {
            var base = program.sourceMap.base;
            delete options.sourceMap.base;
            return function(name) {
              return path.relative(base, name);
            };
          }();
        }
        let filesList;
        if (options.files && options.files.length) {
          filesList = options.files;
          delete options.files;
        } else if (program.args.length) {
          filesList = program.args;
        }
        if (filesList) {
          simple_glob(filesList).forEach(function(name) {
            files[convert_path(name)] = read_file(name);
          });
        } else {
          await new Promise((resolve) => {
            var chunks = [];
            process.stdin.setEncoding("utf8");
            process.stdin.on("data", function(chunk) {
              chunks.push(chunk);
            }).on("end", function() {
              files = [chunks.join("")];
              resolve();
            });
            process.stdin.resume();
          });
        }
        await run_cli2();
        function convert_ast(fn) {
          return AST_Node.from_mozilla_ast(Object.keys(files).reduce(fn, null));
        }
        async function run_cli2() {
          var content = program.sourceMap && program.sourceMap.content;
          if (content && content !== "inline") {
            options.sourceMap.content = read_file(content, content);
          }
          if (program.timings)
            options.timings = true;
          try {
            if (program.parse) {
              if (program.parse.acorn) {
                files = convert_ast(function(toplevel, name) {
                  return require_acorn().parse(files[name], {
                    ecmaVersion: 2018,
                    locations: true,
                    program: toplevel,
                    sourceFile: name,
                    sourceType: options.module || program.parse.module ? "module" : "script"
                  });
                });
              } else if (program.parse.spidermonkey) {
                files = convert_ast(function(toplevel, name) {
                  var obj = JSON.parse(files[name]);
                  if (!toplevel)
                    return obj;
                  toplevel.body = toplevel.body.concat(obj.body);
                  return toplevel;
                });
              }
            }
          } catch (ex) {
            fatal(ex);
          }
          let result;
          try {
            result = await minify2(files, options, fs2);
          } catch (ex) {
            if (ex.name == "SyntaxError") {
              print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col);
              var col = ex.col;
              var lines = files[ex.filename].split(/\r?\n/);
              var line = lines[ex.line - 1];
              if (!line && !col) {
                line = lines[ex.line - 2];
                col = line.length;
              }
              if (line) {
                var limit = 70;
                if (col > limit) {
                  line = line.slice(col - limit);
                  col = limit;
                }
                print_error(line.slice(0, 80));
                print_error(line.slice(0, col).replace(/\S/g, " ") + "^");
              }
            }
            if (ex.defs) {
              print_error("Supported options:");
              print_error(format_object(ex.defs));
            }
            fatal(ex);
            return;
          }
          if (program.output == "ast") {
            if (!options.compress && !options.mangle) {
              result.ast.figure_out_scope({});
            }
            console.log(JSON.stringify(result.ast, function(key, value) {
              if (value)
                switch (key) {
                  case "thedef":
                    return symdef(value);
                  case "enclosed":
                    return value.length ? value.map(symdef) : void 0;
                  case "variables":
                  case "globals":
                    return value.size ? collect_from_map(value, symdef) : void 0;
                }
              if (skip_keys.has(key))
                return;
              if (value instanceof AST_Token)
                return;
              if (value instanceof Map)
                return;
              if (value instanceof AST_Node) {
                var result2 = {
                  _class: "AST_" + value.TYPE
                };
                if (value.block_scope) {
                  result2.variables = value.block_scope.variables;
                  result2.enclosed = value.block_scope.enclosed;
                }
                value.CTOR.PROPS.forEach(function(prop) {
                  if (prop !== "block_scope") {
                    result2[prop] = value[prop];
                  }
                });
                return result2;
              }
              return value;
            }, 2));
          } else if (program.output == "spidermonkey") {
            try {
              const minified = await minify2(result.code, {
                compress: false,
                mangle: false,
                format: {
                  ast: true,
                  code: false
                }
              }, fs2);
              console.log(JSON.stringify(minified.ast.to_mozilla_ast(), null, 2));
            } catch (ex) {
              fatal(ex);
              return;
            }
          } else if (program.output) {
            fs2.writeFileSync(program.output, result.code);
            if (options.sourceMap && options.sourceMap.url !== "inline" && result.map) {
              fs2.writeFileSync(program.output + ".map", result.map);
            }
          } else {
            console.log(result.code);
          }
          if (program.nameCache) {
            fs2.writeFileSync(program.nameCache, JSON.stringify(options.nameCache));
          }
          if (result.timings)
            for (var phase in result.timings) {
              print_error("- " + phase + ": " + result.timings[phase].toFixed(3) + "s");
            }
        }
        function fatal(message) {
          if (message instanceof Error)
            message = message.stack.replace(/^\S*?Error:/, "ERROR:");
          print_error(message);
          process.exit(1);
        }
        function simple_glob(glob) {
          if (Array.isArray(glob)) {
            return [].concat.apply([], glob.map(simple_glob));
          }
          if (glob && glob.match(/[*?]/)) {
            var dir = path.dirname(glob);
            try {
              var entries = fs2.readdirSync(dir);
            } catch (ex) {
            }
            if (entries) {
              var pattern = "^" + path.basename(glob).replace(/[.+^$[\]\\(){}]/g, "\\$&").replace(/\*/g, "[^/\\\\]*").replace(/\?/g, "[^/\\\\]") + "$";
              var mod = process.platform === "win32" ? "i" : "";
              var rx = new RegExp(pattern, mod);
              var results = entries.filter(function(name) {
                return rx.test(name);
              }).map(function(name) {
                return path.join(dir, name);
              });
              if (results.length)
                return results;
            }
          }
          return [glob];
        }
        function read_file(path2, default_value) {
          try {
            return fs2.readFileSync(path2, "utf8");
          } catch (ex) {
            if ((ex.code == "ENOENT" || ex.code == "ENAMETOOLONG") && default_value != null)
              return default_value;
            fatal(ex);
          }
        }
        function parse_js(flag) {
          return function(value, options2) {
            options2 = options2 || {};
            try {
              walk(parse(value, { expression: true }), (node) => {
                if (node instanceof AST_Assign) {
                  var name = node.left.print_to_string();
                  var value2 = node.right;
                  if (flag) {
                    options2[name] = value2;
                  } else if (value2 instanceof AST_Array) {
                    options2[name] = value2.elements.map(to_string);
                  } else if (value2 instanceof AST_RegExp) {
                    value2 = value2.value;
                    options2[name] = new RegExp(value2.source, value2.flags);
                  } else {
                    options2[name] = to_string(value2);
                  }
                  return true;
                }
                if (node instanceof AST_Symbol || node instanceof AST_PropAccess) {
                  var name = node.print_to_string();
                  options2[name] = true;
                  return true;
                }
                if (!(node instanceof AST_Sequence))
                  throw node;
                function to_string(value3) {
                  return value3 instanceof AST_Constant ? value3.getValue() : value3.print_to_string({
                    quote_keys: true
                  });
                }
              });
            } catch (ex) {
              if (flag) {
                fatal("Error parsing arguments for '" + flag + "': " + value);
              } else {
                options2[value] = null;
              }
            }
            return options2;
          };
        }
        function symdef(def) {
          var ret = 1e6 + def.id + " " + def.name;
          if (def.mangled_name)
            ret += " " + def.mangled_name;
          return ret;
        }
        function collect_from_map(map, callback) {
          var result = [];
          map.forEach(function(def) {
            result.push(callback(def));
          });
          return result;
        }
        function format_object(obj) {
          var lines = [];
          var padding = "";
          Object.keys(obj).map(function(name) {
            if (padding.length < name.length)
              padding = Array(name.length + 1).join(" ");
            return [name, JSON.stringify(obj[name])];
          }).forEach(function(tokens) {
            lines.push("  " + tokens[0] + padding.slice(tokens[0].length - 2) + tokens[1]);
          });
          return lines.join("\n");
        }
        function print_error(msg) {
          process.stderr.write(msg);
          process.stderr.write("\n");
        }
        function describe_ast() {
          var out = OutputStream({ beautify: true });
          function doitem(ctor) {
            out.print("AST_" + ctor.TYPE);
            const props = ctor.SELF_PROPS.filter((prop) => !/^\$/.test(prop));
            if (props.length > 0) {
              out.space();
              out.with_parens(function() {
                props.forEach(function(prop, i) {
                  if (i)
                    out.space();
                  out.print(prop);
                });
              });
            }
            if (ctor.documentation) {
              out.space();
              out.print_string(ctor.documentation);
            }
            if (ctor.SUBCLASSES.length > 0) {
              out.space();
              out.with_block(function() {
                ctor.SUBCLASSES.forEach(function(ctor2) {
                  out.indent();
                  doitem(ctor2);
                  out.newline();
                });
              });
            }
          }
          doitem(AST_Node);
          return out + "\n";
        }
      }
      async function _default_options() {
        const defs = {};
        Object.keys(infer_options({ 0: 0 })).forEach((component) => {
          const options = infer_options({
            [component]: { 0: 0 }
          });
          if (options)
            defs[component] = options;
        });
        return defs;
      }
      async function infer_options(options) {
        try {
          await minify2("", options);
        } catch (error) {
          return error.defs;
        }
      }
      exports2._default_options = _default_options;
      exports2._run_cli = run_cli;
      exports2.minify = minify2;
      exports2.minify_sync = minify_sync;
    });
  }
});

// node_modules/html-minifier-terser/dist/htmlminifier.cjs
var require_htmlminifier = __commonJS({
  "node_modules/html-minifier-terser/dist/htmlminifier.cjs"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var CleanCSS = require_clean_css();
    var entities = require_lib();
    var RelateURL = require_lib2();
    var terser = require_bundle_min();
    async function replaceAsync(str, regex, asyncFn) {
      const promises = [];
      str.replace(regex, (match, ...args) => {
        const promise = asyncFn(match, ...args);
        promises.push(promise);
      });
      const data = await Promise.all(promises);
      return str.replace(regex, () => data.shift());
    }
    var CaseInsensitiveSet = class extends Set {
      has(str) {
        return super.has(str.toLowerCase());
      }
    };
    var singleAttrIdentifier = /([^\s"'<>/=]+)/;
    var singleAttrAssigns = [/=/];
    var singleAttrValues = [
      /"([^"]*)"+/.source,
      /'([^']*)'+/.source,
      /([^ \t\n\f\r"'`=<>]+)/.source
    ];
    var qnameCapture = function() {
      const combiningChar = "\\u0300-\\u0345\\u0360\\u0361\\u0483-\\u0486\\u0591-\\u05A1\\u05A3-\\u05B9\\u05BB-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u064B-\\u0652\\u0670\\u06D6-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0901-\\u0903\\u093C\\u093E-\\u094D\\u0951-\\u0954\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A02\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A70\\u0A71\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B43\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B82\\u0B83\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C01-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C82\\u0C83\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D43\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86-\\u0F8B\\u0F90-\\u0F95\\u0F97\\u0F99-\\u0FAD\\u0FB1-\\u0FB7\\u0FB9\\u20D0-\\u20DC\\u20E1\\u302A-\\u302F\\u3099\\u309A";
      const digit = "0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE7-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29";
      const extender = "\\xB7\\u02D0\\u02D1\\u0387\\u0640\\u0E46\\u0EC6\\u3005\\u3031-\\u3035\\u309D\\u309E\\u30FC-\\u30FE";
      const letter = "A-Za-z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u0131\\u0134-\\u013E\\u0141-\\u0148\\u014A-\\u017E\\u0180-\\u01C3\\u01CD-\\u01F0\\u01F4\\u01F5\\u01FA-\\u0217\\u0250-\\u02A8\\u02BB-\\u02C1\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03CE\\u03D0-\\u03D6\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2-\\u03F3\\u0401-\\u040C\\u040E-\\u044F\\u0451-\\u045C\\u045E-\\u0481\\u0490-\\u04C4\\u04C7\\u04C8\\u04CB\\u04CC\\u04D0-\\u04EB\\u04EE-\\u04F5\\u04F8\\u04F9\\u0531-\\u0556\\u0559\\u0561-\\u0586\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\u063A\\u0641-\\u064A\\u0671-\\u06B7\\u06BA-\\u06BE\\u06C0-\\u06CE\\u06D0-\\u06D3\\u06D5\\u06E5\\u06E6\\u0905-\\u0939\\u093D\\u0958-\\u0961\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8B\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AE0\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B36-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB5\\u0BB7-\\u0BB9\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CDE\\u0CE0\\u0CE1\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D60\\u0D61\\u0E01-\\u0E2E\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD\\u0EAE\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0F40-\\u0F47\\u0F49-\\u0F69\\u10A0-\\u10C5\\u10D0-\\u10F6\\u1100\\u1102\\u1103\\u1105-\\u1107\\u1109\\u110B\\u110C\\u110E-\\u1112\\u113C\\u113E\\u1140\\u114C\\u114E\\u1150\\u1154\\u1155\\u1159\\u115F-\\u1161\\u1163\\u1165\\u1167\\u1169\\u116D\\u116E\\u1172\\u1173\\u1175\\u119E\\u11A8\\u11AB\\u11AE\\u11AF\\u11B7\\u11B8\\u11BA\\u11BC-\\u11C2\\u11EB\\u11F0\\u11F9\\u1E00-\\u1E9B\\u1EA0-\\u1EF9\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2126\\u212A\\u212B\\u212E\\u2180-\\u2182\\u3007\\u3021-\\u3029\\u3041-\\u3094\\u30A1-\\u30FA\\u3105-\\u312C\\u4E00-\\u9FA5\\uAC00-\\uD7A3";
      const ncname = "[" + letter + "_][" + letter + digit + "\\.\\-_" + combiningChar + extender + "]*";
      return "((?:" + ncname + "\\:)?" + ncname + ")";
    }();
    var startTagOpen = new RegExp("^<" + qnameCapture);
    var startTagClose = /^\s*(\/?)>/;
    var endTag = new RegExp("^<\\/" + qnameCapture + "[^>]*>");
    var doctype = /^<!DOCTYPE\s?[^>]+>/i;
    var IS_REGEX_CAPTURING_BROKEN = false;
    "x".replace(/x(.)?/g, function(m, g) {
      IS_REGEX_CAPTURING_BROKEN = g === "";
    });
    var empty = new CaseInsensitiveSet(["area", "base", "basefont", "br", "col", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
    var inline = new CaseInsensitiveSet(["a", "abbr", "acronym", "applet", "b", "basefont", "bdo", "big", "br", "button", "cite", "code", "del", "dfn", "em", "font", "i", "iframe", "img", "input", "ins", "kbd", "label", "map", "noscript", "object", "q", "s", "samp", "script", "select", "small", "span", "strike", "strong", "sub", "sup", "svg", "textarea", "tt", "u", "var"]);
    var closeSelf = new CaseInsensitiveSet(["colgroup", "dd", "dt", "li", "option", "p", "td", "tfoot", "th", "thead", "tr", "source"]);
    var fillAttrs = new CaseInsensitiveSet(["checked", "compact", "declare", "defer", "disabled", "ismap", "multiple", "nohref", "noresize", "noshade", "nowrap", "readonly", "selected"]);
    var special = new CaseInsensitiveSet(["script", "style"]);
    var nonPhrasing = new CaseInsensitiveSet(["address", "article", "aside", "base", "blockquote", "body", "caption", "col", "colgroup", "dd", "details", "dialog", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "legend", "li", "menuitem", "meta", "ol", "optgroup", "option", "param", "rp", "rt", "source", "style", "summary", "tbody", "td", "tfoot", "th", "thead", "title", "tr", "track", "ul"]);
    var reCache = {};
    function attrForHandler(handler) {
      let pattern = singleAttrIdentifier.source + "(?:\\s*(" + joinSingleAttrAssigns(handler) + ")[ \\t\\n\\f\\r]*(?:" + singleAttrValues.join("|") + "))?";
      if (handler.customAttrSurround) {
        const attrClauses = [];
        for (let i = handler.customAttrSurround.length - 1; i >= 0; i--) {
          attrClauses[i] = "(?:(" + handler.customAttrSurround[i][0].source + ")\\s*" + pattern + "\\s*(" + handler.customAttrSurround[i][1].source + "))";
        }
        attrClauses.push("(?:" + pattern + ")");
        pattern = "(?:" + attrClauses.join("|") + ")";
      }
      return new RegExp("^\\s*" + pattern);
    }
    function joinSingleAttrAssigns(handler) {
      return singleAttrAssigns.concat(handler.customAttrAssign || []).map(function(assign) {
        return "(?:" + assign.source + ")";
      }).join("|");
    }
    var HTMLParser = class {
      constructor(html, handler) {
        this.html = html;
        this.handler = handler;
      }
      async parse() {
        let html = this.html;
        const handler = this.handler;
        const stack = [];
        let lastTag;
        const attribute = attrForHandler(handler);
        let last2, prevTag, nextTag;
        while (html) {
          last2 = html;
          if (!lastTag || !special.has(lastTag)) {
            let textEnd = html.indexOf("<");
            if (textEnd === 0) {
              if (/^<!--/.test(html)) {
                const commentEnd = html.indexOf("-->");
                if (commentEnd >= 0) {
                  if (handler.comment) {
                    await handler.comment(html.substring(4, commentEnd));
                  }
                  html = html.substring(commentEnd + 3);
                  prevTag = "";
                  continue;
                }
              }
              if (/^<!\[/.test(html)) {
                const conditionalEnd = html.indexOf("]>");
                if (conditionalEnd >= 0) {
                  if (handler.comment) {
                    await handler.comment(html.substring(2, conditionalEnd + 1), true);
                  }
                  html = html.substring(conditionalEnd + 2);
                  prevTag = "";
                  continue;
                }
              }
              const doctypeMatch = html.match(doctype);
              if (doctypeMatch) {
                if (handler.doctype) {
                  handler.doctype(doctypeMatch[0]);
                }
                html = html.substring(doctypeMatch[0].length);
                prevTag = "";
                continue;
              }
              const endTagMatch = html.match(endTag);
              if (endTagMatch) {
                html = html.substring(endTagMatch[0].length);
                await replaceAsync(endTagMatch[0], endTag, parseEndTag);
                prevTag = "/" + endTagMatch[1].toLowerCase();
                continue;
              }
              const startTagMatch = parseStartTag(html);
              if (startTagMatch) {
                html = startTagMatch.rest;
                await handleStartTag(startTagMatch);
                prevTag = startTagMatch.tagName.toLowerCase();
                continue;
              }
              if (handler.continueOnParseError) {
                textEnd = html.indexOf("<", 1);
              }
            }
            let text;
            if (textEnd >= 0) {
              text = html.substring(0, textEnd);
              html = html.substring(textEnd);
            } else {
              text = html;
              html = "";
            }
            let nextTagMatch = parseStartTag(html);
            if (nextTagMatch) {
              nextTag = nextTagMatch.tagName;
            } else {
              nextTagMatch = html.match(endTag);
              if (nextTagMatch) {
                nextTag = "/" + nextTagMatch[1];
              } else {
                nextTag = "";
              }
            }
            if (handler.chars) {
              await handler.chars(text, prevTag, nextTag);
            }
            prevTag = "";
          } else {
            const stackedTag = lastTag.toLowerCase();
            const reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp("([\\s\\S]*?)</" + stackedTag + "[^>]*>", "i"));
            html = await replaceAsync(html, reStackedTag, async (_, text) => {
              if (stackedTag !== "script" && stackedTag !== "style" && stackedTag !== "noscript") {
                text = text.replace(/<!--([\s\S]*?)-->/g, "$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g, "$1");
              }
              if (handler.chars) {
                await handler.chars(text);
              }
              return "";
            });
            await parseEndTag("</" + stackedTag + ">", stackedTag);
          }
          if (html === last2) {
            throw new Error("Parse Error: " + html);
          }
        }
        if (!handler.partialMarkup) {
          await parseEndTag();
        }
        function parseStartTag(input) {
          const start = input.match(startTagOpen);
          if (start) {
            const match = {
              tagName: start[1],
              attrs: []
            };
            input = input.slice(start[0].length);
            let end, attr;
            while (!(end = input.match(startTagClose)) && (attr = input.match(attribute))) {
              input = input.slice(attr[0].length);
              match.attrs.push(attr);
            }
            if (end) {
              match.unarySlash = end[1];
              match.rest = input.slice(end[0].length);
              return match;
            }
          }
        }
        async function closeIfFound(tagName) {
          if (findTag(tagName) >= 0) {
            await parseEndTag("", tagName);
            return true;
          }
        }
        async function handleStartTag(match) {
          const tagName = match.tagName;
          let unarySlash = match.unarySlash;
          if (handler.html5) {
            if (lastTag === "p" && nonPhrasing.has(tagName)) {
              await parseEndTag("", lastTag);
            } else if (tagName === "tbody") {
              await closeIfFound("thead");
            } else if (tagName === "tfoot") {
              if (!await closeIfFound("tbody")) {
                await closeIfFound("thead");
              }
            }
            if (tagName === "col" && findTag("colgroup") < 0) {
              lastTag = "colgroup";
              stack.push({ tag: lastTag, attrs: [] });
              if (handler.start) {
                await handler.start(lastTag, [], false, "");
              }
            }
          }
          if (!handler.html5 && !inline.has(tagName)) {
            while (lastTag && inline.has(lastTag)) {
              await parseEndTag("", lastTag);
            }
          }
          if (closeSelf.has(tagName) && lastTag === tagName) {
            await parseEndTag("", tagName);
          }
          const unary = empty.has(tagName) || tagName === "html" && lastTag === "head" || !!unarySlash;
          const attrs = match.attrs.map(function(args) {
            let name, value, customOpen, customClose, customAssign, quote;
            const ncp = 7;
            if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) {
              if (args[3] === "") {
                delete args[3];
              }
              if (args[4] === "") {
                delete args[4];
              }
              if (args[5] === "") {
                delete args[5];
              }
            }
            function populate(index) {
              customAssign = args[index];
              value = args[index + 1];
              if (typeof value !== "undefined") {
                return '"';
              }
              value = args[index + 2];
              if (typeof value !== "undefined") {
                return "'";
              }
              value = args[index + 3];
              if (typeof value === "undefined" && fillAttrs.has(name)) {
                value = name;
              }
              return "";
            }
            let j = 1;
            if (handler.customAttrSurround) {
              for (let i = 0, l = handler.customAttrSurround.length; i < l; i++, j += ncp) {
                name = args[j + 1];
                if (name) {
                  quote = populate(j + 2);
                  customOpen = args[j];
                  customClose = args[j + 6];
                  break;
                }
              }
            }
            if (!name && (name = args[j])) {
              quote = populate(j + 1);
            }
            return {
              name,
              value,
              customAssign: customAssign || "=",
              customOpen: customOpen || "",
              customClose: customClose || "",
              quote: quote || ""
            };
          });
          if (!unary) {
            stack.push({ tag: tagName, attrs });
            lastTag = tagName;
            unarySlash = "";
          }
          if (handler.start) {
            await handler.start(tagName, attrs, unary, unarySlash);
          }
        }
        function findTag(tagName) {
          let pos;
          const needle = tagName.toLowerCase();
          for (pos = stack.length - 1; pos >= 0; pos--) {
            if (stack[pos].tag.toLowerCase() === needle) {
              break;
            }
          }
          return pos;
        }
        async function parseEndTag(tag, tagName) {
          let pos;
          if (tagName) {
            pos = findTag(tagName);
          } else {
            pos = 0;
          }
          if (pos >= 0) {
            for (let i = stack.length - 1; i >= pos; i--) {
              if (handler.end) {
                handler.end(stack[i].tag, stack[i].attrs, i > pos || !tag);
              }
            }
            stack.length = pos;
            lastTag = pos && stack[pos - 1].tag;
          } else if (tagName.toLowerCase() === "br") {
            if (handler.start) {
              await handler.start(tagName, [], true, "");
            }
          } else if (tagName.toLowerCase() === "p") {
            if (handler.start) {
              await handler.start(tagName, [], false, "", true);
            }
            if (handler.end) {
              handler.end(tagName, []);
            }
          }
        }
      }
    };
    var Sorter = class {
      sort(tokens, fromIndex = 0) {
        for (let i = 0, len = this.keys.length; i < len; i++) {
          const key = this.keys[i];
          const token = key.slice(1);
          let index = tokens.indexOf(token, fromIndex);
          if (index !== -1) {
            do {
              if (index !== fromIndex) {
                tokens.splice(index, 1);
                tokens.splice(fromIndex, 0, token);
              }
              fromIndex++;
            } while ((index = tokens.indexOf(token, fromIndex)) !== -1);
            return this[key].sort(tokens, fromIndex);
          }
        }
        return tokens;
      }
    };
    var TokenChain = class {
      add(tokens) {
        tokens.forEach((token) => {
          const key = "$" + token;
          if (!this[key]) {
            this[key] = [];
            this[key].processed = 0;
          }
          this[key].push(tokens);
        });
      }
      createSorter() {
        const sorter = new Sorter();
        sorter.keys = Object.keys(this).sort((j, k) => {
          const m = this[j].length;
          const n = this[k].length;
          return m < n ? 1 : m > n ? -1 : j < k ? -1 : j > k ? 1 : 0;
        }).filter((key) => {
          if (this[key].processed < this[key].length) {
            const token = key.slice(1);
            const chain = new TokenChain();
            this[key].forEach((tokens) => {
              let index;
              while ((index = tokens.indexOf(token)) !== -1) {
                tokens.splice(index, 1);
              }
              tokens.forEach((token2) => {
                this["$" + token2].processed++;
              });
              chain.add(tokens.slice(0));
            });
            sorter[key] = chain.createSorter();
            return true;
          }
          return false;
        });
        return sorter;
      }
    };
    function trimWhitespace(str) {
      return str && str.replace(/^[ \n\r\t\f]+/, "").replace(/[ \n\r\t\f]+$/, "");
    }
    function collapseWhitespaceAll(str) {
      return str && str.replace(/[ \n\r\t\f\xA0]+/g, function(spaces) {
        return spaces === "	" ? "	" : spaces.replace(/(^|\xA0+)[^\xA0]+/g, "$1 ");
      });
    }
    function collapseWhitespace(str, options, trimLeft, trimRight, collapseAll) {
      let lineBreakBefore = "";
      let lineBreakAfter = "";
      if (options.preserveLineBreaks) {
        str = str.replace(/^[ \n\r\t\f]*?[\n\r][ \n\r\t\f]*/, function() {
          lineBreakBefore = "\n";
          return "";
        }).replace(/[ \n\r\t\f]*?[\n\r][ \n\r\t\f]*$/, function() {
          lineBreakAfter = "\n";
          return "";
        });
      }
      if (trimLeft) {
        str = str.replace(/^[ \n\r\t\f\xA0]+/, function(spaces) {
          const conservative = !lineBreakBefore && options.conservativeCollapse;
          if (conservative && spaces === "	") {
            return "	";
          }
          return spaces.replace(/^[^\xA0]+/, "").replace(/(\xA0+)[^\xA0]+/g, "$1 ") || (conservative ? " " : "");
        });
      }
      if (trimRight) {
        str = str.replace(/[ \n\r\t\f\xA0]+$/, function(spaces) {
          const conservative = !lineBreakAfter && options.conservativeCollapse;
          if (conservative && spaces === "	") {
            return "	";
          }
          return spaces.replace(/[^\xA0]+(\xA0+)/g, " $1").replace(/[^\xA0]+$/, "") || (conservative ? " " : "");
        });
      }
      if (collapseAll) {
        str = collapseWhitespaceAll(str);
      }
      return lineBreakBefore + str + lineBreakAfter;
    }
    var inlineTags = /* @__PURE__ */ new Set(["a", "abbr", "acronym", "b", "bdi", "bdo", "big", "button", "cite", "code", "del", "dfn", "em", "font", "i", "ins", "kbd", "label", "mark", "math", "nobr", "object", "q", "rp", "rt", "rtc", "ruby", "s", "samp", "select", "small", "span", "strike", "strong", "sub", "sup", "svg", "textarea", "time", "tt", "u", "var"]);
    var inlineTextTags = /* @__PURE__ */ new Set(["a", "abbr", "acronym", "b", "big", "del", "em", "font", "i", "ins", "kbd", "mark", "nobr", "rp", "s", "samp", "small", "span", "strike", "strong", "sub", "sup", "time", "tt", "u", "var"]);
    var selfClosingInlineTags = /* @__PURE__ */ new Set(["comment", "img", "input", "wbr"]);
    function collapseWhitespaceSmart(str, prevTag, nextTag, options) {
      let trimLeft = prevTag && !selfClosingInlineTags.has(prevTag);
      if (trimLeft && !options.collapseInlineTagWhitespace) {
        trimLeft = prevTag.charAt(0) === "/" ? !inlineTags.has(prevTag.slice(1)) : !inlineTextTags.has(prevTag);
      }
      let trimRight = nextTag && !selfClosingInlineTags.has(nextTag);
      if (trimRight && !options.collapseInlineTagWhitespace) {
        trimRight = nextTag.charAt(0) === "/" ? !inlineTextTags.has(nextTag.slice(1)) : !inlineTags.has(nextTag);
      }
      return collapseWhitespace(str, options, trimLeft, trimRight, prevTag && nextTag);
    }
    function isConditionalComment(text) {
      return /^\[if\s[^\]]+]|\[endif]$/.test(text);
    }
    function isIgnoredComment(text, options) {
      for (let i = 0, len = options.ignoreCustomComments.length; i < len; i++) {
        if (options.ignoreCustomComments[i].test(text)) {
          return true;
        }
      }
      return false;
    }
    function isEventAttribute(attrName, options) {
      const patterns = options.customEventAttributes;
      if (patterns) {
        for (let i = patterns.length; i--; ) {
          if (patterns[i].test(attrName)) {
            return true;
          }
        }
        return false;
      }
      return /^on[a-z]{3,}$/.test(attrName);
    }
    function canRemoveAttributeQuotes(value) {
      return /^[^ \t\n\f\r"'`=<>]+$/.test(value);
    }
    function attributesInclude(attributes, attribute) {
      for (let i = attributes.length; i--; ) {
        if (attributes[i].name.toLowerCase() === attribute) {
          return true;
        }
      }
      return false;
    }
    function isAttributeRedundant(tag, attrName, attrValue, attrs) {
      attrValue = attrValue ? trimWhitespace(attrValue.toLowerCase()) : "";
      return tag === "script" && attrName === "language" && attrValue === "javascript" || tag === "form" && attrName === "method" && attrValue === "get" || tag === "input" && attrName === "type" && attrValue === "text" || tag === "script" && attrName === "charset" && !attributesInclude(attrs, "src") || tag === "a" && attrName === "name" && attributesInclude(attrs, "id") || tag === "area" && attrName === "shape" && attrValue === "rect";
    }
    var executableScriptsMimetypes = /* @__PURE__ */ new Set([
      "text/javascript",
      "text/ecmascript",
      "text/jscript",
      "application/javascript",
      "application/x-javascript",
      "application/ecmascript",
      "module"
    ]);
    var keepScriptsMimetypes = /* @__PURE__ */ new Set([
      "module"
    ]);
    function isScriptTypeAttribute(attrValue = "") {
      attrValue = trimWhitespace(attrValue.split(/;/, 2)[0]).toLowerCase();
      return attrValue === "" || executableScriptsMimetypes.has(attrValue);
    }
    function keepScriptTypeAttribute(attrValue = "") {
      attrValue = trimWhitespace(attrValue.split(/;/, 2)[0]).toLowerCase();
      return keepScriptsMimetypes.has(attrValue);
    }
    function isExecutableScript(tag, attrs) {
      if (tag !== "script") {
        return false;
      }
      for (let i = 0, len = attrs.length; i < len; i++) {
        const attrName = attrs[i].name.toLowerCase();
        if (attrName === "type") {
          return isScriptTypeAttribute(attrs[i].value);
        }
      }
      return true;
    }
    function isStyleLinkTypeAttribute(attrValue = "") {
      attrValue = trimWhitespace(attrValue).toLowerCase();
      return attrValue === "" || attrValue === "text/css";
    }
    function isStyleSheet(tag, attrs) {
      if (tag !== "style") {
        return false;
      }
      for (let i = 0, len = attrs.length; i < len; i++) {
        const attrName = attrs[i].name.toLowerCase();
        if (attrName === "type") {
          return isStyleLinkTypeAttribute(attrs[i].value);
        }
      }
      return true;
    }
    var isSimpleBoolean = /* @__PURE__ */ new Set(["allowfullscreen", "async", "autofocus", "autoplay", "checked", "compact", "controls", "declare", "default", "defaultchecked", "defaultmuted", "defaultselected", "defer", "disabled", "enabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "itemscope", "loop", "multiple", "muted", "nohref", "noresize", "noshade", "novalidate", "nowrap", "open", "pauseonexit", "readonly", "required", "reversed", "scoped", "seamless", "selected", "sortable", "truespeed", "typemustmatch", "visible"]);
    var isBooleanValue = /* @__PURE__ */ new Set(["true", "false"]);
    function isBooleanAttribute(attrName, attrValue) {
      return isSimpleBoolean.has(attrName) || attrName === "draggable" && !isBooleanValue.has(attrValue);
    }
    function isUriTypeAttribute(attrName, tag) {
      return /^(?:a|area|link|base)$/.test(tag) && attrName === "href" || tag === "img" && /^(?:src|longdesc|usemap)$/.test(attrName) || tag === "object" && /^(?:classid|codebase|data|usemap)$/.test(attrName) || tag === "q" && attrName === "cite" || tag === "blockquote" && attrName === "cite" || (tag === "ins" || tag === "del") && attrName === "cite" || tag === "form" && attrName === "action" || tag === "input" && (attrName === "src" || attrName === "usemap") || tag === "head" && attrName === "profile" || tag === "script" && (attrName === "src" || attrName === "for");
    }
    function isNumberTypeAttribute(attrName, tag) {
      return /^(?:a|area|object|button)$/.test(tag) && attrName === "tabindex" || tag === "input" && (attrName === "maxlength" || attrName === "tabindex") || tag === "select" && (attrName === "size" || attrName === "tabindex") || tag === "textarea" && /^(?:rows|cols|tabindex)$/.test(attrName) || tag === "colgroup" && attrName === "span" || tag === "col" && attrName === "span" || (tag === "th" || tag === "td") && (attrName === "rowspan" || attrName === "colspan");
    }
    function isLinkType(tag, attrs, value) {
      if (tag !== "link") {
        return false;
      }
      for (let i = 0, len = attrs.length; i < len; i++) {
        if (attrs[i].name === "rel" && attrs[i].value === value) {
          return true;
        }
      }
    }
    function isMediaQuery(tag, attrs, attrName) {
      return attrName === "media" && (isLinkType(tag, attrs, "stylesheet") || isStyleSheet(tag, attrs));
    }
    var srcsetTags = /* @__PURE__ */ new Set(["img", "source"]);
    function isSrcset(attrName, tag) {
      return attrName === "srcset" && srcsetTags.has(tag);
    }
    async function cleanAttributeValue(tag, attrName, attrValue, options, attrs) {
      if (isEventAttribute(attrName, options)) {
        attrValue = trimWhitespace(attrValue).replace(/^javascript:\s*/i, "");
        return options.minifyJS(attrValue, true);
      } else if (attrName === "class") {
        attrValue = trimWhitespace(attrValue);
        if (options.sortClassName) {
          attrValue = options.sortClassName(attrValue);
        } else {
          attrValue = collapseWhitespaceAll(attrValue);
        }
        return attrValue;
      } else if (isUriTypeAttribute(attrName, tag)) {
        attrValue = trimWhitespace(attrValue);
        return isLinkType(tag, attrs, "canonical") ? attrValue : options.minifyURLs(attrValue);
      } else if (isNumberTypeAttribute(attrName, tag)) {
        return trimWhitespace(attrValue);
      } else if (attrName === "style") {
        attrValue = trimWhitespace(attrValue);
        if (attrValue) {
          if (/;$/.test(attrValue) && !/&#?[0-9a-zA-Z]+;$/.test(attrValue)) {
            attrValue = attrValue.replace(/\s*;$/, ";");
          }
          attrValue = await options.minifyCSS(attrValue, "inline");
        }
        return attrValue;
      } else if (isSrcset(attrName, tag)) {
        attrValue = trimWhitespace(attrValue).split(/\s+,\s*|\s*,\s+/).map(function(candidate) {
          let url = candidate;
          let descriptor = "";
          const match = candidate.match(/\s+([1-9][0-9]*w|[0-9]+(?:\.[0-9]+)?x)$/);
          if (match) {
            url = url.slice(0, -match[0].length);
            const num = +match[1].slice(0, -1);
            const suffix = match[1].slice(-1);
            if (num !== 1 || suffix !== "x") {
              descriptor = " " + num + suffix;
            }
          }
          return options.minifyURLs(url) + descriptor;
        }).join(", ");
      } else if (isMetaViewport(tag, attrs) && attrName === "content") {
        attrValue = attrValue.replace(/\s+/g, "").replace(/[0-9]+\.[0-9]+/g, function(numString) {
          return (+numString).toString();
        });
      } else if (isContentSecurityPolicy(tag, attrs) && attrName.toLowerCase() === "content") {
        return collapseWhitespaceAll(attrValue);
      } else if (options.customAttrCollapse && options.customAttrCollapse.test(attrName)) {
        attrValue = trimWhitespace(attrValue.replace(/ ?[\n\r]+ ?/g, "").replace(/\s{2,}/g, options.conservativeCollapse ? " " : ""));
      } else if (tag === "script" && attrName === "type") {
        attrValue = trimWhitespace(attrValue.replace(/\s*;\s*/g, ";"));
      } else if (isMediaQuery(tag, attrs, attrName)) {
        attrValue = trimWhitespace(attrValue);
        return options.minifyCSS(attrValue, "media");
      }
      return attrValue;
    }
    function isMetaViewport(tag, attrs) {
      if (tag !== "meta") {
        return false;
      }
      for (let i = 0, len = attrs.length; i < len; i++) {
        if (attrs[i].name === "name" && attrs[i].value === "viewport") {
          return true;
        }
      }
    }
    function isContentSecurityPolicy(tag, attrs) {
      if (tag !== "meta") {
        return false;
      }
      for (let i = 0, len = attrs.length; i < len; i++) {
        if (attrs[i].name.toLowerCase() === "http-equiv" && attrs[i].value.toLowerCase() === "content-security-policy") {
          return true;
        }
      }
    }
    function ignoreCSS(id) {
      return "/* clean-css ignore:start */" + id + "/* clean-css ignore:end */";
    }
    function wrapCSS(text, type) {
      switch (type) {
        case "inline":
          return "*{" + text + "}";
        case "media":
          return "@media " + text + "{a{top:0}}";
        default:
          return text;
      }
    }
    function unwrapCSS(text, type) {
      let matches;
      switch (type) {
        case "inline":
          matches = text.match(/^\*\{([\s\S]*)\}$/);
          break;
        case "media":
          matches = text.match(/^@media ([\s\S]*?)\s*{[\s\S]*}$/);
          break;
      }
      return matches ? matches[1] : text;
    }
    async function cleanConditionalComment(comment, options) {
      return options.processConditionalComments ? await replaceAsync(comment, /^(\[if\s[^\]]+]>)([\s\S]*?)(<!\[endif])$/, async function(match, prefix, text, suffix) {
        return prefix + await minifyHTML(text, options, true) + suffix;
      }) : comment;
    }
    async function processScript(text, options, currentAttrs) {
      for (let i = 0, len = currentAttrs.length; i < len; i++) {
        if (currentAttrs[i].name.toLowerCase() === "type" && options.processScripts.indexOf(currentAttrs[i].value) > -1) {
          return await minifyHTML(text, options);
        }
      }
      return text;
    }
    var optionalStartTags = /* @__PURE__ */ new Set(["html", "head", "body", "colgroup", "tbody"]);
    var optionalEndTags = /* @__PURE__ */ new Set(["html", "head", "body", "li", "dt", "dd", "p", "rb", "rt", "rtc", "rp", "optgroup", "option", "colgroup", "caption", "thead", "tbody", "tfoot", "tr", "td", "th"]);
    var headerTags = /* @__PURE__ */ new Set(["meta", "link", "script", "style", "template", "noscript"]);
    var descriptionTags = /* @__PURE__ */ new Set(["dt", "dd"]);
    var pBlockTags = /* @__PURE__ */ new Set(["address", "article", "aside", "blockquote", "details", "div", "dl", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "main", "menu", "nav", "ol", "p", "pre", "section", "table", "ul"]);
    var pInlineTags = /* @__PURE__ */ new Set(["a", "audio", "del", "ins", "map", "noscript", "video"]);
    var rubyTags = /* @__PURE__ */ new Set(["rb", "rt", "rtc", "rp"]);
    var rtcTag = /* @__PURE__ */ new Set(["rb", "rtc", "rp"]);
    var optionTag = /* @__PURE__ */ new Set(["option", "optgroup"]);
    var tableContentTags = /* @__PURE__ */ new Set(["tbody", "tfoot"]);
    var tableSectionTags = /* @__PURE__ */ new Set(["thead", "tbody", "tfoot"]);
    var cellTags = /* @__PURE__ */ new Set(["td", "th"]);
    var topLevelTags = /* @__PURE__ */ new Set(["html", "head", "body"]);
    var compactTags = /* @__PURE__ */ new Set(["html", "body"]);
    var looseTags = /* @__PURE__ */ new Set(["head", "colgroup", "caption"]);
    var trailingTags = /* @__PURE__ */ new Set(["dt", "thead"]);
    var htmlTags = /* @__PURE__ */ new Set(["a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "listing", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "multicol", "nav", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp"]);
    function canRemoveParentTag(optionalStartTag, tag) {
      switch (optionalStartTag) {
        case "html":
        case "head":
          return true;
        case "body":
          return !headerTags.has(tag);
        case "colgroup":
          return tag === "col";
        case "tbody":
          return tag === "tr";
      }
      return false;
    }
    function isStartTagMandatory(optionalEndTag, tag) {
      switch (tag) {
        case "colgroup":
          return optionalEndTag === "colgroup";
        case "tbody":
          return tableSectionTags.has(optionalEndTag);
      }
      return false;
    }
    function canRemovePrecedingTag(optionalEndTag, tag) {
      switch (optionalEndTag) {
        case "html":
        case "head":
        case "body":
        case "colgroup":
        case "caption":
          return true;
        case "li":
        case "optgroup":
        case "tr":
          return tag === optionalEndTag;
        case "dt":
        case "dd":
          return descriptionTags.has(tag);
        case "p":
          return pBlockTags.has(tag);
        case "rb":
        case "rt":
        case "rp":
          return rubyTags.has(tag);
        case "rtc":
          return rtcTag.has(tag);
        case "option":
          return optionTag.has(tag);
        case "thead":
        case "tbody":
          return tableContentTags.has(tag);
        case "tfoot":
          return tag === "tbody";
        case "td":
        case "th":
          return cellTags.has(tag);
      }
      return false;
    }
    var reEmptyAttribute = new RegExp("^(?:class|id|style|title|lang|dir|on(?:focus|blur|change|click|dblclick|mouse(?:down|up|over|move|out)|key(?:press|down|up)))$");
    function canDeleteEmptyAttribute(tag, attrName, attrValue, options) {
      const isValueEmpty = !attrValue || /^\s*$/.test(attrValue);
      if (!isValueEmpty) {
        return false;
      }
      if (typeof options.removeEmptyAttributes === "function") {
        return options.removeEmptyAttributes(attrName, tag);
      }
      return tag === "input" && attrName === "value" || reEmptyAttribute.test(attrName);
    }
    function hasAttrName(name, attrs) {
      for (let i = attrs.length - 1; i >= 0; i--) {
        if (attrs[i].name === name) {
          return true;
        }
      }
      return false;
    }
    function canRemoveElement(tag, attrs) {
      switch (tag) {
        case "textarea":
          return false;
        case "audio":
        case "script":
        case "video":
          if (hasAttrName("src", attrs)) {
            return false;
          }
          break;
        case "iframe":
          if (hasAttrName("src", attrs) || hasAttrName("srcdoc", attrs)) {
            return false;
          }
          break;
        case "object":
          if (hasAttrName("data", attrs)) {
            return false;
          }
          break;
        case "applet":
          if (hasAttrName("code", attrs)) {
            return false;
          }
          break;
      }
      return true;
    }
    function canCollapseWhitespace(tag) {
      return !/^(?:script|style|pre|textarea)$/.test(tag);
    }
    function canTrimWhitespace(tag) {
      return !/^(?:pre|textarea)$/.test(tag);
    }
    async function normalizeAttr(attr, attrs, tag, options) {
      const attrName = options.name(attr.name);
      let attrValue = attr.value;
      if (options.decodeEntities && attrValue) {
        attrValue = entities.decodeHTMLStrict(attrValue);
      }
      if (options.removeRedundantAttributes && isAttributeRedundant(tag, attrName, attrValue, attrs) || options.removeScriptTypeAttributes && tag === "script" && attrName === "type" && isScriptTypeAttribute(attrValue) && !keepScriptTypeAttribute(attrValue) || options.removeStyleLinkTypeAttributes && (tag === "style" || tag === "link") && attrName === "type" && isStyleLinkTypeAttribute(attrValue)) {
        return;
      }
      if (attrValue) {
        attrValue = await cleanAttributeValue(tag, attrName, attrValue, options, attrs);
      }
      if (options.removeEmptyAttributes && canDeleteEmptyAttribute(tag, attrName, attrValue, options)) {
        return;
      }
      if (options.decodeEntities && attrValue) {
        attrValue = attrValue.replace(/&(#?[0-9a-zA-Z]+;)/g, "&amp;$1");
      }
      return {
        attr,
        name: attrName,
        value: attrValue
      };
    }
    function buildAttr(normalized, hasUnarySlash, options, isLast, uidAttr) {
      const attrName = normalized.name;
      let attrValue = normalized.value;
      const attr = normalized.attr;
      let attrQuote = attr.quote;
      let attrFragment;
      let emittedAttrValue;
      if (typeof attrValue !== "undefined" && (!options.removeAttributeQuotes || ~attrValue.indexOf(uidAttr) || !canRemoveAttributeQuotes(attrValue))) {
        if (!options.preventAttributesEscaping) {
          if (typeof options.quoteCharacter === "undefined") {
            const apos = (attrValue.match(/'/g) || []).length;
            const quot = (attrValue.match(/"/g) || []).length;
            attrQuote = apos < quot ? "'" : '"';
          } else {
            attrQuote = options.quoteCharacter === "'" ? "'" : '"';
          }
          if (attrQuote === '"') {
            attrValue = attrValue.replace(/"/g, "&#34;");
          } else {
            attrValue = attrValue.replace(/'/g, "&#39;");
          }
        }
        emittedAttrValue = attrQuote + attrValue + attrQuote;
        if (!isLast && !options.removeTagWhitespace) {
          emittedAttrValue += " ";
        }
      } else if (isLast && !hasUnarySlash && !/\/$/.test(attrValue)) {
        emittedAttrValue = attrValue;
      } else {
        emittedAttrValue = attrValue + " ";
      }
      if (typeof attrValue === "undefined" || options.collapseBooleanAttributes && isBooleanAttribute(attrName.toLowerCase(), attrValue.toLowerCase())) {
        attrFragment = attrName;
        if (!isLast) {
          attrFragment += " ";
        }
      } else {
        attrFragment = attrName + attr.customAssign + emittedAttrValue;
      }
      return attr.customOpen + attrFragment + attr.customClose;
    }
    function identity(value) {
      return value;
    }
    function identityAsync(value) {
      return Promise.resolve(value);
    }
    var processOptions = (inputOptions) => {
      const options = {
        name: function(name) {
          return name.toLowerCase();
        },
        canCollapseWhitespace,
        canTrimWhitespace,
        html5: true,
        ignoreCustomComments: [
          /^!/,
          /^\s*#/
        ],
        ignoreCustomFragments: [
          /<%[\s\S]*?%>/,
          /<\?[\s\S]*?\?>/
        ],
        includeAutoGeneratedTags: true,
        log: identity,
        minifyCSS: identityAsync,
        minifyJS: identity,
        minifyURLs: identity
      };
      Object.keys(inputOptions).forEach(function(key) {
        const option = inputOptions[key];
        if (key === "caseSensitive") {
          if (option) {
            options.name = identity;
          }
        } else if (key === "log") {
          if (typeof option === "function") {
            options.log = option;
          }
        } else if (key === "minifyCSS" && typeof option !== "function") {
          if (!option) {
            return;
          }
          const cleanCssOptions = typeof option === "object" ? option : {};
          options.minifyCSS = async function(text, type) {
            text = text.replace(/(url\s*\(\s*)("|'|)(.*?)\2(\s*\))/ig, function(match, prefix, quote, url, suffix) {
              return prefix + quote + options.minifyURLs(url) + quote + suffix;
            });
            const inputCSS = wrapCSS(text, type);
            return new Promise((resolve) => {
              new CleanCSS(cleanCssOptions).minify(inputCSS, (_err, output) => {
                if (output.errors.length > 0) {
                  output.errors.forEach(options.log);
                  resolve(text);
                }
                const outputCSS = unwrapCSS(output.styles, type);
                resolve(outputCSS);
              });
            });
          };
        } else if (key === "minifyJS" && typeof option !== "function") {
          if (!option) {
            return;
          }
          const terserOptions = typeof option === "object" ? option : {};
          terserOptions.parse = {
            ...terserOptions.parse,
            bare_returns: false
          };
          options.minifyJS = async function(text, inline2) {
            const start = text.match(/^\s*<!--.*/);
            const code = start ? text.slice(start[0].length).replace(/\n\s*-->\s*$/, "") : text;
            terserOptions.parse.bare_returns = inline2;
            try {
              const result = await terser.minify(code, terserOptions);
              return result.code.replace(/;$/, "");
            } catch (error) {
              options.log(error);
              return text;
            }
          };
        } else if (key === "minifyURLs" && typeof option !== "function") {
          if (!option) {
            return;
          }
          let relateUrlOptions = option;
          if (typeof option === "string") {
            relateUrlOptions = { site: option };
          } else if (typeof option !== "object") {
            relateUrlOptions = {};
          }
          options.minifyURLs = function(text) {
            try {
              return RelateURL.relate(text, relateUrlOptions);
            } catch (err) {
              options.log(err);
              return text;
            }
          };
        } else {
          options[key] = option;
        }
      });
      return options;
    };
    function uniqueId(value) {
      let id;
      do {
        id = Math.random().toString(36).replace(/^0\.[0-9]*/, "");
      } while (~value.indexOf(id));
      return id;
    }
    var specialContentTags = /* @__PURE__ */ new Set(["script", "style"]);
    async function createSortFns(value, options, uidIgnore, uidAttr) {
      const attrChains = options.sortAttributes && /* @__PURE__ */ Object.create(null);
      const classChain = options.sortClassName && new TokenChain();
      function attrNames(attrs) {
        return attrs.map(function(attr) {
          return options.name(attr.name);
        });
      }
      function shouldSkipUID(token, uid) {
        return !uid || token.indexOf(uid) === -1;
      }
      function shouldSkipUIDs(token) {
        return shouldSkipUID(token, uidIgnore) && shouldSkipUID(token, uidAttr);
      }
      async function scan(input) {
        let currentTag, currentType;
        const parser = new HTMLParser(input, {
          start: function(tag, attrs) {
            if (attrChains) {
              if (!attrChains[tag]) {
                attrChains[tag] = new TokenChain();
              }
              attrChains[tag].add(attrNames(attrs).filter(shouldSkipUIDs));
            }
            for (let i = 0, len = attrs.length; i < len; i++) {
              const attr = attrs[i];
              if (classChain && attr.value && options.name(attr.name) === "class") {
                classChain.add(trimWhitespace(attr.value).split(/[ \t\n\f\r]+/).filter(shouldSkipUIDs));
              } else if (options.processScripts && attr.name.toLowerCase() === "type") {
                currentTag = tag;
                currentType = attr.value;
              }
            }
          },
          end: function() {
            currentTag = "";
          },
          chars: async function(text) {
            if (options.processScripts && specialContentTags.has(currentTag) && options.processScripts.indexOf(currentType) > -1) {
              await scan(text);
            }
          }
        });
        await parser.parse();
      }
      const log = options.log;
      options.log = identity;
      options.sortAttributes = false;
      options.sortClassName = false;
      await scan(await minifyHTML(value, options));
      options.log = log;
      if (attrChains) {
        const attrSorters = /* @__PURE__ */ Object.create(null);
        for (const tag in attrChains) {
          attrSorters[tag] = attrChains[tag].createSorter();
        }
        options.sortAttributes = function(tag, attrs) {
          const sorter = attrSorters[tag];
          if (sorter) {
            const attrMap = /* @__PURE__ */ Object.create(null);
            const names = attrNames(attrs);
            names.forEach(function(name, index) {
              (attrMap[name] || (attrMap[name] = [])).push(attrs[index]);
            });
            sorter.sort(names).forEach(function(name, index) {
              attrs[index] = attrMap[name].shift();
            });
          }
        };
      }
      if (classChain) {
        const sorter = classChain.createSorter();
        options.sortClassName = function(value2) {
          return sorter.sort(value2.split(/[ \n\f\r]+/)).join(" ");
        };
      }
    }
    async function minifyHTML(value, options, partialMarkup) {
      if (options.collapseWhitespace) {
        value = collapseWhitespace(value, options, true, true);
      }
      const buffer = [];
      let charsPrevTag;
      let currentChars = "";
      let hasChars;
      let currentTag = "";
      let currentAttrs = [];
      const stackNoTrimWhitespace = [];
      const stackNoCollapseWhitespace = [];
      let optionalStartTag = "";
      let optionalEndTag = "";
      const ignoredMarkupChunks = [];
      const ignoredCustomMarkupChunks = [];
      let uidIgnore;
      let uidAttr;
      let uidPattern;
      value = value.replace(/<!-- htmlmin:ignore -->([\s\S]*?)<!-- htmlmin:ignore -->/g, function(match, group1) {
        if (!uidIgnore) {
          uidIgnore = uniqueId(value);
          const pattern = new RegExp("^" + uidIgnore + "([0-9]+)$");
          if (options.ignoreCustomComments) {
            options.ignoreCustomComments = options.ignoreCustomComments.slice();
          } else {
            options.ignoreCustomComments = [];
          }
          options.ignoreCustomComments.push(pattern);
        }
        const token = "<!--" + uidIgnore + ignoredMarkupChunks.length + "-->";
        ignoredMarkupChunks.push(group1);
        return token;
      });
      const customFragments = options.ignoreCustomFragments.map(function(re) {
        return re.source;
      });
      if (customFragments.length) {
        const reCustomIgnore = new RegExp("\\s*(?:" + customFragments.join("|") + ")+\\s*", "g");
        value = value.replace(reCustomIgnore, function(match) {
          if (!uidAttr) {
            uidAttr = uniqueId(value);
            uidPattern = new RegExp("(\\s*)" + uidAttr + "([0-9]+)" + uidAttr + "(\\s*)", "g");
            if (options.minifyCSS) {
              options.minifyCSS = function(fn) {
                return function(text, type) {
                  text = text.replace(uidPattern, function(match2, prefix, index) {
                    const chunks = ignoredCustomMarkupChunks[+index];
                    return chunks[1] + uidAttr + index + uidAttr + chunks[2];
                  });
                  const ids = [];
                  new CleanCSS().minify(wrapCSS(text, type)).warnings.forEach(function(warning) {
                    const match2 = uidPattern.exec(warning);
                    if (match2) {
                      const id = uidAttr + match2[2] + uidAttr;
                      text = text.replace(id, ignoreCSS(id));
                      ids.push(id);
                    }
                  });
                  return fn(text, type).then((chunk) => {
                    ids.forEach(function(id) {
                      chunk = chunk.replace(ignoreCSS(id), id);
                    });
                    return chunk;
                  });
                };
              }(options.minifyCSS);
            }
            if (options.minifyJS) {
              options.minifyJS = function(fn) {
                return function(text, type) {
                  return fn(text.replace(uidPattern, function(match2, prefix, index) {
                    const chunks = ignoredCustomMarkupChunks[+index];
                    return chunks[1] + uidAttr + index + uidAttr + chunks[2];
                  }), type);
                };
              }(options.minifyJS);
            }
          }
          const token = uidAttr + ignoredCustomMarkupChunks.length + uidAttr;
          ignoredCustomMarkupChunks.push(/^(\s*)[\s\S]*?(\s*)$/.exec(match));
          return "	" + token + "	";
        });
      }
      if (options.sortAttributes && typeof options.sortAttributes !== "function" || options.sortClassName && typeof options.sortClassName !== "function") {
        await createSortFns(value, options, uidIgnore, uidAttr);
      }
      function _canCollapseWhitespace(tag, attrs) {
        return options.canCollapseWhitespace(tag, attrs, canCollapseWhitespace);
      }
      function _canTrimWhitespace(tag, attrs) {
        return options.canTrimWhitespace(tag, attrs, canTrimWhitespace);
      }
      function removeStartTag() {
        let index = buffer.length - 1;
        while (index > 0 && !/^<[^/!]/.test(buffer[index])) {
          index--;
        }
        buffer.length = Math.max(0, index);
      }
      function removeEndTag() {
        let index = buffer.length - 1;
        while (index > 0 && !/^<\//.test(buffer[index])) {
          index--;
        }
        buffer.length = Math.max(0, index);
      }
      function trimTrailingWhitespace(index, nextTag) {
        for (let endTag2 = null; index >= 0 && _canTrimWhitespace(endTag2); index--) {
          const str = buffer[index];
          const match = str.match(/^<\/([\w:-]+)>$/);
          if (match) {
            endTag2 = match[1];
          } else if (/>$/.test(str) || (buffer[index] = collapseWhitespaceSmart(str, null, nextTag, options))) {
            break;
          }
        }
      }
      function squashTrailingWhitespace(nextTag) {
        let charsIndex = buffer.length - 1;
        if (buffer.length > 1) {
          const item = buffer[buffer.length - 1];
          if (/^(?:<!|$)/.test(item) && item.indexOf(uidIgnore) === -1) {
            charsIndex--;
          }
        }
        trimTrailingWhitespace(charsIndex, nextTag);
      }
      const parser = new HTMLParser(value, {
        partialMarkup,
        continueOnParseError: options.continueOnParseError,
        customAttrAssign: options.customAttrAssign,
        customAttrSurround: options.customAttrSurround,
        html5: options.html5,
        start: async function(tag, attrs, unary, unarySlash, autoGenerated) {
          if (tag.toLowerCase() === "svg") {
            options = Object.create(options);
            options.caseSensitive = true;
            options.keepClosingSlash = true;
            options.name = identity;
          }
          tag = options.name(tag);
          currentTag = tag;
          charsPrevTag = tag;
          if (!inlineTextTags.has(tag)) {
            currentChars = "";
          }
          hasChars = false;
          currentAttrs = attrs;
          let optional = options.removeOptionalTags;
          if (optional) {
            const htmlTag = htmlTags.has(tag);
            if (htmlTag && canRemoveParentTag(optionalStartTag, tag)) {
              removeStartTag();
            }
            optionalStartTag = "";
            if (htmlTag && canRemovePrecedingTag(optionalEndTag, tag)) {
              removeEndTag();
              optional = !isStartTagMandatory(optionalEndTag, tag);
            }
            optionalEndTag = "";
          }
          if (options.collapseWhitespace) {
            if (!stackNoTrimWhitespace.length) {
              squashTrailingWhitespace(tag);
            }
            if (!unary) {
              if (!_canTrimWhitespace(tag, attrs) || stackNoTrimWhitespace.length) {
                stackNoTrimWhitespace.push(tag);
              }
              if (!_canCollapseWhitespace(tag, attrs) || stackNoCollapseWhitespace.length) {
                stackNoCollapseWhitespace.push(tag);
              }
            }
          }
          const openTag = "<" + tag;
          const hasUnarySlash = unarySlash && options.keepClosingSlash;
          buffer.push(openTag);
          if (options.sortAttributes) {
            options.sortAttributes(tag, attrs);
          }
          const parts = [];
          for (let i = attrs.length, isLast = true; --i >= 0; ) {
            const normalized = await normalizeAttr(attrs[i], attrs, tag, options);
            if (normalized) {
              parts.unshift(buildAttr(normalized, hasUnarySlash, options, isLast, uidAttr));
              isLast = false;
            }
          }
          if (parts.length > 0) {
            buffer.push(" ");
            buffer.push.apply(buffer, parts);
          } else if (optional && optionalStartTags.has(tag)) {
            optionalStartTag = tag;
          }
          buffer.push(buffer.pop() + (hasUnarySlash ? "/" : "") + ">");
          if (autoGenerated && !options.includeAutoGeneratedTags) {
            removeStartTag();
            optionalStartTag = "";
          }
        },
        end: function(tag, attrs, autoGenerated) {
          if (tag.toLowerCase() === "svg") {
            options = Object.getPrototypeOf(options);
          }
          tag = options.name(tag);
          if (options.collapseWhitespace) {
            if (stackNoTrimWhitespace.length) {
              if (tag === stackNoTrimWhitespace[stackNoTrimWhitespace.length - 1]) {
                stackNoTrimWhitespace.pop();
              }
            } else {
              squashTrailingWhitespace("/" + tag);
            }
            if (stackNoCollapseWhitespace.length && tag === stackNoCollapseWhitespace[stackNoCollapseWhitespace.length - 1]) {
              stackNoCollapseWhitespace.pop();
            }
          }
          let isElementEmpty = false;
          if (tag === currentTag) {
            currentTag = "";
            isElementEmpty = !hasChars;
          }
          if (options.removeOptionalTags) {
            if (isElementEmpty && topLevelTags.has(optionalStartTag)) {
              removeStartTag();
            }
            optionalStartTag = "";
            if (htmlTags.has(tag) && optionalEndTag && !trailingTags.has(optionalEndTag) && (optionalEndTag !== "p" || !pInlineTags.has(tag))) {
              removeEndTag();
            }
            optionalEndTag = optionalEndTags.has(tag) ? tag : "";
          }
          if (options.removeEmptyElements && isElementEmpty && canRemoveElement(tag, attrs)) {
            removeStartTag();
            optionalStartTag = "";
            optionalEndTag = "";
          } else {
            if (autoGenerated && !options.includeAutoGeneratedTags) {
              optionalEndTag = "";
            } else {
              buffer.push("</" + tag + ">");
            }
            charsPrevTag = "/" + tag;
            if (!inlineTags.has(tag)) {
              currentChars = "";
            } else if (isElementEmpty) {
              currentChars += "|";
            }
          }
        },
        chars: async function(text, prevTag, nextTag) {
          prevTag = prevTag === "" ? "comment" : prevTag;
          nextTag = nextTag === "" ? "comment" : nextTag;
          if (options.decodeEntities && text && !specialContentTags.has(currentTag)) {
            text = entities.decodeHTML(text);
          }
          if (options.collapseWhitespace) {
            if (!stackNoTrimWhitespace.length) {
              if (prevTag === "comment") {
                const prevComment = buffer[buffer.length - 1];
                if (prevComment.indexOf(uidIgnore) === -1) {
                  if (!prevComment) {
                    prevTag = charsPrevTag;
                  }
                  if (buffer.length > 1 && (!prevComment || !options.conservativeCollapse && / $/.test(currentChars))) {
                    const charsIndex = buffer.length - 2;
                    buffer[charsIndex] = buffer[charsIndex].replace(/\s+$/, function(trailingSpaces) {
                      text = trailingSpaces + text;
                      return "";
                    });
                  }
                }
              }
              if (prevTag) {
                if (prevTag === "/nobr" || prevTag === "wbr") {
                  if (/^\s/.test(text)) {
                    let tagIndex = buffer.length - 1;
                    while (tagIndex > 0 && buffer[tagIndex].lastIndexOf("<" + prevTag) !== 0) {
                      tagIndex--;
                    }
                    trimTrailingWhitespace(tagIndex - 1, "br");
                  }
                } else if (inlineTextTags.has(prevTag.charAt(0) === "/" ? prevTag.slice(1) : prevTag)) {
                  text = collapseWhitespace(text, options, /(?:^|\s)$/.test(currentChars));
                }
              }
              if (prevTag || nextTag) {
                text = collapseWhitespaceSmart(text, prevTag, nextTag, options);
              } else {
                text = collapseWhitespace(text, options, true, true);
              }
              if (!text && /\s$/.test(currentChars) && prevTag && prevTag.charAt(0) === "/") {
                trimTrailingWhitespace(buffer.length - 1, nextTag);
              }
            }
            if (!stackNoCollapseWhitespace.length && nextTag !== "html" && !(prevTag && nextTag)) {
              text = collapseWhitespace(text, options, false, false, true);
            }
          }
          if (options.processScripts && specialContentTags.has(currentTag)) {
            text = await processScript(text, options, currentAttrs);
          }
          if (isExecutableScript(currentTag, currentAttrs)) {
            text = await options.minifyJS(text);
          }
          if (isStyleSheet(currentTag, currentAttrs)) {
            text = await options.minifyCSS(text);
          }
          if (options.removeOptionalTags && text) {
            if (optionalStartTag === "html" || optionalStartTag === "body" && !/^\s/.test(text)) {
              removeStartTag();
            }
            optionalStartTag = "";
            if (compactTags.has(optionalEndTag) || looseTags.has(optionalEndTag) && !/^\s/.test(text)) {
              removeEndTag();
            }
            optionalEndTag = "";
          }
          charsPrevTag = /^\s*$/.test(text) ? prevTag : "comment";
          if (options.decodeEntities && text && !specialContentTags.has(currentTag)) {
            text = text.replace(/&((?:Iacute|aacute|uacute|plusmn|Otilde|otilde|agrave|Agrave|Yacute|yacute|Oslash|oslash|atilde|Atilde|brvbar|ccedil|Ccedil|Ograve|curren|divide|eacute|Eacute|ograve|Oacute|egrave|Egrave|Ugrave|frac12|frac14|frac34|ugrave|oacute|iacute|Ntilde|ntilde|Uacute|middot|igrave|Igrave|iquest|Aacute|cedil|laquo|micro|iexcl|Icirc|icirc|acirc|Ucirc|Ecirc|ocirc|Ocirc|ecirc|ucirc|Aring|aring|AElig|aelig|acute|pound|raquo|Acirc|times|THORN|szlig|thorn|COPY|auml|ordf|ordm|Uuml|macr|uuml|Auml|ouml|Ouml|para|nbsp|euml|quot|QUOT|Euml|yuml|cent|sect|copy|sup1|sup2|sup3|iuml|Iuml|ETH|shy|reg|not|yen|amp|AMP|REG|uml|eth|deg|gt|GT|LT|lt)(?!;)|(?:#?[0-9a-zA-Z]+;))/g, "&amp$1").replace(/</g, "&lt;");
          }
          if (uidPattern && options.collapseWhitespace && stackNoTrimWhitespace.length) {
            text = text.replace(uidPattern, function(match, prefix, index) {
              return ignoredCustomMarkupChunks[+index][0];
            });
          }
          currentChars += text;
          if (text) {
            hasChars = true;
          }
          buffer.push(text);
        },
        comment: async function(text, nonStandard) {
          const prefix = nonStandard ? "<!" : "<!--";
          const suffix = nonStandard ? ">" : "-->";
          if (isConditionalComment(text)) {
            text = prefix + await cleanConditionalComment(text, options) + suffix;
          } else if (options.removeComments) {
            if (isIgnoredComment(text, options)) {
              text = "<!--" + text + "-->";
            } else {
              text = "";
            }
          } else {
            text = prefix + text + suffix;
          }
          if (options.removeOptionalTags && text) {
            optionalStartTag = "";
            optionalEndTag = "";
          }
          buffer.push(text);
        },
        doctype: function(doctype2) {
          buffer.push(options.useShortDoctype ? "<!doctype" + (options.removeTagWhitespace ? "" : " ") + "html>" : collapseWhitespaceAll(doctype2));
        }
      });
      await parser.parse();
      if (options.removeOptionalTags) {
        if (topLevelTags.has(optionalStartTag)) {
          removeStartTag();
        }
        if (optionalEndTag && !trailingTags.has(optionalEndTag)) {
          removeEndTag();
        }
      }
      if (options.collapseWhitespace) {
        squashTrailingWhitespace("br");
      }
      return joinResultSegments(buffer, options, uidPattern ? function(str) {
        return str.replace(uidPattern, function(match, prefix, index, suffix) {
          let chunk = ignoredCustomMarkupChunks[+index][0];
          if (options.collapseWhitespace) {
            if (prefix !== "	") {
              chunk = prefix + chunk;
            }
            if (suffix !== "	") {
              chunk += suffix;
            }
            return collapseWhitespace(chunk, {
              preserveLineBreaks: options.preserveLineBreaks,
              conservativeCollapse: !options.trimCustomFragments
            }, /^[ \n\r\t\f]/.test(chunk), /[ \n\r\t\f]$/.test(chunk));
          }
          return chunk;
        });
      } : identity, uidIgnore ? function(str) {
        return str.replace(new RegExp("<!--" + uidIgnore + "([0-9]+)-->", "g"), function(match, index) {
          return ignoredMarkupChunks[+index];
        });
      } : identity);
    }
    function joinResultSegments(results, options, restoreCustom, restoreIgnore) {
      let str;
      const maxLineLength = options.maxLineLength;
      const noNewlinesBeforeTagClose = options.noNewlinesBeforeTagClose;
      if (maxLineLength) {
        let line = "";
        const lines = [];
        while (results.length) {
          const len = line.length;
          const end = results[0].indexOf("\n");
          const isClosingTag = Boolean(results[0].match(endTag));
          const shouldKeepSameLine = noNewlinesBeforeTagClose && isClosingTag;
          if (end < 0) {
            line += restoreIgnore(restoreCustom(results.shift()));
          } else {
            line += restoreIgnore(restoreCustom(results[0].slice(0, end)));
            results[0] = results[0].slice(end + 1);
          }
          if (len > 0 && line.length > maxLineLength && !shouldKeepSameLine) {
            lines.push(line.slice(0, len));
            line = line.slice(len);
          } else if (end >= 0) {
            lines.push(line);
            line = "";
          }
        }
        if (line) {
          lines.push(line);
        }
        str = lines.join("\n");
      } else {
        str = restoreIgnore(restoreCustom(results.join("")));
      }
      return options.collapseWhitespace ? collapseWhitespace(str, options, true, true) : str;
    }
    var minify2 = async function(value, options) {
      const start = Date.now();
      options = processOptions(options || {});
      const result = await minifyHTML(value, options);
      options.log("minified in: " + (Date.now() - start) + "ms");
      return result;
    };
    var htmlminifier = { minify: minify2 };
    exports.default = htmlminifier;
    exports.minify = minify2;
  }
});

// node_modules/mime/Mime.js
var require_Mime = __commonJS({
  "node_modules/mime/Mime.js"(exports, module2) {
    "use strict";
    function Mime() {
      this._types = /* @__PURE__ */ Object.create(null);
      this._extensions = /* @__PURE__ */ Object.create(null);
      for (let i = 0; i < arguments.length; i++) {
        this.define(arguments[i]);
      }
      this.define = this.define.bind(this);
      this.getType = this.getType.bind(this);
      this.getExtension = this.getExtension.bind(this);
    }
    Mime.prototype.define = function(typeMap, force) {
      for (let type in typeMap) {
        let extensions2 = typeMap[type].map(function(t) {
          return t.toLowerCase();
        });
        type = type.toLowerCase();
        for (let i = 0; i < extensions2.length; i++) {
          const ext = extensions2[i];
          if (ext[0] === "*") {
            continue;
          }
          if (!force && ext in this._types) {
            throw new Error('Attempt to change mapping for "' + ext + '" extension from "' + this._types[ext] + '" to "' + type + '". Pass `force=true` to allow this, otherwise remove "' + ext + '" from the list of extensions for "' + type + '".');
          }
          this._types[ext] = type;
        }
        if (force || !this._extensions[type]) {
          const ext = extensions2[0];
          this._extensions[type] = ext[0] !== "*" ? ext : ext.substr(1);
        }
      }
    };
    Mime.prototype.getType = function(path) {
      path = String(path);
      let last2 = path.replace(/^.*[/\\]/, "").toLowerCase();
      let ext = last2.replace(/^.*\./, "").toLowerCase();
      let hasPath = last2.length < path.length;
      let hasDot = ext.length < last2.length - 1;
      return (hasDot || !hasPath) && this._types[ext] || null;
    };
    Mime.prototype.getExtension = function(type) {
      type = /^\s*([^;\s]*)/.test(type) && RegExp.$1;
      return type && this._extensions[type.toLowerCase()] || null;
    };
    module2.exports = Mime;
  }
});

// node_modules/mime/types/standard.js
var require_standard = __commonJS({
  "node_modules/mime/types/standard.js"(exports, module2) {
    module2.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
  }
});

// node_modules/mime/types/other.js
var require_other = __commonJS({
  "node_modules/mime/types/other.js"(exports, module2) {
    module2.exports = { "application/prs.cww": ["cww"], "application/vnd.1000minds.decision-model+xml": ["1km"], "application/vnd.3gpp.pic-bw-large": ["plb"], "application/vnd.3gpp.pic-bw-small": ["psb"], "application/vnd.3gpp.pic-bw-var": ["pvb"], "application/vnd.3gpp2.tcap": ["tcap"], "application/vnd.3m.post-it-notes": ["pwn"], "application/vnd.accpac.simply.aso": ["aso"], "application/vnd.accpac.simply.imp": ["imp"], "application/vnd.acucobol": ["acu"], "application/vnd.acucorp": ["atc", "acutc"], "application/vnd.adobe.air-application-installer-package+zip": ["air"], "application/vnd.adobe.formscentral.fcdt": ["fcdt"], "application/vnd.adobe.fxp": ["fxp", "fxpl"], "application/vnd.adobe.xdp+xml": ["xdp"], "application/vnd.adobe.xfdf": ["xfdf"], "application/vnd.ahead.space": ["ahead"], "application/vnd.airzip.filesecure.azf": ["azf"], "application/vnd.airzip.filesecure.azs": ["azs"], "application/vnd.amazon.ebook": ["azw"], "application/vnd.americandynamics.acc": ["acc"], "application/vnd.amiga.ami": ["ami"], "application/vnd.android.package-archive": ["apk"], "application/vnd.anser-web-certificate-issue-initiation": ["cii"], "application/vnd.anser-web-funds-transfer-initiation": ["fti"], "application/vnd.antix.game-component": ["atx"], "application/vnd.apple.installer+xml": ["mpkg"], "application/vnd.apple.keynote": ["key"], "application/vnd.apple.mpegurl": ["m3u8"], "application/vnd.apple.numbers": ["numbers"], "application/vnd.apple.pages": ["pages"], "application/vnd.apple.pkpass": ["pkpass"], "application/vnd.aristanetworks.swi": ["swi"], "application/vnd.astraea-software.iota": ["iota"], "application/vnd.audiograph": ["aep"], "application/vnd.balsamiq.bmml+xml": ["bmml"], "application/vnd.blueice.multipass": ["mpm"], "application/vnd.bmi": ["bmi"], "application/vnd.businessobjects": ["rep"], "application/vnd.chemdraw+xml": ["cdxml"], "application/vnd.chipnuts.karaoke-mmd": ["mmd"], "application/vnd.cinderella": ["cdy"], "application/vnd.citationstyles.style+xml": ["csl"], "application/vnd.claymore": ["cla"], "application/vnd.cloanto.rp9": ["rp9"], "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], "application/vnd.cluetrust.cartomobile-config": ["c11amc"], "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], "application/vnd.commonspace": ["csp"], "application/vnd.contact.cmsg": ["cdbcmsg"], "application/vnd.cosmocaller": ["cmc"], "application/vnd.crick.clicker": ["clkx"], "application/vnd.crick.clicker.keyboard": ["clkk"], "application/vnd.crick.clicker.palette": ["clkp"], "application/vnd.crick.clicker.template": ["clkt"], "application/vnd.crick.clicker.wordbank": ["clkw"], "application/vnd.criticaltools.wbs+xml": ["wbs"], "application/vnd.ctc-posml": ["pml"], "application/vnd.cups-ppd": ["ppd"], "application/vnd.curl.car": ["car"], "application/vnd.curl.pcurl": ["pcurl"], "application/vnd.dart": ["dart"], "application/vnd.data-vision.rdz": ["rdz"], "application/vnd.dbf": ["dbf"], "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], "application/vnd.dece.ttml+xml": ["uvt", "uvvt"], "application/vnd.dece.unspecified": ["uvx", "uvvx"], "application/vnd.dece.zip": ["uvz", "uvvz"], "application/vnd.denovo.fcselayout-link": ["fe_launch"], "application/vnd.dna": ["dna"], "application/vnd.dolby.mlp": ["mlp"], "application/vnd.dpgraph": ["dpg"], "application/vnd.dreamfactory": ["dfac"], "application/vnd.ds-keypoint": ["kpxx"], "application/vnd.dvb.ait": ["ait"], "application/vnd.dvb.service": ["svc"], "application/vnd.dynageo": ["geo"], "application/vnd.ecowin.chart": ["mag"], "application/vnd.enliven": ["nml"], "application/vnd.epson.esf": ["esf"], "application/vnd.epson.msf": ["msf"], "application/vnd.epson.quickanime": ["qam"], "application/vnd.epson.salt": ["slt"], "application/vnd.epson.ssf": ["ssf"], "application/vnd.eszigno3+xml": ["es3", "et3"], "application/vnd.ezpix-album": ["ez2"], "application/vnd.ezpix-package": ["ez3"], "application/vnd.fdf": ["fdf"], "application/vnd.fdsn.mseed": ["mseed"], "application/vnd.fdsn.seed": ["seed", "dataless"], "application/vnd.flographit": ["gph"], "application/vnd.fluxtime.clip": ["ftc"], "application/vnd.framemaker": ["fm", "frame", "maker", "book"], "application/vnd.frogans.fnc": ["fnc"], "application/vnd.frogans.ltf": ["ltf"], "application/vnd.fsc.weblaunch": ["fsc"], "application/vnd.fujitsu.oasys": ["oas"], "application/vnd.fujitsu.oasys2": ["oa2"], "application/vnd.fujitsu.oasys3": ["oa3"], "application/vnd.fujitsu.oasysgp": ["fg5"], "application/vnd.fujitsu.oasysprs": ["bh2"], "application/vnd.fujixerox.ddd": ["ddd"], "application/vnd.fujixerox.docuworks": ["xdw"], "application/vnd.fujixerox.docuworks.binder": ["xbd"], "application/vnd.fuzzysheet": ["fzs"], "application/vnd.genomatix.tuxedo": ["txd"], "application/vnd.geogebra.file": ["ggb"], "application/vnd.geogebra.tool": ["ggt"], "application/vnd.geometry-explorer": ["gex", "gre"], "application/vnd.geonext": ["gxt"], "application/vnd.geoplan": ["g2w"], "application/vnd.geospace": ["g3w"], "application/vnd.gmx": ["gmx"], "application/vnd.google-apps.document": ["gdoc"], "application/vnd.google-apps.presentation": ["gslides"], "application/vnd.google-apps.spreadsheet": ["gsheet"], "application/vnd.google-earth.kml+xml": ["kml"], "application/vnd.google-earth.kmz": ["kmz"], "application/vnd.grafeq": ["gqf", "gqs"], "application/vnd.groove-account": ["gac"], "application/vnd.groove-help": ["ghf"], "application/vnd.groove-identity-message": ["gim"], "application/vnd.groove-injector": ["grv"], "application/vnd.groove-tool-message": ["gtm"], "application/vnd.groove-tool-template": ["tpl"], "application/vnd.groove-vcard": ["vcg"], "application/vnd.hal+xml": ["hal"], "application/vnd.handheld-entertainment+xml": ["zmm"], "application/vnd.hbci": ["hbci"], "application/vnd.hhe.lesson-player": ["les"], "application/vnd.hp-hpgl": ["hpgl"], "application/vnd.hp-hpid": ["hpid"], "application/vnd.hp-hps": ["hps"], "application/vnd.hp-jlyt": ["jlt"], "application/vnd.hp-pcl": ["pcl"], "application/vnd.hp-pclxl": ["pclxl"], "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], "application/vnd.ibm.minipay": ["mpy"], "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"], "application/vnd.ibm.rights-management": ["irm"], "application/vnd.ibm.secure-container": ["sc"], "application/vnd.iccprofile": ["icc", "icm"], "application/vnd.igloader": ["igl"], "application/vnd.immervision-ivp": ["ivp"], "application/vnd.immervision-ivu": ["ivu"], "application/vnd.insors.igm": ["igm"], "application/vnd.intercon.formnet": ["xpw", "xpx"], "application/vnd.intergeo": ["i2g"], "application/vnd.intu.qbo": ["qbo"], "application/vnd.intu.qfx": ["qfx"], "application/vnd.ipunplugged.rcprofile": ["rcprofile"], "application/vnd.irepository.package+xml": ["irp"], "application/vnd.is-xpr": ["xpr"], "application/vnd.isac.fcs": ["fcs"], "application/vnd.jam": ["jam"], "application/vnd.jcp.javame.midlet-rms": ["rms"], "application/vnd.jisp": ["jisp"], "application/vnd.joost.joda-archive": ["joda"], "application/vnd.kahootz": ["ktz", "ktr"], "application/vnd.kde.karbon": ["karbon"], "application/vnd.kde.kchart": ["chrt"], "application/vnd.kde.kformula": ["kfo"], "application/vnd.kde.kivio": ["flw"], "application/vnd.kde.kontour": ["kon"], "application/vnd.kde.kpresenter": ["kpr", "kpt"], "application/vnd.kde.kspread": ["ksp"], "application/vnd.kde.kword": ["kwd", "kwt"], "application/vnd.kenameaapp": ["htke"], "application/vnd.kidspiration": ["kia"], "application/vnd.kinar": ["kne", "knp"], "application/vnd.koan": ["skp", "skd", "skt", "skm"], "application/vnd.kodak-descriptor": ["sse"], "application/vnd.las.las+xml": ["lasxml"], "application/vnd.llamagraphics.life-balance.desktop": ["lbd"], "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], "application/vnd.lotus-1-2-3": ["123"], "application/vnd.lotus-approach": ["apr"], "application/vnd.lotus-freelance": ["pre"], "application/vnd.lotus-notes": ["nsf"], "application/vnd.lotus-organizer": ["org"], "application/vnd.lotus-screencam": ["scm"], "application/vnd.lotus-wordpro": ["lwp"], "application/vnd.macports.portpkg": ["portpkg"], "application/vnd.mapbox-vector-tile": ["mvt"], "application/vnd.mcd": ["mcd"], "application/vnd.medcalcdata": ["mc1"], "application/vnd.mediastation.cdkey": ["cdkey"], "application/vnd.mfer": ["mwf"], "application/vnd.mfmp": ["mfm"], "application/vnd.micrografx.flo": ["flo"], "application/vnd.micrografx.igx": ["igx"], "application/vnd.mif": ["mif"], "application/vnd.mobius.daf": ["daf"], "application/vnd.mobius.dis": ["dis"], "application/vnd.mobius.mbk": ["mbk"], "application/vnd.mobius.mqy": ["mqy"], "application/vnd.mobius.msl": ["msl"], "application/vnd.mobius.plc": ["plc"], "application/vnd.mobius.txf": ["txf"], "application/vnd.mophun.application": ["mpn"], "application/vnd.mophun.certificate": ["mpc"], "application/vnd.mozilla.xul+xml": ["xul"], "application/vnd.ms-artgalry": ["cil"], "application/vnd.ms-cab-compressed": ["cab"], "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], "application/vnd.ms-excel.template.macroenabled.12": ["xltm"], "application/vnd.ms-fontobject": ["eot"], "application/vnd.ms-htmlhelp": ["chm"], "application/vnd.ms-ims": ["ims"], "application/vnd.ms-lrm": ["lrm"], "application/vnd.ms-officetheme": ["thmx"], "application/vnd.ms-outlook": ["msg"], "application/vnd.ms-pki.seccat": ["cat"], "application/vnd.ms-pki.stl": ["*stl"], "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"], "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], "application/vnd.ms-project": ["mpp", "mpt"], "application/vnd.ms-word.document.macroenabled.12": ["docm"], "application/vnd.ms-word.template.macroenabled.12": ["dotm"], "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"], "application/vnd.ms-wpl": ["wpl"], "application/vnd.ms-xpsdocument": ["xps"], "application/vnd.mseq": ["mseq"], "application/vnd.musician": ["mus"], "application/vnd.muvee.style": ["msty"], "application/vnd.mynfc": ["taglet"], "application/vnd.neurolanguage.nlu": ["nlu"], "application/vnd.nitf": ["ntf", "nitf"], "application/vnd.noblenet-directory": ["nnd"], "application/vnd.noblenet-sealer": ["nns"], "application/vnd.noblenet-web": ["nnw"], "application/vnd.nokia.n-gage.ac+xml": ["*ac"], "application/vnd.nokia.n-gage.data": ["ngdat"], "application/vnd.nokia.n-gage.symbian.install": ["n-gage"], "application/vnd.nokia.radio-preset": ["rpst"], "application/vnd.nokia.radio-presets": ["rpss"], "application/vnd.novadigm.edm": ["edm"], "application/vnd.novadigm.edx": ["edx"], "application/vnd.novadigm.ext": ["ext"], "application/vnd.oasis.opendocument.chart": ["odc"], "application/vnd.oasis.opendocument.chart-template": ["otc"], "application/vnd.oasis.opendocument.database": ["odb"], "application/vnd.oasis.opendocument.formula": ["odf"], "application/vnd.oasis.opendocument.formula-template": ["odft"], "application/vnd.oasis.opendocument.graphics": ["odg"], "application/vnd.oasis.opendocument.graphics-template": ["otg"], "application/vnd.oasis.opendocument.image": ["odi"], "application/vnd.oasis.opendocument.image-template": ["oti"], "application/vnd.oasis.opendocument.presentation": ["odp"], "application/vnd.oasis.opendocument.presentation-template": ["otp"], "application/vnd.oasis.opendocument.spreadsheet": ["ods"], "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], "application/vnd.oasis.opendocument.text": ["odt"], "application/vnd.oasis.opendocument.text-master": ["odm"], "application/vnd.oasis.opendocument.text-template": ["ott"], "application/vnd.oasis.opendocument.text-web": ["oth"], "application/vnd.olpc-sugar": ["xo"], "application/vnd.oma.dd2+xml": ["dd2"], "application/vnd.openblox.game+xml": ["obgx"], "application/vnd.openofficeorg.extension": ["oxt"], "application/vnd.openstreetmap.data+xml": ["osm"], "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], "application/vnd.osgeo.mapguide.package": ["mgp"], "application/vnd.osgi.dp": ["dp"], "application/vnd.osgi.subsystem": ["esa"], "application/vnd.palm": ["pdb", "pqa", "oprc"], "application/vnd.pawaafile": ["paw"], "application/vnd.pg.format": ["str"], "application/vnd.pg.osasli": ["ei6"], "application/vnd.picsel": ["efif"], "application/vnd.pmi.widget": ["wg"], "application/vnd.pocketlearn": ["plf"], "application/vnd.powerbuilder6": ["pbd"], "application/vnd.previewsystems.box": ["box"], "application/vnd.proteus.magazine": ["mgz"], "application/vnd.publishare-delta-tree": ["qps"], "application/vnd.pvi.ptid1": ["ptid"], "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], "application/vnd.rar": ["rar"], "application/vnd.realvnc.bed": ["bed"], "application/vnd.recordare.musicxml": ["mxl"], "application/vnd.recordare.musicxml+xml": ["musicxml"], "application/vnd.rig.cryptonote": ["cryptonote"], "application/vnd.rim.cod": ["cod"], "application/vnd.rn-realmedia": ["rm"], "application/vnd.rn-realmedia-vbr": ["rmvb"], "application/vnd.route66.link66+xml": ["link66"], "application/vnd.sailingtracker.track": ["st"], "application/vnd.seemail": ["see"], "application/vnd.sema": ["sema"], "application/vnd.semd": ["semd"], "application/vnd.semf": ["semf"], "application/vnd.shana.informed.formdata": ["ifm"], "application/vnd.shana.informed.formtemplate": ["itp"], "application/vnd.shana.informed.interchange": ["iif"], "application/vnd.shana.informed.package": ["ipk"], "application/vnd.simtech-mindmapper": ["twd", "twds"], "application/vnd.smaf": ["mmf"], "application/vnd.smart.teacher": ["teacher"], "application/vnd.software602.filler.form+xml": ["fo"], "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"], "application/vnd.spotfire.dxp": ["dxp"], "application/vnd.spotfire.sfs": ["sfs"], "application/vnd.stardivision.calc": ["sdc"], "application/vnd.stardivision.draw": ["sda"], "application/vnd.stardivision.impress": ["sdd"], "application/vnd.stardivision.math": ["smf"], "application/vnd.stardivision.writer": ["sdw", "vor"], "application/vnd.stardivision.writer-global": ["sgl"], "application/vnd.stepmania.package": ["smzip"], "application/vnd.stepmania.stepchart": ["sm"], "application/vnd.sun.wadl+xml": ["wadl"], "application/vnd.sun.xml.calc": ["sxc"], "application/vnd.sun.xml.calc.template": ["stc"], "application/vnd.sun.xml.draw": ["sxd"], "application/vnd.sun.xml.draw.template": ["std"], "application/vnd.sun.xml.impress": ["sxi"], "application/vnd.sun.xml.impress.template": ["sti"], "application/vnd.sun.xml.math": ["sxm"], "application/vnd.sun.xml.writer": ["sxw"], "application/vnd.sun.xml.writer.global": ["sxg"], "application/vnd.sun.xml.writer.template": ["stw"], "application/vnd.sus-calendar": ["sus", "susp"], "application/vnd.svd": ["svd"], "application/vnd.symbian.install": ["sis", "sisx"], "application/vnd.syncml+xml": ["xsm"], "application/vnd.syncml.dm+wbxml": ["bdm"], "application/vnd.syncml.dm+xml": ["xdm"], "application/vnd.syncml.dmddf+xml": ["ddf"], "application/vnd.tao.intent-module-archive": ["tao"], "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], "application/vnd.tmobile-livetv": ["tmo"], "application/vnd.trid.tpt": ["tpt"], "application/vnd.triscape.mxs": ["mxs"], "application/vnd.trueapp": ["tra"], "application/vnd.ufdl": ["ufd", "ufdl"], "application/vnd.uiq.theme": ["utz"], "application/vnd.umajin": ["umj"], "application/vnd.unity": ["unityweb"], "application/vnd.uoml+xml": ["uoml"], "application/vnd.vcx": ["vcx"], "application/vnd.visio": ["vsd", "vst", "vss", "vsw"], "application/vnd.visionary": ["vis"], "application/vnd.vsf": ["vsf"], "application/vnd.wap.wbxml": ["wbxml"], "application/vnd.wap.wmlc": ["wmlc"], "application/vnd.wap.wmlscriptc": ["wmlsc"], "application/vnd.webturbo": ["wtb"], "application/vnd.wolfram.player": ["nbp"], "application/vnd.wordperfect": ["wpd"], "application/vnd.wqd": ["wqd"], "application/vnd.wt.stf": ["stf"], "application/vnd.xara": ["xar"], "application/vnd.xfdl": ["xfdl"], "application/vnd.yamaha.hv-dic": ["hvd"], "application/vnd.yamaha.hv-script": ["hvs"], "application/vnd.yamaha.hv-voice": ["hvp"], "application/vnd.yamaha.openscoreformat": ["osf"], "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], "application/vnd.yamaha.smaf-audio": ["saf"], "application/vnd.yamaha.smaf-phrase": ["spf"], "application/vnd.yellowriver-custom-menu": ["cmp"], "application/vnd.zul": ["zir", "zirz"], "application/vnd.zzazz.deck+xml": ["zaz"], "application/x-7z-compressed": ["7z"], "application/x-abiword": ["abw"], "application/x-ace-compressed": ["ace"], "application/x-apple-diskimage": ["*dmg"], "application/x-arj": ["arj"], "application/x-authorware-bin": ["aab", "x32", "u32", "vox"], "application/x-authorware-map": ["aam"], "application/x-authorware-seg": ["aas"], "application/x-bcpio": ["bcpio"], "application/x-bdoc": ["*bdoc"], "application/x-bittorrent": ["torrent"], "application/x-blorb": ["blb", "blorb"], "application/x-bzip": ["bz"], "application/x-bzip2": ["bz2", "boz"], "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"], "application/x-cdlink": ["vcd"], "application/x-cfs-compressed": ["cfs"], "application/x-chat": ["chat"], "application/x-chess-pgn": ["pgn"], "application/x-chrome-extension": ["crx"], "application/x-cocoa": ["cco"], "application/x-conference": ["nsc"], "application/x-cpio": ["cpio"], "application/x-csh": ["csh"], "application/x-debian-package": ["*deb", "udeb"], "application/x-dgc-compressed": ["dgc"], "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], "application/x-doom": ["wad"], "application/x-dtbncx+xml": ["ncx"], "application/x-dtbook+xml": ["dtb"], "application/x-dtbresource+xml": ["res"], "application/x-dvi": ["dvi"], "application/x-envoy": ["evy"], "application/x-eva": ["eva"], "application/x-font-bdf": ["bdf"], "application/x-font-ghostscript": ["gsf"], "application/x-font-linux-psf": ["psf"], "application/x-font-pcf": ["pcf"], "application/x-font-snf": ["snf"], "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"], "application/x-freearc": ["arc"], "application/x-futuresplash": ["spl"], "application/x-gca-compressed": ["gca"], "application/x-glulx": ["ulx"], "application/x-gnumeric": ["gnumeric"], "application/x-gramps-xml": ["gramps"], "application/x-gtar": ["gtar"], "application/x-hdf": ["hdf"], "application/x-httpd-php": ["php"], "application/x-install-instructions": ["install"], "application/x-iso9660-image": ["*iso"], "application/x-iwork-keynote-sffkey": ["*key"], "application/x-iwork-numbers-sffnumbers": ["*numbers"], "application/x-iwork-pages-sffpages": ["*pages"], "application/x-java-archive-diff": ["jardiff"], "application/x-java-jnlp-file": ["jnlp"], "application/x-keepass2": ["kdbx"], "application/x-latex": ["latex"], "application/x-lua-bytecode": ["luac"], "application/x-lzh-compressed": ["lzh", "lha"], "application/x-makeself": ["run"], "application/x-mie": ["mie"], "application/x-mobipocket-ebook": ["prc", "mobi"], "application/x-ms-application": ["application"], "application/x-ms-shortcut": ["lnk"], "application/x-ms-wmd": ["wmd"], "application/x-ms-wmz": ["wmz"], "application/x-ms-xbap": ["xbap"], "application/x-msaccess": ["mdb"], "application/x-msbinder": ["obd"], "application/x-mscardfile": ["crd"], "application/x-msclip": ["clp"], "application/x-msdos-program": ["*exe"], "application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"], "application/x-msmediaview": ["mvb", "m13", "m14"], "application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"], "application/x-msmoney": ["mny"], "application/x-mspublisher": ["pub"], "application/x-msschedule": ["scd"], "application/x-msterminal": ["trm"], "application/x-mswrite": ["wri"], "application/x-netcdf": ["nc", "cdf"], "application/x-ns-proxy-autoconfig": ["pac"], "application/x-nzb": ["nzb"], "application/x-perl": ["pl", "pm"], "application/x-pilot": ["*prc", "*pdb"], "application/x-pkcs12": ["p12", "pfx"], "application/x-pkcs7-certificates": ["p7b", "spc"], "application/x-pkcs7-certreqresp": ["p7r"], "application/x-rar-compressed": ["*rar"], "application/x-redhat-package-manager": ["rpm"], "application/x-research-info-systems": ["ris"], "application/x-sea": ["sea"], "application/x-sh": ["sh"], "application/x-shar": ["shar"], "application/x-shockwave-flash": ["swf"], "application/x-silverlight-app": ["xap"], "application/x-sql": ["sql"], "application/x-stuffit": ["sit"], "application/x-stuffitx": ["sitx"], "application/x-subrip": ["srt"], "application/x-sv4cpio": ["sv4cpio"], "application/x-sv4crc": ["sv4crc"], "application/x-t3vm-image": ["t3"], "application/x-tads": ["gam"], "application/x-tar": ["tar"], "application/x-tcl": ["tcl", "tk"], "application/x-tex": ["tex"], "application/x-tex-tfm": ["tfm"], "application/x-texinfo": ["texinfo", "texi"], "application/x-tgif": ["*obj"], "application/x-ustar": ["ustar"], "application/x-virtualbox-hdd": ["hdd"], "application/x-virtualbox-ova": ["ova"], "application/x-virtualbox-ovf": ["ovf"], "application/x-virtualbox-vbox": ["vbox"], "application/x-virtualbox-vbox-extpack": ["vbox-extpack"], "application/x-virtualbox-vdi": ["vdi"], "application/x-virtualbox-vhd": ["vhd"], "application/x-virtualbox-vmdk": ["vmdk"], "application/x-wais-source": ["src"], "application/x-web-app-manifest+json": ["webapp"], "application/x-x509-ca-cert": ["der", "crt", "pem"], "application/x-xfig": ["fig"], "application/x-xliff+xml": ["*xlf"], "application/x-xpinstall": ["xpi"], "application/x-xz": ["xz"], "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], "audio/vnd.dece.audio": ["uva", "uvva"], "audio/vnd.digital-winds": ["eol"], "audio/vnd.dra": ["dra"], "audio/vnd.dts": ["dts"], "audio/vnd.dts.hd": ["dtshd"], "audio/vnd.lucent.voice": ["lvp"], "audio/vnd.ms-playready.media.pya": ["pya"], "audio/vnd.nuera.ecelp4800": ["ecelp4800"], "audio/vnd.nuera.ecelp7470": ["ecelp7470"], "audio/vnd.nuera.ecelp9600": ["ecelp9600"], "audio/vnd.rip": ["rip"], "audio/x-aac": ["aac"], "audio/x-aiff": ["aif", "aiff", "aifc"], "audio/x-caf": ["caf"], "audio/x-flac": ["flac"], "audio/x-m4a": ["*m4a"], "audio/x-matroska": ["mka"], "audio/x-mpegurl": ["m3u"], "audio/x-ms-wax": ["wax"], "audio/x-ms-wma": ["wma"], "audio/x-pn-realaudio": ["ram", "ra"], "audio/x-pn-realaudio-plugin": ["rmp"], "audio/x-realaudio": ["*ra"], "audio/x-wav": ["*wav"], "chemical/x-cdx": ["cdx"], "chemical/x-cif": ["cif"], "chemical/x-cmdf": ["cmdf"], "chemical/x-cml": ["cml"], "chemical/x-csml": ["csml"], "chemical/x-xyz": ["xyz"], "image/prs.btif": ["btif"], "image/prs.pti": ["pti"], "image/vnd.adobe.photoshop": ["psd"], "image/vnd.airzip.accelerator.azv": ["azv"], "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], "image/vnd.djvu": ["djvu", "djv"], "image/vnd.dvb.subtitle": ["*sub"], "image/vnd.dwg": ["dwg"], "image/vnd.dxf": ["dxf"], "image/vnd.fastbidsheet": ["fbs"], "image/vnd.fpx": ["fpx"], "image/vnd.fst": ["fst"], "image/vnd.fujixerox.edmics-mmr": ["mmr"], "image/vnd.fujixerox.edmics-rlc": ["rlc"], "image/vnd.microsoft.icon": ["ico"], "image/vnd.ms-dds": ["dds"], "image/vnd.ms-modi": ["mdi"], "image/vnd.ms-photo": ["wdp"], "image/vnd.net-fpx": ["npx"], "image/vnd.pco.b16": ["b16"], "image/vnd.tencent.tap": ["tap"], "image/vnd.valve.source.texture": ["vtf"], "image/vnd.wap.wbmp": ["wbmp"], "image/vnd.xiff": ["xif"], "image/vnd.zbrush.pcx": ["pcx"], "image/x-3ds": ["3ds"], "image/x-cmu-raster": ["ras"], "image/x-cmx": ["cmx"], "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], "image/x-icon": ["*ico"], "image/x-jng": ["jng"], "image/x-mrsid-image": ["sid"], "image/x-ms-bmp": ["*bmp"], "image/x-pcx": ["*pcx"], "image/x-pict": ["pic", "pct"], "image/x-portable-anymap": ["pnm"], "image/x-portable-bitmap": ["pbm"], "image/x-portable-graymap": ["pgm"], "image/x-portable-pixmap": ["ppm"], "image/x-rgb": ["rgb"], "image/x-tga": ["tga"], "image/x-xbitmap": ["xbm"], "image/x-xpixmap": ["xpm"], "image/x-xwindowdump": ["xwd"], "message/vnd.wfa.wsc": ["wsc"], "model/vnd.collada+xml": ["dae"], "model/vnd.dwf": ["dwf"], "model/vnd.gdl": ["gdl"], "model/vnd.gtw": ["gtw"], "model/vnd.mts": ["mts"], "model/vnd.opengex": ["ogex"], "model/vnd.parasolid.transmit.binary": ["x_b"], "model/vnd.parasolid.transmit.text": ["x_t"], "model/vnd.sap.vds": ["vds"], "model/vnd.usdz+zip": ["usdz"], "model/vnd.valve.source.compiled-map": ["bsp"], "model/vnd.vtu": ["vtu"], "text/prs.lines.tag": ["dsc"], "text/vnd.curl": ["curl"], "text/vnd.curl.dcurl": ["dcurl"], "text/vnd.curl.mcurl": ["mcurl"], "text/vnd.curl.scurl": ["scurl"], "text/vnd.dvb.subtitle": ["sub"], "text/vnd.fly": ["fly"], "text/vnd.fmi.flexstor": ["flx"], "text/vnd.graphviz": ["gv"], "text/vnd.in3d.3dml": ["3dml"], "text/vnd.in3d.spot": ["spot"], "text/vnd.sun.j2me.app-descriptor": ["jad"], "text/vnd.wap.wml": ["wml"], "text/vnd.wap.wmlscript": ["wmls"], "text/x-asm": ["s", "asm"], "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], "text/x-component": ["htc"], "text/x-fortran": ["f", "for", "f77", "f90"], "text/x-handlebars-template": ["hbs"], "text/x-java-source": ["java"], "text/x-lua": ["lua"], "text/x-markdown": ["mkd"], "text/x-nfo": ["nfo"], "text/x-opml": ["opml"], "text/x-org": ["*org"], "text/x-pascal": ["p", "pas"], "text/x-processing": ["pde"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "text/x-setext": ["etx"], "text/x-sfv": ["sfv"], "text/x-suse-ymp": ["ymp"], "text/x-uuencode": ["uu"], "text/x-vcalendar": ["vcs"], "text/x-vcard": ["vcf"], "video/vnd.dece.hd": ["uvh", "uvvh"], "video/vnd.dece.mobile": ["uvm", "uvvm"], "video/vnd.dece.pd": ["uvp", "uvvp"], "video/vnd.dece.sd": ["uvs", "uvvs"], "video/vnd.dece.video": ["uvv", "uvvv"], "video/vnd.dvb.file": ["dvb"], "video/vnd.fvt": ["fvt"], "video/vnd.mpegurl": ["mxu", "m4u"], "video/vnd.ms-playready.media.pyv": ["pyv"], "video/vnd.uvvu.mp4": ["uvu", "uvvu"], "video/vnd.vivo": ["viv"], "video/x-f4v": ["f4v"], "video/x-fli": ["fli"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-mng": ["mng"], "video/x-ms-asf": ["asf", "asx"], "video/x-ms-vob": ["vob"], "video/x-ms-wm": ["wm"], "video/x-ms-wmv": ["wmv"], "video/x-ms-wmx": ["wmx"], "video/x-ms-wvx": ["wvx"], "video/x-msvideo": ["avi"], "video/x-sgi-movie": ["movie"], "video/x-smv": ["smv"], "x-conference/x-cooltalk": ["ice"] };
  }
});

// node_modules/mime/index.js
var require_mime = __commonJS({
  "node_modules/mime/index.js"(exports, module2) {
    "use strict";
    var Mime = require_Mime();
    module2.exports = new Mime(require_standard(), require_other());
  }
});

// node_modules/mime-db/db.json
var require_db = __commonJS({
  "node_modules/mime-db/db.json"(exports, module2) {
    module2.exports = {
      "application/1d-interleaved-parityfec": {
        source: "iana"
      },
      "application/3gpdash-qoe-report+xml": {
        source: "iana"
      },
      "application/3gpp-ims+xml": {
        source: "iana"
      },
      "application/a2l": {
        source: "iana"
      },
      "application/activemessage": {
        source: "iana"
      },
      "application/alto-costmap+json": {
        source: "iana",
        compressible: true
      },
      "application/alto-costmapfilter+json": {
        source: "iana",
        compressible: true
      },
      "application/alto-directory+json": {
        source: "iana",
        compressible: true
      },
      "application/alto-endpointcost+json": {
        source: "iana",
        compressible: true
      },
      "application/alto-endpointcostparams+json": {
        source: "iana",
        compressible: true
      },
      "application/alto-endpointprop+json": {
        source: "iana",
        compressible: true
      },
      "application/alto-endpointpropparams+json": {
        source: "iana",
        compressible: true
      },
      "application/alto-error+json": {
        source: "iana",
        compressible: true
      },
      "application/alto-networkmap+json": {
        source: "iana",
        compressible: true
      },
      "application/alto-networkmapfilter+json": {
        source: "iana",
        compressible: true
      },
      "application/aml": {
        source: "iana"
      },
      "application/andrew-inset": {
        source: "iana",
        extensions: ["ez"]
      },
      "application/applefile": {
        source: "iana"
      },
      "application/applixware": {
        source: "apache",
        extensions: ["aw"]
      },
      "application/atf": {
        source: "iana"
      },
      "application/atfx": {
        source: "iana"
      },
      "application/atom+xml": {
        source: "iana",
        compressible: true,
        extensions: ["atom"]
      },
      "application/atomcat+xml": {
        source: "iana",
        extensions: ["atomcat"]
      },
      "application/atomdeleted+xml": {
        source: "iana"
      },
      "application/atomicmail": {
        source: "iana"
      },
      "application/atomsvc+xml": {
        source: "iana",
        extensions: ["atomsvc"]
      },
      "application/atxml": {
        source: "iana"
      },
      "application/auth-policy+xml": {
        source: "iana"
      },
      "application/bacnet-xdd+zip": {
        source: "iana"
      },
      "application/batch-smtp": {
        source: "iana"
      },
      "application/bdoc": {
        compressible: false,
        extensions: ["bdoc"]
      },
      "application/beep+xml": {
        source: "iana"
      },
      "application/calendar+json": {
        source: "iana",
        compressible: true
      },
      "application/calendar+xml": {
        source: "iana"
      },
      "application/call-completion": {
        source: "iana"
      },
      "application/cals-1840": {
        source: "iana"
      },
      "application/cbor": {
        source: "iana"
      },
      "application/ccmp+xml": {
        source: "iana"
      },
      "application/ccxml+xml": {
        source: "iana",
        extensions: ["ccxml"]
      },
      "application/cdfx+xml": {
        source: "iana"
      },
      "application/cdmi-capability": {
        source: "iana",
        extensions: ["cdmia"]
      },
      "application/cdmi-container": {
        source: "iana",
        extensions: ["cdmic"]
      },
      "application/cdmi-domain": {
        source: "iana",
        extensions: ["cdmid"]
      },
      "application/cdmi-object": {
        source: "iana",
        extensions: ["cdmio"]
      },
      "application/cdmi-queue": {
        source: "iana",
        extensions: ["cdmiq"]
      },
      "application/cdni": {
        source: "iana"
      },
      "application/cea": {
        source: "iana"
      },
      "application/cea-2018+xml": {
        source: "iana"
      },
      "application/cellml+xml": {
        source: "iana"
      },
      "application/cfw": {
        source: "iana"
      },
      "application/clue_info+xml": {
        source: "iana"
      },
      "application/cms": {
        source: "iana"
      },
      "application/cnrp+xml": {
        source: "iana"
      },
      "application/coap-group+json": {
        source: "iana",
        compressible: true
      },
      "application/commonground": {
        source: "iana"
      },
      "application/conference-info+xml": {
        source: "iana"
      },
      "application/cpl+xml": {
        source: "iana"
      },
      "application/csrattrs": {
        source: "iana"
      },
      "application/csta+xml": {
        source: "iana"
      },
      "application/cstadata+xml": {
        source: "iana"
      },
      "application/csvm+json": {
        source: "iana",
        compressible: true
      },
      "application/cu-seeme": {
        source: "apache",
        extensions: ["cu"]
      },
      "application/cybercash": {
        source: "iana"
      },
      "application/dart": {
        compressible: true
      },
      "application/dash+xml": {
        source: "iana",
        extensions: ["mpd"]
      },
      "application/dashdelta": {
        source: "iana"
      },
      "application/davmount+xml": {
        source: "iana",
        extensions: ["davmount"]
      },
      "application/dca-rft": {
        source: "iana"
      },
      "application/dcd": {
        source: "iana"
      },
      "application/dec-dx": {
        source: "iana"
      },
      "application/dialog-info+xml": {
        source: "iana"
      },
      "application/dicom": {
        source: "iana"
      },
      "application/dicom+json": {
        source: "iana",
        compressible: true
      },
      "application/dicom+xml": {
        source: "iana"
      },
      "application/dii": {
        source: "iana"
      },
      "application/dit": {
        source: "iana"
      },
      "application/dns": {
        source: "iana"
      },
      "application/docbook+xml": {
        source: "apache",
        extensions: ["dbk"]
      },
      "application/dskpp+xml": {
        source: "iana"
      },
      "application/dssc+der": {
        source: "iana",
        extensions: ["dssc"]
      },
      "application/dssc+xml": {
        source: "iana",
        extensions: ["xdssc"]
      },
      "application/dvcs": {
        source: "iana"
      },
      "application/ecmascript": {
        source: "iana",
        compressible: true,
        extensions: ["ecma"]
      },
      "application/edi-consent": {
        source: "iana"
      },
      "application/edi-x12": {
        source: "iana",
        compressible: false
      },
      "application/edifact": {
        source: "iana",
        compressible: false
      },
      "application/efi": {
        source: "iana"
      },
      "application/emergencycalldata.comment+xml": {
        source: "iana"
      },
      "application/emergencycalldata.deviceinfo+xml": {
        source: "iana"
      },
      "application/emergencycalldata.providerinfo+xml": {
        source: "iana"
      },
      "application/emergencycalldata.serviceinfo+xml": {
        source: "iana"
      },
      "application/emergencycalldata.subscriberinfo+xml": {
        source: "iana"
      },
      "application/emma+xml": {
        source: "iana",
        extensions: ["emma"]
      },
      "application/emotionml+xml": {
        source: "iana"
      },
      "application/encaprtp": {
        source: "iana"
      },
      "application/epp+xml": {
        source: "iana"
      },
      "application/epub+zip": {
        source: "iana",
        extensions: ["epub"]
      },
      "application/eshop": {
        source: "iana"
      },
      "application/exi": {
        source: "iana",
        extensions: ["exi"]
      },
      "application/fastinfoset": {
        source: "iana"
      },
      "application/fastsoap": {
        source: "iana"
      },
      "application/fdt+xml": {
        source: "iana"
      },
      "application/fits": {
        source: "iana"
      },
      "application/font-sfnt": {
        source: "iana"
      },
      "application/font-tdpfr": {
        source: "iana",
        extensions: ["pfr"]
      },
      "application/font-woff": {
        source: "iana",
        compressible: false,
        extensions: ["woff"]
      },
      "application/font-woff2": {
        compressible: false,
        extensions: ["woff2"]
      },
      "application/framework-attributes+xml": {
        source: "iana"
      },
      "application/geo+json": {
        source: "iana",
        compressible: true
      },
      "application/gml+xml": {
        source: "apache",
        extensions: ["gml"]
      },
      "application/gpx+xml": {
        source: "apache",
        extensions: ["gpx"]
      },
      "application/gxf": {
        source: "apache",
        extensions: ["gxf"]
      },
      "application/gzip": {
        source: "iana",
        compressible: false
      },
      "application/h224": {
        source: "iana"
      },
      "application/held+xml": {
        source: "iana"
      },
      "application/http": {
        source: "iana"
      },
      "application/hyperstudio": {
        source: "iana",
        extensions: ["stk"]
      },
      "application/ibe-key-request+xml": {
        source: "iana"
      },
      "application/ibe-pkg-reply+xml": {
        source: "iana"
      },
      "application/ibe-pp-data": {
        source: "iana"
      },
      "application/iges": {
        source: "iana"
      },
      "application/im-iscomposing+xml": {
        source: "iana"
      },
      "application/index": {
        source: "iana"
      },
      "application/index.cmd": {
        source: "iana"
      },
      "application/index.obj": {
        source: "iana"
      },
      "application/index.response": {
        source: "iana"
      },
      "application/index.vnd": {
        source: "iana"
      },
      "application/inkml+xml": {
        source: "iana",
        extensions: ["ink", "inkml"]
      },
      "application/iotp": {
        source: "iana"
      },
      "application/ipfix": {
        source: "iana",
        extensions: ["ipfix"]
      },
      "application/ipp": {
        source: "iana"
      },
      "application/isup": {
        source: "iana"
      },
      "application/its+xml": {
        source: "iana"
      },
      "application/java-archive": {
        source: "apache",
        compressible: false,
        extensions: ["jar", "war", "ear"]
      },
      "application/java-serialized-object": {
        source: "apache",
        compressible: false,
        extensions: ["ser"]
      },
      "application/java-vm": {
        source: "apache",
        compressible: false,
        extensions: ["class"]
      },
      "application/javascript": {
        source: "iana",
        charset: "UTF-8",
        compressible: true,
        extensions: ["js"]
      },
      "application/jose": {
        source: "iana"
      },
      "application/jose+json": {
        source: "iana",
        compressible: true
      },
      "application/jrd+json": {
        source: "iana",
        compressible: true
      },
      "application/json": {
        source: "iana",
        charset: "UTF-8",
        compressible: true,
        extensions: ["json", "map"]
      },
      "application/json-patch+json": {
        source: "iana",
        compressible: true
      },
      "application/json-seq": {
        source: "iana"
      },
      "application/json5": {
        extensions: ["json5"]
      },
      "application/jsonml+json": {
        source: "apache",
        compressible: true,
        extensions: ["jsonml"]
      },
      "application/jwk+json": {
        source: "iana",
        compressible: true
      },
      "application/jwk-set+json": {
        source: "iana",
        compressible: true
      },
      "application/jwt": {
        source: "iana"
      },
      "application/kpml-request+xml": {
        source: "iana"
      },
      "application/kpml-response+xml": {
        source: "iana"
      },
      "application/ld+json": {
        source: "iana",
        compressible: true,
        extensions: ["jsonld"]
      },
      "application/lgr+xml": {
        source: "iana"
      },
      "application/link-format": {
        source: "iana"
      },
      "application/load-control+xml": {
        source: "iana"
      },
      "application/lost+xml": {
        source: "iana",
        extensions: ["lostxml"]
      },
      "application/lostsync+xml": {
        source: "iana"
      },
      "application/lxf": {
        source: "iana"
      },
      "application/mac-binhex40": {
        source: "iana",
        extensions: ["hqx"]
      },
      "application/mac-compactpro": {
        source: "apache",
        extensions: ["cpt"]
      },
      "application/macwriteii": {
        source: "iana"
      },
      "application/mads+xml": {
        source: "iana",
        extensions: ["mads"]
      },
      "application/manifest+json": {
        charset: "UTF-8",
        compressible: true,
        extensions: ["webmanifest"]
      },
      "application/marc": {
        source: "iana",
        extensions: ["mrc"]
      },
      "application/marcxml+xml": {
        source: "iana",
        extensions: ["mrcx"]
      },
      "application/mathematica": {
        source: "iana",
        extensions: ["ma", "nb", "mb"]
      },
      "application/mathml+xml": {
        source: "iana",
        extensions: ["mathml"]
      },
      "application/mathml-content+xml": {
        source: "iana"
      },
      "application/mathml-presentation+xml": {
        source: "iana"
      },
      "application/mbms-associated-procedure-description+xml": {
        source: "iana"
      },
      "application/mbms-deregister+xml": {
        source: "iana"
      },
      "application/mbms-envelope+xml": {
        source: "iana"
      },
      "application/mbms-msk+xml": {
        source: "iana"
      },
      "application/mbms-msk-response+xml": {
        source: "iana"
      },
      "application/mbms-protection-description+xml": {
        source: "iana"
      },
      "application/mbms-reception-report+xml": {
        source: "iana"
      },
      "application/mbms-register+xml": {
        source: "iana"
      },
      "application/mbms-register-response+xml": {
        source: "iana"
      },
      "application/mbms-schedule+xml": {
        source: "iana"
      },
      "application/mbms-user-service-description+xml": {
        source: "iana"
      },
      "application/mbox": {
        source: "iana",
        extensions: ["mbox"]
      },
      "application/media-policy-dataset+xml": {
        source: "iana"
      },
      "application/media_control+xml": {
        source: "iana"
      },
      "application/mediaservercontrol+xml": {
        source: "iana",
        extensions: ["mscml"]
      },
      "application/merge-patch+json": {
        source: "iana",
        compressible: true
      },
      "application/metalink+xml": {
        source: "apache",
        extensions: ["metalink"]
      },
      "application/metalink4+xml": {
        source: "iana",
        extensions: ["meta4"]
      },
      "application/mets+xml": {
        source: "iana",
        extensions: ["mets"]
      },
      "application/mf4": {
        source: "iana"
      },
      "application/mikey": {
        source: "iana"
      },
      "application/mods+xml": {
        source: "iana",
        extensions: ["mods"]
      },
      "application/moss-keys": {
        source: "iana"
      },
      "application/moss-signature": {
        source: "iana"
      },
      "application/mosskey-data": {
        source: "iana"
      },
      "application/mosskey-request": {
        source: "iana"
      },
      "application/mp21": {
        source: "iana",
        extensions: ["m21", "mp21"]
      },
      "application/mp4": {
        source: "iana",
        extensions: ["mp4s", "m4p"]
      },
      "application/mpeg4-generic": {
        source: "iana"
      },
      "application/mpeg4-iod": {
        source: "iana"
      },
      "application/mpeg4-iod-xmt": {
        source: "iana"
      },
      "application/mrb-consumer+xml": {
        source: "iana"
      },
      "application/mrb-publish+xml": {
        source: "iana"
      },
      "application/msc-ivr+xml": {
        source: "iana"
      },
      "application/msc-mixer+xml": {
        source: "iana"
      },
      "application/msword": {
        source: "iana",
        compressible: false,
        extensions: ["doc", "dot"]
      },
      "application/mxf": {
        source: "iana",
        extensions: ["mxf"]
      },
      "application/nasdata": {
        source: "iana"
      },
      "application/news-checkgroups": {
        source: "iana"
      },
      "application/news-groupinfo": {
        source: "iana"
      },
      "application/news-transmission": {
        source: "iana"
      },
      "application/nlsml+xml": {
        source: "iana"
      },
      "application/nss": {
        source: "iana"
      },
      "application/ocsp-request": {
        source: "iana"
      },
      "application/ocsp-response": {
        source: "iana"
      },
      "application/octet-stream": {
        source: "iana",
        compressible: false,
        extensions: ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"]
      },
      "application/oda": {
        source: "iana",
        extensions: ["oda"]
      },
      "application/odx": {
        source: "iana"
      },
      "application/oebps-package+xml": {
        source: "iana",
        extensions: ["opf"]
      },
      "application/ogg": {
        source: "iana",
        compressible: false,
        extensions: ["ogx"]
      },
      "application/omdoc+xml": {
        source: "apache",
        extensions: ["omdoc"]
      },
      "application/onenote": {
        source: "apache",
        extensions: ["onetoc", "onetoc2", "onetmp", "onepkg"]
      },
      "application/oxps": {
        source: "iana",
        extensions: ["oxps"]
      },
      "application/p2p-overlay+xml": {
        source: "iana"
      },
      "application/parityfec": {
        source: "iana"
      },
      "application/patch-ops-error+xml": {
        source: "iana",
        extensions: ["xer"]
      },
      "application/pdf": {
        source: "iana",
        compressible: false,
        extensions: ["pdf"]
      },
      "application/pdx": {
        source: "iana"
      },
      "application/pgp-encrypted": {
        source: "iana",
        compressible: false,
        extensions: ["pgp"]
      },
      "application/pgp-keys": {
        source: "iana"
      },
      "application/pgp-signature": {
        source: "iana",
        extensions: ["asc", "sig"]
      },
      "application/pics-rules": {
        source: "apache",
        extensions: ["prf"]
      },
      "application/pidf+xml": {
        source: "iana"
      },
      "application/pidf-diff+xml": {
        source: "iana"
      },
      "application/pkcs10": {
        source: "iana",
        extensions: ["p10"]
      },
      "application/pkcs12": {
        source: "iana"
      },
      "application/pkcs7-mime": {
        source: "iana",
        extensions: ["p7m", "p7c"]
      },
      "application/pkcs7-signature": {
        source: "iana",
        extensions: ["p7s"]
      },
      "application/pkcs8": {
        source: "iana",
        extensions: ["p8"]
      },
      "application/pkix-attr-cert": {
        source: "iana",
        extensions: ["ac"]
      },
      "application/pkix-cert": {
        source: "iana",
        extensions: ["cer"]
      },
      "application/pkix-crl": {
        source: "iana",
        extensions: ["crl"]
      },
      "application/pkix-pkipath": {
        source: "iana",
        extensions: ["pkipath"]
      },
      "application/pkixcmp": {
        source: "iana",
        extensions: ["pki"]
      },
      "application/pls+xml": {
        source: "iana",
        extensions: ["pls"]
      },
      "application/poc-settings+xml": {
        source: "iana"
      },
      "application/postscript": {
        source: "iana",
        compressible: true,
        extensions: ["ai", "eps", "ps"]
      },
      "application/ppsp-tracker+json": {
        source: "iana",
        compressible: true
      },
      "application/problem+json": {
        source: "iana",
        compressible: true
      },
      "application/problem+xml": {
        source: "iana"
      },
      "application/provenance+xml": {
        source: "iana"
      },
      "application/prs.alvestrand.titrax-sheet": {
        source: "iana"
      },
      "application/prs.cww": {
        source: "iana",
        extensions: ["cww"]
      },
      "application/prs.hpub+zip": {
        source: "iana"
      },
      "application/prs.nprend": {
        source: "iana"
      },
      "application/prs.plucker": {
        source: "iana"
      },
      "application/prs.rdf-xml-crypt": {
        source: "iana"
      },
      "application/prs.xsf+xml": {
        source: "iana"
      },
      "application/pskc+xml": {
        source: "iana",
        extensions: ["pskcxml"]
      },
      "application/qsig": {
        source: "iana"
      },
      "application/raptorfec": {
        source: "iana"
      },
      "application/rdap+json": {
        source: "iana",
        compressible: true
      },
      "application/rdf+xml": {
        source: "iana",
        compressible: true,
        extensions: ["rdf"]
      },
      "application/reginfo+xml": {
        source: "iana",
        extensions: ["rif"]
      },
      "application/relax-ng-compact-syntax": {
        source: "iana",
        extensions: ["rnc"]
      },
      "application/remote-printing": {
        source: "iana"
      },
      "application/reputon+json": {
        source: "iana",
        compressible: true
      },
      "application/resource-lists+xml": {
        source: "iana",
        extensions: ["rl"]
      },
      "application/resource-lists-diff+xml": {
        source: "iana",
        extensions: ["rld"]
      },
      "application/rfc+xml": {
        source: "iana"
      },
      "application/riscos": {
        source: "iana"
      },
      "application/rlmi+xml": {
        source: "iana"
      },
      "application/rls-services+xml": {
        source: "iana",
        extensions: ["rs"]
      },
      "application/rpki-ghostbusters": {
        source: "iana",
        extensions: ["gbr"]
      },
      "application/rpki-manifest": {
        source: "iana",
        extensions: ["mft"]
      },
      "application/rpki-roa": {
        source: "iana",
        extensions: ["roa"]
      },
      "application/rpki-updown": {
        source: "iana"
      },
      "application/rsd+xml": {
        source: "apache",
        extensions: ["rsd"]
      },
      "application/rss+xml": {
        source: "apache",
        compressible: true,
        extensions: ["rss"]
      },
      "application/rtf": {
        source: "iana",
        compressible: true,
        extensions: ["rtf"]
      },
      "application/rtploopback": {
        source: "iana"
      },
      "application/rtx": {
        source: "iana"
      },
      "application/samlassertion+xml": {
        source: "iana"
      },
      "application/samlmetadata+xml": {
        source: "iana"
      },
      "application/sbml+xml": {
        source: "iana",
        extensions: ["sbml"]
      },
      "application/scaip+xml": {
        source: "iana"
      },
      "application/scim+json": {
        source: "iana",
        compressible: true
      },
      "application/scvp-cv-request": {
        source: "iana",
        extensions: ["scq"]
      },
      "application/scvp-cv-response": {
        source: "iana",
        extensions: ["scs"]
      },
      "application/scvp-vp-request": {
        source: "iana",
        extensions: ["spq"]
      },
      "application/scvp-vp-response": {
        source: "iana",
        extensions: ["spp"]
      },
      "application/sdp": {
        source: "iana",
        extensions: ["sdp"]
      },
      "application/sep+xml": {
        source: "iana"
      },
      "application/sep-exi": {
        source: "iana"
      },
      "application/session-info": {
        source: "iana"
      },
      "application/set-payment": {
        source: "iana"
      },
      "application/set-payment-initiation": {
        source: "iana",
        extensions: ["setpay"]
      },
      "application/set-registration": {
        source: "iana"
      },
      "application/set-registration-initiation": {
        source: "iana",
        extensions: ["setreg"]
      },
      "application/sgml": {
        source: "iana"
      },
      "application/sgml-open-catalog": {
        source: "iana"
      },
      "application/shf+xml": {
        source: "iana",
        extensions: ["shf"]
      },
      "application/sieve": {
        source: "iana"
      },
      "application/simple-filter+xml": {
        source: "iana"
      },
      "application/simple-message-summary": {
        source: "iana"
      },
      "application/simplesymbolcontainer": {
        source: "iana"
      },
      "application/slate": {
        source: "iana"
      },
      "application/smil": {
        source: "iana"
      },
      "application/smil+xml": {
        source: "iana",
        extensions: ["smi", "smil"]
      },
      "application/smpte336m": {
        source: "iana"
      },
      "application/soap+fastinfoset": {
        source: "iana"
      },
      "application/soap+xml": {
        source: "iana",
        compressible: true
      },
      "application/sparql-query": {
        source: "iana",
        extensions: ["rq"]
      },
      "application/sparql-results+xml": {
        source: "iana",
        extensions: ["srx"]
      },
      "application/spirits-event+xml": {
        source: "iana"
      },
      "application/sql": {
        source: "iana"
      },
      "application/srgs": {
        source: "iana",
        extensions: ["gram"]
      },
      "application/srgs+xml": {
        source: "iana",
        extensions: ["grxml"]
      },
      "application/sru+xml": {
        source: "iana",
        extensions: ["sru"]
      },
      "application/ssdl+xml": {
        source: "apache",
        extensions: ["ssdl"]
      },
      "application/ssml+xml": {
        source: "iana",
        extensions: ["ssml"]
      },
      "application/tamp-apex-update": {
        source: "iana"
      },
      "application/tamp-apex-update-confirm": {
        source: "iana"
      },
      "application/tamp-community-update": {
        source: "iana"
      },
      "application/tamp-community-update-confirm": {
        source: "iana"
      },
      "application/tamp-error": {
        source: "iana"
      },
      "application/tamp-sequence-adjust": {
        source: "iana"
      },
      "application/tamp-sequence-adjust-confirm": {
        source: "iana"
      },
      "application/tamp-status-query": {
        source: "iana"
      },
      "application/tamp-status-response": {
        source: "iana"
      },
      "application/tamp-update": {
        source: "iana"
      },
      "application/tamp-update-confirm": {
        source: "iana"
      },
      "application/tar": {
        compressible: true
      },
      "application/tei+xml": {
        source: "iana",
        extensions: ["tei", "teicorpus"]
      },
      "application/thraud+xml": {
        source: "iana",
        extensions: ["tfi"]
      },
      "application/timestamp-query": {
        source: "iana"
      },
      "application/timestamp-reply": {
        source: "iana"
      },
      "application/timestamped-data": {
        source: "iana",
        extensions: ["tsd"]
      },
      "application/ttml+xml": {
        source: "iana"
      },
      "application/tve-trigger": {
        source: "iana"
      },
      "application/ulpfec": {
        source: "iana"
      },
      "application/urc-grpsheet+xml": {
        source: "iana"
      },
      "application/urc-ressheet+xml": {
        source: "iana"
      },
      "application/urc-targetdesc+xml": {
        source: "iana"
      },
      "application/urc-uisocketdesc+xml": {
        source: "iana"
      },
      "application/vcard+json": {
        source: "iana",
        compressible: true
      },
      "application/vcard+xml": {
        source: "iana"
      },
      "application/vemmi": {
        source: "iana"
      },
      "application/vividence.scriptfile": {
        source: "apache"
      },
      "application/vnd.3gpp-prose+xml": {
        source: "iana"
      },
      "application/vnd.3gpp-prose-pc3ch+xml": {
        source: "iana"
      },
      "application/vnd.3gpp.access-transfer-events+xml": {
        source: "iana"
      },
      "application/vnd.3gpp.bsf+xml": {
        source: "iana"
      },
      "application/vnd.3gpp.mid-call+xml": {
        source: "iana"
      },
      "application/vnd.3gpp.pic-bw-large": {
        source: "iana",
        extensions: ["plb"]
      },
      "application/vnd.3gpp.pic-bw-small": {
        source: "iana",
        extensions: ["psb"]
      },
      "application/vnd.3gpp.pic-bw-var": {
        source: "iana",
        extensions: ["pvb"]
      },
      "application/vnd.3gpp.sms": {
        source: "iana"
      },
      "application/vnd.3gpp.sms+xml": {
        source: "iana"
      },
      "application/vnd.3gpp.srvcc-ext+xml": {
        source: "iana"
      },
      "application/vnd.3gpp.srvcc-info+xml": {
        source: "iana"
      },
      "application/vnd.3gpp.state-and-event-info+xml": {
        source: "iana"
      },
      "application/vnd.3gpp.ussd+xml": {
        source: "iana"
      },
      "application/vnd.3gpp2.bcmcsinfo+xml": {
        source: "iana"
      },
      "application/vnd.3gpp2.sms": {
        source: "iana"
      },
      "application/vnd.3gpp2.tcap": {
        source: "iana",
        extensions: ["tcap"]
      },
      "application/vnd.3lightssoftware.imagescal": {
        source: "iana"
      },
      "application/vnd.3m.post-it-notes": {
        source: "iana",
        extensions: ["pwn"]
      },
      "application/vnd.accpac.simply.aso": {
        source: "iana",
        extensions: ["aso"]
      },
      "application/vnd.accpac.simply.imp": {
        source: "iana",
        extensions: ["imp"]
      },
      "application/vnd.acucobol": {
        source: "iana",
        extensions: ["acu"]
      },
      "application/vnd.acucorp": {
        source: "iana",
        extensions: ["atc", "acutc"]
      },
      "application/vnd.adobe.air-application-installer-package+zip": {
        source: "apache",
        extensions: ["air"]
      },
      "application/vnd.adobe.flash.movie": {
        source: "iana"
      },
      "application/vnd.adobe.formscentral.fcdt": {
        source: "iana",
        extensions: ["fcdt"]
      },
      "application/vnd.adobe.fxp": {
        source: "iana",
        extensions: ["fxp", "fxpl"]
      },
      "application/vnd.adobe.partial-upload": {
        source: "iana"
      },
      "application/vnd.adobe.xdp+xml": {
        source: "iana",
        extensions: ["xdp"]
      },
      "application/vnd.adobe.xfdf": {
        source: "iana",
        extensions: ["xfdf"]
      },
      "application/vnd.aether.imp": {
        source: "iana"
      },
      "application/vnd.ah-barcode": {
        source: "iana"
      },
      "application/vnd.ahead.space": {
        source: "iana",
        extensions: ["ahead"]
      },
      "application/vnd.airzip.filesecure.azf": {
        source: "iana",
        extensions: ["azf"]
      },
      "application/vnd.airzip.filesecure.azs": {
        source: "iana",
        extensions: ["azs"]
      },
      "application/vnd.amazon.ebook": {
        source: "apache",
        extensions: ["azw"]
      },
      "application/vnd.amazon.mobi8-ebook": {
        source: "iana"
      },
      "application/vnd.americandynamics.acc": {
        source: "iana",
        extensions: ["acc"]
      },
      "application/vnd.amiga.ami": {
        source: "iana",
        extensions: ["ami"]
      },
      "application/vnd.amundsen.maze+xml": {
        source: "iana"
      },
      "application/vnd.android.package-archive": {
        source: "apache",
        compressible: false,
        extensions: ["apk"]
      },
      "application/vnd.anki": {
        source: "iana"
      },
      "application/vnd.anser-web-certificate-issue-initiation": {
        source: "iana",
        extensions: ["cii"]
      },
      "application/vnd.anser-web-funds-transfer-initiation": {
        source: "apache",
        extensions: ["fti"]
      },
      "application/vnd.antix.game-component": {
        source: "iana",
        extensions: ["atx"]
      },
      "application/vnd.apache.thrift.binary": {
        source: "iana"
      },
      "application/vnd.apache.thrift.compact": {
        source: "iana"
      },
      "application/vnd.apache.thrift.json": {
        source: "iana"
      },
      "application/vnd.api+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.apple.installer+xml": {
        source: "iana",
        extensions: ["mpkg"]
      },
      "application/vnd.apple.mpegurl": {
        source: "iana",
        extensions: ["m3u8"]
      },
      "application/vnd.apple.pkpass": {
        compressible: false,
        extensions: ["pkpass"]
      },
      "application/vnd.arastra.swi": {
        source: "iana"
      },
      "application/vnd.aristanetworks.swi": {
        source: "iana",
        extensions: ["swi"]
      },
      "application/vnd.artsquare": {
        source: "iana"
      },
      "application/vnd.astraea-software.iota": {
        source: "iana",
        extensions: ["iota"]
      },
      "application/vnd.audiograph": {
        source: "iana",
        extensions: ["aep"]
      },
      "application/vnd.autopackage": {
        source: "iana"
      },
      "application/vnd.avistar+xml": {
        source: "iana"
      },
      "application/vnd.balsamiq.bmml+xml": {
        source: "iana"
      },
      "application/vnd.balsamiq.bmpr": {
        source: "iana"
      },
      "application/vnd.bekitzur-stech+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.biopax.rdf+xml": {
        source: "iana"
      },
      "application/vnd.blueice.multipass": {
        source: "iana",
        extensions: ["mpm"]
      },
      "application/vnd.bluetooth.ep.oob": {
        source: "iana"
      },
      "application/vnd.bluetooth.le.oob": {
        source: "iana"
      },
      "application/vnd.bmi": {
        source: "iana",
        extensions: ["bmi"]
      },
      "application/vnd.businessobjects": {
        source: "iana",
        extensions: ["rep"]
      },
      "application/vnd.cab-jscript": {
        source: "iana"
      },
      "application/vnd.canon-cpdl": {
        source: "iana"
      },
      "application/vnd.canon-lips": {
        source: "iana"
      },
      "application/vnd.cendio.thinlinc.clientconf": {
        source: "iana"
      },
      "application/vnd.century-systems.tcp_stream": {
        source: "iana"
      },
      "application/vnd.chemdraw+xml": {
        source: "iana",
        extensions: ["cdxml"]
      },
      "application/vnd.chess-pgn": {
        source: "iana"
      },
      "application/vnd.chipnuts.karaoke-mmd": {
        source: "iana",
        extensions: ["mmd"]
      },
      "application/vnd.cinderella": {
        source: "iana",
        extensions: ["cdy"]
      },
      "application/vnd.cirpack.isdn-ext": {
        source: "iana"
      },
      "application/vnd.citationstyles.style+xml": {
        source: "iana"
      },
      "application/vnd.claymore": {
        source: "iana",
        extensions: ["cla"]
      },
      "application/vnd.cloanto.rp9": {
        source: "iana",
        extensions: ["rp9"]
      },
      "application/vnd.clonk.c4group": {
        source: "iana",
        extensions: ["c4g", "c4d", "c4f", "c4p", "c4u"]
      },
      "application/vnd.cluetrust.cartomobile-config": {
        source: "iana",
        extensions: ["c11amc"]
      },
      "application/vnd.cluetrust.cartomobile-config-pkg": {
        source: "iana",
        extensions: ["c11amz"]
      },
      "application/vnd.coffeescript": {
        source: "iana"
      },
      "application/vnd.collection+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.collection.doc+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.collection.next+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.comicbook+zip": {
        source: "iana"
      },
      "application/vnd.commerce-battelle": {
        source: "iana"
      },
      "application/vnd.commonspace": {
        source: "iana",
        extensions: ["csp"]
      },
      "application/vnd.contact.cmsg": {
        source: "iana",
        extensions: ["cdbcmsg"]
      },
      "application/vnd.coreos.ignition+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.cosmocaller": {
        source: "iana",
        extensions: ["cmc"]
      },
      "application/vnd.crick.clicker": {
        source: "iana",
        extensions: ["clkx"]
      },
      "application/vnd.crick.clicker.keyboard": {
        source: "iana",
        extensions: ["clkk"]
      },
      "application/vnd.crick.clicker.palette": {
        source: "iana",
        extensions: ["clkp"]
      },
      "application/vnd.crick.clicker.template": {
        source: "iana",
        extensions: ["clkt"]
      },
      "application/vnd.crick.clicker.wordbank": {
        source: "iana",
        extensions: ["clkw"]
      },
      "application/vnd.criticaltools.wbs+xml": {
        source: "iana",
        extensions: ["wbs"]
      },
      "application/vnd.ctc-posml": {
        source: "iana",
        extensions: ["pml"]
      },
      "application/vnd.ctct.ws+xml": {
        source: "iana"
      },
      "application/vnd.cups-pdf": {
        source: "iana"
      },
      "application/vnd.cups-postscript": {
        source: "iana"
      },
      "application/vnd.cups-ppd": {
        source: "iana",
        extensions: ["ppd"]
      },
      "application/vnd.cups-raster": {
        source: "iana"
      },
      "application/vnd.cups-raw": {
        source: "iana"
      },
      "application/vnd.curl": {
        source: "iana"
      },
      "application/vnd.curl.car": {
        source: "apache",
        extensions: ["car"]
      },
      "application/vnd.curl.pcurl": {
        source: "apache",
        extensions: ["pcurl"]
      },
      "application/vnd.cyan.dean.root+xml": {
        source: "iana"
      },
      "application/vnd.cybank": {
        source: "iana"
      },
      "application/vnd.d2l.coursepackage1p0+zip": {
        source: "iana"
      },
      "application/vnd.dart": {
        source: "iana",
        compressible: true,
        extensions: ["dart"]
      },
      "application/vnd.data-vision.rdz": {
        source: "iana",
        extensions: ["rdz"]
      },
      "application/vnd.debian.binary-package": {
        source: "iana"
      },
      "application/vnd.dece.data": {
        source: "iana",
        extensions: ["uvf", "uvvf", "uvd", "uvvd"]
      },
      "application/vnd.dece.ttml+xml": {
        source: "iana",
        extensions: ["uvt", "uvvt"]
      },
      "application/vnd.dece.unspecified": {
        source: "iana",
        extensions: ["uvx", "uvvx"]
      },
      "application/vnd.dece.zip": {
        source: "iana",
        extensions: ["uvz", "uvvz"]
      },
      "application/vnd.denovo.fcselayout-link": {
        source: "iana",
        extensions: ["fe_launch"]
      },
      "application/vnd.desmume-movie": {
        source: "iana"
      },
      "application/vnd.desmume.movie": {
        source: "apache"
      },
      "application/vnd.dir-bi.plate-dl-nosuffix": {
        source: "iana"
      },
      "application/vnd.dm.delegation+xml": {
        source: "iana"
      },
      "application/vnd.dna": {
        source: "iana",
        extensions: ["dna"]
      },
      "application/vnd.document+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.dolby.mlp": {
        source: "apache",
        extensions: ["mlp"]
      },
      "application/vnd.dolby.mobile.1": {
        source: "iana"
      },
      "application/vnd.dolby.mobile.2": {
        source: "iana"
      },
      "application/vnd.doremir.scorecloud-binary-document": {
        source: "iana"
      },
      "application/vnd.dpgraph": {
        source: "iana",
        extensions: ["dpg"]
      },
      "application/vnd.dreamfactory": {
        source: "iana",
        extensions: ["dfac"]
      },
      "application/vnd.drive+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.ds-keypoint": {
        source: "apache",
        extensions: ["kpxx"]
      },
      "application/vnd.dtg.local": {
        source: "iana"
      },
      "application/vnd.dtg.local.flash": {
        source: "iana"
      },
      "application/vnd.dtg.local.html": {
        source: "iana"
      },
      "application/vnd.dvb.ait": {
        source: "iana",
        extensions: ["ait"]
      },
      "application/vnd.dvb.dvbj": {
        source: "iana"
      },
      "application/vnd.dvb.esgcontainer": {
        source: "iana"
      },
      "application/vnd.dvb.ipdcdftnotifaccess": {
        source: "iana"
      },
      "application/vnd.dvb.ipdcesgaccess": {
        source: "iana"
      },
      "application/vnd.dvb.ipdcesgaccess2": {
        source: "iana"
      },
      "application/vnd.dvb.ipdcesgpdd": {
        source: "iana"
      },
      "application/vnd.dvb.ipdcroaming": {
        source: "iana"
      },
      "application/vnd.dvb.iptv.alfec-base": {
        source: "iana"
      },
      "application/vnd.dvb.iptv.alfec-enhancement": {
        source: "iana"
      },
      "application/vnd.dvb.notif-aggregate-root+xml": {
        source: "iana"
      },
      "application/vnd.dvb.notif-container+xml": {
        source: "iana"
      },
      "application/vnd.dvb.notif-generic+xml": {
        source: "iana"
      },
      "application/vnd.dvb.notif-ia-msglist+xml": {
        source: "iana"
      },
      "application/vnd.dvb.notif-ia-registration-request+xml": {
        source: "iana"
      },
      "application/vnd.dvb.notif-ia-registration-response+xml": {
        source: "iana"
      },
      "application/vnd.dvb.notif-init+xml": {
        source: "iana"
      },
      "application/vnd.dvb.pfr": {
        source: "iana"
      },
      "application/vnd.dvb.service": {
        source: "iana",
        extensions: ["svc"]
      },
      "application/vnd.dxr": {
        source: "iana"
      },
      "application/vnd.dynageo": {
        source: "iana",
        extensions: ["geo"]
      },
      "application/vnd.dzr": {
        source: "iana"
      },
      "application/vnd.easykaraoke.cdgdownload": {
        source: "iana"
      },
      "application/vnd.ecdis-update": {
        source: "iana"
      },
      "application/vnd.ecowin.chart": {
        source: "iana",
        extensions: ["mag"]
      },
      "application/vnd.ecowin.filerequest": {
        source: "iana"
      },
      "application/vnd.ecowin.fileupdate": {
        source: "iana"
      },
      "application/vnd.ecowin.series": {
        source: "iana"
      },
      "application/vnd.ecowin.seriesrequest": {
        source: "iana"
      },
      "application/vnd.ecowin.seriesupdate": {
        source: "iana"
      },
      "application/vnd.emclient.accessrequest+xml": {
        source: "iana"
      },
      "application/vnd.enliven": {
        source: "iana",
        extensions: ["nml"]
      },
      "application/vnd.enphase.envoy": {
        source: "iana"
      },
      "application/vnd.eprints.data+xml": {
        source: "iana"
      },
      "application/vnd.epson.esf": {
        source: "iana",
        extensions: ["esf"]
      },
      "application/vnd.epson.msf": {
        source: "iana",
        extensions: ["msf"]
      },
      "application/vnd.epson.quickanime": {
        source: "iana",
        extensions: ["qam"]
      },
      "application/vnd.epson.salt": {
        source: "iana",
        extensions: ["slt"]
      },
      "application/vnd.epson.ssf": {
        source: "iana",
        extensions: ["ssf"]
      },
      "application/vnd.ericsson.quickcall": {
        source: "iana"
      },
      "application/vnd.espass-espass+zip": {
        source: "iana"
      },
      "application/vnd.eszigno3+xml": {
        source: "iana",
        extensions: ["es3", "et3"]
      },
      "application/vnd.etsi.aoc+xml": {
        source: "iana"
      },
      "application/vnd.etsi.asic-e+zip": {
        source: "iana"
      },
      "application/vnd.etsi.asic-s+zip": {
        source: "iana"
      },
      "application/vnd.etsi.cug+xml": {
        source: "iana"
      },
      "application/vnd.etsi.iptvcommand+xml": {
        source: "iana"
      },
      "application/vnd.etsi.iptvdiscovery+xml": {
        source: "iana"
      },
      "application/vnd.etsi.iptvprofile+xml": {
        source: "iana"
      },
      "application/vnd.etsi.iptvsad-bc+xml": {
        source: "iana"
      },
      "application/vnd.etsi.iptvsad-cod+xml": {
        source: "iana"
      },
      "application/vnd.etsi.iptvsad-npvr+xml": {
        source: "iana"
      },
      "application/vnd.etsi.iptvservice+xml": {
        source: "iana"
      },
      "application/vnd.etsi.iptvsync+xml": {
        source: "iana"
      },
      "application/vnd.etsi.iptvueprofile+xml": {
        source: "iana"
      },
      "application/vnd.etsi.mcid+xml": {
        source: "iana"
      },
      "application/vnd.etsi.mheg5": {
        source: "iana"
      },
      "application/vnd.etsi.overload-control-policy-dataset+xml": {
        source: "iana"
      },
      "application/vnd.etsi.pstn+xml": {
        source: "iana"
      },
      "application/vnd.etsi.sci+xml": {
        source: "iana"
      },
      "application/vnd.etsi.simservs+xml": {
        source: "iana"
      },
      "application/vnd.etsi.timestamp-token": {
        source: "iana"
      },
      "application/vnd.etsi.tsl+xml": {
        source: "iana"
      },
      "application/vnd.etsi.tsl.der": {
        source: "iana"
      },
      "application/vnd.eudora.data": {
        source: "iana"
      },
      "application/vnd.ezpix-album": {
        source: "iana",
        extensions: ["ez2"]
      },
      "application/vnd.ezpix-package": {
        source: "iana",
        extensions: ["ez3"]
      },
      "application/vnd.f-secure.mobile": {
        source: "iana"
      },
      "application/vnd.fastcopy-disk-image": {
        source: "iana"
      },
      "application/vnd.fdf": {
        source: "iana",
        extensions: ["fdf"]
      },
      "application/vnd.fdsn.mseed": {
        source: "iana",
        extensions: ["mseed"]
      },
      "application/vnd.fdsn.seed": {
        source: "iana",
        extensions: ["seed", "dataless"]
      },
      "application/vnd.ffsns": {
        source: "iana"
      },
      "application/vnd.filmit.zfc": {
        source: "iana"
      },
      "application/vnd.fints": {
        source: "iana"
      },
      "application/vnd.firemonkeys.cloudcell": {
        source: "iana"
      },
      "application/vnd.flographit": {
        source: "iana",
        extensions: ["gph"]
      },
      "application/vnd.fluxtime.clip": {
        source: "iana",
        extensions: ["ftc"]
      },
      "application/vnd.font-fontforge-sfd": {
        source: "iana"
      },
      "application/vnd.framemaker": {
        source: "iana",
        extensions: ["fm", "frame", "maker", "book"]
      },
      "application/vnd.frogans.fnc": {
        source: "iana",
        extensions: ["fnc"]
      },
      "application/vnd.frogans.ltf": {
        source: "iana",
        extensions: ["ltf"]
      },
      "application/vnd.fsc.weblaunch": {
        source: "iana",
        extensions: ["fsc"]
      },
      "application/vnd.fujitsu.oasys": {
        source: "iana",
        extensions: ["oas"]
      },
      "application/vnd.fujitsu.oasys2": {
        source: "iana",
        extensions: ["oa2"]
      },
      "application/vnd.fujitsu.oasys3": {
        source: "iana",
        extensions: ["oa3"]
      },
      "application/vnd.fujitsu.oasysgp": {
        source: "iana",
        extensions: ["fg5"]
      },
      "application/vnd.fujitsu.oasysprs": {
        source: "iana",
        extensions: ["bh2"]
      },
      "application/vnd.fujixerox.art-ex": {
        source: "iana"
      },
      "application/vnd.fujixerox.art4": {
        source: "iana"
      },
      "application/vnd.fujixerox.ddd": {
        source: "iana",
        extensions: ["ddd"]
      },
      "application/vnd.fujixerox.docuworks": {
        source: "iana",
        extensions: ["xdw"]
      },
      "application/vnd.fujixerox.docuworks.binder": {
        source: "iana",
        extensions: ["xbd"]
      },
      "application/vnd.fujixerox.docuworks.container": {
        source: "iana"
      },
      "application/vnd.fujixerox.hbpl": {
        source: "iana"
      },
      "application/vnd.fut-misnet": {
        source: "iana"
      },
      "application/vnd.fuzzysheet": {
        source: "iana",
        extensions: ["fzs"]
      },
      "application/vnd.genomatix.tuxedo": {
        source: "iana",
        extensions: ["txd"]
      },
      "application/vnd.geo+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.geocube+xml": {
        source: "iana"
      },
      "application/vnd.geogebra.file": {
        source: "iana",
        extensions: ["ggb"]
      },
      "application/vnd.geogebra.tool": {
        source: "iana",
        extensions: ["ggt"]
      },
      "application/vnd.geometry-explorer": {
        source: "iana",
        extensions: ["gex", "gre"]
      },
      "application/vnd.geonext": {
        source: "iana",
        extensions: ["gxt"]
      },
      "application/vnd.geoplan": {
        source: "iana",
        extensions: ["g2w"]
      },
      "application/vnd.geospace": {
        source: "iana",
        extensions: ["g3w"]
      },
      "application/vnd.gerber": {
        source: "iana"
      },
      "application/vnd.globalplatform.card-content-mgt": {
        source: "iana"
      },
      "application/vnd.globalplatform.card-content-mgt-response": {
        source: "iana"
      },
      "application/vnd.gmx": {
        source: "iana",
        extensions: ["gmx"]
      },
      "application/vnd.google-apps.document": {
        compressible: false,
        extensions: ["gdoc"]
      },
      "application/vnd.google-apps.presentation": {
        compressible: false,
        extensions: ["gslides"]
      },
      "application/vnd.google-apps.spreadsheet": {
        compressible: false,
        extensions: ["gsheet"]
      },
      "application/vnd.google-earth.kml+xml": {
        source: "iana",
        compressible: true,
        extensions: ["kml"]
      },
      "application/vnd.google-earth.kmz": {
        source: "iana",
        compressible: false,
        extensions: ["kmz"]
      },
      "application/vnd.gov.sk.e-form+xml": {
        source: "iana"
      },
      "application/vnd.gov.sk.e-form+zip": {
        source: "iana"
      },
      "application/vnd.gov.sk.xmldatacontainer+xml": {
        source: "iana"
      },
      "application/vnd.grafeq": {
        source: "iana",
        extensions: ["gqf", "gqs"]
      },
      "application/vnd.gridmp": {
        source: "iana"
      },
      "application/vnd.groove-account": {
        source: "iana",
        extensions: ["gac"]
      },
      "application/vnd.groove-help": {
        source: "iana",
        extensions: ["ghf"]
      },
      "application/vnd.groove-identity-message": {
        source: "iana",
        extensions: ["gim"]
      },
      "application/vnd.groove-injector": {
        source: "iana",
        extensions: ["grv"]
      },
      "application/vnd.groove-tool-message": {
        source: "iana",
        extensions: ["gtm"]
      },
      "application/vnd.groove-tool-template": {
        source: "iana",
        extensions: ["tpl"]
      },
      "application/vnd.groove-vcard": {
        source: "iana",
        extensions: ["vcg"]
      },
      "application/vnd.hal+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.hal+xml": {
        source: "iana",
        extensions: ["hal"]
      },
      "application/vnd.handheld-entertainment+xml": {
        source: "iana",
        extensions: ["zmm"]
      },
      "application/vnd.hbci": {
        source: "iana",
        extensions: ["hbci"]
      },
      "application/vnd.hcl-bireports": {
        source: "iana"
      },
      "application/vnd.hdt": {
        source: "iana"
      },
      "application/vnd.heroku+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.hhe.lesson-player": {
        source: "iana",
        extensions: ["les"]
      },
      "application/vnd.hp-hpgl": {
        source: "iana",
        extensions: ["hpgl"]
      },
      "application/vnd.hp-hpid": {
        source: "iana",
        extensions: ["hpid"]
      },
      "application/vnd.hp-hps": {
        source: "iana",
        extensions: ["hps"]
      },
      "application/vnd.hp-jlyt": {
        source: "iana",
        extensions: ["jlt"]
      },
      "application/vnd.hp-pcl": {
        source: "iana",
        extensions: ["pcl"]
      },
      "application/vnd.hp-pclxl": {
        source: "iana",
        extensions: ["pclxl"]
      },
      "application/vnd.httphone": {
        source: "iana"
      },
      "application/vnd.hydrostatix.sof-data": {
        source: "iana",
        extensions: ["sfd-hdstx"]
      },
      "application/vnd.hyperdrive+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.hzn-3d-crossword": {
        source: "iana"
      },
      "application/vnd.ibm.afplinedata": {
        source: "iana"
      },
      "application/vnd.ibm.electronic-media": {
        source: "iana"
      },
      "application/vnd.ibm.minipay": {
        source: "iana",
        extensions: ["mpy"]
      },
      "application/vnd.ibm.modcap": {
        source: "iana",
        extensions: ["afp", "listafp", "list3820"]
      },
      "application/vnd.ibm.rights-management": {
        source: "iana",
        extensions: ["irm"]
      },
      "application/vnd.ibm.secure-container": {
        source: "iana",
        extensions: ["sc"]
      },
      "application/vnd.iccprofile": {
        source: "iana",
        extensions: ["icc", "icm"]
      },
      "application/vnd.ieee.1905": {
        source: "iana"
      },
      "application/vnd.igloader": {
        source: "iana",
        extensions: ["igl"]
      },
      "application/vnd.immervision-ivp": {
        source: "iana",
        extensions: ["ivp"]
      },
      "application/vnd.immervision-ivu": {
        source: "iana",
        extensions: ["ivu"]
      },
      "application/vnd.ims.imsccv1p1": {
        source: "iana"
      },
      "application/vnd.ims.imsccv1p2": {
        source: "iana"
      },
      "application/vnd.ims.imsccv1p3": {
        source: "iana"
      },
      "application/vnd.ims.lis.v2.result+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.ims.lti.v2.toolconsumerprofile+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.ims.lti.v2.toolproxy+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.ims.lti.v2.toolproxy.id+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.ims.lti.v2.toolsettings+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.ims.lti.v2.toolsettings.simple+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.informedcontrol.rms+xml": {
        source: "iana"
      },
      "application/vnd.informix-visionary": {
        source: "iana"
      },
      "application/vnd.infotech.project": {
        source: "iana"
      },
      "application/vnd.infotech.project+xml": {
        source: "iana"
      },
      "application/vnd.innopath.wamp.notification": {
        source: "iana"
      },
      "application/vnd.insors.igm": {
        source: "iana",
        extensions: ["igm"]
      },
      "application/vnd.intercon.formnet": {
        source: "iana",
        extensions: ["xpw", "xpx"]
      },
      "application/vnd.intergeo": {
        source: "iana",
        extensions: ["i2g"]
      },
      "application/vnd.intertrust.digibox": {
        source: "iana"
      },
      "application/vnd.intertrust.nncp": {
        source: "iana"
      },
      "application/vnd.intu.qbo": {
        source: "iana",
        extensions: ["qbo"]
      },
      "application/vnd.intu.qfx": {
        source: "iana",
        extensions: ["qfx"]
      },
      "application/vnd.iptc.g2.catalogitem+xml": {
        source: "iana"
      },
      "application/vnd.iptc.g2.conceptitem+xml": {
        source: "iana"
      },
      "application/vnd.iptc.g2.knowledgeitem+xml": {
        source: "iana"
      },
      "application/vnd.iptc.g2.newsitem+xml": {
        source: "iana"
      },
      "application/vnd.iptc.g2.newsmessage+xml": {
        source: "iana"
      },
      "application/vnd.iptc.g2.packageitem+xml": {
        source: "iana"
      },
      "application/vnd.iptc.g2.planningitem+xml": {
        source: "iana"
      },
      "application/vnd.ipunplugged.rcprofile": {
        source: "iana",
        extensions: ["rcprofile"]
      },
      "application/vnd.irepository.package+xml": {
        source: "iana",
        extensions: ["irp"]
      },
      "application/vnd.is-xpr": {
        source: "iana",
        extensions: ["xpr"]
      },
      "application/vnd.isac.fcs": {
        source: "iana",
        extensions: ["fcs"]
      },
      "application/vnd.jam": {
        source: "iana",
        extensions: ["jam"]
      },
      "application/vnd.japannet-directory-service": {
        source: "iana"
      },
      "application/vnd.japannet-jpnstore-wakeup": {
        source: "iana"
      },
      "application/vnd.japannet-payment-wakeup": {
        source: "iana"
      },
      "application/vnd.japannet-registration": {
        source: "iana"
      },
      "application/vnd.japannet-registration-wakeup": {
        source: "iana"
      },
      "application/vnd.japannet-setstore-wakeup": {
        source: "iana"
      },
      "application/vnd.japannet-verification": {
        source: "iana"
      },
      "application/vnd.japannet-verification-wakeup": {
        source: "iana"
      },
      "application/vnd.jcp.javame.midlet-rms": {
        source: "iana",
        extensions: ["rms"]
      },
      "application/vnd.jisp": {
        source: "iana",
        extensions: ["jisp"]
      },
      "application/vnd.joost.joda-archive": {
        source: "iana",
        extensions: ["joda"]
      },
      "application/vnd.jsk.isdn-ngn": {
        source: "iana"
      },
      "application/vnd.kahootz": {
        source: "iana",
        extensions: ["ktz", "ktr"]
      },
      "application/vnd.kde.karbon": {
        source: "iana",
        extensions: ["karbon"]
      },
      "application/vnd.kde.kchart": {
        source: "iana",
        extensions: ["chrt"]
      },
      "application/vnd.kde.kformula": {
        source: "iana",
        extensions: ["kfo"]
      },
      "application/vnd.kde.kivio": {
        source: "iana",
        extensions: ["flw"]
      },
      "application/vnd.kde.kontour": {
        source: "iana",
        extensions: ["kon"]
      },
      "application/vnd.kde.kpresenter": {
        source: "iana",
        extensions: ["kpr", "kpt"]
      },
      "application/vnd.kde.kspread": {
        source: "iana",
        extensions: ["ksp"]
      },
      "application/vnd.kde.kword": {
        source: "iana",
        extensions: ["kwd", "kwt"]
      },
      "application/vnd.kenameaapp": {
        source: "iana",
        extensions: ["htke"]
      },
      "application/vnd.kidspiration": {
        source: "iana",
        extensions: ["kia"]
      },
      "application/vnd.kinar": {
        source: "iana",
        extensions: ["kne", "knp"]
      },
      "application/vnd.koan": {
        source: "iana",
        extensions: ["skp", "skd", "skt", "skm"]
      },
      "application/vnd.kodak-descriptor": {
        source: "iana",
        extensions: ["sse"]
      },
      "application/vnd.las.las+xml": {
        source: "iana",
        extensions: ["lasxml"]
      },
      "application/vnd.liberty-request+xml": {
        source: "iana"
      },
      "application/vnd.llamagraphics.life-balance.desktop": {
        source: "iana",
        extensions: ["lbd"]
      },
      "application/vnd.llamagraphics.life-balance.exchange+xml": {
        source: "iana",
        extensions: ["lbe"]
      },
      "application/vnd.lotus-1-2-3": {
        source: "iana",
        extensions: ["123"]
      },
      "application/vnd.lotus-approach": {
        source: "iana",
        extensions: ["apr"]
      },
      "application/vnd.lotus-freelance": {
        source: "iana",
        extensions: ["pre"]
      },
      "application/vnd.lotus-notes": {
        source: "iana",
        extensions: ["nsf"]
      },
      "application/vnd.lotus-organizer": {
        source: "iana",
        extensions: ["org"]
      },
      "application/vnd.lotus-screencam": {
        source: "iana",
        extensions: ["scm"]
      },
      "application/vnd.lotus-wordpro": {
        source: "iana",
        extensions: ["lwp"]
      },
      "application/vnd.macports.portpkg": {
        source: "iana",
        extensions: ["portpkg"]
      },
      "application/vnd.mapbox-vector-tile": {
        source: "iana"
      },
      "application/vnd.marlin.drm.actiontoken+xml": {
        source: "iana"
      },
      "application/vnd.marlin.drm.conftoken+xml": {
        source: "iana"
      },
      "application/vnd.marlin.drm.license+xml": {
        source: "iana"
      },
      "application/vnd.marlin.drm.mdcf": {
        source: "iana"
      },
      "application/vnd.mason+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.maxmind.maxmind-db": {
        source: "iana"
      },
      "application/vnd.mcd": {
        source: "iana",
        extensions: ["mcd"]
      },
      "application/vnd.medcalcdata": {
        source: "iana",
        extensions: ["mc1"]
      },
      "application/vnd.mediastation.cdkey": {
        source: "iana",
        extensions: ["cdkey"]
      },
      "application/vnd.meridian-slingshot": {
        source: "iana"
      },
      "application/vnd.mfer": {
        source: "iana",
        extensions: ["mwf"]
      },
      "application/vnd.mfmp": {
        source: "iana",
        extensions: ["mfm"]
      },
      "application/vnd.micro+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.micrografx.flo": {
        source: "iana",
        extensions: ["flo"]
      },
      "application/vnd.micrografx.igx": {
        source: "iana",
        extensions: ["igx"]
      },
      "application/vnd.microsoft.portable-executable": {
        source: "iana"
      },
      "application/vnd.miele+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.mif": {
        source: "iana",
        extensions: ["mif"]
      },
      "application/vnd.minisoft-hp3000-save": {
        source: "iana"
      },
      "application/vnd.mitsubishi.misty-guard.trustweb": {
        source: "iana"
      },
      "application/vnd.mobius.daf": {
        source: "iana",
        extensions: ["daf"]
      },
      "application/vnd.mobius.dis": {
        source: "iana",
        extensions: ["dis"]
      },
      "application/vnd.mobius.mbk": {
        source: "iana",
        extensions: ["mbk"]
      },
      "application/vnd.mobius.mqy": {
        source: "iana",
        extensions: ["mqy"]
      },
      "application/vnd.mobius.msl": {
        source: "iana",
        extensions: ["msl"]
      },
      "application/vnd.mobius.plc": {
        source: "iana",
        extensions: ["plc"]
      },
      "application/vnd.mobius.txf": {
        source: "iana",
        extensions: ["txf"]
      },
      "application/vnd.mophun.application": {
        source: "iana",
        extensions: ["mpn"]
      },
      "application/vnd.mophun.certificate": {
        source: "iana",
        extensions: ["mpc"]
      },
      "application/vnd.motorola.flexsuite": {
        source: "iana"
      },
      "application/vnd.motorola.flexsuite.adsi": {
        source: "iana"
      },
      "application/vnd.motorola.flexsuite.fis": {
        source: "iana"
      },
      "application/vnd.motorola.flexsuite.gotap": {
        source: "iana"
      },
      "application/vnd.motorola.flexsuite.kmr": {
        source: "iana"
      },
      "application/vnd.motorola.flexsuite.ttc": {
        source: "iana"
      },
      "application/vnd.motorola.flexsuite.wem": {
        source: "iana"
      },
      "application/vnd.motorola.iprm": {
        source: "iana"
      },
      "application/vnd.mozilla.xul+xml": {
        source: "iana",
        compressible: true,
        extensions: ["xul"]
      },
      "application/vnd.ms-3mfdocument": {
        source: "iana"
      },
      "application/vnd.ms-artgalry": {
        source: "iana",
        extensions: ["cil"]
      },
      "application/vnd.ms-asf": {
        source: "iana"
      },
      "application/vnd.ms-cab-compressed": {
        source: "iana",
        extensions: ["cab"]
      },
      "application/vnd.ms-color.iccprofile": {
        source: "apache"
      },
      "application/vnd.ms-excel": {
        source: "iana",
        compressible: false,
        extensions: ["xls", "xlm", "xla", "xlc", "xlt", "xlw"]
      },
      "application/vnd.ms-excel.addin.macroenabled.12": {
        source: "iana",
        extensions: ["xlam"]
      },
      "application/vnd.ms-excel.sheet.binary.macroenabled.12": {
        source: "iana",
        extensions: ["xlsb"]
      },
      "application/vnd.ms-excel.sheet.macroenabled.12": {
        source: "iana",
        extensions: ["xlsm"]
      },
      "application/vnd.ms-excel.template.macroenabled.12": {
        source: "iana",
        extensions: ["xltm"]
      },
      "application/vnd.ms-fontobject": {
        source: "iana",
        compressible: true,
        extensions: ["eot"]
      },
      "application/vnd.ms-htmlhelp": {
        source: "iana",
        extensions: ["chm"]
      },
      "application/vnd.ms-ims": {
        source: "iana",
        extensions: ["ims"]
      },
      "application/vnd.ms-lrm": {
        source: "iana",
        extensions: ["lrm"]
      },
      "application/vnd.ms-office.activex+xml": {
        source: "iana"
      },
      "application/vnd.ms-officetheme": {
        source: "iana",
        extensions: ["thmx"]
      },
      "application/vnd.ms-opentype": {
        source: "apache",
        compressible: true
      },
      "application/vnd.ms-package.obfuscated-opentype": {
        source: "apache"
      },
      "application/vnd.ms-pki.seccat": {
        source: "apache",
        extensions: ["cat"]
      },
      "application/vnd.ms-pki.stl": {
        source: "apache",
        extensions: ["stl"]
      },
      "application/vnd.ms-playready.initiator+xml": {
        source: "iana"
      },
      "application/vnd.ms-powerpoint": {
        source: "iana",
        compressible: false,
        extensions: ["ppt", "pps", "pot"]
      },
      "application/vnd.ms-powerpoint.addin.macroenabled.12": {
        source: "iana",
        extensions: ["ppam"]
      },
      "application/vnd.ms-powerpoint.presentation.macroenabled.12": {
        source: "iana",
        extensions: ["pptm"]
      },
      "application/vnd.ms-powerpoint.slide.macroenabled.12": {
        source: "iana",
        extensions: ["sldm"]
      },
      "application/vnd.ms-powerpoint.slideshow.macroenabled.12": {
        source: "iana",
        extensions: ["ppsm"]
      },
      "application/vnd.ms-powerpoint.template.macroenabled.12": {
        source: "iana",
        extensions: ["potm"]
      },
      "application/vnd.ms-printdevicecapabilities+xml": {
        source: "iana"
      },
      "application/vnd.ms-printing.printticket+xml": {
        source: "apache"
      },
      "application/vnd.ms-printschematicket+xml": {
        source: "iana"
      },
      "application/vnd.ms-project": {
        source: "iana",
        extensions: ["mpp", "mpt"]
      },
      "application/vnd.ms-tnef": {
        source: "iana"
      },
      "application/vnd.ms-windows.devicepairing": {
        source: "iana"
      },
      "application/vnd.ms-windows.nwprinting.oob": {
        source: "iana"
      },
      "application/vnd.ms-windows.printerpairing": {
        source: "iana"
      },
      "application/vnd.ms-windows.wsd.oob": {
        source: "iana"
      },
      "application/vnd.ms-wmdrm.lic-chlg-req": {
        source: "iana"
      },
      "application/vnd.ms-wmdrm.lic-resp": {
        source: "iana"
      },
      "application/vnd.ms-wmdrm.meter-chlg-req": {
        source: "iana"
      },
      "application/vnd.ms-wmdrm.meter-resp": {
        source: "iana"
      },
      "application/vnd.ms-word.document.macroenabled.12": {
        source: "iana",
        extensions: ["docm"]
      },
      "application/vnd.ms-word.template.macroenabled.12": {
        source: "iana",
        extensions: ["dotm"]
      },
      "application/vnd.ms-works": {
        source: "iana",
        extensions: ["wps", "wks", "wcm", "wdb"]
      },
      "application/vnd.ms-wpl": {
        source: "iana",
        extensions: ["wpl"]
      },
      "application/vnd.ms-xpsdocument": {
        source: "iana",
        compressible: false,
        extensions: ["xps"]
      },
      "application/vnd.msa-disk-image": {
        source: "iana"
      },
      "application/vnd.mseq": {
        source: "iana",
        extensions: ["mseq"]
      },
      "application/vnd.msign": {
        source: "iana"
      },
      "application/vnd.multiad.creator": {
        source: "iana"
      },
      "application/vnd.multiad.creator.cif": {
        source: "iana"
      },
      "application/vnd.music-niff": {
        source: "iana"
      },
      "application/vnd.musician": {
        source: "iana",
        extensions: ["mus"]
      },
      "application/vnd.muvee.style": {
        source: "iana",
        extensions: ["msty"]
      },
      "application/vnd.mynfc": {
        source: "iana",
        extensions: ["taglet"]
      },
      "application/vnd.ncd.control": {
        source: "iana"
      },
      "application/vnd.ncd.reference": {
        source: "iana"
      },
      "application/vnd.nearst.inv+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.nervana": {
        source: "iana"
      },
      "application/vnd.netfpx": {
        source: "iana"
      },
      "application/vnd.neurolanguage.nlu": {
        source: "iana",
        extensions: ["nlu"]
      },
      "application/vnd.nintendo.nitro.rom": {
        source: "iana"
      },
      "application/vnd.nintendo.snes.rom": {
        source: "iana"
      },
      "application/vnd.nitf": {
        source: "iana",
        extensions: ["ntf", "nitf"]
      },
      "application/vnd.noblenet-directory": {
        source: "iana",
        extensions: ["nnd"]
      },
      "application/vnd.noblenet-sealer": {
        source: "iana",
        extensions: ["nns"]
      },
      "application/vnd.noblenet-web": {
        source: "iana",
        extensions: ["nnw"]
      },
      "application/vnd.nokia.catalogs": {
        source: "iana"
      },
      "application/vnd.nokia.conml+wbxml": {
        source: "iana"
      },
      "application/vnd.nokia.conml+xml": {
        source: "iana"
      },
      "application/vnd.nokia.iptv.config+xml": {
        source: "iana"
      },
      "application/vnd.nokia.isds-radio-presets": {
        source: "iana"
      },
      "application/vnd.nokia.landmark+wbxml": {
        source: "iana"
      },
      "application/vnd.nokia.landmark+xml": {
        source: "iana"
      },
      "application/vnd.nokia.landmarkcollection+xml": {
        source: "iana"
      },
      "application/vnd.nokia.n-gage.ac+xml": {
        source: "iana"
      },
      "application/vnd.nokia.n-gage.data": {
        source: "iana",
        extensions: ["ngdat"]
      },
      "application/vnd.nokia.n-gage.symbian.install": {
        source: "iana",
        extensions: ["n-gage"]
      },
      "application/vnd.nokia.ncd": {
        source: "iana"
      },
      "application/vnd.nokia.pcd+wbxml": {
        source: "iana"
      },
      "application/vnd.nokia.pcd+xml": {
        source: "iana"
      },
      "application/vnd.nokia.radio-preset": {
        source: "iana",
        extensions: ["rpst"]
      },
      "application/vnd.nokia.radio-presets": {
        source: "iana",
        extensions: ["rpss"]
      },
      "application/vnd.novadigm.edm": {
        source: "iana",
        extensions: ["edm"]
      },
      "application/vnd.novadigm.edx": {
        source: "iana",
        extensions: ["edx"]
      },
      "application/vnd.novadigm.ext": {
        source: "iana",
        extensions: ["ext"]
      },
      "application/vnd.ntt-local.content-share": {
        source: "iana"
      },
      "application/vnd.ntt-local.file-transfer": {
        source: "iana"
      },
      "application/vnd.ntt-local.ogw_remote-access": {
        source: "iana"
      },
      "application/vnd.ntt-local.sip-ta_remote": {
        source: "iana"
      },
      "application/vnd.ntt-local.sip-ta_tcp_stream": {
        source: "iana"
      },
      "application/vnd.oasis.opendocument.chart": {
        source: "iana",
        extensions: ["odc"]
      },
      "application/vnd.oasis.opendocument.chart-template": {
        source: "iana",
        extensions: ["otc"]
      },
      "application/vnd.oasis.opendocument.database": {
        source: "iana",
        extensions: ["odb"]
      },
      "application/vnd.oasis.opendocument.formula": {
        source: "iana",
        extensions: ["odf"]
      },
      "application/vnd.oasis.opendocument.formula-template": {
        source: "iana",
        extensions: ["odft"]
      },
      "application/vnd.oasis.opendocument.graphics": {
        source: "iana",
        compressible: false,
        extensions: ["odg"]
      },
      "application/vnd.oasis.opendocument.graphics-template": {
        source: "iana",
        extensions: ["otg"]
      },
      "application/vnd.oasis.opendocument.image": {
        source: "iana",
        extensions: ["odi"]
      },
      "application/vnd.oasis.opendocument.image-template": {
        source: "iana",
        extensions: ["oti"]
      },
      "application/vnd.oasis.opendocument.presentation": {
        source: "iana",
        compressible: false,
        extensions: ["odp"]
      },
      "application/vnd.oasis.opendocument.presentation-template": {
        source: "iana",
        extensions: ["otp"]
      },
      "application/vnd.oasis.opendocument.spreadsheet": {
        source: "iana",
        compressible: false,
        extensions: ["ods"]
      },
      "application/vnd.oasis.opendocument.spreadsheet-template": {
        source: "iana",
        extensions: ["ots"]
      },
      "application/vnd.oasis.opendocument.text": {
        source: "iana",
        compressible: false,
        extensions: ["odt"]
      },
      "application/vnd.oasis.opendocument.text-master": {
        source: "iana",
        extensions: ["odm"]
      },
      "application/vnd.oasis.opendocument.text-template": {
        source: "iana",
        extensions: ["ott"]
      },
      "application/vnd.oasis.opendocument.text-web": {
        source: "iana",
        extensions: ["oth"]
      },
      "application/vnd.obn": {
        source: "iana"
      },
      "application/vnd.oftn.l10n+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.oipf.contentaccessdownload+xml": {
        source: "iana"
      },
      "application/vnd.oipf.contentaccessstreaming+xml": {
        source: "iana"
      },
      "application/vnd.oipf.cspg-hexbinary": {
        source: "iana"
      },
      "application/vnd.oipf.dae.svg+xml": {
        source: "iana"
      },
      "application/vnd.oipf.dae.xhtml+xml": {
        source: "iana"
      },
      "application/vnd.oipf.mippvcontrolmessage+xml": {
        source: "iana"
      },
      "application/vnd.oipf.pae.gem": {
        source: "iana"
      },
      "application/vnd.oipf.spdiscovery+xml": {
        source: "iana"
      },
      "application/vnd.oipf.spdlist+xml": {
        source: "iana"
      },
      "application/vnd.oipf.ueprofile+xml": {
        source: "iana"
      },
      "application/vnd.oipf.userprofile+xml": {
        source: "iana"
      },
      "application/vnd.olpc-sugar": {
        source: "iana",
        extensions: ["xo"]
      },
      "application/vnd.oma-scws-config": {
        source: "iana"
      },
      "application/vnd.oma-scws-http-request": {
        source: "iana"
      },
      "application/vnd.oma-scws-http-response": {
        source: "iana"
      },
      "application/vnd.oma.bcast.associated-procedure-parameter+xml": {
        source: "iana"
      },
      "application/vnd.oma.bcast.drm-trigger+xml": {
        source: "iana"
      },
      "application/vnd.oma.bcast.imd+xml": {
        source: "iana"
      },
      "application/vnd.oma.bcast.ltkm": {
        source: "iana"
      },
      "application/vnd.oma.bcast.notification+xml": {
        source: "iana"
      },
      "application/vnd.oma.bcast.provisioningtrigger": {
        source: "iana"
      },
      "application/vnd.oma.bcast.sgboot": {
        source: "iana"
      },
      "application/vnd.oma.bcast.sgdd+xml": {
        source: "iana"
      },
      "application/vnd.oma.bcast.sgdu": {
        source: "iana"
      },
      "application/vnd.oma.bcast.simple-symbol-container": {
        source: "iana"
      },
      "application/vnd.oma.bcast.smartcard-trigger+xml": {
        source: "iana"
      },
      "application/vnd.oma.bcast.sprov+xml": {
        source: "iana"
      },
      "application/vnd.oma.bcast.stkm": {
        source: "iana"
      },
      "application/vnd.oma.cab-address-book+xml": {
        source: "iana"
      },
      "application/vnd.oma.cab-feature-handler+xml": {
        source: "iana"
      },
      "application/vnd.oma.cab-pcc+xml": {
        source: "iana"
      },
      "application/vnd.oma.cab-subs-invite+xml": {
        source: "iana"
      },
      "application/vnd.oma.cab-user-prefs+xml": {
        source: "iana"
      },
      "application/vnd.oma.dcd": {
        source: "iana"
      },
      "application/vnd.oma.dcdc": {
        source: "iana"
      },
      "application/vnd.oma.dd2+xml": {
        source: "iana",
        extensions: ["dd2"]
      },
      "application/vnd.oma.drm.risd+xml": {
        source: "iana"
      },
      "application/vnd.oma.group-usage-list+xml": {
        source: "iana"
      },
      "application/vnd.oma.lwm2m+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.oma.lwm2m+tlv": {
        source: "iana"
      },
      "application/vnd.oma.pal+xml": {
        source: "iana"
      },
      "application/vnd.oma.poc.detailed-progress-report+xml": {
        source: "iana"
      },
      "application/vnd.oma.poc.final-report+xml": {
        source: "iana"
      },
      "application/vnd.oma.poc.groups+xml": {
        source: "iana"
      },
      "application/vnd.oma.poc.invocation-descriptor+xml": {
        source: "iana"
      },
      "application/vnd.oma.poc.optimized-progress-report+xml": {
        source: "iana"
      },
      "application/vnd.oma.push": {
        source: "iana"
      },
      "application/vnd.oma.scidm.messages+xml": {
        source: "iana"
      },
      "application/vnd.oma.xcap-directory+xml": {
        source: "iana"
      },
      "application/vnd.omads-email+xml": {
        source: "iana"
      },
      "application/vnd.omads-file+xml": {
        source: "iana"
      },
      "application/vnd.omads-folder+xml": {
        source: "iana"
      },
      "application/vnd.omaloc-supl-init": {
        source: "iana"
      },
      "application/vnd.onepager": {
        source: "iana"
      },
      "application/vnd.openblox.game+xml": {
        source: "iana"
      },
      "application/vnd.openblox.game-binary": {
        source: "iana"
      },
      "application/vnd.openeye.oeb": {
        source: "iana"
      },
      "application/vnd.openofficeorg.extension": {
        source: "apache",
        extensions: ["oxt"]
      },
      "application/vnd.openstreetmap.data+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.custom-properties+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.drawing+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.extended-properties+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml-template": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
        source: "iana",
        compressible: false,
        extensions: ["pptx"]
      },
      "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.slide": {
        source: "iana",
        extensions: ["sldx"]
      },
      "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.slideshow": {
        source: "iana",
        extensions: ["ppsx"]
      },
      "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.template": {
        source: "apache",
        extensions: ["potx"]
      },
      "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml-template": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
        source: "iana",
        compressible: false,
        extensions: ["xlsx"]
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.template": {
        source: "apache",
        extensions: ["xltx"]
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.theme+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.themeoverride+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.vmldrawing": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml-template": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
        source: "iana",
        compressible: false,
        extensions: ["docx"]
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.template": {
        source: "apache",
        extensions: ["dotx"]
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-package.core-properties+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": {
        source: "iana"
      },
      "application/vnd.openxmlformats-package.relationships+xml": {
        source: "iana"
      },
      "application/vnd.oracle.resource+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.orange.indata": {
        source: "iana"
      },
      "application/vnd.osa.netdeploy": {
        source: "iana"
      },
      "application/vnd.osgeo.mapguide.package": {
        source: "iana",
        extensions: ["mgp"]
      },
      "application/vnd.osgi.bundle": {
        source: "iana"
      },
      "application/vnd.osgi.dp": {
        source: "iana",
        extensions: ["dp"]
      },
      "application/vnd.osgi.subsystem": {
        source: "iana",
        extensions: ["esa"]
      },
      "application/vnd.otps.ct-kip+xml": {
        source: "iana"
      },
      "application/vnd.oxli.countgraph": {
        source: "iana"
      },
      "application/vnd.pagerduty+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.palm": {
        source: "iana",
        extensions: ["pdb", "pqa", "oprc"]
      },
      "application/vnd.panoply": {
        source: "iana"
      },
      "application/vnd.paos+xml": {
        source: "iana"
      },
      "application/vnd.paos.xml": {
        source: "apache"
      },
      "application/vnd.pawaafile": {
        source: "iana",
        extensions: ["paw"]
      },
      "application/vnd.pcos": {
        source: "iana"
      },
      "application/vnd.pg.format": {
        source: "iana",
        extensions: ["str"]
      },
      "application/vnd.pg.osasli": {
        source: "iana",
        extensions: ["ei6"]
      },
      "application/vnd.piaccess.application-licence": {
        source: "iana"
      },
      "application/vnd.picsel": {
        source: "iana",
        extensions: ["efif"]
      },
      "application/vnd.pmi.widget": {
        source: "iana",
        extensions: ["wg"]
      },
      "application/vnd.poc.group-advertisement+xml": {
        source: "iana"
      },
      "application/vnd.pocketlearn": {
        source: "iana",
        extensions: ["plf"]
      },
      "application/vnd.powerbuilder6": {
        source: "iana",
        extensions: ["pbd"]
      },
      "application/vnd.powerbuilder6-s": {
        source: "iana"
      },
      "application/vnd.powerbuilder7": {
        source: "iana"
      },
      "application/vnd.powerbuilder7-s": {
        source: "iana"
      },
      "application/vnd.powerbuilder75": {
        source: "iana"
      },
      "application/vnd.powerbuilder75-s": {
        source: "iana"
      },
      "application/vnd.preminet": {
        source: "iana"
      },
      "application/vnd.previewsystems.box": {
        source: "iana",
        extensions: ["box"]
      },
      "application/vnd.proteus.magazine": {
        source: "iana",
        extensions: ["mgz"]
      },
      "application/vnd.publishare-delta-tree": {
        source: "iana",
        extensions: ["qps"]
      },
      "application/vnd.pvi.ptid1": {
        source: "iana",
        extensions: ["ptid"]
      },
      "application/vnd.pwg-multiplexed": {
        source: "iana"
      },
      "application/vnd.pwg-xhtml-print+xml": {
        source: "iana"
      },
      "application/vnd.qualcomm.brew-app-res": {
        source: "iana"
      },
      "application/vnd.quarantainenet": {
        source: "iana"
      },
      "application/vnd.quark.quarkxpress": {
        source: "iana",
        extensions: ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"]
      },
      "application/vnd.quobject-quoxdocument": {
        source: "iana"
      },
      "application/vnd.radisys.moml+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-audit+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-audit-conf+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-audit-conn+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-audit-dialog+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-audit-stream+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-conf+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-dialog+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-dialog-base+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-dialog-fax-detect+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-dialog-group+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-dialog-speech+xml": {
        source: "iana"
      },
      "application/vnd.radisys.msml-dialog-transform+xml": {
        source: "iana"
      },
      "application/vnd.rainstor.data": {
        source: "iana"
      },
      "application/vnd.rapid": {
        source: "iana"
      },
      "application/vnd.rar": {
        source: "iana"
      },
      "application/vnd.realvnc.bed": {
        source: "iana",
        extensions: ["bed"]
      },
      "application/vnd.recordare.musicxml": {
        source: "iana",
        extensions: ["mxl"]
      },
      "application/vnd.recordare.musicxml+xml": {
        source: "iana",
        extensions: ["musicxml"]
      },
      "application/vnd.renlearn.rlprint": {
        source: "iana"
      },
      "application/vnd.rig.cryptonote": {
        source: "iana",
        extensions: ["cryptonote"]
      },
      "application/vnd.rim.cod": {
        source: "apache",
        extensions: ["cod"]
      },
      "application/vnd.rn-realmedia": {
        source: "apache",
        extensions: ["rm"]
      },
      "application/vnd.rn-realmedia-vbr": {
        source: "apache",
        extensions: ["rmvb"]
      },
      "application/vnd.route66.link66+xml": {
        source: "iana",
        extensions: ["link66"]
      },
      "application/vnd.rs-274x": {
        source: "iana"
      },
      "application/vnd.ruckus.download": {
        source: "iana"
      },
      "application/vnd.s3sms": {
        source: "iana"
      },
      "application/vnd.sailingtracker.track": {
        source: "iana",
        extensions: ["st"]
      },
      "application/vnd.sbm.cid": {
        source: "iana"
      },
      "application/vnd.sbm.mid2": {
        source: "iana"
      },
      "application/vnd.scribus": {
        source: "iana"
      },
      "application/vnd.sealed.3df": {
        source: "iana"
      },
      "application/vnd.sealed.csf": {
        source: "iana"
      },
      "application/vnd.sealed.doc": {
        source: "iana"
      },
      "application/vnd.sealed.eml": {
        source: "iana"
      },
      "application/vnd.sealed.mht": {
        source: "iana"
      },
      "application/vnd.sealed.net": {
        source: "iana"
      },
      "application/vnd.sealed.ppt": {
        source: "iana"
      },
      "application/vnd.sealed.tiff": {
        source: "iana"
      },
      "application/vnd.sealed.xls": {
        source: "iana"
      },
      "application/vnd.sealedmedia.softseal.html": {
        source: "iana"
      },
      "application/vnd.sealedmedia.softseal.pdf": {
        source: "iana"
      },
      "application/vnd.seemail": {
        source: "iana",
        extensions: ["see"]
      },
      "application/vnd.sema": {
        source: "iana",
        extensions: ["sema"]
      },
      "application/vnd.semd": {
        source: "iana",
        extensions: ["semd"]
      },
      "application/vnd.semf": {
        source: "iana",
        extensions: ["semf"]
      },
      "application/vnd.shana.informed.formdata": {
        source: "iana",
        extensions: ["ifm"]
      },
      "application/vnd.shana.informed.formtemplate": {
        source: "iana",
        extensions: ["itp"]
      },
      "application/vnd.shana.informed.interchange": {
        source: "iana",
        extensions: ["iif"]
      },
      "application/vnd.shana.informed.package": {
        source: "iana",
        extensions: ["ipk"]
      },
      "application/vnd.simtech-mindmapper": {
        source: "iana",
        extensions: ["twd", "twds"]
      },
      "application/vnd.siren+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.smaf": {
        source: "iana",
        extensions: ["mmf"]
      },
      "application/vnd.smart.notebook": {
        source: "iana"
      },
      "application/vnd.smart.teacher": {
        source: "iana",
        extensions: ["teacher"]
      },
      "application/vnd.software602.filler.form+xml": {
        source: "iana"
      },
      "application/vnd.software602.filler.form-xml-zip": {
        source: "iana"
      },
      "application/vnd.solent.sdkm+xml": {
        source: "iana",
        extensions: ["sdkm", "sdkd"]
      },
      "application/vnd.spotfire.dxp": {
        source: "iana",
        extensions: ["dxp"]
      },
      "application/vnd.spotfire.sfs": {
        source: "iana",
        extensions: ["sfs"]
      },
      "application/vnd.sss-cod": {
        source: "iana"
      },
      "application/vnd.sss-dtf": {
        source: "iana"
      },
      "application/vnd.sss-ntf": {
        source: "iana"
      },
      "application/vnd.stardivision.calc": {
        source: "apache",
        extensions: ["sdc"]
      },
      "application/vnd.stardivision.draw": {
        source: "apache",
        extensions: ["sda"]
      },
      "application/vnd.stardivision.impress": {
        source: "apache",
        extensions: ["sdd"]
      },
      "application/vnd.stardivision.math": {
        source: "apache",
        extensions: ["smf"]
      },
      "application/vnd.stardivision.writer": {
        source: "apache",
        extensions: ["sdw", "vor"]
      },
      "application/vnd.stardivision.writer-global": {
        source: "apache",
        extensions: ["sgl"]
      },
      "application/vnd.stepmania.package": {
        source: "iana",
        extensions: ["smzip"]
      },
      "application/vnd.stepmania.stepchart": {
        source: "iana",
        extensions: ["sm"]
      },
      "application/vnd.street-stream": {
        source: "iana"
      },
      "application/vnd.sun.wadl+xml": {
        source: "iana"
      },
      "application/vnd.sun.xml.calc": {
        source: "apache",
        extensions: ["sxc"]
      },
      "application/vnd.sun.xml.calc.template": {
        source: "apache",
        extensions: ["stc"]
      },
      "application/vnd.sun.xml.draw": {
        source: "apache",
        extensions: ["sxd"]
      },
      "application/vnd.sun.xml.draw.template": {
        source: "apache",
        extensions: ["std"]
      },
      "application/vnd.sun.xml.impress": {
        source: "apache",
        extensions: ["sxi"]
      },
      "application/vnd.sun.xml.impress.template": {
        source: "apache",
        extensions: ["sti"]
      },
      "application/vnd.sun.xml.math": {
        source: "apache",
        extensions: ["sxm"]
      },
      "application/vnd.sun.xml.writer": {
        source: "apache",
        extensions: ["sxw"]
      },
      "application/vnd.sun.xml.writer.global": {
        source: "apache",
        extensions: ["sxg"]
      },
      "application/vnd.sun.xml.writer.template": {
        source: "apache",
        extensions: ["stw"]
      },
      "application/vnd.sus-calendar": {
        source: "iana",
        extensions: ["sus", "susp"]
      },
      "application/vnd.svd": {
        source: "iana",
        extensions: ["svd"]
      },
      "application/vnd.swiftview-ics": {
        source: "iana"
      },
      "application/vnd.symbian.install": {
        source: "apache",
        extensions: ["sis", "sisx"]
      },
      "application/vnd.syncml+xml": {
        source: "iana",
        extensions: ["xsm"]
      },
      "application/vnd.syncml.dm+wbxml": {
        source: "iana",
        extensions: ["bdm"]
      },
      "application/vnd.syncml.dm+xml": {
        source: "iana",
        extensions: ["xdm"]
      },
      "application/vnd.syncml.dm.notification": {
        source: "iana"
      },
      "application/vnd.syncml.dmddf+wbxml": {
        source: "iana"
      },
      "application/vnd.syncml.dmddf+xml": {
        source: "iana"
      },
      "application/vnd.syncml.dmtnds+wbxml": {
        source: "iana"
      },
      "application/vnd.syncml.dmtnds+xml": {
        source: "iana"
      },
      "application/vnd.syncml.ds.notification": {
        source: "iana"
      },
      "application/vnd.tao.intent-module-archive": {
        source: "iana",
        extensions: ["tao"]
      },
      "application/vnd.tcpdump.pcap": {
        source: "iana",
        extensions: ["pcap", "cap", "dmp"]
      },
      "application/vnd.tmd.mediaflex.api+xml": {
        source: "iana"
      },
      "application/vnd.tml": {
        source: "iana"
      },
      "application/vnd.tmobile-livetv": {
        source: "iana",
        extensions: ["tmo"]
      },
      "application/vnd.tri.onesource": {
        source: "iana"
      },
      "application/vnd.trid.tpt": {
        source: "iana",
        extensions: ["tpt"]
      },
      "application/vnd.triscape.mxs": {
        source: "iana",
        extensions: ["mxs"]
      },
      "application/vnd.trueapp": {
        source: "iana",
        extensions: ["tra"]
      },
      "application/vnd.truedoc": {
        source: "iana"
      },
      "application/vnd.ubisoft.webplayer": {
        source: "iana"
      },
      "application/vnd.ufdl": {
        source: "iana",
        extensions: ["ufd", "ufdl"]
      },
      "application/vnd.uiq.theme": {
        source: "iana",
        extensions: ["utz"]
      },
      "application/vnd.umajin": {
        source: "iana",
        extensions: ["umj"]
      },
      "application/vnd.unity": {
        source: "iana",
        extensions: ["unityweb"]
      },
      "application/vnd.uoml+xml": {
        source: "iana",
        extensions: ["uoml"]
      },
      "application/vnd.uplanet.alert": {
        source: "iana"
      },
      "application/vnd.uplanet.alert-wbxml": {
        source: "iana"
      },
      "application/vnd.uplanet.bearer-choice": {
        source: "iana"
      },
      "application/vnd.uplanet.bearer-choice-wbxml": {
        source: "iana"
      },
      "application/vnd.uplanet.cacheop": {
        source: "iana"
      },
      "application/vnd.uplanet.cacheop-wbxml": {
        source: "iana"
      },
      "application/vnd.uplanet.channel": {
        source: "iana"
      },
      "application/vnd.uplanet.channel-wbxml": {
        source: "iana"
      },
      "application/vnd.uplanet.list": {
        source: "iana"
      },
      "application/vnd.uplanet.list-wbxml": {
        source: "iana"
      },
      "application/vnd.uplanet.listcmd": {
        source: "iana"
      },
      "application/vnd.uplanet.listcmd-wbxml": {
        source: "iana"
      },
      "application/vnd.uplanet.signal": {
        source: "iana"
      },
      "application/vnd.uri-map": {
        source: "iana"
      },
      "application/vnd.valve.source.material": {
        source: "iana"
      },
      "application/vnd.vcx": {
        source: "iana",
        extensions: ["vcx"]
      },
      "application/vnd.vd-study": {
        source: "iana"
      },
      "application/vnd.vectorworks": {
        source: "iana"
      },
      "application/vnd.vel+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.verimatrix.vcas": {
        source: "iana"
      },
      "application/vnd.vidsoft.vidconference": {
        source: "iana"
      },
      "application/vnd.visio": {
        source: "iana",
        extensions: ["vsd", "vst", "vss", "vsw"]
      },
      "application/vnd.visionary": {
        source: "iana",
        extensions: ["vis"]
      },
      "application/vnd.vividence.scriptfile": {
        source: "iana"
      },
      "application/vnd.vsf": {
        source: "iana",
        extensions: ["vsf"]
      },
      "application/vnd.wap.sic": {
        source: "iana"
      },
      "application/vnd.wap.slc": {
        source: "iana"
      },
      "application/vnd.wap.wbxml": {
        source: "iana",
        extensions: ["wbxml"]
      },
      "application/vnd.wap.wmlc": {
        source: "iana",
        extensions: ["wmlc"]
      },
      "application/vnd.wap.wmlscriptc": {
        source: "iana",
        extensions: ["wmlsc"]
      },
      "application/vnd.webturbo": {
        source: "iana",
        extensions: ["wtb"]
      },
      "application/vnd.wfa.p2p": {
        source: "iana"
      },
      "application/vnd.wfa.wsc": {
        source: "iana"
      },
      "application/vnd.windows.devicepairing": {
        source: "iana"
      },
      "application/vnd.wmc": {
        source: "iana"
      },
      "application/vnd.wmf.bootstrap": {
        source: "iana"
      },
      "application/vnd.wolfram.mathematica": {
        source: "iana"
      },
      "application/vnd.wolfram.mathematica.package": {
        source: "iana"
      },
      "application/vnd.wolfram.player": {
        source: "iana",
        extensions: ["nbp"]
      },
      "application/vnd.wordperfect": {
        source: "iana",
        extensions: ["wpd"]
      },
      "application/vnd.wqd": {
        source: "iana",
        extensions: ["wqd"]
      },
      "application/vnd.wrq-hp3000-labelled": {
        source: "iana"
      },
      "application/vnd.wt.stf": {
        source: "iana",
        extensions: ["stf"]
      },
      "application/vnd.wv.csp+wbxml": {
        source: "iana"
      },
      "application/vnd.wv.csp+xml": {
        source: "iana"
      },
      "application/vnd.wv.ssp+xml": {
        source: "iana"
      },
      "application/vnd.xacml+json": {
        source: "iana",
        compressible: true
      },
      "application/vnd.xara": {
        source: "iana",
        extensions: ["xar"]
      },
      "application/vnd.xfdl": {
        source: "iana",
        extensions: ["xfdl"]
      },
      "application/vnd.xfdl.webform": {
        source: "iana"
      },
      "application/vnd.xmi+xml": {
        source: "iana"
      },
      "application/vnd.xmpie.cpkg": {
        source: "iana"
      },
      "application/vnd.xmpie.dpkg": {
        source: "iana"
      },
      "application/vnd.xmpie.plan": {
        source: "iana"
      },
      "application/vnd.xmpie.ppkg": {
        source: "iana"
      },
      "application/vnd.xmpie.xlim": {
        source: "iana"
      },
      "application/vnd.yamaha.hv-dic": {
        source: "iana",
        extensions: ["hvd"]
      },
      "application/vnd.yamaha.hv-script": {
        source: "iana",
        extensions: ["hvs"]
      },
      "application/vnd.yamaha.hv-voice": {
        source: "iana",
        extensions: ["hvp"]
      },
      "application/vnd.yamaha.openscoreformat": {
        source: "iana",
        extensions: ["osf"]
      },
      "application/vnd.yamaha.openscoreformat.osfpvg+xml": {
        source: "iana",
        extensions: ["osfpvg"]
      },
      "application/vnd.yamaha.remote-setup": {
        source: "iana"
      },
      "application/vnd.yamaha.smaf-audio": {
        source: "iana",
        extensions: ["saf"]
      },
      "application/vnd.yamaha.smaf-phrase": {
        source: "iana",
        extensions: ["spf"]
      },
      "application/vnd.yamaha.through-ngn": {
        source: "iana"
      },
      "application/vnd.yamaha.tunnel-udpencap": {
        source: "iana"
      },
      "application/vnd.yaoweme": {
        source: "iana"
      },
      "application/vnd.yellowriver-custom-menu": {
        source: "iana",
        extensions: ["cmp"]
      },
      "application/vnd.zul": {
        source: "iana",
        extensions: ["zir", "zirz"]
      },
      "application/vnd.zzazz.deck+xml": {
        source: "iana",
        extensions: ["zaz"]
      },
      "application/voicexml+xml": {
        source: "iana",
        extensions: ["vxml"]
      },
      "application/vq-rtcpxr": {
        source: "iana"
      },
      "application/watcherinfo+xml": {
        source: "iana"
      },
      "application/whoispp-query": {
        source: "iana"
      },
      "application/whoispp-response": {
        source: "iana"
      },
      "application/widget": {
        source: "iana",
        extensions: ["wgt"]
      },
      "application/winhlp": {
        source: "apache",
        extensions: ["hlp"]
      },
      "application/wita": {
        source: "iana"
      },
      "application/wordperfect5.1": {
        source: "iana"
      },
      "application/wsdl+xml": {
        source: "iana",
        extensions: ["wsdl"]
      },
      "application/wspolicy+xml": {
        source: "iana",
        extensions: ["wspolicy"]
      },
      "application/x-7z-compressed": {
        source: "apache",
        compressible: false,
        extensions: ["7z"]
      },
      "application/x-abiword": {
        source: "apache",
        extensions: ["abw"]
      },
      "application/x-ace-compressed": {
        source: "apache",
        extensions: ["ace"]
      },
      "application/x-amf": {
        source: "apache"
      },
      "application/x-apple-diskimage": {
        source: "apache",
        extensions: ["dmg"]
      },
      "application/x-authorware-bin": {
        source: "apache",
        extensions: ["aab", "x32", "u32", "vox"]
      },
      "application/x-authorware-map": {
        source: "apache",
        extensions: ["aam"]
      },
      "application/x-authorware-seg": {
        source: "apache",
        extensions: ["aas"]
      },
      "application/x-bcpio": {
        source: "apache",
        extensions: ["bcpio"]
      },
      "application/x-bdoc": {
        compressible: false,
        extensions: ["bdoc"]
      },
      "application/x-bittorrent": {
        source: "apache",
        extensions: ["torrent"]
      },
      "application/x-blorb": {
        source: "apache",
        extensions: ["blb", "blorb"]
      },
      "application/x-bzip": {
        source: "apache",
        compressible: false,
        extensions: ["bz"]
      },
      "application/x-bzip2": {
        source: "apache",
        compressible: false,
        extensions: ["bz2", "boz"]
      },
      "application/x-cbr": {
        source: "apache",
        extensions: ["cbr", "cba", "cbt", "cbz", "cb7"]
      },
      "application/x-cdlink": {
        source: "apache",
        extensions: ["vcd"]
      },
      "application/x-cfs-compressed": {
        source: "apache",
        extensions: ["cfs"]
      },
      "application/x-chat": {
        source: "apache",
        extensions: ["chat"]
      },
      "application/x-chess-pgn": {
        source: "apache",
        extensions: ["pgn"]
      },
      "application/x-chrome-extension": {
        extensions: ["crx"]
      },
      "application/x-cocoa": {
        source: "nginx",
        extensions: ["cco"]
      },
      "application/x-compress": {
        source: "apache"
      },
      "application/x-conference": {
        source: "apache",
        extensions: ["nsc"]
      },
      "application/x-cpio": {
        source: "apache",
        extensions: ["cpio"]
      },
      "application/x-csh": {
        source: "apache",
        extensions: ["csh"]
      },
      "application/x-deb": {
        compressible: false
      },
      "application/x-debian-package": {
        source: "apache",
        extensions: ["deb", "udeb"]
      },
      "application/x-dgc-compressed": {
        source: "apache",
        extensions: ["dgc"]
      },
      "application/x-director": {
        source: "apache",
        extensions: ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"]
      },
      "application/x-doom": {
        source: "apache",
        extensions: ["wad"]
      },
      "application/x-dtbncx+xml": {
        source: "apache",
        extensions: ["ncx"]
      },
      "application/x-dtbook+xml": {
        source: "apache",
        extensions: ["dtb"]
      },
      "application/x-dtbresource+xml": {
        source: "apache",
        extensions: ["res"]
      },
      "application/x-dvi": {
        source: "apache",
        compressible: false,
        extensions: ["dvi"]
      },
      "application/x-envoy": {
        source: "apache",
        extensions: ["evy"]
      },
      "application/x-eva": {
        source: "apache",
        extensions: ["eva"]
      },
      "application/x-font-bdf": {
        source: "apache",
        extensions: ["bdf"]
      },
      "application/x-font-dos": {
        source: "apache"
      },
      "application/x-font-framemaker": {
        source: "apache"
      },
      "application/x-font-ghostscript": {
        source: "apache",
        extensions: ["gsf"]
      },
      "application/x-font-libgrx": {
        source: "apache"
      },
      "application/x-font-linux-psf": {
        source: "apache",
        extensions: ["psf"]
      },
      "application/x-font-otf": {
        source: "apache",
        compressible: true,
        extensions: ["otf"]
      },
      "application/x-font-pcf": {
        source: "apache",
        extensions: ["pcf"]
      },
      "application/x-font-snf": {
        source: "apache",
        extensions: ["snf"]
      },
      "application/x-font-speedo": {
        source: "apache"
      },
      "application/x-font-sunos-news": {
        source: "apache"
      },
      "application/x-font-ttf": {
        source: "apache",
        compressible: true,
        extensions: ["ttf", "ttc"]
      },
      "application/x-font-type1": {
        source: "apache",
        extensions: ["pfa", "pfb", "pfm", "afm"]
      },
      "application/x-font-vfont": {
        source: "apache"
      },
      "application/x-freearc": {
        source: "apache",
        extensions: ["arc"]
      },
      "application/x-futuresplash": {
        source: "apache",
        extensions: ["spl"]
      },
      "application/x-gca-compressed": {
        source: "apache",
        extensions: ["gca"]
      },
      "application/x-glulx": {
        source: "apache",
        extensions: ["ulx"]
      },
      "application/x-gnumeric": {
        source: "apache",
        extensions: ["gnumeric"]
      },
      "application/x-gramps-xml": {
        source: "apache",
        extensions: ["gramps"]
      },
      "application/x-gtar": {
        source: "apache",
        extensions: ["gtar"]
      },
      "application/x-gzip": {
        source: "apache"
      },
      "application/x-hdf": {
        source: "apache",
        extensions: ["hdf"]
      },
      "application/x-httpd-php": {
        compressible: true,
        extensions: ["php"]
      },
      "application/x-install-instructions": {
        source: "apache",
        extensions: ["install"]
      },
      "application/x-iso9660-image": {
        source: "apache",
        extensions: ["iso"]
      },
      "application/x-java-archive-diff": {
        source: "nginx",
        extensions: ["jardiff"]
      },
      "application/x-java-jnlp-file": {
        source: "apache",
        compressible: false,
        extensions: ["jnlp"]
      },
      "application/x-javascript": {
        compressible: true
      },
      "application/x-latex": {
        source: "apache",
        compressible: false,
        extensions: ["latex"]
      },
      "application/x-lua-bytecode": {
        extensions: ["luac"]
      },
      "application/x-lzh-compressed": {
        source: "apache",
        extensions: ["lzh", "lha"]
      },
      "application/x-makeself": {
        source: "nginx",
        extensions: ["run"]
      },
      "application/x-mie": {
        source: "apache",
        extensions: ["mie"]
      },
      "application/x-mobipocket-ebook": {
        source: "apache",
        extensions: ["prc", "mobi"]
      },
      "application/x-mpegurl": {
        compressible: false
      },
      "application/x-ms-application": {
        source: "apache",
        extensions: ["application"]
      },
      "application/x-ms-shortcut": {
        source: "apache",
        extensions: ["lnk"]
      },
      "application/x-ms-wmd": {
        source: "apache",
        extensions: ["wmd"]
      },
      "application/x-ms-wmz": {
        source: "apache",
        extensions: ["wmz"]
      },
      "application/x-ms-xbap": {
        source: "apache",
        extensions: ["xbap"]
      },
      "application/x-msaccess": {
        source: "apache",
        extensions: ["mdb"]
      },
      "application/x-msbinder": {
        source: "apache",
        extensions: ["obd"]
      },
      "application/x-mscardfile": {
        source: "apache",
        extensions: ["crd"]
      },
      "application/x-msclip": {
        source: "apache",
        extensions: ["clp"]
      },
      "application/x-msdos-program": {
        extensions: ["exe"]
      },
      "application/x-msdownload": {
        source: "apache",
        extensions: ["exe", "dll", "com", "bat", "msi"]
      },
      "application/x-msmediaview": {
        source: "apache",
        extensions: ["mvb", "m13", "m14"]
      },
      "application/x-msmetafile": {
        source: "apache",
        extensions: ["wmf", "wmz", "emf", "emz"]
      },
      "application/x-msmoney": {
        source: "apache",
        extensions: ["mny"]
      },
      "application/x-mspublisher": {
        source: "apache",
        extensions: ["pub"]
      },
      "application/x-msschedule": {
        source: "apache",
        extensions: ["scd"]
      },
      "application/x-msterminal": {
        source: "apache",
        extensions: ["trm"]
      },
      "application/x-mswrite": {
        source: "apache",
        extensions: ["wri"]
      },
      "application/x-netcdf": {
        source: "apache",
        extensions: ["nc", "cdf"]
      },
      "application/x-ns-proxy-autoconfig": {
        compressible: true,
        extensions: ["pac"]
      },
      "application/x-nzb": {
        source: "apache",
        extensions: ["nzb"]
      },
      "application/x-perl": {
        source: "nginx",
        extensions: ["pl", "pm"]
      },
      "application/x-pilot": {
        source: "nginx",
        extensions: ["prc", "pdb"]
      },
      "application/x-pkcs12": {
        source: "apache",
        compressible: false,
        extensions: ["p12", "pfx"]
      },
      "application/x-pkcs7-certificates": {
        source: "apache",
        extensions: ["p7b", "spc"]
      },
      "application/x-pkcs7-certreqresp": {
        source: "apache",
        extensions: ["p7r"]
      },
      "application/x-rar-compressed": {
        source: "apache",
        compressible: false,
        extensions: ["rar"]
      },
      "application/x-redhat-package-manager": {
        source: "nginx",
        extensions: ["rpm"]
      },
      "application/x-research-info-systems": {
        source: "apache",
        extensions: ["ris"]
      },
      "application/x-sea": {
        source: "nginx",
        extensions: ["sea"]
      },
      "application/x-sh": {
        source: "apache",
        compressible: true,
        extensions: ["sh"]
      },
      "application/x-shar": {
        source: "apache",
        extensions: ["shar"]
      },
      "application/x-shockwave-flash": {
        source: "apache",
        compressible: false,
        extensions: ["swf"]
      },
      "application/x-silverlight-app": {
        source: "apache",
        extensions: ["xap"]
      },
      "application/x-sql": {
        source: "apache",
        extensions: ["sql"]
      },
      "application/x-stuffit": {
        source: "apache",
        compressible: false,
        extensions: ["sit"]
      },
      "application/x-stuffitx": {
        source: "apache",
        extensions: ["sitx"]
      },
      "application/x-subrip": {
        source: "apache",
        extensions: ["srt"]
      },
      "application/x-sv4cpio": {
        source: "apache",
        extensions: ["sv4cpio"]
      },
      "application/x-sv4crc": {
        source: "apache",
        extensions: ["sv4crc"]
      },
      "application/x-t3vm-image": {
        source: "apache",
        extensions: ["t3"]
      },
      "application/x-tads": {
        source: "apache",
        extensions: ["gam"]
      },
      "application/x-tar": {
        source: "apache",
        compressible: true,
        extensions: ["tar"]
      },
      "application/x-tcl": {
        source: "apache",
        extensions: ["tcl", "tk"]
      },
      "application/x-tex": {
        source: "apache",
        extensions: ["tex"]
      },
      "application/x-tex-tfm": {
        source: "apache",
        extensions: ["tfm"]
      },
      "application/x-texinfo": {
        source: "apache",
        extensions: ["texinfo", "texi"]
      },
      "application/x-tgif": {
        source: "apache",
        extensions: ["obj"]
      },
      "application/x-ustar": {
        source: "apache",
        extensions: ["ustar"]
      },
      "application/x-wais-source": {
        source: "apache",
        extensions: ["src"]
      },
      "application/x-web-app-manifest+json": {
        compressible: true,
        extensions: ["webapp"]
      },
      "application/x-www-form-urlencoded": {
        source: "iana",
        compressible: true
      },
      "application/x-x509-ca-cert": {
        source: "apache",
        extensions: ["der", "crt", "pem"]
      },
      "application/x-xfig": {
        source: "apache",
        extensions: ["fig"]
      },
      "application/x-xliff+xml": {
        source: "apache",
        extensions: ["xlf"]
      },
      "application/x-xpinstall": {
        source: "apache",
        compressible: false,
        extensions: ["xpi"]
      },
      "application/x-xz": {
        source: "apache",
        extensions: ["xz"]
      },
      "application/x-zmachine": {
        source: "apache",
        extensions: ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"]
      },
      "application/x400-bp": {
        source: "iana"
      },
      "application/xacml+xml": {
        source: "iana"
      },
      "application/xaml+xml": {
        source: "apache",
        extensions: ["xaml"]
      },
      "application/xcap-att+xml": {
        source: "iana"
      },
      "application/xcap-caps+xml": {
        source: "iana"
      },
      "application/xcap-diff+xml": {
        source: "iana",
        extensions: ["xdf"]
      },
      "application/xcap-el+xml": {
        source: "iana"
      },
      "application/xcap-error+xml": {
        source: "iana"
      },
      "application/xcap-ns+xml": {
        source: "iana"
      },
      "application/xcon-conference-info+xml": {
        source: "iana"
      },
      "application/xcon-conference-info-diff+xml": {
        source: "iana"
      },
      "application/xenc+xml": {
        source: "iana",
        extensions: ["xenc"]
      },
      "application/xhtml+xml": {
        source: "iana",
        compressible: true,
        extensions: ["xhtml", "xht"]
      },
      "application/xhtml-voice+xml": {
        source: "apache"
      },
      "application/xml": {
        source: "iana",
        compressible: true,
        extensions: ["xml", "xsl", "xsd", "rng"]
      },
      "application/xml-dtd": {
        source: "iana",
        compressible: true,
        extensions: ["dtd"]
      },
      "application/xml-external-parsed-entity": {
        source: "iana"
      },
      "application/xml-patch+xml": {
        source: "iana"
      },
      "application/xmpp+xml": {
        source: "iana"
      },
      "application/xop+xml": {
        source: "iana",
        compressible: true,
        extensions: ["xop"]
      },
      "application/xproc+xml": {
        source: "apache",
        extensions: ["xpl"]
      },
      "application/xslt+xml": {
        source: "iana",
        extensions: ["xslt"]
      },
      "application/xspf+xml": {
        source: "apache",
        extensions: ["xspf"]
      },
      "application/xv+xml": {
        source: "iana",
        extensions: ["mxml", "xhvml", "xvml", "xvm"]
      },
      "application/yang": {
        source: "iana",
        extensions: ["yang"]
      },
      "application/yang-data+json": {
        source: "iana",
        compressible: true
      },
      "application/yang-data+xml": {
        source: "iana"
      },
      "application/yin+xml": {
        source: "iana",
        extensions: ["yin"]
      },
      "application/zip": {
        source: "iana",
        compressible: false,
        extensions: ["zip"]
      },
      "application/zlib": {
        source: "iana"
      },
      "audio/1d-interleaved-parityfec": {
        source: "iana"
      },
      "audio/32kadpcm": {
        source: "iana"
      },
      "audio/3gpp": {
        source: "iana",
        compressible: false,
        extensions: ["3gpp"]
      },
      "audio/3gpp2": {
        source: "iana"
      },
      "audio/ac3": {
        source: "iana"
      },
      "audio/adpcm": {
        source: "apache",
        extensions: ["adp"]
      },
      "audio/amr": {
        source: "iana"
      },
      "audio/amr-wb": {
        source: "iana"
      },
      "audio/amr-wb+": {
        source: "iana"
      },
      "audio/aptx": {
        source: "iana"
      },
      "audio/asc": {
        source: "iana"
      },
      "audio/atrac-advanced-lossless": {
        source: "iana"
      },
      "audio/atrac-x": {
        source: "iana"
      },
      "audio/atrac3": {
        source: "iana"
      },
      "audio/basic": {
        source: "iana",
        compressible: false,
        extensions: ["au", "snd"]
      },
      "audio/bv16": {
        source: "iana"
      },
      "audio/bv32": {
        source: "iana"
      },
      "audio/clearmode": {
        source: "iana"
      },
      "audio/cn": {
        source: "iana"
      },
      "audio/dat12": {
        source: "iana"
      },
      "audio/dls": {
        source: "iana"
      },
      "audio/dsr-es201108": {
        source: "iana"
      },
      "audio/dsr-es202050": {
        source: "iana"
      },
      "audio/dsr-es202211": {
        source: "iana"
      },
      "audio/dsr-es202212": {
        source: "iana"
      },
      "audio/dv": {
        source: "iana"
      },
      "audio/dvi4": {
        source: "iana"
      },
      "audio/eac3": {
        source: "iana"
      },
      "audio/encaprtp": {
        source: "iana"
      },
      "audio/evrc": {
        source: "iana"
      },
      "audio/evrc-qcp": {
        source: "iana"
      },
      "audio/evrc0": {
        source: "iana"
      },
      "audio/evrc1": {
        source: "iana"
      },
      "audio/evrcb": {
        source: "iana"
      },
      "audio/evrcb0": {
        source: "iana"
      },
      "audio/evrcb1": {
        source: "iana"
      },
      "audio/evrcnw": {
        source: "iana"
      },
      "audio/evrcnw0": {
        source: "iana"
      },
      "audio/evrcnw1": {
        source: "iana"
      },
      "audio/evrcwb": {
        source: "iana"
      },
      "audio/evrcwb0": {
        source: "iana"
      },
      "audio/evrcwb1": {
        source: "iana"
      },
      "audio/evs": {
        source: "iana"
      },
      "audio/fwdred": {
        source: "iana"
      },
      "audio/g711-0": {
        source: "iana"
      },
      "audio/g719": {
        source: "iana"
      },
      "audio/g722": {
        source: "iana"
      },
      "audio/g7221": {
        source: "iana"
      },
      "audio/g723": {
        source: "iana"
      },
      "audio/g726-16": {
        source: "iana"
      },
      "audio/g726-24": {
        source: "iana"
      },
      "audio/g726-32": {
        source: "iana"
      },
      "audio/g726-40": {
        source: "iana"
      },
      "audio/g728": {
        source: "iana"
      },
      "audio/g729": {
        source: "iana"
      },
      "audio/g7291": {
        source: "iana"
      },
      "audio/g729d": {
        source: "iana"
      },
      "audio/g729e": {
        source: "iana"
      },
      "audio/gsm": {
        source: "iana"
      },
      "audio/gsm-efr": {
        source: "iana"
      },
      "audio/gsm-hr-08": {
        source: "iana"
      },
      "audio/ilbc": {
        source: "iana"
      },
      "audio/ip-mr_v2.5": {
        source: "iana"
      },
      "audio/isac": {
        source: "apache"
      },
      "audio/l16": {
        source: "iana"
      },
      "audio/l20": {
        source: "iana"
      },
      "audio/l24": {
        source: "iana",
        compressible: false
      },
      "audio/l8": {
        source: "iana"
      },
      "audio/lpc": {
        source: "iana"
      },
      "audio/midi": {
        source: "apache",
        extensions: ["mid", "midi", "kar", "rmi"]
      },
      "audio/mobile-xmf": {
        source: "iana"
      },
      "audio/mp3": {
        compressible: false,
        extensions: ["mp3"]
      },
      "audio/mp4": {
        source: "iana",
        compressible: false,
        extensions: ["m4a", "mp4a"]
      },
      "audio/mp4a-latm": {
        source: "iana"
      },
      "audio/mpa": {
        source: "iana"
      },
      "audio/mpa-robust": {
        source: "iana"
      },
      "audio/mpeg": {
        source: "iana",
        compressible: false,
        extensions: ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"]
      },
      "audio/mpeg4-generic": {
        source: "iana"
      },
      "audio/musepack": {
        source: "apache"
      },
      "audio/ogg": {
        source: "iana",
        compressible: false,
        extensions: ["oga", "ogg", "spx"]
      },
      "audio/opus": {
        source: "iana"
      },
      "audio/parityfec": {
        source: "iana"
      },
      "audio/pcma": {
        source: "iana"
      },
      "audio/pcma-wb": {
        source: "iana"
      },
      "audio/pcmu": {
        source: "iana"
      },
      "audio/pcmu-wb": {
        source: "iana"
      },
      "audio/prs.sid": {
        source: "iana"
      },
      "audio/qcelp": {
        source: "iana"
      },
      "audio/raptorfec": {
        source: "iana"
      },
      "audio/red": {
        source: "iana"
      },
      "audio/rtp-enc-aescm128": {
        source: "iana"
      },
      "audio/rtp-midi": {
        source: "iana"
      },
      "audio/rtploopback": {
        source: "iana"
      },
      "audio/rtx": {
        source: "iana"
      },
      "audio/s3m": {
        source: "apache",
        extensions: ["s3m"]
      },
      "audio/silk": {
        source: "apache",
        extensions: ["sil"]
      },
      "audio/smv": {
        source: "iana"
      },
      "audio/smv-qcp": {
        source: "iana"
      },
      "audio/smv0": {
        source: "iana"
      },
      "audio/sp-midi": {
        source: "iana"
      },
      "audio/speex": {
        source: "iana"
      },
      "audio/t140c": {
        source: "iana"
      },
      "audio/t38": {
        source: "iana"
      },
      "audio/telephone-event": {
        source: "iana"
      },
      "audio/tone": {
        source: "iana"
      },
      "audio/uemclip": {
        source: "iana"
      },
      "audio/ulpfec": {
        source: "iana"
      },
      "audio/vdvi": {
        source: "iana"
      },
      "audio/vmr-wb": {
        source: "iana"
      },
      "audio/vnd.3gpp.iufp": {
        source: "iana"
      },
      "audio/vnd.4sb": {
        source: "iana"
      },
      "audio/vnd.audiokoz": {
        source: "iana"
      },
      "audio/vnd.celp": {
        source: "iana"
      },
      "audio/vnd.cisco.nse": {
        source: "iana"
      },
      "audio/vnd.cmles.radio-events": {
        source: "iana"
      },
      "audio/vnd.cns.anp1": {
        source: "iana"
      },
      "audio/vnd.cns.inf1": {
        source: "iana"
      },
      "audio/vnd.dece.audio": {
        source: "iana",
        extensions: ["uva", "uvva"]
      },
      "audio/vnd.digital-winds": {
        source: "iana",
        extensions: ["eol"]
      },
      "audio/vnd.dlna.adts": {
        source: "iana"
      },
      "audio/vnd.dolby.heaac.1": {
        source: "iana"
      },
      "audio/vnd.dolby.heaac.2": {
        source: "iana"
      },
      "audio/vnd.dolby.mlp": {
        source: "iana"
      },
      "audio/vnd.dolby.mps": {
        source: "iana"
      },
      "audio/vnd.dolby.pl2": {
        source: "iana"
      },
      "audio/vnd.dolby.pl2x": {
        source: "iana"
      },
      "audio/vnd.dolby.pl2z": {
        source: "iana"
      },
      "audio/vnd.dolby.pulse.1": {
        source: "iana"
      },
      "audio/vnd.dra": {
        source: "iana",
        extensions: ["dra"]
      },
      "audio/vnd.dts": {
        source: "iana",
        extensions: ["dts"]
      },
      "audio/vnd.dts.hd": {
        source: "iana",
        extensions: ["dtshd"]
      },
      "audio/vnd.dvb.file": {
        source: "iana"
      },
      "audio/vnd.everad.plj": {
        source: "iana"
      },
      "audio/vnd.hns.audio": {
        source: "iana"
      },
      "audio/vnd.lucent.voice": {
        source: "iana",
        extensions: ["lvp"]
      },
      "audio/vnd.ms-playready.media.pya": {
        source: "iana",
        extensions: ["pya"]
      },
      "audio/vnd.nokia.mobile-xmf": {
        source: "iana"
      },
      "audio/vnd.nortel.vbk": {
        source: "iana"
      },
      "audio/vnd.nuera.ecelp4800": {
        source: "iana",
        extensions: ["ecelp4800"]
      },
      "audio/vnd.nuera.ecelp7470": {
        source: "iana",
        extensions: ["ecelp7470"]
      },
      "audio/vnd.nuera.ecelp9600": {
        source: "iana",
        extensions: ["ecelp9600"]
      },
      "audio/vnd.octel.sbc": {
        source: "iana"
      },
      "audio/vnd.qcelp": {
        source: "iana"
      },
      "audio/vnd.rhetorex.32kadpcm": {
        source: "iana"
      },
      "audio/vnd.rip": {
        source: "iana",
        extensions: ["rip"]
      },
      "audio/vnd.rn-realaudio": {
        compressible: false
      },
      "audio/vnd.sealedmedia.softseal.mpeg": {
        source: "iana"
      },
      "audio/vnd.vmx.cvsd": {
        source: "iana"
      },
      "audio/vnd.wave": {
        compressible: false
      },
      "audio/vorbis": {
        source: "iana",
        compressible: false
      },
      "audio/vorbis-config": {
        source: "iana"
      },
      "audio/wav": {
        compressible: false,
        extensions: ["wav"]
      },
      "audio/wave": {
        compressible: false,
        extensions: ["wav"]
      },
      "audio/webm": {
        source: "apache",
        compressible: false,
        extensions: ["weba"]
      },
      "audio/x-aac": {
        source: "apache",
        compressible: false,
        extensions: ["aac"]
      },
      "audio/x-aiff": {
        source: "apache",
        extensions: ["aif", "aiff", "aifc"]
      },
      "audio/x-caf": {
        source: "apache",
        compressible: false,
        extensions: ["caf"]
      },
      "audio/x-flac": {
        source: "apache",
        extensions: ["flac"]
      },
      "audio/x-m4a": {
        source: "nginx",
        extensions: ["m4a"]
      },
      "audio/x-matroska": {
        source: "apache",
        extensions: ["mka"]
      },
      "audio/x-mpegurl": {
        source: "apache",
        extensions: ["m3u"]
      },
      "audio/x-ms-wax": {
        source: "apache",
        extensions: ["wax"]
      },
      "audio/x-ms-wma": {
        source: "apache",
        extensions: ["wma"]
      },
      "audio/x-pn-realaudio": {
        source: "apache",
        extensions: ["ram", "ra"]
      },
      "audio/x-pn-realaudio-plugin": {
        source: "apache",
        extensions: ["rmp"]
      },
      "audio/x-realaudio": {
        source: "nginx",
        extensions: ["ra"]
      },
      "audio/x-tta": {
        source: "apache"
      },
      "audio/x-wav": {
        source: "apache",
        extensions: ["wav"]
      },
      "audio/xm": {
        source: "apache",
        extensions: ["xm"]
      },
      "chemical/x-cdx": {
        source: "apache",
        extensions: ["cdx"]
      },
      "chemical/x-cif": {
        source: "apache",
        extensions: ["cif"]
      },
      "chemical/x-cmdf": {
        source: "apache",
        extensions: ["cmdf"]
      },
      "chemical/x-cml": {
        source: "apache",
        extensions: ["cml"]
      },
      "chemical/x-csml": {
        source: "apache",
        extensions: ["csml"]
      },
      "chemical/x-pdb": {
        source: "apache"
      },
      "chemical/x-xyz": {
        source: "apache",
        extensions: ["xyz"]
      },
      "font/opentype": {
        compressible: true,
        extensions: ["otf"]
      },
      "image/bmp": {
        source: "iana",
        compressible: true,
        extensions: ["bmp"]
      },
      "image/cgm": {
        source: "iana",
        extensions: ["cgm"]
      },
      "image/dicom-rle": {
        source: "iana"
      },
      "image/emf": {
        source: "iana"
      },
      "image/fits": {
        source: "iana"
      },
      "image/g3fax": {
        source: "iana",
        extensions: ["g3"]
      },
      "image/gif": {
        source: "iana",
        compressible: false,
        extensions: ["gif"]
      },
      "image/ief": {
        source: "iana",
        extensions: ["ief"]
      },
      "image/jls": {
        source: "iana"
      },
      "image/jp2": {
        source: "iana"
      },
      "image/jpeg": {
        source: "iana",
        compressible: false,
        extensions: ["jpeg", "jpg", "jpe"]
      },
      "image/jpm": {
        source: "iana"
      },
      "image/jpx": {
        source: "iana"
      },
      "image/ktx": {
        source: "iana",
        extensions: ["ktx"]
      },
      "image/naplps": {
        source: "iana"
      },
      "image/pjpeg": {
        compressible: false
      },
      "image/png": {
        source: "iana",
        compressible: false,
        extensions: ["png"]
      },
      "image/prs.btif": {
        source: "iana",
        extensions: ["btif"]
      },
      "image/prs.pti": {
        source: "iana"
      },
      "image/pwg-raster": {
        source: "iana"
      },
      "image/sgi": {
        source: "apache",
        extensions: ["sgi"]
      },
      "image/svg+xml": {
        source: "iana",
        compressible: true,
        extensions: ["svg", "svgz"]
      },
      "image/t38": {
        source: "iana"
      },
      "image/tiff": {
        source: "iana",
        compressible: false,
        extensions: ["tiff", "tif"]
      },
      "image/tiff-fx": {
        source: "iana"
      },
      "image/vnd.adobe.photoshop": {
        source: "iana",
        compressible: true,
        extensions: ["psd"]
      },
      "image/vnd.airzip.accelerator.azv": {
        source: "iana"
      },
      "image/vnd.cns.inf2": {
        source: "iana"
      },
      "image/vnd.dece.graphic": {
        source: "iana",
        extensions: ["uvi", "uvvi", "uvg", "uvvg"]
      },
      "image/vnd.djvu": {
        source: "iana",
        extensions: ["djvu", "djv"]
      },
      "image/vnd.dvb.subtitle": {
        source: "iana",
        extensions: ["sub"]
      },
      "image/vnd.dwg": {
        source: "iana",
        extensions: ["dwg"]
      },
      "image/vnd.dxf": {
        source: "iana",
        extensions: ["dxf"]
      },
      "image/vnd.fastbidsheet": {
        source: "iana",
        extensions: ["fbs"]
      },
      "image/vnd.fpx": {
        source: "iana",
        extensions: ["fpx"]
      },
      "image/vnd.fst": {
        source: "iana",
        extensions: ["fst"]
      },
      "image/vnd.fujixerox.edmics-mmr": {
        source: "iana",
        extensions: ["mmr"]
      },
      "image/vnd.fujixerox.edmics-rlc": {
        source: "iana",
        extensions: ["rlc"]
      },
      "image/vnd.globalgraphics.pgb": {
        source: "iana"
      },
      "image/vnd.microsoft.icon": {
        source: "iana"
      },
      "image/vnd.mix": {
        source: "iana"
      },
      "image/vnd.mozilla.apng": {
        source: "iana"
      },
      "image/vnd.ms-modi": {
        source: "iana",
        extensions: ["mdi"]
      },
      "image/vnd.ms-photo": {
        source: "apache",
        extensions: ["wdp"]
      },
      "image/vnd.net-fpx": {
        source: "iana",
        extensions: ["npx"]
      },
      "image/vnd.radiance": {
        source: "iana"
      },
      "image/vnd.sealed.png": {
        source: "iana"
      },
      "image/vnd.sealedmedia.softseal.gif": {
        source: "iana"
      },
      "image/vnd.sealedmedia.softseal.jpg": {
        source: "iana"
      },
      "image/vnd.svf": {
        source: "iana"
      },
      "image/vnd.tencent.tap": {
        source: "iana"
      },
      "image/vnd.valve.source.texture": {
        source: "iana"
      },
      "image/vnd.wap.wbmp": {
        source: "iana",
        extensions: ["wbmp"]
      },
      "image/vnd.xiff": {
        source: "iana",
        extensions: ["xif"]
      },
      "image/vnd.zbrush.pcx": {
        source: "iana"
      },
      "image/webp": {
        source: "apache",
        extensions: ["webp"]
      },
      "image/wmf": {
        source: "iana"
      },
      "image/x-3ds": {
        source: "apache",
        extensions: ["3ds"]
      },
      "image/x-cmu-raster": {
        source: "apache",
        extensions: ["ras"]
      },
      "image/x-cmx": {
        source: "apache",
        extensions: ["cmx"]
      },
      "image/x-freehand": {
        source: "apache",
        extensions: ["fh", "fhc", "fh4", "fh5", "fh7"]
      },
      "image/x-icon": {
        source: "apache",
        compressible: true,
        extensions: ["ico"]
      },
      "image/x-jng": {
        source: "nginx",
        extensions: ["jng"]
      },
      "image/x-mrsid-image": {
        source: "apache",
        extensions: ["sid"]
      },
      "image/x-ms-bmp": {
        source: "nginx",
        compressible: true,
        extensions: ["bmp"]
      },
      "image/x-pcx": {
        source: "apache",
        extensions: ["pcx"]
      },
      "image/x-pict": {
        source: "apache",
        extensions: ["pic", "pct"]
      },
      "image/x-portable-anymap": {
        source: "apache",
        extensions: ["pnm"]
      },
      "image/x-portable-bitmap": {
        source: "apache",
        extensions: ["pbm"]
      },
      "image/x-portable-graymap": {
        source: "apache",
        extensions: ["pgm"]
      },
      "image/x-portable-pixmap": {
        source: "apache",
        extensions: ["ppm"]
      },
      "image/x-rgb": {
        source: "apache",
        extensions: ["rgb"]
      },
      "image/x-tga": {
        source: "apache",
        extensions: ["tga"]
      },
      "image/x-xbitmap": {
        source: "apache",
        extensions: ["xbm"]
      },
      "image/x-xcf": {
        compressible: false
      },
      "image/x-xpixmap": {
        source: "apache",
        extensions: ["xpm"]
      },
      "image/x-xwindowdump": {
        source: "apache",
        extensions: ["xwd"]
      },
      "message/cpim": {
        source: "iana"
      },
      "message/delivery-status": {
        source: "iana"
      },
      "message/disposition-notification": {
        source: "iana"
      },
      "message/external-body": {
        source: "iana"
      },
      "message/feedback-report": {
        source: "iana"
      },
      "message/global": {
        source: "iana"
      },
      "message/global-delivery-status": {
        source: "iana"
      },
      "message/global-disposition-notification": {
        source: "iana"
      },
      "message/global-headers": {
        source: "iana"
      },
      "message/http": {
        source: "iana",
        compressible: false
      },
      "message/imdn+xml": {
        source: "iana",
        compressible: true
      },
      "message/news": {
        source: "iana"
      },
      "message/partial": {
        source: "iana",
        compressible: false
      },
      "message/rfc822": {
        source: "iana",
        compressible: true,
        extensions: ["eml", "mime"]
      },
      "message/s-http": {
        source: "iana"
      },
      "message/sip": {
        source: "iana"
      },
      "message/sipfrag": {
        source: "iana"
      },
      "message/tracking-status": {
        source: "iana"
      },
      "message/vnd.si.simp": {
        source: "iana"
      },
      "message/vnd.wfa.wsc": {
        source: "iana"
      },
      "model/gltf+json": {
        source: "iana",
        compressible: true
      },
      "model/iges": {
        source: "iana",
        compressible: false,
        extensions: ["igs", "iges"]
      },
      "model/mesh": {
        source: "iana",
        compressible: false,
        extensions: ["msh", "mesh", "silo"]
      },
      "model/vnd.collada+xml": {
        source: "iana",
        extensions: ["dae"]
      },
      "model/vnd.dwf": {
        source: "iana",
        extensions: ["dwf"]
      },
      "model/vnd.flatland.3dml": {
        source: "iana"
      },
      "model/vnd.gdl": {
        source: "iana",
        extensions: ["gdl"]
      },
      "model/vnd.gs-gdl": {
        source: "apache"
      },
      "model/vnd.gs.gdl": {
        source: "iana"
      },
      "model/vnd.gtw": {
        source: "iana",
        extensions: ["gtw"]
      },
      "model/vnd.moml+xml": {
        source: "iana"
      },
      "model/vnd.mts": {
        source: "iana",
        extensions: ["mts"]
      },
      "model/vnd.opengex": {
        source: "iana"
      },
      "model/vnd.parasolid.transmit.binary": {
        source: "iana"
      },
      "model/vnd.parasolid.transmit.text": {
        source: "iana"
      },
      "model/vnd.rosette.annotated-data-model": {
        source: "iana"
      },
      "model/vnd.valve.source.compiled-map": {
        source: "iana"
      },
      "model/vnd.vtu": {
        source: "iana",
        extensions: ["vtu"]
      },
      "model/vrml": {
        source: "iana",
        compressible: false,
        extensions: ["wrl", "vrml"]
      },
      "model/x3d+binary": {
        source: "apache",
        compressible: false,
        extensions: ["x3db", "x3dbz"]
      },
      "model/x3d+fastinfoset": {
        source: "iana"
      },
      "model/x3d+vrml": {
        source: "apache",
        compressible: false,
        extensions: ["x3dv", "x3dvz"]
      },
      "model/x3d+xml": {
        source: "iana",
        compressible: true,
        extensions: ["x3d", "x3dz"]
      },
      "model/x3d-vrml": {
        source: "iana"
      },
      "multipart/alternative": {
        source: "iana",
        compressible: false
      },
      "multipart/appledouble": {
        source: "iana"
      },
      "multipart/byteranges": {
        source: "iana"
      },
      "multipart/digest": {
        source: "iana"
      },
      "multipart/encrypted": {
        source: "iana",
        compressible: false
      },
      "multipart/form-data": {
        source: "iana",
        compressible: false
      },
      "multipart/header-set": {
        source: "iana"
      },
      "multipart/mixed": {
        source: "iana",
        compressible: false
      },
      "multipart/parallel": {
        source: "iana"
      },
      "multipart/related": {
        source: "iana",
        compressible: false
      },
      "multipart/report": {
        source: "iana"
      },
      "multipart/signed": {
        source: "iana",
        compressible: false
      },
      "multipart/voice-message": {
        source: "iana"
      },
      "multipart/x-mixed-replace": {
        source: "iana"
      },
      "text/1d-interleaved-parityfec": {
        source: "iana"
      },
      "text/cache-manifest": {
        source: "iana",
        compressible: true,
        extensions: ["appcache", "manifest"]
      },
      "text/calendar": {
        source: "iana",
        extensions: ["ics", "ifb"]
      },
      "text/calender": {
        compressible: true
      },
      "text/cmd": {
        compressible: true
      },
      "text/coffeescript": {
        extensions: ["coffee", "litcoffee"]
      },
      "text/css": {
        source: "iana",
        compressible: true,
        extensions: ["css"]
      },
      "text/csv": {
        source: "iana",
        compressible: true,
        extensions: ["csv"]
      },
      "text/csv-schema": {
        source: "iana"
      },
      "text/directory": {
        source: "iana"
      },
      "text/dns": {
        source: "iana"
      },
      "text/ecmascript": {
        source: "iana"
      },
      "text/encaprtp": {
        source: "iana"
      },
      "text/enriched": {
        source: "iana"
      },
      "text/fwdred": {
        source: "iana"
      },
      "text/grammar-ref-list": {
        source: "iana"
      },
      "text/hjson": {
        extensions: ["hjson"]
      },
      "text/html": {
        source: "iana",
        compressible: true,
        extensions: ["html", "htm", "shtml"]
      },
      "text/jade": {
        extensions: ["jade"]
      },
      "text/javascript": {
        source: "iana",
        compressible: true
      },
      "text/jcr-cnd": {
        source: "iana"
      },
      "text/jsx": {
        compressible: true,
        extensions: ["jsx"]
      },
      "text/less": {
        extensions: ["less"]
      },
      "text/markdown": {
        source: "iana"
      },
      "text/mathml": {
        source: "nginx",
        extensions: ["mml"]
      },
      "text/mizar": {
        source: "iana"
      },
      "text/n3": {
        source: "iana",
        compressible: true,
        extensions: ["n3"]
      },
      "text/parameters": {
        source: "iana"
      },
      "text/parityfec": {
        source: "iana"
      },
      "text/plain": {
        source: "iana",
        compressible: true,
        extensions: ["txt", "text", "conf", "def", "list", "log", "in", "ini"]
      },
      "text/provenance-notation": {
        source: "iana"
      },
      "text/prs.fallenstein.rst": {
        source: "iana"
      },
      "text/prs.lines.tag": {
        source: "iana",
        extensions: ["dsc"]
      },
      "text/prs.prop.logic": {
        source: "iana"
      },
      "text/raptorfec": {
        source: "iana"
      },
      "text/red": {
        source: "iana"
      },
      "text/rfc822-headers": {
        source: "iana"
      },
      "text/richtext": {
        source: "iana",
        compressible: true,
        extensions: ["rtx"]
      },
      "text/rtf": {
        source: "iana",
        compressible: true,
        extensions: ["rtf"]
      },
      "text/rtp-enc-aescm128": {
        source: "iana"
      },
      "text/rtploopback": {
        source: "iana"
      },
      "text/rtx": {
        source: "iana"
      },
      "text/sgml": {
        source: "iana",
        extensions: ["sgml", "sgm"]
      },
      "text/slim": {
        extensions: ["slim", "slm"]
      },
      "text/stylus": {
        extensions: ["stylus", "styl"]
      },
      "text/t140": {
        source: "iana"
      },
      "text/tab-separated-values": {
        source: "iana",
        compressible: true,
        extensions: ["tsv"]
      },
      "text/troff": {
        source: "iana",
        extensions: ["t", "tr", "roff", "man", "me", "ms"]
      },
      "text/turtle": {
        source: "iana",
        extensions: ["ttl"]
      },
      "text/ulpfec": {
        source: "iana"
      },
      "text/uri-list": {
        source: "iana",
        compressible: true,
        extensions: ["uri", "uris", "urls"]
      },
      "text/vcard": {
        source: "iana",
        compressible: true,
        extensions: ["vcard"]
      },
      "text/vnd.a": {
        source: "iana"
      },
      "text/vnd.abc": {
        source: "iana"
      },
      "text/vnd.ascii-art": {
        source: "iana"
      },
      "text/vnd.curl": {
        source: "iana",
        extensions: ["curl"]
      },
      "text/vnd.curl.dcurl": {
        source: "apache",
        extensions: ["dcurl"]
      },
      "text/vnd.curl.mcurl": {
        source: "apache",
        extensions: ["mcurl"]
      },
      "text/vnd.curl.scurl": {
        source: "apache",
        extensions: ["scurl"]
      },
      "text/vnd.debian.copyright": {
        source: "iana"
      },
      "text/vnd.dmclientscript": {
        source: "iana"
      },
      "text/vnd.dvb.subtitle": {
        source: "iana",
        extensions: ["sub"]
      },
      "text/vnd.esmertec.theme-descriptor": {
        source: "iana"
      },
      "text/vnd.fly": {
        source: "iana",
        extensions: ["fly"]
      },
      "text/vnd.fmi.flexstor": {
        source: "iana",
        extensions: ["flx"]
      },
      "text/vnd.graphviz": {
        source: "iana",
        extensions: ["gv"]
      },
      "text/vnd.in3d.3dml": {
        source: "iana",
        extensions: ["3dml"]
      },
      "text/vnd.in3d.spot": {
        source: "iana",
        extensions: ["spot"]
      },
      "text/vnd.iptc.newsml": {
        source: "iana"
      },
      "text/vnd.iptc.nitf": {
        source: "iana"
      },
      "text/vnd.latex-z": {
        source: "iana"
      },
      "text/vnd.motorola.reflex": {
        source: "iana"
      },
      "text/vnd.ms-mediapackage": {
        source: "iana"
      },
      "text/vnd.net2phone.commcenter.command": {
        source: "iana"
      },
      "text/vnd.radisys.msml-basic-layout": {
        source: "iana"
      },
      "text/vnd.si.uricatalogue": {
        source: "iana"
      },
      "text/vnd.sun.j2me.app-descriptor": {
        source: "iana",
        extensions: ["jad"]
      },
      "text/vnd.trolltech.linguist": {
        source: "iana"
      },
      "text/vnd.wap.si": {
        source: "iana"
      },
      "text/vnd.wap.sl": {
        source: "iana"
      },
      "text/vnd.wap.wml": {
        source: "iana",
        extensions: ["wml"]
      },
      "text/vnd.wap.wmlscript": {
        source: "iana",
        extensions: ["wmls"]
      },
      "text/vtt": {
        charset: "UTF-8",
        compressible: true,
        extensions: ["vtt"]
      },
      "text/x-asm": {
        source: "apache",
        extensions: ["s", "asm"]
      },
      "text/x-c": {
        source: "apache",
        extensions: ["c", "cc", "cxx", "cpp", "h", "hh", "dic"]
      },
      "text/x-component": {
        source: "nginx",
        extensions: ["htc"]
      },
      "text/x-fortran": {
        source: "apache",
        extensions: ["f", "for", "f77", "f90"]
      },
      "text/x-gwt-rpc": {
        compressible: true
      },
      "text/x-handlebars-template": {
        extensions: ["hbs"]
      },
      "text/x-java-source": {
        source: "apache",
        extensions: ["java"]
      },
      "text/x-jquery-tmpl": {
        compressible: true
      },
      "text/x-lua": {
        extensions: ["lua"]
      },
      "text/x-markdown": {
        compressible: true,
        extensions: ["markdown", "md", "mkd"]
      },
      "text/x-nfo": {
        source: "apache",
        extensions: ["nfo"]
      },
      "text/x-opml": {
        source: "apache",
        extensions: ["opml"]
      },
      "text/x-pascal": {
        source: "apache",
        extensions: ["p", "pas"]
      },
      "text/x-processing": {
        compressible: true,
        extensions: ["pde"]
      },
      "text/x-sass": {
        extensions: ["sass"]
      },
      "text/x-scss": {
        extensions: ["scss"]
      },
      "text/x-setext": {
        source: "apache",
        extensions: ["etx"]
      },
      "text/x-sfv": {
        source: "apache",
        extensions: ["sfv"]
      },
      "text/x-suse-ymp": {
        compressible: true,
        extensions: ["ymp"]
      },
      "text/x-uuencode": {
        source: "apache",
        extensions: ["uu"]
      },
      "text/x-vcalendar": {
        source: "apache",
        extensions: ["vcs"]
      },
      "text/x-vcard": {
        source: "apache",
        extensions: ["vcf"]
      },
      "text/xml": {
        source: "iana",
        compressible: true,
        extensions: ["xml"]
      },
      "text/xml-external-parsed-entity": {
        source: "iana"
      },
      "text/yaml": {
        extensions: ["yaml", "yml"]
      },
      "video/1d-interleaved-parityfec": {
        source: "apache"
      },
      "video/3gpp": {
        source: "apache",
        extensions: ["3gp", "3gpp"]
      },
      "video/3gpp-tt": {
        source: "apache"
      },
      "video/3gpp2": {
        source: "apache",
        extensions: ["3g2"]
      },
      "video/bmpeg": {
        source: "apache"
      },
      "video/bt656": {
        source: "apache"
      },
      "video/celb": {
        source: "apache"
      },
      "video/dv": {
        source: "apache"
      },
      "video/encaprtp": {
        source: "apache"
      },
      "video/h261": {
        source: "apache",
        extensions: ["h261"]
      },
      "video/h263": {
        source: "apache",
        extensions: ["h263"]
      },
      "video/h263-1998": {
        source: "apache"
      },
      "video/h263-2000": {
        source: "apache"
      },
      "video/h264": {
        source: "apache",
        extensions: ["h264"]
      },
      "video/h264-rcdo": {
        source: "apache"
      },
      "video/h264-svc": {
        source: "apache"
      },
      "video/h265": {
        source: "apache"
      },
      "video/iso.segment": {
        source: "apache"
      },
      "video/jpeg": {
        source: "apache",
        extensions: ["jpgv"]
      },
      "video/jpeg2000": {
        source: "apache"
      },
      "video/jpm": {
        source: "apache",
        extensions: ["jpm", "jpgm"]
      },
      "video/mj2": {
        source: "apache",
        extensions: ["mj2", "mjp2"]
      },
      "video/mp1s": {
        source: "apache"
      },
      "video/mp2p": {
        source: "apache"
      },
      "video/mp2t": {
        source: "apache",
        extensions: ["ts"]
      },
      "video/mp4": {
        source: "apache",
        compressible: false,
        extensions: ["mp4", "mp4v", "mpg4"]
      },
      "video/mp4v-es": {
        source: "apache"
      },
      "video/mpeg": {
        source: "apache",
        compressible: false,
        extensions: ["mpeg", "mpg", "mpe", "m1v", "m2v"]
      },
      "video/mpeg4-generic": {
        source: "apache"
      },
      "video/mpv": {
        source: "apache"
      },
      "video/nv": {
        source: "apache"
      },
      "video/ogg": {
        source: "apache",
        compressible: false,
        extensions: ["ogv"]
      },
      "video/parityfec": {
        source: "apache"
      },
      "video/pointer": {
        source: "apache"
      },
      "video/quicktime": {
        source: "apache",
        compressible: false,
        extensions: ["qt", "mov"]
      },
      "video/raptorfec": {
        source: "apache"
      },
      "video/raw": {
        source: "apache"
      },
      "video/rtp-enc-aescm128": {
        source: "apache"
      },
      "video/rtploopback": {
        source: "apache"
      },
      "video/rtx": {
        source: "apache"
      },
      "video/smpte292m": {
        source: "apache"
      },
      "video/ulpfec": {
        source: "apache"
      },
      "video/vc1": {
        source: "apache"
      },
      "video/vnd.cctv": {
        source: "apache"
      },
      "video/vnd.dece.hd": {
        source: "apache",
        extensions: ["uvh", "uvvh"]
      },
      "video/vnd.dece.mobile": {
        source: "apache",
        extensions: ["uvm", "uvvm"]
      },
      "video/vnd.dece.mp4": {
        source: "apache"
      },
      "video/vnd.dece.pd": {
        source: "apache",
        extensions: ["uvp", "uvvp"]
      },
      "video/vnd.dece.sd": {
        source: "apache",
        extensions: ["uvs", "uvvs"]
      },
      "video/vnd.dece.video": {
        source: "apache",
        extensions: ["uvv", "uvvv"]
      },
      "video/vnd.directv.mpeg": {
        source: "apache"
      },
      "video/vnd.directv.mpeg-tts": {
        source: "apache"
      },
      "video/vnd.dlna.mpeg-tts": {
        source: "apache"
      },
      "video/vnd.dvb.file": {
        source: "apache",
        extensions: ["dvb"]
      },
      "video/vnd.fvt": {
        source: "apache",
        extensions: ["fvt"]
      },
      "video/vnd.hns.video": {
        source: "apache"
      },
      "video/vnd.iptvforum.1dparityfec-1010": {
        source: "apache"
      },
      "video/vnd.iptvforum.1dparityfec-2005": {
        source: "apache"
      },
      "video/vnd.iptvforum.2dparityfec-1010": {
        source: "apache"
      },
      "video/vnd.iptvforum.2dparityfec-2005": {
        source: "apache"
      },
      "video/vnd.iptvforum.ttsavc": {
        source: "apache"
      },
      "video/vnd.iptvforum.ttsmpeg2": {
        source: "apache"
      },
      "video/vnd.motorola.video": {
        source: "apache"
      },
      "video/vnd.motorola.videop": {
        source: "apache"
      },
      "video/vnd.mpegurl": {
        source: "apache",
        extensions: ["mxu", "m4u"]
      },
      "video/vnd.ms-playready.media.pyv": {
        source: "apache",
        extensions: ["pyv"]
      },
      "video/vnd.nokia.interleaved-multimedia": {
        source: "apache"
      },
      "video/vnd.nokia.videovoip": {
        source: "apache"
      },
      "video/vnd.objectvideo": {
        source: "apache"
      },
      "video/vnd.radgamettools.bink": {
        source: "apache"
      },
      "video/vnd.radgamettools.smacker": {
        source: "apache"
      },
      "video/vnd.sealed.mpeg1": {
        source: "apache"
      },
      "video/vnd.sealed.mpeg4": {
        source: "apache"
      },
      "video/vnd.sealed.swf": {
        source: "apache"
      },
      "video/vnd.sealedmedia.softseal.mov": {
        source: "apache"
      },
      "video/vnd.uvvu.mp4": {
        source: "apache",
        extensions: ["uvu", "uvvu"]
      },
      "video/vnd.vivo": {
        source: "apache",
        extensions: ["viv"]
      },
      "video/vp8": {
        source: "apache"
      },
      "video/webm": {
        source: "apache",
        compressible: false,
        extensions: ["webm"]
      },
      "video/x-f4v": {
        source: "apache",
        extensions: ["f4v"]
      },
      "video/x-fli": {
        source: "apache",
        extensions: ["fli"]
      },
      "video/x-flv": {
        source: "apache",
        compressible: false,
        extensions: ["flv"]
      },
      "video/x-m4v": {
        source: "apache",
        extensions: ["m4v"]
      },
      "video/x-matroska": {
        source: "apache",
        compressible: false,
        extensions: ["mkv", "mk3d", "mks"]
      },
      "video/x-mng": {
        source: "apache",
        extensions: ["mng"]
      },
      "video/x-ms-asf": {
        source: "apache",
        extensions: ["asf", "asx"]
      },
      "video/x-ms-vob": {
        source: "apache",
        extensions: ["vob"]
      },
      "video/x-ms-wm": {
        source: "apache",
        extensions: ["wm"]
      },
      "video/x-ms-wmv": {
        source: "apache",
        compressible: false,
        extensions: ["wmv"]
      },
      "video/x-ms-wmx": {
        source: "apache",
        extensions: ["wmx"]
      },
      "video/x-ms-wvx": {
        source: "apache",
        extensions: ["wvx"]
      },
      "video/x-msvideo": {
        source: "apache",
        extensions: ["avi"]
      },
      "video/x-sgi-movie": {
        source: "apache",
        extensions: ["movie"]
      },
      "video/x-smv": {
        source: "apache",
        extensions: ["smv"]
      },
      "x-conference/x-cooltalk": {
        source: "apache",
        extensions: ["ice"]
      },
      "x-shader/x-fragment": {
        compressible: true
      },
      "x-shader/x-vertex": {
        compressible: true
      }
    };
  }
});

// node_modules/mime-db/index.js
var require_mime_db = __commonJS({
  "node_modules/mime-db/index.js"(exports, module2) {
    module2.exports = require_db();
  }
});

// node_modules/mime-types/index.js
var require_mime_types = __commonJS({
  "node_modules/mime-types/index.js"(exports) {
    "use strict";
    var db = require_mime_db();
    var extname = require("path").extname;
    var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/;
    var textTypeRegExp = /^text\//i;
    exports.charset = charset;
    exports.charsets = { lookup: charset };
    exports.contentType = contentType;
    exports.extension = extension;
    exports.extensions = /* @__PURE__ */ Object.create(null);
    exports.lookup = lookup2;
    exports.types = /* @__PURE__ */ Object.create(null);
    populateMaps(exports.extensions, exports.types);
    function charset(type) {
      if (!type || typeof type !== "string") {
        return false;
      }
      var match = extractTypeRegExp.exec(type);
      var mime3 = match && db[match[1].toLowerCase()];
      if (mime3 && mime3.charset) {
        return mime3.charset;
      }
      if (match && textTypeRegExp.test(match[1])) {
        return "UTF-8";
      }
      return false;
    }
    function contentType(str) {
      if (!str || typeof str !== "string") {
        return false;
      }
      var mime3 = str.indexOf("/") === -1 ? exports.lookup(str) : str;
      if (!mime3) {
        return false;
      }
      if (mime3.indexOf("charset") === -1) {
        var charset2 = exports.charset(mime3);
        if (charset2)
          mime3 += "; charset=" + charset2.toLowerCase();
      }
      return mime3;
    }
    function extension(type) {
      if (!type || typeof type !== "string") {
        return false;
      }
      var match = extractTypeRegExp.exec(type);
      var exts = match && exports.extensions[match[1].toLowerCase()];
      if (!exts || !exts.length) {
        return false;
      }
      return exts[0];
    }
    function lookup2(path) {
      if (!path || typeof path !== "string") {
        return false;
      }
      var extension2 = extname("x." + path).toLowerCase().substr(1);
      if (!extension2) {
        return false;
      }
      return exports.types[extension2] || false;
    }
    function populateMaps(extensions2, types) {
      var preference = ["nginx", "apache", void 0, "iana"];
      Object.keys(db).forEach(function forEachMimeType(type) {
        var mime3 = db[type];
        var exts = mime3.extensions;
        if (!exts || !exts.length) {
          return;
        }
        extensions2[type] = exts;
        for (var i = 0; i < exts.length; i++) {
          var extension2 = exts[i];
          if (types[extension2]) {
            var from = preference.indexOf(db[types[extension2]].source);
            var to = preference.indexOf(mime3.source);
            if (types[extension2] !== "application/octet-stream" && from > to || from === to && types[extension2].substr(0, 12) === "application/") {
              continue;
            }
          }
          types[extension2] = type;
        }
      });
    }
  }
});

// node_modules/xml/lib/escapeForXML.js
var require_escapeForXML = __commonJS({
  "node_modules/xml/lib/escapeForXML.js"(exports, module2) {
    var XML_CHARACTER_MAP = {
      "&": "&amp;",
      '"': "&quot;",
      "'": "&apos;",
      "<": "&lt;",
      ">": "&gt;"
    };
    function escapeForXML(string) {
      return string && string.replace ? string.replace(/([&"<>'])/g, function(str, item) {
        return XML_CHARACTER_MAP[item];
      }) : string;
    }
    module2.exports = escapeForXML;
  }
});

// node_modules/xml/lib/xml.js
var require_xml = __commonJS({
  "node_modules/xml/lib/xml.js"(exports, module2) {
    var escapeForXML = require_escapeForXML();
    var Stream = require("stream").Stream;
    var DEFAULT_INDENT = "    ";
    function xml(input, options) {
      if (typeof options !== "object") {
        options = {
          indent: options
        };
      }
      var stream = options.stream ? new Stream() : null, output = "", interrupted = false, indent = !options.indent ? "" : options.indent === true ? DEFAULT_INDENT : options.indent, instant = true;
      function delay(func) {
        if (!instant) {
          func();
        } else {
          process.nextTick(func);
        }
      }
      function append(interrupt, out) {
        if (out !== void 0) {
          output += out;
        }
        if (interrupt && !interrupted) {
          stream = stream || new Stream();
          interrupted = true;
        }
        if (interrupt && interrupted) {
          var data = output;
          delay(function() {
            stream.emit("data", data);
          });
          output = "";
        }
      }
      function add(value, last2) {
        format(append, resolve(value, indent, indent ? 1 : 0), last2);
      }
      function end() {
        if (stream) {
          var data = output;
          delay(function() {
            stream.emit("data", data);
            stream.emit("end");
            stream.readable = false;
            stream.emit("close");
          });
        }
      }
      function addXmlDeclaration(declaration) {
        var encoding = declaration.encoding || "UTF-8", attr = { version: "1.0", encoding };
        if (declaration.standalone) {
          attr.standalone = declaration.standalone;
        }
        add({ "?xml": { _attr: attr } });
        output = output.replace("/>", "?>");
      }
      delay(function() {
        instant = false;
      });
      if (options.declaration) {
        addXmlDeclaration(options.declaration);
      }
      if (input && input.forEach) {
        input.forEach(function(value, i) {
          var last2;
          if (i + 1 === input.length)
            last2 = end;
          add(value, last2);
        });
      } else {
        add(input, end);
      }
      if (stream) {
        stream.readable = true;
        return stream;
      }
      return output;
    }
    function element() {
      var input = Array.prototype.slice.call(arguments), self2 = {
        _elem: resolve(input)
      };
      self2.push = function(input2) {
        if (!this.append) {
          throw new Error("not assigned to a parent!");
        }
        var that = this;
        var indent = this._elem.indent;
        format(this.append, resolve(input2, indent, this._elem.icount + (indent ? 1 : 0)), function() {
          that.append(true);
        });
      };
      self2.close = function(input2) {
        if (input2 !== void 0) {
          this.push(input2);
        }
        if (this.end) {
          this.end();
        }
      };
      return self2;
    }
    function create_indent(character, count) {
      return new Array(count || 0).join(character || "");
    }
    function resolve(data, indent, indent_count) {
      indent_count = indent_count || 0;
      var indent_spaces = create_indent(indent, indent_count);
      var name;
      var values = data;
      var interrupt = false;
      if (typeof data === "object") {
        var keys = Object.keys(data);
        name = keys[0];
        values = data[name];
        if (values && values._elem) {
          values._elem.name = name;
          values._elem.icount = indent_count;
          values._elem.indent = indent;
          values._elem.indents = indent_spaces;
          values._elem.interrupt = values;
          return values._elem;
        }
      }
      var attributes = [], content = [];
      var isStringContent;
      function get_attributes(obj) {
        var keys2 = Object.keys(obj);
        keys2.forEach(function(key) {
          attributes.push(attribute(key, obj[key]));
        });
      }
      switch (typeof values) {
        case "object":
          if (values === null)
            break;
          if (values._attr) {
            get_attributes(values._attr);
          }
          if (values._cdata) {
            content.push(("<![CDATA[" + values._cdata).replace(/\]\]>/g, "]]]]><![CDATA[>") + "]]>");
          }
          if (values.forEach) {
            isStringContent = false;
            content.push("");
            values.forEach(function(value) {
              if (typeof value == "object") {
                var _name = Object.keys(value)[0];
                if (_name == "_attr") {
                  get_attributes(value._attr);
                } else {
                  content.push(resolve(value, indent, indent_count + 1));
                }
              } else {
                content.pop();
                isStringContent = true;
                content.push(escapeForXML(value));
              }
            });
            if (!isStringContent) {
              content.push("");
            }
          }
          break;
        default:
          content.push(escapeForXML(values));
      }
      return {
        name,
        interrupt,
        attributes,
        content,
        icount: indent_count,
        indents: indent_spaces,
        indent
      };
    }
    function format(append, elem, end) {
      if (typeof elem != "object") {
        return append(false, elem);
      }
      var len = elem.interrupt ? 1 : elem.content.length;
      function proceed() {
        while (elem.content.length) {
          var value = elem.content.shift();
          if (value === void 0)
            continue;
          if (interrupt(value))
            return;
          format(append, value);
        }
        append(false, (len > 1 ? elem.indents : "") + (elem.name ? "</" + elem.name + ">" : "") + (elem.indent && !end ? "\n" : ""));
        if (end) {
          end();
        }
      }
      function interrupt(value) {
        if (value.interrupt) {
          value.interrupt.append = append;
          value.interrupt.end = proceed;
          value.interrupt = false;
          append(true);
          return true;
        }
        return false;
      }
      append(false, elem.indents + (elem.name ? "<" + elem.name : "") + (elem.attributes.length ? " " + elem.attributes.join(" ") : "") + (len ? elem.name ? ">" : "" : elem.name ? "/>" : "") + (elem.indent && len > 1 ? "\n" : ""));
      if (!len) {
        return append(false, elem.indent ? "\n" : "");
      }
      if (!interrupt(elem)) {
        proceed();
      }
    }
    function attribute(key, value) {
      return key + '="' + escapeForXML(value) + '"';
    }
    module2.exports = xml;
    module2.exports.element = module2.exports.Element = element;
  }
});

// node_modules/rss/lib/index.js
var require_lib3 = __commonJS({
  "node_modules/rss/lib/index.js"(exports, module2) {
    "use strict";
    var mime3 = require_mime_types();
    var xml = require_xml();
    var fs2 = require("fs");
    function ifTruePush(bool, array, data) {
      if (bool) {
        array.push(data);
      }
    }
    function ifTruePushArray(bool, array, dataArray) {
      if (!bool) {
        return;
      }
      dataArray.forEach(function(item) {
        ifTruePush(item, array, item);
      });
    }
    function getSize(filename) {
      if (typeof fs2 === "undefined") {
        return 0;
      }
      return fs2.statSync(filename).size;
    }
    function generateXML(data) {
      var channel = [];
      channel.push({ title: { _cdata: data.title } });
      channel.push({ description: { _cdata: data.description || data.title } });
      channel.push({ link: data.site_url || "http://github.com/dylang/node-rss" });
      if (data.image_url) {
        channel.push({ image: [{ url: data.image_url }, { title: data.title }, { link: data.site_url }] });
      }
      channel.push({ generator: data.generator });
      channel.push({ lastBuildDate: new Date().toUTCString() });
      ifTruePush(data.feed_url, channel, { "atom:link": { _attr: { href: data.feed_url, rel: "self", type: "application/rss+xml" } } });
      ifTruePush(data.author, channel, { "author": { _cdata: data.author } });
      ifTruePush(data.pubDate, channel, { "pubDate": new Date(data.pubDate).toGMTString() });
      ifTruePush(data.copyright, channel, { "copyright": { _cdata: data.copyright } });
      ifTruePush(data.language, channel, { "language": { _cdata: data.language } });
      ifTruePush(data.managingEditor, channel, { "managingEditor": { _cdata: data.managingEditor } });
      ifTruePush(data.webMaster, channel, { "webMaster": { _cdata: data.webMaster } });
      ifTruePush(data.docs, channel, { "docs": data.docs });
      ifTruePush(data.ttl, channel, { "ttl": data.ttl });
      ifTruePush(data.hub, channel, { "atom:link": { _attr: { href: data.hub, rel: "hub" } } });
      if (data.categories) {
        data.categories.forEach(function(category) {
          ifTruePush(category, channel, { category: { _cdata: category } });
        });
      }
      ifTruePushArray(data.custom_elements, channel, data.custom_elements);
      data.items.forEach(function(item) {
        var item_values = [
          { title: { _cdata: item.title } }
        ];
        ifTruePush(item.description, item_values, { description: { _cdata: item.description } });
        ifTruePush(item.url, item_values, { link: item.url });
        ifTruePush(item.link || item.guid || item.title, item_values, { guid: [{ _attr: { isPermaLink: !item.guid && !!item.url } }, item.guid || item.url || item.title] });
        item.categories.forEach(function(category) {
          ifTruePush(category, item_values, { category: { _cdata: category } });
        });
        ifTruePush(item.author || data.author, item_values, { "dc:creator": { _cdata: item.author || data.author } });
        ifTruePush(item.date, item_values, { pubDate: new Date(item.date).toGMTString() });
        data.geoRSS = data.geoRSS || item.lat && item.long;
        ifTruePush(item.lat, item_values, { "geo:lat": item.lat });
        ifTruePush(item.long, item_values, { "geo:long": item.long });
        if (item.enclosure && item.enclosure.url) {
          if (item.enclosure.file) {
            item_values.push({
              enclosure: {
                _attr: {
                  url: item.enclosure.url,
                  length: item.enclosure.size || getSize(item.enclosure.file),
                  type: item.enclosure.type || mime3.lookup(item.enclosure.file)
                }
              }
            });
          } else {
            item_values.push({
              enclosure: {
                _attr: {
                  url: item.enclosure.url,
                  length: item.enclosure.size || 0,
                  type: item.enclosure.type || mime3.lookup(item.enclosure.url)
                }
              }
            });
          }
        }
        ifTruePushArray(item.custom_elements, item_values, item.custom_elements);
        channel.push({ item: item_values });
      });
      var _attr = {
        "xmlns:dc": "http://purl.org/dc/elements/1.1/",
        "xmlns:content": "http://purl.org/rss/1.0/modules/content/",
        "xmlns:atom": "http://www.w3.org/2005/Atom",
        version: "2.0"
      };
      Object.keys(data.custom_namespaces).forEach(function(name) {
        _attr["xmlns:" + name] = data.custom_namespaces[name];
      });
      if (data.geoRSS) {
        _attr["xmlns:geo"] = "http://www.w3.org/2003/01/geo/wgs84_pos#";
      }
      return {
        rss: [
          { _attr },
          { channel }
        ]
      };
    }
    function RSS2(options, items) {
      options = options || {};
      this.title = options.title || "Untitled RSS Feed";
      this.description = options.description || "";
      this.generator = options.generator || "RSS for Node";
      this.feed_url = options.feed_url;
      this.site_url = options.site_url;
      this.image_url = options.image_url;
      this.author = options.author;
      this.categories = options.categories;
      this.pubDate = options.pubDate;
      this.hub = options.hub;
      this.docs = options.docs;
      this.copyright = options.copyright;
      this.language = options.language;
      this.managingEditor = options.managingEditor;
      this.webMaster = options.webMaster;
      this.ttl = options.ttl;
      this.geoRSS = options.geoRSS || false;
      this.custom_namespaces = options.custom_namespaces || {};
      this.custom_elements = options.custom_elements || [];
      this.items = items || [];
      this.item = function(options2) {
        options2 = options2 || {};
        var item = {
          title: options2.title || "No title",
          description: options2.description || "",
          url: options2.url,
          guid: options2.guid,
          categories: options2.categories || [],
          author: options2.author,
          date: options2.date,
          lat: options2.lat,
          long: options2.long,
          enclosure: options2.enclosure || false,
          custom_elements: options2.custom_elements || []
        };
        this.items.push(item);
        return this;
      };
      this.xml = function(indent) {
        return '<?xml version="1.0" encoding="UTF-8"?>' + xml(generateXML(this), indent);
      };
    }
    module2.exports = RSS2;
  }
});

// node_modules/upath/build/code/upath.js
var require_upath = __commonJS({
  "node_modules/upath/build/code/upath.js"(exports) {
    var VERSION = "2.0.1";
    var extraFn;
    var extraFunctions;
    var isFunction;
    var isString;
    var isValidExt;
    var name;
    var path;
    var propName;
    var propValue;
    var toUnix;
    var upath;
    var slice = [].slice;
    var indexOf = [].indexOf || function(item) {
      for (var i = 0, l = this.length; i < l; i++) {
        if (i in this && this[i] === item)
          return i;
      }
      return -1;
    };
    var hasProp = {}.hasOwnProperty;
    path = require("path");
    isFunction = function(val) {
      return typeof val === "function";
    };
    isString = function(val) {
      return typeof val === "string" || !!val && typeof val === "object" && Object.prototype.toString.call(val) === "[object String]";
    };
    upath = exports;
    upath.VERSION = typeof VERSION !== "undefined" && VERSION !== null ? VERSION : "NO-VERSION";
    toUnix = function(p) {
      p = p.replace(/\\/g, "/");
      p = p.replace(/(?<!^)\/+/g, "/");
      return p;
    };
    for (propName in path) {
      propValue = path[propName];
      if (isFunction(propValue)) {
        upath[propName] = function(propName2) {
          return function() {
            var args, result;
            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
            args = args.map(function(p) {
              if (isString(p)) {
                return toUnix(p);
              } else {
                return p;
              }
            });
            result = path[propName2].apply(path, args);
            if (isString(result)) {
              return toUnix(result);
            } else {
              return result;
            }
          };
        }(propName);
      } else {
        upath[propName] = propValue;
      }
    }
    upath.sep = "/";
    extraFunctions = {
      toUnix,
      normalizeSafe: function(p) {
        var result;
        p = toUnix(p);
        result = upath.normalize(p);
        if (p.startsWith("./") && !result.startsWith("./") && !result.startsWith("..")) {
          result = "./" + result;
        } else if (p.startsWith("//") && !result.startsWith("//")) {
          if (p.startsWith("//./")) {
            result = "//." + result;
          } else {
            result = "/" + result;
          }
        }
        return result;
      },
      normalizeTrim: function(p) {
        p = upath.normalizeSafe(p);
        if (p.endsWith("/")) {
          return p.slice(0, +(p.length - 2) + 1 || 9e9);
        } else {
          return p;
        }
      },
      joinSafe: function() {
        var p, p0, result;
        p = 1 <= arguments.length ? slice.call(arguments, 0) : [];
        result = upath.join.apply(null, p);
        if (p.length > 0) {
          p0 = toUnix(p[0]);
          if (p0.startsWith("./") && !result.startsWith("./") && !result.startsWith("..")) {
            result = "./" + result;
          } else if (p0.startsWith("//") && !result.startsWith("//")) {
            if (p0.startsWith("//./")) {
              result = "//." + result;
            } else {
              result = "/" + result;
            }
          }
        }
        return result;
      },
      addExt: function(file, ext) {
        if (!ext) {
          return file;
        } else {
          if (ext[0] !== ".") {
            ext = "." + ext;
          }
          return file + (file.endsWith(ext) ? "" : ext);
        }
      },
      trimExt: function(filename, ignoreExts, maxSize) {
        var oldExt;
        if (maxSize == null) {
          maxSize = 7;
        }
        oldExt = upath.extname(filename);
        if (isValidExt(oldExt, ignoreExts, maxSize)) {
          return filename.slice(0, +(filename.length - oldExt.length - 1) + 1 || 9e9);
        } else {
          return filename;
        }
      },
      removeExt: function(filename, ext) {
        if (!ext) {
          return filename;
        } else {
          ext = ext[0] === "." ? ext : "." + ext;
          if (upath.extname(filename) === ext) {
            return upath.trimExt(filename, [], ext.length);
          } else {
            return filename;
          }
        }
      },
      changeExt: function(filename, ext, ignoreExts, maxSize) {
        if (maxSize == null) {
          maxSize = 7;
        }
        return upath.trimExt(filename, ignoreExts, maxSize) + (!ext ? "" : ext[0] === "." ? ext : "." + ext);
      },
      defaultExt: function(filename, ext, ignoreExts, maxSize) {
        var oldExt;
        if (maxSize == null) {
          maxSize = 7;
        }
        oldExt = upath.extname(filename);
        if (isValidExt(oldExt, ignoreExts, maxSize)) {
          return filename;
        } else {
          return upath.addExt(filename, ext);
        }
      }
    };
    isValidExt = function(ext, ignoreExts, maxSize) {
      if (ignoreExts == null) {
        ignoreExts = [];
      }
      return ext && ext.length <= maxSize && indexOf.call(ignoreExts.map(function(e) {
        return (e && e[0] !== "." ? "." : "") + e;
      }), ext) < 0;
    };
    for (name in extraFunctions) {
      if (!hasProp.call(extraFunctions, name))
        continue;
      extraFn = extraFunctions[name];
      if (upath[name] !== void 0) {
        throw new Error("path." + name + " already exists.");
      } else {
        upath[name] = extraFn;
      }
    }
  }
});

// node_modules/readable-stream/lib/internal/streams/stream-browser.js
var require_stream_browser = __commonJS({
  "node_modules/readable-stream/lib/internal/streams/stream-browser.js"(exports, module2) {
    module2.exports = require("events").EventEmitter;
  }
});

// node_modules/readable-stream/lib/internal/streams/buffer_list.js
var require_buffer_list = __commonJS({
  "node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports, module2) {
    "use strict";
    function ownKeys(object, enumerableOnly) {
      var keys = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        enumerableOnly && (symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        })), keys.push.apply(keys, symbols);
      }
      return keys;
    }
    function _objectSpread(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i] != null ? arguments[i] : {};
        i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
          _defineProperty(target, key, source[key]);
        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
      }
      return target;
    }
    function _defineProperty(obj, key, value) {
      key = _toPropertyKey(key);
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    function _defineProperties(target, props) {
      for (var i = 0; i < props.length; i++) {
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor)
          descriptor.writable = true;
        Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
      }
    }
    function _createClass(Constructor, protoProps, staticProps) {
      if (protoProps)
        _defineProperties(Constructor.prototype, protoProps);
      if (staticProps)
        _defineProperties(Constructor, staticProps);
      Object.defineProperty(Constructor, "prototype", { writable: false });
      return Constructor;
    }
    function _toPropertyKey(arg) {
      var key = _toPrimitive(arg, "string");
      return typeof key === "symbol" ? key : String(key);
    }
    function _toPrimitive(input, hint) {
      if (typeof input !== "object" || input === null)
        return input;
      var prim = input[Symbol.toPrimitive];
      if (prim !== void 0) {
        var res = prim.call(input, hint || "default");
        if (typeof res !== "object")
          return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (hint === "string" ? String : Number)(input);
    }
    var _require = require("buffer");
    var Buffer5 = _require.Buffer;
    var _require2 = require("util");
    var inspect = _require2.inspect;
    var custom = inspect && inspect.custom || "inspect";
    function copyBuffer(src, target, offset) {
      Buffer5.prototype.copy.call(src, target, offset);
    }
    module2.exports = /* @__PURE__ */ function() {
      function BufferList() {
        _classCallCheck(this, BufferList);
        this.head = null;
        this.tail = null;
        this.length = 0;
      }
      _createClass(BufferList, [{
        key: "push",
        value: function push(v) {
          var entry = {
            data: v,
            next: null
          };
          if (this.length > 0)
            this.tail.next = entry;
          else
            this.head = entry;
          this.tail = entry;
          ++this.length;
        }
      }, {
        key: "unshift",
        value: function unshift(v) {
          var entry = {
            data: v,
            next: this.head
          };
          if (this.length === 0)
            this.tail = entry;
          this.head = entry;
          ++this.length;
        }
      }, {
        key: "shift",
        value: function shift() {
          if (this.length === 0)
            return;
          var ret = this.head.data;
          if (this.length === 1)
            this.head = this.tail = null;
          else
            this.head = this.head.next;
          --this.length;
          return ret;
        }
      }, {
        key: "clear",
        value: function clear() {
          this.head = this.tail = null;
          this.length = 0;
        }
      }, {
        key: "join",
        value: function join(s) {
          if (this.length === 0)
            return "";
          var p = this.head;
          var ret = "" + p.data;
          while (p = p.next)
            ret += s + p.data;
          return ret;
        }
      }, {
        key: "concat",
        value: function concat(n) {
          if (this.length === 0)
            return Buffer5.alloc(0);
          var ret = Buffer5.allocUnsafe(n >>> 0);
          var p = this.head;
          var i = 0;
          while (p) {
            copyBuffer(p.data, ret, i);
            i += p.data.length;
            p = p.next;
          }
          return ret;
        }
      }, {
        key: "consume",
        value: function consume(n, hasStrings) {
          var ret;
          if (n < this.head.data.length) {
            ret = this.head.data.slice(0, n);
            this.head.data = this.head.data.slice(n);
          } else if (n === this.head.data.length) {
            ret = this.shift();
          } else {
            ret = hasStrings ? this._getString(n) : this._getBuffer(n);
          }
          return ret;
        }
      }, {
        key: "first",
        value: function first() {
          return this.head.data;
        }
      }, {
        key: "_getString",
        value: function _getString(n) {
          var p = this.head;
          var c = 1;
          var ret = p.data;
          n -= ret.length;
          while (p = p.next) {
            var str = p.data;
            var nb = n > str.length ? str.length : n;
            if (nb === str.length)
              ret += str;
            else
              ret += str.slice(0, n);
            n -= nb;
            if (n === 0) {
              if (nb === str.length) {
                ++c;
                if (p.next)
                  this.head = p.next;
                else
                  this.head = this.tail = null;
              } else {
                this.head = p;
                p.data = str.slice(nb);
              }
              break;
            }
            ++c;
          }
          this.length -= c;
          return ret;
        }
      }, {
        key: "_getBuffer",
        value: function _getBuffer(n) {
          var ret = Buffer5.allocUnsafe(n);
          var p = this.head;
          var c = 1;
          p.data.copy(ret);
          n -= p.data.length;
          while (p = p.next) {
            var buf = p.data;
            var nb = n > buf.length ? buf.length : n;
            buf.copy(ret, ret.length - n, 0, nb);
            n -= nb;
            if (n === 0) {
              if (nb === buf.length) {
                ++c;
                if (p.next)
                  this.head = p.next;
                else
                  this.head = this.tail = null;
              } else {
                this.head = p;
                p.data = buf.slice(nb);
              }
              break;
            }
            ++c;
          }
          this.length -= c;
          return ret;
        }
      }, {
        key: custom,
        value: function value(_, options) {
          return inspect(this, _objectSpread(_objectSpread({}, options), {}, {
            depth: 0,
            customInspect: false
          }));
        }
      }]);
      return BufferList;
    }();
  }
});

// node_modules/readable-stream/lib/internal/streams/destroy.js
var require_destroy = __commonJS({
  "node_modules/readable-stream/lib/internal/streams/destroy.js"(exports, module2) {
    "use strict";
    function destroy(err, cb) {
      var _this = this;
      var readableDestroyed = this._readableState && this._readableState.destroyed;
      var writableDestroyed = this._writableState && this._writableState.destroyed;
      if (readableDestroyed || writableDestroyed) {
        if (cb) {
          cb(err);
        } else if (err) {
          if (!this._writableState) {
            process.nextTick(emitErrorNT, this, err);
          } else if (!this._writableState.errorEmitted) {
            this._writableState.errorEmitted = true;
            process.nextTick(emitErrorNT, this, err);
          }
        }
        return this;
      }
      if (this._readableState) {
        this._readableState.destroyed = true;
      }
      if (this._writableState) {
        this._writableState.destroyed = true;
      }
      this._destroy(err || null, function(err2) {
        if (!cb && err2) {
          if (!_this._writableState) {
            process.nextTick(emitErrorAndCloseNT, _this, err2);
          } else if (!_this._writableState.errorEmitted) {
            _this._writableState.errorEmitted = true;
            process.nextTick(emitErrorAndCloseNT, _this, err2);
          } else {
            process.nextTick(emitCloseNT, _this);
          }
        } else if (cb) {
          process.nextTick(emitCloseNT, _this);
          cb(err2);
        } else {
          process.nextTick(emitCloseNT, _this);
        }
      });
      return this;
    }
    function emitErrorAndCloseNT(self2, err) {
      emitErrorNT(self2, err);
      emitCloseNT(self2);
    }
    function emitCloseNT(self2) {
      if (self2._writableState && !self2._writableState.emitClose)
        return;
      if (self2._readableState && !self2._readableState.emitClose)
        return;
      self2.emit("close");
    }
    function undestroy() {
      if (this._readableState) {
        this._readableState.destroyed = false;
        this._readableState.reading = false;
        this._readableState.ended = false;
        this._readableState.endEmitted = false;
      }
      if (this._writableState) {
        this._writableState.destroyed = false;
        this._writableState.ended = false;
        this._writableState.ending = false;
        this._writableState.finalCalled = false;
        this._writableState.prefinished = false;
        this._writableState.finished = false;
        this._writableState.errorEmitted = false;
      }
    }
    function emitErrorNT(self2, err) {
      self2.emit("error", err);
    }
    function errorOrDestroy(stream, err) {
      var rState = stream._readableState;
      var wState = stream._writableState;
      if (rState && rState.autoDestroy || wState && wState.autoDestroy)
        stream.destroy(err);
      else
        stream.emit("error", err);
    }
    module2.exports = {
      destroy,
      undestroy,
      errorOrDestroy
    };
  }
});

// node_modules/readable-stream/errors-browser.js
var require_errors_browser = __commonJS({
  "node_modules/readable-stream/errors-browser.js"(exports, module2) {
    "use strict";
    function _inheritsLoose(subClass, superClass) {
      subClass.prototype = Object.create(superClass.prototype);
      subClass.prototype.constructor = subClass;
      subClass.__proto__ = superClass;
    }
    var codes = {};
    function createErrorType(code, message, Base) {
      if (!Base) {
        Base = Error;
      }
      function getMessage(arg1, arg2, arg3) {
        if (typeof message === "string") {
          return message;
        } else {
          return message(arg1, arg2, arg3);
        }
      }
      var NodeError = /* @__PURE__ */ function(_Base) {
        _inheritsLoose(NodeError2, _Base);
        function NodeError2(arg1, arg2, arg3) {
          return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
        }
        return NodeError2;
      }(Base);
      NodeError.prototype.name = Base.name;
      NodeError.prototype.code = code;
      codes[code] = NodeError;
    }
    function oneOf(expected, thing) {
      if (Array.isArray(expected)) {
        var len = expected.length;
        expected = expected.map(function(i) {
          return String(i);
        });
        if (len > 2) {
          return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(", "), ", or ") + expected[len - 1];
        } else if (len === 2) {
          return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
        } else {
          return "of ".concat(thing, " ").concat(expected[0]);
        }
      } else {
        return "of ".concat(thing, " ").concat(String(expected));
      }
    }
    function startsWith(str, search, pos) {
      return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
    }
    function endsWith(str, search, this_len) {
      if (this_len === void 0 || this_len > str.length) {
        this_len = str.length;
      }
      return str.substring(this_len - search.length, this_len) === search;
    }
    function includes(str, search, start) {
      if (typeof start !== "number") {
        start = 0;
      }
      if (start + search.length > str.length) {
        return false;
      } else {
        return str.indexOf(search, start) !== -1;
      }
    }
    createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) {
      return 'The value "' + value + '" is invalid for option "' + name + '"';
    }, TypeError);
    createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
      var determiner;
      if (typeof expected === "string" && startsWith(expected, "not ")) {
        determiner = "must not be";
        expected = expected.replace(/^not /, "");
      } else {
        determiner = "must be";
      }
      var msg;
      if (endsWith(name, " argument")) {
        msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
      } else {
        var type = includes(name, ".") ? "property" : "argument";
        msg = 'The "'.concat(name, '" ').concat(type, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
      }
      msg += ". Received type ".concat(typeof actual);
      return msg;
    }, TypeError);
    createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
    createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
      return "The " + name + " method is not implemented";
    });
    createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
    createErrorType("ERR_STREAM_DESTROYED", function(name) {
      return "Cannot call " + name + " after a stream was destroyed";
    });
    createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
    createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
    createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
    createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
    createErrorType("ERR_UNKNOWN_ENCODING", function(arg) {
      return "Unknown encoding: " + arg;
    }, TypeError);
    createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
    module2.exports.codes = codes;
  }
});

// node_modules/readable-stream/lib/internal/streams/state.js
var require_state = __commonJS({
  "node_modules/readable-stream/lib/internal/streams/state.js"(exports, module2) {
    "use strict";
    var ERR_INVALID_OPT_VALUE = require_errors_browser().codes.ERR_INVALID_OPT_VALUE;
    function highWaterMarkFrom(options, isDuplex, duplexKey) {
      return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
    }
    function getHighWaterMark(state, options, duplexKey, isDuplex) {
      var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
      if (hwm != null) {
        if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
          var name = isDuplex ? duplexKey : "highWaterMark";
          throw new ERR_INVALID_OPT_VALUE(name, hwm);
        }
        return Math.floor(hwm);
      }
      return state.objectMode ? 16 : 16 * 1024;
    }
    module2.exports = {
      getHighWaterMark
    };
  }
});

// node_modules/inherits/inherits_browser.js
var require_inherits_browser = __commonJS({
  "node_modules/inherits/inherits_browser.js"(exports, module2) {
    if (typeof Object.create === "function") {
      module2.exports = function inherits(ctor, superCtor) {
        if (superCtor) {
          ctor.super_ = superCtor;
          ctor.prototype = Object.create(superCtor.prototype, {
            constructor: {
              value: ctor,
              enumerable: false,
              writable: true,
              configurable: true
            }
          });
        }
      };
    } else {
      module2.exports = function inherits(ctor, superCtor) {
        if (superCtor) {
          ctor.super_ = superCtor;
          var TempCtor = function() {
          };
          TempCtor.prototype = superCtor.prototype;
          ctor.prototype = new TempCtor();
          ctor.prototype.constructor = ctor;
        }
      };
    }
  }
});

// node_modules/util-deprecate/browser.js
var require_browser = __commonJS({
  "node_modules/util-deprecate/browser.js"(exports, module2) {
    module2.exports = deprecate;
    function deprecate(fn, msg) {
      if (config("noDeprecation")) {
        return fn;
      }
      var warned = false;
      function deprecated() {
        if (!warned) {
          if (config("throwDeprecation")) {
            throw new Error(msg);
          } else if (config("traceDeprecation")) {
            console.trace(msg);
          } else {
            console.warn(msg);
          }
          warned = true;
        }
        return fn.apply(this, arguments);
      }
      return deprecated;
    }
    function config(name) {
      try {
        if (!global.localStorage)
          return false;
      } catch (_) {
        return false;
      }
      var val = global.localStorage[name];
      if (val == null)
        return false;
      return String(val).toLowerCase() === "true";
    }
  }
});

// node_modules/readable-stream/lib/_stream_writable.js
var require_stream_writable = __commonJS({
  "node_modules/readable-stream/lib/_stream_writable.js"(exports, module2) {
    "use strict";
    module2.exports = Writable;
    function CorkedRequest(state) {
      var _this = this;
      this.next = null;
      this.entry = null;
      this.finish = function() {
        onCorkedFinish(_this, state);
      };
    }
    var Duplex;
    Writable.WritableState = WritableState;
    var internalUtil = {
      deprecate: require_browser()
    };
    var Stream = require_stream_browser();
    var Buffer5 = require("buffer").Buffer;
    var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
    };
    function _uint8ArrayToBuffer(chunk) {
      return Buffer5.from(chunk);
    }
    function _isUint8Array(obj) {
      return Buffer5.isBuffer(obj) || obj instanceof OurUint8Array;
    }
    var destroyImpl = require_destroy();
    var _require = require_state();
    var getHighWaterMark = _require.getHighWaterMark;
    var _require$codes = require_errors_browser().codes;
    var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
    var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
    var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
    var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE;
    var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
    var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES;
    var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
    var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
    var errorOrDestroy = destroyImpl.errorOrDestroy;
    require_inherits_browser()(Writable, Stream);
    function nop() {
    }
    function WritableState(options, stream, isDuplex) {
      Duplex = Duplex || require_stream_duplex();
      options = options || {};
      if (typeof isDuplex !== "boolean")
        isDuplex = stream instanceof Duplex;
      this.objectMode = !!options.objectMode;
      if (isDuplex)
        this.objectMode = this.objectMode || !!options.writableObjectMode;
      this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex);
      this.finalCalled = false;
      this.needDrain = false;
      this.ending = false;
      this.ended = false;
      this.finished = false;
      this.destroyed = false;
      var noDecode = options.decodeStrings === false;
      this.decodeStrings = !noDecode;
      this.defaultEncoding = options.defaultEncoding || "utf8";
      this.length = 0;
      this.writing = false;
      this.corked = 0;
      this.sync = true;
      this.bufferProcessing = false;
      this.onwrite = function(er) {
        onwrite(stream, er);
      };
      this.writecb = null;
      this.writelen = 0;
      this.bufferedRequest = null;
      this.lastBufferedRequest = null;
      this.pendingcb = 0;
      this.prefinished = false;
      this.errorEmitted = false;
      this.emitClose = options.emitClose !== false;
      this.autoDestroy = !!options.autoDestroy;
      this.bufferedRequestCount = 0;
      this.corkedRequestsFree = new CorkedRequest(this);
    }
    WritableState.prototype.getBuffer = function getBuffer() {
      var current = this.bufferedRequest;
      var out = [];
      while (current) {
        out.push(current);
        current = current.next;
      }
      return out;
    };
    (function() {
      try {
        Object.defineProperty(WritableState.prototype, "buffer", {
          get: internalUtil.deprecate(function writableStateBufferGetter() {
            return this.getBuffer();
          }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
        });
      } catch (_) {
      }
    })();
    var realHasInstance;
    if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") {
      realHasInstance = Function.prototype[Symbol.hasInstance];
      Object.defineProperty(Writable, Symbol.hasInstance, {
        value: function value(object) {
          if (realHasInstance.call(this, object))
            return true;
          if (this !== Writable)
            return false;
          return object && object._writableState instanceof WritableState;
        }
      });
    } else {
      realHasInstance = function realHasInstance2(object) {
        return object instanceof this;
      };
    }
    function Writable(options) {
      Duplex = Duplex || require_stream_duplex();
      var isDuplex = this instanceof Duplex;
      if (!isDuplex && !realHasInstance.call(Writable, this))
        return new Writable(options);
      this._writableState = new WritableState(options, this, isDuplex);
      this.writable = true;
      if (options) {
        if (typeof options.write === "function")
          this._write = options.write;
        if (typeof options.writev === "function")
          this._writev = options.writev;
        if (typeof options.destroy === "function")
          this._destroy = options.destroy;
        if (typeof options.final === "function")
          this._final = options.final;
      }
      Stream.call(this);
    }
    Writable.prototype.pipe = function() {
      errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
    };
    function writeAfterEnd(stream, cb) {
      var er = new ERR_STREAM_WRITE_AFTER_END();
      errorOrDestroy(stream, er);
      process.nextTick(cb, er);
    }
    function validChunk(stream, state, chunk, cb) {
      var er;
      if (chunk === null) {
        er = new ERR_STREAM_NULL_VALUES();
      } else if (typeof chunk !== "string" && !state.objectMode) {
        er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk);
      }
      if (er) {
        errorOrDestroy(stream, er);
        process.nextTick(cb, er);
        return false;
      }
      return true;
    }
    Writable.prototype.write = function(chunk, encoding, cb) {
      var state = this._writableState;
      var ret = false;
      var isBuf = !state.objectMode && _isUint8Array(chunk);
      if (isBuf && !Buffer5.isBuffer(chunk)) {
        chunk = _uint8ArrayToBuffer(chunk);
      }
      if (typeof encoding === "function") {
        cb = encoding;
        encoding = null;
      }
      if (isBuf)
        encoding = "buffer";
      else if (!encoding)
        encoding = state.defaultEncoding;
      if (typeof cb !== "function")
        cb = nop;
      if (state.ending)
        writeAfterEnd(this, cb);
      else if (isBuf || validChunk(this, state, chunk, cb)) {
        state.pendingcb++;
        ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
      }
      return ret;
    };
    Writable.prototype.cork = function() {
      this._writableState.corked++;
    };
    Writable.prototype.uncork = function() {
      var state = this._writableState;
      if (state.corked) {
        state.corked--;
        if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest)
          clearBuffer(this, state);
      }
    };
    Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
      if (typeof encoding === "string")
        encoding = encoding.toLowerCase();
      if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1))
        throw new ERR_UNKNOWN_ENCODING(encoding);
      this._writableState.defaultEncoding = encoding;
      return this;
    };
    Object.defineProperty(Writable.prototype, "writableBuffer", {
      enumerable: false,
      get: function get() {
        return this._writableState && this._writableState.getBuffer();
      }
    });
    function decodeChunk(state, chunk, encoding) {
      if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") {
        chunk = Buffer5.from(chunk, encoding);
      }
      return chunk;
    }
    Object.defineProperty(Writable.prototype, "writableHighWaterMark", {
      enumerable: false,
      get: function get() {
        return this._writableState.highWaterMark;
      }
    });
    function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
      if (!isBuf) {
        var newChunk = decodeChunk(state, chunk, encoding);
        if (chunk !== newChunk) {
          isBuf = true;
          encoding = "buffer";
          chunk = newChunk;
        }
      }
      var len = state.objectMode ? 1 : chunk.length;
      state.length += len;
      var ret = state.length < state.highWaterMark;
      if (!ret)
        state.needDrain = true;
      if (state.writing || state.corked) {
        var last2 = state.lastBufferedRequest;
        state.lastBufferedRequest = {
          chunk,
          encoding,
          isBuf,
          callback: cb,
          next: null
        };
        if (last2) {
          last2.next = state.lastBufferedRequest;
        } else {
          state.bufferedRequest = state.lastBufferedRequest;
        }
        state.bufferedRequestCount += 1;
      } else {
        doWrite(stream, state, false, len, chunk, encoding, cb);
      }
      return ret;
    }
    function doWrite(stream, state, writev, len, chunk, encoding, cb) {
      state.writelen = len;
      state.writecb = cb;
      state.writing = true;
      state.sync = true;
      if (state.destroyed)
        state.onwrite(new ERR_STREAM_DESTROYED("write"));
      else if (writev)
        stream._writev(chunk, state.onwrite);
      else
        stream._write(chunk, encoding, state.onwrite);
      state.sync = false;
    }
    function onwriteError(stream, state, sync, er, cb) {
      --state.pendingcb;
      if (sync) {
        process.nextTick(cb, er);
        process.nextTick(finishMaybe, stream, state);
        stream._writableState.errorEmitted = true;
        errorOrDestroy(stream, er);
      } else {
        cb(er);
        stream._writableState.errorEmitted = true;
        errorOrDestroy(stream, er);
        finishMaybe(stream, state);
      }
    }
    function onwriteStateUpdate(state) {
      state.writing = false;
      state.writecb = null;
      state.length -= state.writelen;
      state.writelen = 0;
    }
    function onwrite(stream, er) {
      var state = stream._writableState;
      var sync = state.sync;
      var cb = state.writecb;
      if (typeof cb !== "function")
        throw new ERR_MULTIPLE_CALLBACK();
      onwriteStateUpdate(state);
      if (er)
        onwriteError(stream, state, sync, er, cb);
      else {
        var finished = needFinish(state) || stream.destroyed;
        if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
          clearBuffer(stream, state);
        }
        if (sync) {
          process.nextTick(afterWrite, stream, state, finished, cb);
        } else {
          afterWrite(stream, state, finished, cb);
        }
      }
    }
    function afterWrite(stream, state, finished, cb) {
      if (!finished)
        onwriteDrain(stream, state);
      state.pendingcb--;
      cb();
      finishMaybe(stream, state);
    }
    function onwriteDrain(stream, state) {
      if (state.length === 0 && state.needDrain) {
        state.needDrain = false;
        stream.emit("drain");
      }
    }
    function clearBuffer(stream, state) {
      state.bufferProcessing = true;
      var entry = state.bufferedRequest;
      if (stream._writev && entry && entry.next) {
        var l = state.bufferedRequestCount;
        var buffer = new Array(l);
        var holder = state.corkedRequestsFree;
        holder.entry = entry;
        var count = 0;
        var allBuffers = true;
        while (entry) {
          buffer[count] = entry;
          if (!entry.isBuf)
            allBuffers = false;
          entry = entry.next;
          count += 1;
        }
        buffer.allBuffers = allBuffers;
        doWrite(stream, state, true, state.length, buffer, "", holder.finish);
        state.pendingcb++;
        state.lastBufferedRequest = null;
        if (holder.next) {
          state.corkedRequestsFree = holder.next;
          holder.next = null;
        } else {
          state.corkedRequestsFree = new CorkedRequest(state);
        }
        state.bufferedRequestCount = 0;
      } else {
        while (entry) {
          var chunk = entry.chunk;
          var encoding = entry.encoding;
          var cb = entry.callback;
          var len = state.objectMode ? 1 : chunk.length;
          doWrite(stream, state, false, len, chunk, encoding, cb);
          entry = entry.next;
          state.bufferedRequestCount--;
          if (state.writing) {
            break;
          }
        }
        if (entry === null)
          state.lastBufferedRequest = null;
      }
      state.bufferedRequest = entry;
      state.bufferProcessing = false;
    }
    Writable.prototype._write = function(chunk, encoding, cb) {
      cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
    };
    Writable.prototype._writev = null;
    Writable.prototype.end = function(chunk, encoding, cb) {
      var state = this._writableState;
      if (typeof chunk === "function") {
        cb = chunk;
        chunk = null;
        encoding = null;
      } else if (typeof encoding === "function") {
        cb = encoding;
        encoding = null;
      }
      if (chunk !== null && chunk !== void 0)
        this.write(chunk, encoding);
      if (state.corked) {
        state.corked = 1;
        this.uncork();
      }
      if (!state.ending)
        endWritable(this, state, cb);
      return this;
    };
    Object.defineProperty(Writable.prototype, "writableLength", {
      enumerable: false,
      get: function get() {
        return this._writableState.length;
      }
    });
    function needFinish(state) {
      return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
    }
    function callFinal(stream, state) {
      stream._final(function(err) {
        state.pendingcb--;
        if (err) {
          errorOrDestroy(stream, err);
        }
        state.prefinished = true;
        stream.emit("prefinish");
        finishMaybe(stream, state);
      });
    }
    function prefinish(stream, state) {
      if (!state.prefinished && !state.finalCalled) {
        if (typeof stream._final === "function" && !state.destroyed) {
          state.pendingcb++;
          state.finalCalled = true;
          process.nextTick(callFinal, stream, state);
        } else {
          state.prefinished = true;
          stream.emit("prefinish");
        }
      }
    }
    function finishMaybe(stream, state) {
      var need = needFinish(state);
      if (need) {
        prefinish(stream, state);
        if (state.pendingcb === 0) {
          state.finished = true;
          stream.emit("finish");
          if (state.autoDestroy) {
            var rState = stream._readableState;
            if (!rState || rState.autoDestroy && rState.endEmitted) {
              stream.destroy();
            }
          }
        }
      }
      return need;
    }
    function endWritable(stream, state, cb) {
      state.ending = true;
      finishMaybe(stream, state);
      if (cb) {
        if (state.finished)
          process.nextTick(cb);
        else
          stream.once("finish", cb);
      }
      state.ended = true;
      stream.writable = false;
    }
    function onCorkedFinish(corkReq, state, err) {
      var entry = corkReq.entry;
      corkReq.entry = null;
      while (entry) {
        var cb = entry.callback;
        state.pendingcb--;
        cb(err);
        entry = entry.next;
      }
      state.corkedRequestsFree.next = corkReq;
    }
    Object.defineProperty(Writable.prototype, "destroyed", {
      enumerable: false,
      get: function get() {
        if (this._writableState === void 0) {
          return false;
        }
        return this._writableState.destroyed;
      },
      set: function set(value) {
        if (!this._writableState) {
          return;
        }
        this._writableState.destroyed = value;
      }
    });
    Writable.prototype.destroy = destroyImpl.destroy;
    Writable.prototype._undestroy = destroyImpl.undestroy;
    Writable.prototype._destroy = function(err, cb) {
      cb(err);
    };
  }
});

// node_modules/readable-stream/lib/_stream_duplex.js
var require_stream_duplex = __commonJS({
  "node_modules/readable-stream/lib/_stream_duplex.js"(exports, module2) {
    "use strict";
    var objectKeys = Object.keys || function(obj) {
      var keys2 = [];
      for (var key in obj)
        keys2.push(key);
      return keys2;
    };
    module2.exports = Duplex;
    var Readable = require_stream_readable();
    var Writable = require_stream_writable();
    require_inherits_browser()(Duplex, Readable);
    {
      keys = objectKeys(Writable.prototype);
      for (v = 0; v < keys.length; v++) {
        method = keys[v];
        if (!Duplex.prototype[method])
          Duplex.prototype[method] = Writable.prototype[method];
      }
    }
    var keys;
    var method;
    var v;
    function Duplex(options) {
      if (!(this instanceof Duplex))
        return new Duplex(options);
      Readable.call(this, options);
      Writable.call(this, options);
      this.allowHalfOpen = true;
      if (options) {
        if (options.readable === false)
          this.readable = false;
        if (options.writable === false)
          this.writable = false;
        if (options.allowHalfOpen === false) {
          this.allowHalfOpen = false;
          this.once("end", onend);
        }
      }
    }
    Object.defineProperty(Duplex.prototype, "writableHighWaterMark", {
      enumerable: false,
      get: function get() {
        return this._writableState.highWaterMark;
      }
    });
    Object.defineProperty(Duplex.prototype, "writableBuffer", {
      enumerable: false,
      get: function get() {
        return this._writableState && this._writableState.getBuffer();
      }
    });
    Object.defineProperty(Duplex.prototype, "writableLength", {
      enumerable: false,
      get: function get() {
        return this._writableState.length;
      }
    });
    function onend() {
      if (this._writableState.ended)
        return;
      process.nextTick(onEndNT, this);
    }
    function onEndNT(self2) {
      self2.end();
    }
    Object.defineProperty(Duplex.prototype, "destroyed", {
      enumerable: false,
      get: function get() {
        if (this._readableState === void 0 || this._writableState === void 0) {
          return false;
        }
        return this._readableState.destroyed && this._writableState.destroyed;
      },
      set: function set(value) {
        if (this._readableState === void 0 || this._writableState === void 0) {
          return;
        }
        this._readableState.destroyed = value;
        this._writableState.destroyed = value;
      }
    });
  }
});

// node_modules/readable-stream/lib/internal/streams/end-of-stream.js
var require_end_of_stream = __commonJS({
  "node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports, module2) {
    "use strict";
    var ERR_STREAM_PREMATURE_CLOSE = require_errors_browser().codes.ERR_STREAM_PREMATURE_CLOSE;
    function once(callback) {
      var called = false;
      return function() {
        if (called)
          return;
        called = true;
        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
        callback.apply(this, args);
      };
    }
    function noop() {
    }
    function isRequest(stream) {
      return stream.setHeader && typeof stream.abort === "function";
    }
    function eos(stream, opts, callback) {
      if (typeof opts === "function")
        return eos(stream, null, opts);
      if (!opts)
        opts = {};
      callback = once(callback || noop);
      var readable = opts.readable || opts.readable !== false && stream.readable;
      var writable = opts.writable || opts.writable !== false && stream.writable;
      var onlegacyfinish = function onlegacyfinish2() {
        if (!stream.writable)
          onfinish();
      };
      var writableEnded = stream._writableState && stream._writableState.finished;
      var onfinish = function onfinish2() {
        writable = false;
        writableEnded = true;
        if (!readable)
          callback.call(stream);
      };
      var readableEnded = stream._readableState && stream._readableState.endEmitted;
      var onend = function onend2() {
        readable = false;
        readableEnded = true;
        if (!writable)
          callback.call(stream);
      };
      var onerror = function onerror2(err) {
        callback.call(stream, err);
      };
      var onclose = function onclose2() {
        var err;
        if (readable && !readableEnded) {
          if (!stream._readableState || !stream._readableState.ended)
            err = new ERR_STREAM_PREMATURE_CLOSE();
          return callback.call(stream, err);
        }
        if (writable && !writableEnded) {
          if (!stream._writableState || !stream._writableState.ended)
            err = new ERR_STREAM_PREMATURE_CLOSE();
          return callback.call(stream, err);
        }
      };
      var onrequest = function onrequest2() {
        stream.req.on("finish", onfinish);
      };
      if (isRequest(stream)) {
        stream.on("complete", onfinish);
        stream.on("abort", onclose);
        if (stream.req)
          onrequest();
        else
          stream.on("request", onrequest);
      } else if (writable && !stream._writableState) {
        stream.on("end", onlegacyfinish);
        stream.on("close", onlegacyfinish);
      }
      stream.on("end", onend);
      stream.on("finish", onfinish);
      if (opts.error !== false)
        stream.on("error", onerror);
      stream.on("close", onclose);
      return function() {
        stream.removeListener("complete", onfinish);
        stream.removeListener("abort", onclose);
        stream.removeListener("request", onrequest);
        if (stream.req)
          stream.req.removeListener("finish", onfinish);
        stream.removeListener("end", onlegacyfinish);
        stream.removeListener("close", onlegacyfinish);
        stream.removeListener("finish", onfinish);
        stream.removeListener("end", onend);
        stream.removeListener("error", onerror);
        stream.removeListener("close", onclose);
      };
    }
    module2.exports = eos;
  }
});

// node_modules/readable-stream/lib/internal/streams/async_iterator.js
var require_async_iterator = __commonJS({
  "node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports, module2) {
    "use strict";
    var _Object$setPrototypeO;
    function _defineProperty(obj, key, value) {
      key = _toPropertyKey(key);
      if (key in obj) {
        Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }
      return obj;
    }
    function _toPropertyKey(arg) {
      var key = _toPrimitive(arg, "string");
      return typeof key === "symbol" ? key : String(key);
    }
    function _toPrimitive(input, hint) {
      if (typeof input !== "object" || input === null)
        return input;
      var prim = input[Symbol.toPrimitive];
      if (prim !== void 0) {
        var res = prim.call(input, hint || "default");
        if (typeof res !== "object")
          return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (hint === "string" ? String : Number)(input);
    }
    var finished = require_end_of_stream();
    var kLastResolve = Symbol("lastResolve");
    var kLastReject = Symbol("lastReject");
    var kError = Symbol("error");
    var kEnded = Symbol("ended");
    var kLastPromise = Symbol("lastPromise");
    var kHandlePromise = Symbol("handlePromise");
    var kStream = Symbol("stream");
    function createIterResult(value, done) {
      return {
        value,
        done
      };
    }
    function readAndResolve(iter) {
      var resolve = iter[kLastResolve];
      if (resolve !== null) {
        var data = iter[kStream].read();
        if (data !== null) {
          iter[kLastPromise] = null;
          iter[kLastResolve] = null;
          iter[kLastReject] = null;
          resolve(createIterResult(data, false));
        }
      }
    }
    function onReadable(iter) {
      process.nextTick(readAndResolve, iter);
    }
    function wrapForNext(lastPromise, iter) {
      return function(resolve, reject) {
        lastPromise.then(function() {
          if (iter[kEnded]) {
            resolve(createIterResult(void 0, true));
            return;
          }
          iter[kHandlePromise](resolve, reject);
        }, reject);
      };
    }
    var AsyncIteratorPrototype = Object.getPrototypeOf(function() {
    });
    var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
      get stream() {
        return this[kStream];
      },
      next: function next() {
        var _this = this;
        var error = this[kError];
        if (error !== null) {
          return Promise.reject(error);
        }
        if (this[kEnded]) {
          return Promise.resolve(createIterResult(void 0, true));
        }
        if (this[kStream].destroyed) {
          return new Promise(function(resolve, reject) {
            process.nextTick(function() {
              if (_this[kError]) {
                reject(_this[kError]);
              } else {
                resolve(createIterResult(void 0, true));
              }
            });
          });
        }
        var lastPromise = this[kLastPromise];
        var promise;
        if (lastPromise) {
          promise = new Promise(wrapForNext(lastPromise, this));
        } else {
          var data = this[kStream].read();
          if (data !== null) {
            return Promise.resolve(createIterResult(data, false));
          }
          promise = new Promise(this[kHandlePromise]);
        }
        this[kLastPromise] = promise;
        return promise;
      }
    }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() {
      return this;
    }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
      var _this2 = this;
      return new Promise(function(resolve, reject) {
        _this2[kStream].destroy(null, function(err) {
          if (err) {
            reject(err);
            return;
          }
          resolve(createIterResult(void 0, true));
        });
      });
    }), _Object$setPrototypeO), AsyncIteratorPrototype);
    var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) {
      var _Object$create;
      var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
        value: stream,
        writable: true
      }), _defineProperty(_Object$create, kLastResolve, {
        value: null,
        writable: true
      }), _defineProperty(_Object$create, kLastReject, {
        value: null,
        writable: true
      }), _defineProperty(_Object$create, kError, {
        value: null,
        writable: true
      }), _defineProperty(_Object$create, kEnded, {
        value: stream._readableState.endEmitted,
        writable: true
      }), _defineProperty(_Object$create, kHandlePromise, {
        value: function value(resolve, reject) {
          var data = iterator[kStream].read();
          if (data) {
            iterator[kLastPromise] = null;
            iterator[kLastResolve] = null;
            iterator[kLastReject] = null;
            resolve(createIterResult(data, false));
          } else {
            iterator[kLastResolve] = resolve;
            iterator[kLastReject] = reject;
          }
        },
        writable: true
      }), _Object$create));
      iterator[kLastPromise] = null;
      finished(stream, function(err) {
        if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
          var reject = iterator[kLastReject];
          if (reject !== null) {
            iterator[kLastPromise] = null;
            iterator[kLastResolve] = null;
            iterator[kLastReject] = null;
            reject(err);
          }
          iterator[kError] = err;
          return;
        }
        var resolve = iterator[kLastResolve];
        if (resolve !== null) {
          iterator[kLastPromise] = null;
          iterator[kLastResolve] = null;
          iterator[kLastReject] = null;
          resolve(createIterResult(void 0, true));
        }
        iterator[kEnded] = true;
      });
      stream.on("readable", onReadable.bind(null, iterator));
      return iterator;
    };
    module2.exports = createReadableStreamAsyncIterator;
  }
});

// node_modules/readable-stream/lib/internal/streams/from-browser.js
var require_from_browser = __commonJS({
  "node_modules/readable-stream/lib/internal/streams/from-browser.js"(exports, module2) {
    module2.exports = function() {
      throw new Error("Readable.from is not available in the browser");
    };
  }
});

// node_modules/readable-stream/lib/_stream_readable.js
var require_stream_readable = __commonJS({
  "node_modules/readable-stream/lib/_stream_readable.js"(exports, module2) {
    "use strict";
    module2.exports = Readable;
    var Duplex;
    Readable.ReadableState = ReadableState;
    var EE = require("events").EventEmitter;
    var EElistenerCount = function EElistenerCount2(emitter, type) {
      return emitter.listeners(type).length;
    };
    var Stream = require_stream_browser();
    var Buffer5 = require("buffer").Buffer;
    var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
    };
    function _uint8ArrayToBuffer(chunk) {
      return Buffer5.from(chunk);
    }
    function _isUint8Array(obj) {
      return Buffer5.isBuffer(obj) || obj instanceof OurUint8Array;
    }
    var debugUtil = require("util");
    var debug;
    if (debugUtil && debugUtil.debuglog) {
      debug = debugUtil.debuglog("stream");
    } else {
      debug = function debug2() {
      };
    }
    var BufferList = require_buffer_list();
    var destroyImpl = require_destroy();
    var _require = require_state();
    var getHighWaterMark = _require.getHighWaterMark;
    var _require$codes = require_errors_browser().codes;
    var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
    var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF;
    var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
    var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
    var StringDecoder;
    var createReadableStreamAsyncIterator;
    var from;
    require_inherits_browser()(Readable, Stream);
    var errorOrDestroy = destroyImpl.errorOrDestroy;
    var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
    function prependListener(emitter, event, fn) {
      if (typeof emitter.prependListener === "function")
        return emitter.prependListener(event, fn);
      if (!emitter._events || !emitter._events[event])
        emitter.on(event, fn);
      else if (Array.isArray(emitter._events[event]))
        emitter._events[event].unshift(fn);
      else
        emitter._events[event] = [fn, emitter._events[event]];
    }
    function ReadableState(options, stream, isDuplex) {
      Duplex = Duplex || require_stream_duplex();
      options = options || {};
      if (typeof isDuplex !== "boolean")
        isDuplex = stream instanceof Duplex;
      this.objectMode = !!options.objectMode;
      if (isDuplex)
        this.objectMode = this.objectMode || !!options.readableObjectMode;
      this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex);
      this.buffer = new BufferList();
      this.length = 0;
      this.pipes = null;
      this.pipesCount = 0;
      this.flowing = null;
      this.ended = false;
      this.endEmitted = false;
      this.reading = false;
      this.sync = true;
      this.needReadable = false;
      this.emittedReadable = false;
      this.readableListening = false;
      this.resumeScheduled = false;
      this.paused = true;
      this.emitClose = options.emitClose !== false;
      this.autoDestroy = !!options.autoDestroy;
      this.destroyed = false;
      this.defaultEncoding = options.defaultEncoding || "utf8";
      this.awaitDrain = 0;
      this.readingMore = false;
      this.decoder = null;
      this.encoding = null;
      if (options.encoding) {
        if (!StringDecoder)
          StringDecoder = require("string_decoder/").StringDecoder;
        this.decoder = new StringDecoder(options.encoding);
        this.encoding = options.encoding;
      }
    }
    function Readable(options) {
      Duplex = Duplex || require_stream_duplex();
      if (!(this instanceof Readable))
        return new Readable(options);
      var isDuplex = this instanceof Duplex;
      this._readableState = new ReadableState(options, this, isDuplex);
      this.readable = true;
      if (options) {
        if (typeof options.read === "function")
          this._read = options.read;
        if (typeof options.destroy === "function")
          this._destroy = options.destroy;
      }
      Stream.call(this);
    }
    Object.defineProperty(Readable.prototype, "destroyed", {
      enumerable: false,
      get: function get() {
        if (this._readableState === void 0) {
          return false;
        }
        return this._readableState.destroyed;
      },
      set: function set(value) {
        if (!this._readableState) {
          return;
        }
        this._readableState.destroyed = value;
      }
    });
    Readable.prototype.destroy = destroyImpl.destroy;
    Readable.prototype._undestroy = destroyImpl.undestroy;
    Readable.prototype._destroy = function(err, cb) {
      cb(err);
    };
    Readable.prototype.push = function(chunk, encoding) {
      var state = this._readableState;
      var skipChunkCheck;
      if (!state.objectMode) {
        if (typeof chunk === "string") {
          encoding = encoding || state.defaultEncoding;
          if (encoding !== state.encoding) {
            chunk = Buffer5.from(chunk, encoding);
            encoding = "";
          }
          skipChunkCheck = true;
        }
      } else {
        skipChunkCheck = true;
      }
      return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
    };
    Readable.prototype.unshift = function(chunk) {
      return readableAddChunk(this, chunk, null, true, false);
    };
    function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
      debug("readableAddChunk", chunk);
      var state = stream._readableState;
      if (chunk === null) {
        state.reading = false;
        onEofChunk(stream, state);
      } else {
        var er;
        if (!skipChunkCheck)
          er = chunkInvalid(state, chunk);
        if (er) {
          errorOrDestroy(stream, er);
        } else if (state.objectMode || chunk && chunk.length > 0) {
          if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer5.prototype) {
            chunk = _uint8ArrayToBuffer(chunk);
          }
          if (addToFront) {
            if (state.endEmitted)
              errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());
            else
              addChunk(stream, state, chunk, true);
          } else if (state.ended) {
            errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
          } else if (state.destroyed) {
            return false;
          } else {
            state.reading = false;
            if (state.decoder && !encoding) {
              chunk = state.decoder.write(chunk);
              if (state.objectMode || chunk.length !== 0)
                addChunk(stream, state, chunk, false);
              else
                maybeReadMore(stream, state);
            } else {
              addChunk(stream, state, chunk, false);
            }
          }
        } else if (!addToFront) {
          state.reading = false;
          maybeReadMore(stream, state);
        }
      }
      return !state.ended && (state.length < state.highWaterMark || state.length === 0);
    }
    function addChunk(stream, state, chunk, addToFront) {
      if (state.flowing && state.length === 0 && !state.sync) {
        state.awaitDrain = 0;
        stream.emit("data", chunk);
      } else {
        state.length += state.objectMode ? 1 : chunk.length;
        if (addToFront)
          state.buffer.unshift(chunk);
        else
          state.buffer.push(chunk);
        if (state.needReadable)
          emitReadable(stream);
      }
      maybeReadMore(stream, state);
    }
    function chunkInvalid(state, chunk) {
      var er;
      if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) {
        er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk);
      }
      return er;
    }
    Readable.prototype.isPaused = function() {
      return this._readableState.flowing === false;
    };
    Readable.prototype.setEncoding = function(enc) {
      if (!StringDecoder)
        StringDecoder = require("string_decoder/").StringDecoder;
      var decoder = new StringDecoder(enc);
      this._readableState.decoder = decoder;
      this._readableState.encoding = this._readableState.decoder.encoding;
      var p = this._readableState.buffer.head;
      var content = "";
      while (p !== null) {
        content += decoder.write(p.data);
        p = p.next;
      }
      this._readableState.buffer.clear();
      if (content !== "")
        this._readableState.buffer.push(content);
      this._readableState.length = content.length;
      return this;
    };
    var MAX_HWM = 1073741824;
    function computeNewHighWaterMark(n) {
      if (n >= MAX_HWM) {
        n = MAX_HWM;
      } else {
        n--;
        n |= n >>> 1;
        n |= n >>> 2;
        n |= n >>> 4;
        n |= n >>> 8;
        n |= n >>> 16;
        n++;
      }
      return n;
    }
    function howMuchToRead(n, state) {
      if (n <= 0 || state.length === 0 && state.ended)
        return 0;
      if (state.objectMode)
        return 1;
      if (n !== n) {
        if (state.flowing && state.length)
          return state.buffer.head.data.length;
        else
          return state.length;
      }
      if (n > state.highWaterMark)
        state.highWaterMark = computeNewHighWaterMark(n);
      if (n <= state.length)
        return n;
      if (!state.ended) {
        state.needReadable = true;
        return 0;
      }
      return state.length;
    }
    Readable.prototype.read = function(n) {
      debug("read", n);
      n = parseInt(n, 10);
      var state = this._readableState;
      var nOrig = n;
      if (n !== 0)
        state.emittedReadable = false;
      if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {
        debug("read: emitReadable", state.length, state.ended);
        if (state.length === 0 && state.ended)
          endReadable(this);
        else
          emitReadable(this);
        return null;
      }
      n = howMuchToRead(n, state);
      if (n === 0 && state.ended) {
        if (state.length === 0)
          endReadable(this);
        return null;
      }
      var doRead = state.needReadable;
      debug("need readable", doRead);
      if (state.length === 0 || state.length - n < state.highWaterMark) {
        doRead = true;
        debug("length less than watermark", doRead);
      }
      if (state.ended || state.reading) {
        doRead = false;
        debug("reading or ended", doRead);
      } else if (doRead) {
        debug("do read");
        state.reading = true;
        state.sync = true;
        if (state.length === 0)
          state.needReadable = true;
        this._read(state.highWaterMark);
        state.sync = false;
        if (!state.reading)
          n = howMuchToRead(nOrig, state);
      }
      var ret;
      if (n > 0)
        ret = fromList(n, state);
      else
        ret = null;
      if (ret === null) {
        state.needReadable = state.length <= state.highWaterMark;
        n = 0;
      } else {
        state.length -= n;
        state.awaitDrain = 0;
      }
      if (state.length === 0) {
        if (!state.ended)
          state.needReadable = true;
        if (nOrig !== n && state.ended)
          endReadable(this);
      }
      if (ret !== null)
        this.emit("data", ret);
      return ret;
    };
    function onEofChunk(stream, state) {
      debug("onEofChunk");
      if (state.ended)
        return;
      if (state.decoder) {
        var chunk = state.decoder.end();
        if (chunk && chunk.length) {
          state.buffer.push(chunk);
          state.length += state.objectMode ? 1 : chunk.length;
        }
      }
      state.ended = true;
      if (state.sync) {
        emitReadable(stream);
      } else {
        state.needReadable = false;
        if (!state.emittedReadable) {
          state.emittedReadable = true;
          emitReadable_(stream);
        }
      }
    }
    function emitReadable(stream) {
      var state = stream._readableState;
      debug("emitReadable", state.needReadable, state.emittedReadable);
      state.needReadable = false;
      if (!state.emittedReadable) {
        debug("emitReadable", state.flowing);
        state.emittedReadable = true;
        process.nextTick(emitReadable_, stream);
      }
    }
    function emitReadable_(stream) {
      var state = stream._readableState;
      debug("emitReadable_", state.destroyed, state.length, state.ended);
      if (!state.destroyed && (state.length || state.ended)) {
        stream.emit("readable");
        state.emittedReadable = false;
      }
      state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;
      flow(stream);
    }
    function maybeReadMore(stream, state) {
      if (!state.readingMore) {
        state.readingMore = true;
        process.nextTick(maybeReadMore_, stream, state);
      }
    }
    function maybeReadMore_(stream, state) {
      while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {
        var len = state.length;
        debug("maybeReadMore read 0");
        stream.read(0);
        if (len === state.length)
          break;
      }
      state.readingMore = false;
    }
    Readable.prototype._read = function(n) {
      errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()"));
    };
    Readable.prototype.pipe = function(dest, pipeOpts) {
      var src = this;
      var state = this._readableState;
      switch (state.pipesCount) {
        case 0:
          state.pipes = dest;
          break;
        case 1:
          state.pipes = [state.pipes, dest];
          break;
        default:
          state.pipes.push(dest);
          break;
      }
      state.pipesCount += 1;
      debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts);
      var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
      var endFn = doEnd ? onend : unpipe;
      if (state.endEmitted)
        process.nextTick(endFn);
      else
        src.once("end", endFn);
      dest.on("unpipe", onunpipe);
      function onunpipe(readable, unpipeInfo) {
        debug("onunpipe");
        if (readable === src) {
          if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
            unpipeInfo.hasUnpiped = true;
            cleanup2();
          }
        }
      }
      function onend() {
        debug("onend");
        dest.end();
      }
      var ondrain = pipeOnDrain(src);
      dest.on("drain", ondrain);
      var cleanedUp = false;
      function cleanup2() {
        debug("cleanup");
        dest.removeListener("close", onclose);
        dest.removeListener("finish", onfinish);
        dest.removeListener("drain", ondrain);
        dest.removeListener("error", onerror);
        dest.removeListener("unpipe", onunpipe);
        src.removeListener("end", onend);
        src.removeListener("end", unpipe);
        src.removeListener("data", ondata);
        cleanedUp = true;
        if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain))
          ondrain();
      }
      src.on("data", ondata);
      function ondata(chunk) {
        debug("ondata");
        var ret = dest.write(chunk);
        debug("dest.write", ret);
        if (ret === false) {
          if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
            debug("false write response, pause", state.awaitDrain);
            state.awaitDrain++;
          }
          src.pause();
        }
      }
      function onerror(er) {
        debug("onerror", er);
        unpipe();
        dest.removeListener("error", onerror);
        if (EElistenerCount(dest, "error") === 0)
          errorOrDestroy(dest, er);
      }
      prependListener(dest, "error", onerror);
      function onclose() {
        dest.removeListener("finish", onfinish);
        unpipe();
      }
      dest.once("close", onclose);
      function onfinish() {
        debug("onfinish");
        dest.removeListener("close", onclose);
        unpipe();
      }
      dest.once("finish", onfinish);
      function unpipe() {
        debug("unpipe");
        src.unpipe(dest);
      }
      dest.emit("pipe", src);
      if (!state.flowing) {
        debug("pipe resume");
        src.resume();
      }
      return dest;
    };
    function pipeOnDrain(src) {
      return function pipeOnDrainFunctionResult() {
        var state = src._readableState;
        debug("pipeOnDrain", state.awaitDrain);
        if (state.awaitDrain)
          state.awaitDrain--;
        if (state.awaitDrain === 0 && EElistenerCount(src, "data")) {
          state.flowing = true;
          flow(src);
        }
      };
    }
    Readable.prototype.unpipe = function(dest) {
      var state = this._readableState;
      var unpipeInfo = {
        hasUnpiped: false
      };
      if (state.pipesCount === 0)
        return this;
      if (state.pipesCount === 1) {
        if (dest && dest !== state.pipes)
          return this;
        if (!dest)
          dest = state.pipes;
        state.pipes = null;
        state.pipesCount = 0;
        state.flowing = false;
        if (dest)
          dest.emit("unpipe", this, unpipeInfo);
        return this;
      }
      if (!dest) {
        var dests = state.pipes;
        var len = state.pipesCount;
        state.pipes = null;
        state.pipesCount = 0;
        state.flowing = false;
        for (var i = 0; i < len; i++)
          dests[i].emit("unpipe", this, {
            hasUnpiped: false
          });
        return this;
      }
      var index = indexOf(state.pipes, dest);
      if (index === -1)
        return this;
      state.pipes.splice(index, 1);
      state.pipesCount -= 1;
      if (state.pipesCount === 1)
        state.pipes = state.pipes[0];
      dest.emit("unpipe", this, unpipeInfo);
      return this;
    };
    Readable.prototype.on = function(ev, fn) {
      var res = Stream.prototype.on.call(this, ev, fn);
      var state = this._readableState;
      if (ev === "data") {
        state.readableListening = this.listenerCount("readable") > 0;
        if (state.flowing !== false)
          this.resume();
      } else if (ev === "readable") {
        if (!state.endEmitted && !state.readableListening) {
          state.readableListening = state.needReadable = true;
          state.flowing = false;
          state.emittedReadable = false;
          debug("on readable", state.length, state.reading);
          if (state.length) {
            emitReadable(this);
          } else if (!state.reading) {
            process.nextTick(nReadingNextTick, this);
          }
        }
      }
      return res;
    };
    Readable.prototype.addListener = Readable.prototype.on;
    Readable.prototype.removeListener = function(ev, fn) {
      var res = Stream.prototype.removeListener.call(this, ev, fn);
      if (ev === "readable") {
        process.nextTick(updateReadableListening, this);
      }
      return res;
    };
    Readable.prototype.removeAllListeners = function(ev) {
      var res = Stream.prototype.removeAllListeners.apply(this, arguments);
      if (ev === "readable" || ev === void 0) {
        process.nextTick(updateReadableListening, this);
      }
      return res;
    };
    function updateReadableListening(self2) {
      var state = self2._readableState;
      state.readableListening = self2.listenerCount("readable") > 0;
      if (state.resumeScheduled && !state.paused) {
        state.flowing = true;
      } else if (self2.listenerCount("data") > 0) {
        self2.resume();
      }
    }
    function nReadingNextTick(self2) {
      debug("readable nexttick read 0");
      self2.read(0);
    }
    Readable.prototype.resume = function() {
      var state = this._readableState;
      if (!state.flowing) {
        debug("resume");
        state.flowing = !state.readableListening;
        resume(this, state);
      }
      state.paused = false;
      return this;
    };
    function resume(stream, state) {
      if (!state.resumeScheduled) {
        state.resumeScheduled = true;
        process.nextTick(resume_, stream, state);
      }
    }
    function resume_(stream, state) {
      debug("resume", state.reading);
      if (!state.reading) {
        stream.read(0);
      }
      state.resumeScheduled = false;
      stream.emit("resume");
      flow(stream);
      if (state.flowing && !state.reading)
        stream.read(0);
    }
    Readable.prototype.pause = function() {
      debug("call pause flowing=%j", this._readableState.flowing);
      if (this._readableState.flowing !== false) {
        debug("pause");
        this._readableState.flowing = false;
        this.emit("pause");
      }
      this._readableState.paused = true;
      return this;
    };
    function flow(stream) {
      var state = stream._readableState;
      debug("flow", state.flowing);
      while (state.flowing && stream.read() !== null)
        ;
    }
    Readable.prototype.wrap = function(stream) {
      var _this = this;
      var state = this._readableState;
      var paused = false;
      stream.on("end", function() {
        debug("wrapped end");
        if (state.decoder && !state.ended) {
          var chunk = state.decoder.end();
          if (chunk && chunk.length)
            _this.push(chunk);
        }
        _this.push(null);
      });
      stream.on("data", function(chunk) {
        debug("wrapped data");
        if (state.decoder)
          chunk = state.decoder.write(chunk);
        if (state.objectMode && (chunk === null || chunk === void 0))
          return;
        else if (!state.objectMode && (!chunk || !chunk.length))
          return;
        var ret = _this.push(chunk);
        if (!ret) {
          paused = true;
          stream.pause();
        }
      });
      for (var i in stream) {
        if (this[i] === void 0 && typeof stream[i] === "function") {
          this[i] = function methodWrap(method) {
            return function methodWrapReturnFunction() {
              return stream[method].apply(stream, arguments);
            };
          }(i);
        }
      }
      for (var n = 0; n < kProxyEvents.length; n++) {
        stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
      }
      this._read = function(n2) {
        debug("wrapped _read", n2);
        if (paused) {
          paused = false;
          stream.resume();
        }
      };
      return this;
    };
    if (typeof Symbol === "function") {
      Readable.prototype[Symbol.asyncIterator] = function() {
        if (createReadableStreamAsyncIterator === void 0) {
          createReadableStreamAsyncIterator = require_async_iterator();
        }
        return createReadableStreamAsyncIterator(this);
      };
    }
    Object.defineProperty(Readable.prototype, "readableHighWaterMark", {
      enumerable: false,
      get: function get() {
        return this._readableState.highWaterMark;
      }
    });
    Object.defineProperty(Readable.prototype, "readableBuffer", {
      enumerable: false,
      get: function get() {
        return this._readableState && this._readableState.buffer;
      }
    });
    Object.defineProperty(Readable.prototype, "readableFlowing", {
      enumerable: false,
      get: function get() {
        return this._readableState.flowing;
      },
      set: function set(state) {
        if (this._readableState) {
          this._readableState.flowing = state;
        }
      }
    });
    Readable._fromList = fromList;
    Object.defineProperty(Readable.prototype, "readableLength", {
      enumerable: false,
      get: function get() {
        return this._readableState.length;
      }
    });
    function fromList(n, state) {
      if (state.length === 0)
        return null;
      var ret;
      if (state.objectMode)
        ret = state.buffer.shift();
      else if (!n || n >= state.length) {
        if (state.decoder)
          ret = state.buffer.join("");
        else if (state.buffer.length === 1)
          ret = state.buffer.first();
        else
          ret = state.buffer.concat(state.length);
        state.buffer.clear();
      } else {
        ret = state.buffer.consume(n, state.decoder);
      }
      return ret;
    }
    function endReadable(stream) {
      var state = stream._readableState;
      debug("endReadable", state.endEmitted);
      if (!state.endEmitted) {
        state.ended = true;
        process.nextTick(endReadableNT, state, stream);
      }
    }
    function endReadableNT(state, stream) {
      debug("endReadableNT", state.endEmitted, state.length);
      if (!state.endEmitted && state.length === 0) {
        state.endEmitted = true;
        stream.readable = false;
        stream.emit("end");
        if (state.autoDestroy) {
          var wState = stream._writableState;
          if (!wState || wState.autoDestroy && wState.finished) {
            stream.destroy();
          }
        }
      }
    }
    if (typeof Symbol === "function") {
      Readable.from = function(iterable, opts) {
        if (from === void 0) {
          from = require_from_browser();
        }
        return from(Readable, iterable, opts);
      };
    }
    function indexOf(xs, x) {
      for (var i = 0, l = xs.length; i < l; i++) {
        if (xs[i] === x)
          return i;
      }
      return -1;
    }
  }
});

// node_modules/readable-stream/lib/_stream_transform.js
var require_stream_transform = __commonJS({
  "node_modules/readable-stream/lib/_stream_transform.js"(exports, module2) {
    "use strict";
    module2.exports = Transform;
    var _require$codes = require_errors_browser().codes;
    var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
    var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
    var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
    var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
    var Duplex = require_stream_duplex();
    require_inherits_browser()(Transform, Duplex);
    function afterTransform(er, data) {
      var ts = this._transformState;
      ts.transforming = false;
      var cb = ts.writecb;
      if (cb === null) {
        return this.emit("error", new ERR_MULTIPLE_CALLBACK());
      }
      ts.writechunk = null;
      ts.writecb = null;
      if (data != null)
        this.push(data);
      cb(er);
      var rs = this._readableState;
      rs.reading = false;
      if (rs.needReadable || rs.length < rs.highWaterMark) {
        this._read(rs.highWaterMark);
      }
    }
    function Transform(options) {
      if (!(this instanceof Transform))
        return new Transform(options);
      Duplex.call(this, options);
      this._transformState = {
        afterTransform: afterTransform.bind(this),
        needTransform: false,
        transforming: false,
        writecb: null,
        writechunk: null,
        writeencoding: null
      };
      this._readableState.needReadable = true;
      this._readableState.sync = false;
      if (options) {
        if (typeof options.transform === "function")
          this._transform = options.transform;
        if (typeof options.flush === "function")
          this._flush = options.flush;
      }
      this.on("prefinish", prefinish);
    }
    function prefinish() {
      var _this = this;
      if (typeof this._flush === "function" && !this._readableState.destroyed) {
        this._flush(function(er, data) {
          done(_this, er, data);
        });
      } else {
        done(this, null, null);
      }
    }
    Transform.prototype.push = function(chunk, encoding) {
      this._transformState.needTransform = false;
      return Duplex.prototype.push.call(this, chunk, encoding);
    };
    Transform.prototype._transform = function(chunk, encoding, cb) {
      cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
    };
    Transform.prototype._write = function(chunk, encoding, cb) {
      var ts = this._transformState;
      ts.writecb = cb;
      ts.writechunk = chunk;
      ts.writeencoding = encoding;
      if (!ts.transforming) {
        var rs = this._readableState;
        if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark)
          this._read(rs.highWaterMark);
      }
    };
    Transform.prototype._read = function(n) {
      var ts = this._transformState;
      if (ts.writechunk !== null && !ts.transforming) {
        ts.transforming = true;
        this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
      } else {
        ts.needTransform = true;
      }
    };
    Transform.prototype._destroy = function(err, cb) {
      Duplex.prototype._destroy.call(this, err, function(err2) {
        cb(err2);
      });
    };
    function done(stream, er, data) {
      if (er)
        return stream.emit("error", er);
      if (data != null)
        stream.push(data);
      if (stream._writableState.length)
        throw new ERR_TRANSFORM_WITH_LENGTH_0();
      if (stream._transformState.transforming)
        throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
      return stream.push(null);
    }
  }
});

// node_modules/readable-stream/lib/_stream_passthrough.js
var require_stream_passthrough = __commonJS({
  "node_modules/readable-stream/lib/_stream_passthrough.js"(exports, module2) {
    "use strict";
    module2.exports = PassThrough;
    var Transform = require_stream_transform();
    require_inherits_browser()(PassThrough, Transform);
    function PassThrough(options) {
      if (!(this instanceof PassThrough))
        return new PassThrough(options);
      Transform.call(this, options);
    }
    PassThrough.prototype._transform = function(chunk, encoding, cb) {
      cb(null, chunk);
    };
  }
});

// node_modules/readable-stream/lib/internal/streams/pipeline.js
var require_pipeline = __commonJS({
  "node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports, module2) {
    "use strict";
    var eos;
    function once(callback) {
      var called = false;
      return function() {
        if (called)
          return;
        called = true;
        callback.apply(void 0, arguments);
      };
    }
    var _require$codes = require_errors_browser().codes;
    var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
    var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
    function noop(err) {
      if (err)
        throw err;
    }
    function isRequest(stream) {
      return stream.setHeader && typeof stream.abort === "function";
    }
    function destroyer(stream, reading, writing, callback) {
      callback = once(callback);
      var closed = false;
      stream.on("close", function() {
        closed = true;
      });
      if (eos === void 0)
        eos = require_end_of_stream();
      eos(stream, {
        readable: reading,
        writable: writing
      }, function(err) {
        if (err)
          return callback(err);
        closed = true;
        callback();
      });
      var destroyed = false;
      return function(err) {
        if (closed)
          return;
        if (destroyed)
          return;
        destroyed = true;
        if (isRequest(stream))
          return stream.abort();
        if (typeof stream.destroy === "function")
          return stream.destroy();
        callback(err || new ERR_STREAM_DESTROYED("pipe"));
      };
    }
    function call(fn) {
      fn();
    }
    function pipe(from, to) {
      return from.pipe(to);
    }
    function popCallback(streams) {
      if (!streams.length)
        return noop;
      if (typeof streams[streams.length - 1] !== "function")
        return noop;
      return streams.pop();
    }
    function pipeline() {
      for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
        streams[_key] = arguments[_key];
      }
      var callback = popCallback(streams);
      if (Array.isArray(streams[0]))
        streams = streams[0];
      if (streams.length < 2) {
        throw new ERR_MISSING_ARGS("streams");
      }
      var error;
      var destroys = streams.map(function(stream, i) {
        var reading = i < streams.length - 1;
        var writing = i > 0;
        return destroyer(stream, reading, writing, function(err) {
          if (!error)
            error = err;
          if (err)
            destroys.forEach(call);
          if (reading)
            return;
          destroys.forEach(call);
          callback(error);
        });
      });
      return streams.reduce(pipe);
    }
    module2.exports = pipeline;
  }
});

// node_modules/readable-stream/readable-browser.js
var require_readable_browser = __commonJS({
  "node_modules/readable-stream/readable-browser.js"(exports, module2) {
    exports = module2.exports = require_stream_readable();
    exports.Stream = exports;
    exports.Readable = exports;
    exports.Writable = require_stream_writable();
    exports.Duplex = require_stream_duplex();
    exports.Transform = require_stream_transform();
    exports.PassThrough = require_stream_passthrough();
    exports.finished = require_end_of_stream();
    exports.pipeline = require_pipeline();
  }
});

// node_modules/readable-web-to-node-stream/lib/index.js
var require_lib4 = __commonJS({
  "node_modules/readable-web-to-node-stream/lib/index.js"(exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.ReadableWebToNodeStream = void 0;
    var readable_stream_1 = require_readable_browser();
    var ReadableWebToNodeStream2 = class extends readable_stream_1.Readable {
      constructor(stream) {
        super();
        this.bytesRead = 0;
        this.released = false;
        this.reader = stream.getReader();
      }
      async _read() {
        if (this.released) {
          this.push(null);
          return;
        }
        this.pendingRead = this.reader.read();
        const data = await this.pendingRead;
        delete this.pendingRead;
        if (data.done || this.released) {
          this.push(null);
        } else {
          this.bytesRead += data.value.length;
          this.push(data.value);
        }
      }
      async waitForReadToComplete() {
        if (this.pendingRead) {
          await this.pendingRead;
        }
      }
      async close() {
        await this.syncAndRelease();
      }
      async syncAndRelease() {
        this.released = true;
        await this.waitForReadToComplete();
        await this.reader.releaseLock();
      }
    };
    exports.ReadableWebToNodeStream = ReadableWebToNodeStream2;
  }
});

// node_modules/ieee754/index.js
var require_ieee754 = __commonJS({
  "node_modules/ieee754/index.js"(exports) {
    exports.read = function(buffer, offset, isLE, mLen, nBytes) {
      var e, m;
      var eLen = nBytes * 8 - mLen - 1;
      var eMax = (1 << eLen) - 1;
      var eBias = eMax >> 1;
      var nBits = -7;
      var i = isLE ? nBytes - 1 : 0;
      var d = isLE ? -1 : 1;
      var s = buffer[offset + i];
      i += d;
      e = s & (1 << -nBits) - 1;
      s >>= -nBits;
      nBits += eLen;
      for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {
      }
      m = e & (1 << -nBits) - 1;
      e >>= -nBits;
      nBits += mLen;
      for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {
      }
      if (e === 0) {
        e = 1 - eBias;
      } else if (e === eMax) {
        return m ? NaN : (s ? -1 : 1) * Infinity;
      } else {
        m = m + Math.pow(2, mLen);
        e = e - eBias;
      }
      return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
    };
    exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
      var e, m, c;
      var eLen = nBytes * 8 - mLen - 1;
      var eMax = (1 << eLen) - 1;
      var eBias = eMax >> 1;
      var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
      var i = isLE ? 0 : nBytes - 1;
      var d = isLE ? 1 : -1;
      var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
      value = Math.abs(value);
      if (isNaN(value) || value === Infinity) {
        m = isNaN(value) ? 1 : 0;
        e = eMax;
      } else {
        e = Math.floor(Math.log(value) / Math.LN2);
        if (value * (c = Math.pow(2, -e)) < 1) {
          e--;
          c *= 2;
        }
        if (e + eBias >= 1) {
          value += rt / c;
        } else {
          value += rt * Math.pow(2, 1 - eBias);
        }
        if (value * c >= 2) {
          e++;
          c /= 2;
        }
        if (e + eBias >= eMax) {
          m = 0;
          e = eMax;
        } else if (e + eBias >= 1) {
          m = (value * c - 1) * Math.pow(2, mLen);
          e = e + eBias;
        } else {
          m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
          e = 0;
        }
      }
      for (; mLen >= 8; buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
      }
      e = e << mLen | m;
      eLen += mLen;
      for (; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
      }
      buffer[offset + i - d] |= s * 128;
    };
  }
});

// scripts/main.ts
var main_exports = {};
__export(main_exports, {
  default: () => HTMLExportPlugin
});
module.exports = __toCommonJS(main_exports);
var import_obsidian13 = require("obsidian");

// assets/graph-view.txt.js
var graph_view_txt_default = `// -------------------------- GRAPH VIEW --------------------------
var running = false;
let batchFraction = 1; // how much of the graph to update per frame
let minBatchFraction = 0.3; // batch fraction is updated dynamically, but never goes below this value
let dt = 1;
let targetFPS = 40;
let startingCameraRect = {minX: -1, minY: -1, maxX: 1, maxY: 1};

let mouseWorldPos = { x: undefined, y: undefined };
let scrollVelocity = 0;
let averageFPS = targetFPS * 2;

let pixiApp = undefined;
let graphRenderer = undefined;

class GraphAssembly
{
    static nodeCount = 0;
    static linkCount = 0;
    static hoveredNode = -1;

    static #positionsPtr = 0;
    static #positionsByteLength = 0;
    static #radiiPtr = 0;
    static #linkSourcesPtr = 0;
    static #linkTargetsPtr = 0;

    static linkSources = new Int32Array(0);
    static linkTargets = new Int32Array(0);
    static radii = new Float32Array(0);
    static maxRadius = 0;
    static averageRadius = 0;
    static minRadius = 0;

    /**  
     * @param {{graphOptions: {attractionForce: number, linkLength: number, repulsionForce: number, centralForce: number, edgePruning: number, minNodeRadius: number, maxNodeRadius: number}, nodeCount: number, linkCount:number, radii: number[], labels: string[], paths: string[], linkSources: number[], linkTargets: number[], linkCounts: number[]}} graphData
    */
    static init(graphData)
    {
        GraphAssembly.nodeCount = graphData.nodeCount;
        GraphAssembly.linkCount = graphData.linkCount;

        // create arrays for the data
        let positions = new Float32Array(GraphAssembly.nodeCount * 2);
        GraphAssembly.radii = new Float32Array(graphData.radii);
        GraphAssembly.linkSources = new Int32Array(graphData.linkSources);
        GraphAssembly.linkTargets = new Int32Array(graphData.linkTargets);

        // allocate memory on the heap
        GraphAssembly.#positionsPtr = Module._malloc(positions.byteLength);
        GraphAssembly.#positionsByteLength = positions.byteLength;
        GraphAssembly.#radiiPtr = Module._malloc(GraphAssembly.radii.byteLength);
        GraphAssembly.#linkSourcesPtr = Module._malloc(GraphAssembly.linkSources.byteLength);
        GraphAssembly.#linkTargetsPtr = Module._malloc(GraphAssembly.linkTargets.byteLength);

        GraphAssembly.maxRadius = GraphAssembly.radii.reduce((a, b) => Math.max(a, b));
        GraphAssembly.averageRadius = GraphAssembly.radii.reduce((a, b) => a + b) / GraphAssembly.radii.length;
        GraphAssembly.minRadius = GraphAssembly.radii.reduce((a, b) => Math.min(a, b));

        positions = this.loadState();

        // copy the data to the heap
        Module.HEAP32.set(new Int32Array(positions.buffer), GraphAssembly.#positionsPtr / positions.BYTES_PER_ELEMENT);
        Module.HEAP32.set(new Int32Array(GraphAssembly.radii.buffer), GraphAssembly.#radiiPtr / GraphAssembly.radii.BYTES_PER_ELEMENT);
        Module.HEAP32.set(new Int32Array(GraphAssembly.linkSources.buffer), GraphAssembly.#linkSourcesPtr / GraphAssembly.linkSources.BYTES_PER_ELEMENT);
        Module.HEAP32.set(new Int32Array(GraphAssembly.linkTargets.buffer), GraphAssembly.#linkTargetsPtr / GraphAssembly.linkTargets.BYTES_PER_ELEMENT);

        Module._Init(
            GraphAssembly.#positionsPtr, 
            GraphAssembly.#radiiPtr, 
            GraphAssembly.#linkSourcesPtr, 
            GraphAssembly.#linkTargetsPtr, 
            GraphAssembly.nodeCount, 
            GraphAssembly.linkCount, 
            batchFraction, 
            dt, 
            graphData.graphOptions.attractionForce, 
            graphData.graphOptions.linkLength, 
            graphData.graphOptions.repulsionForce,
            graphData.graphOptions.centralForce,
        );
    }

    /**
     * @returns {Float32Array}
     */
    static get positions()
    {
        return Module.HEAP32.buffer.slice(GraphAssembly.#positionsPtr, GraphAssembly.#positionsPtr + GraphAssembly.#positionsByteLength);
    }

    /**
     * @param {GraphRenderWorker} renderWorker
     * */ 
    static saveState(renderWorker)
    {
		// save all rounded to int
        localStorage.setItem("positions", JSON.stringify(new Float32Array(GraphAssembly.positions).map(x => Math.round(x))));
    }

    /**
     * @returns {Float32Array}
     * */
    static loadState()
    {
        let positionsLoad = localStorage.getItem("positions");
        let positions = null;
        if(positionsLoad) positions = new Float32Array(Object.values(JSON.parse(positionsLoad)));
        if (!positions || !positionsLoad || positions.length != GraphAssembly.nodeCount * 2)
        {
            positions = new Float32Array(GraphAssembly.nodeCount * 2);
            let spawnRadius = (GraphAssembly.averageRadius * Math.sqrt(GraphAssembly.nodeCount)) * 2;
            for (let i = 0; i < GraphAssembly.nodeCount; i++) 
            {
                let distance = (1 - GraphAssembly.radii[i] / GraphAssembly.maxRadius) * spawnRadius;
                positions[i * 2] = Math.cos(i/GraphAssembly.nodeCount * 7.41 * 2 * Math.PI) * distance;
                positions[i * 2 + 1] = Math.sin(i/GraphAssembly.nodeCount * 7.41 * 2 * Math.PI) * distance;
            }
        }

		// fit view to positions
		let minX = Infinity;
		let maxX = -Infinity;
		let minY = Infinity;
		let maxY = -Infinity;
		for (let i = 0; i < GraphAssembly.nodeCount-1; i+=2)
		{
			let pos = { x: positions[i], y: positions[i + 1] };
			minX = Math.min(minX, pos.x);
			maxX = Math.max(maxX, pos.x);
			minY = Math.min(minY, pos.y);
			maxY = Math.max(maxY, pos.y);
		}

		let margin = 50;

		startingCameraRect = { minX: minX - margin, minY: minY - margin, maxX: maxX + margin, maxY: maxY + margin };

        return positions;
    }

    /**
     * @param {{x: number, y: number}} mousePosition
     * @param {number} grabbedNode
     */
    static update(mousePosition, grabbedNode, cameraScale)
    {
        GraphAssembly.hoveredNode = Module._Update(mousePosition.x, mousePosition.y, grabbedNode, cameraScale);
    }

    static free()
    {
        Module._free(GraphAssembly.#positionsPtr);
        Module._free(GraphAssembly.#radiiPtr);
        Module._free(GraphAssembly.#linkSourcesPtr);
        Module._free(GraphAssembly.#linkTargetsPtr);
        Module._FreeMemory();
    }

    /**
     * @param {number} value
     */
    static set batchFraction(value)
    {
        Module._SetBatchFractionSize(value);
    }
    
    /**
     * @param {number} value
     */
    static set attractionForce(value)
    {
        Module._SetAttractionForce(value);
    }

    /**
     * @param {number} value
     */
    static set repulsionForce(value)
    {
        Module._SetRepulsionForce(value);
    }

    /**
     * @param {number} value
     */
    static set centralForce(value)
    {
        Module._SetCentralForce(value);
    }

    /**
     * @param {number} value
     */
    static set linkLength(value)
    {
        Module._SetLinkLength(value);
    }

    /**
     * @param {number} value
     */
    static set dt(value)
    {
        Module._SetDt(value);
    }
}

class GraphRenderWorker
{
    #cameraOffset;
    #cameraScale;
    #hoveredNode;
    #grabbedNode;
    #colors;
    #width;
    #height;


    constructor()
    {
        this.canvas = document.querySelector("#graph-canvas");
		this.canvasSidebar = undefined;

		try
		{
			this.canvasSidebar = document.querySelector(".sidebar:has(#graph-canvas)");
		}
		catch(e)
		{
			console.log("Error: " + e + "\\n\\n Using fallback.");
			
			let rightSidebar = document.querySelector(".sidebar-right");
			let leftSidebar = document.querySelector(".sidebar-left");

			this.canvasSidebar = rightSidebar.querySelector("#graph-canvas") ? rightSidebar : leftSidebar;
		}

        this.view = this.canvas.transferControlToOffscreen();

        this.worker = new Worker(new URL("./graph-render-worker.js", import.meta.url));

        this.#cameraOffset = {x: 0, y: 0};
        this.#cameraScale = 1;
        this.#hoveredNode = -1;
        this.#grabbedNode = -1;
        this.#colors = 
        {
            background: 0x000000,
            link: 0x000000,
            node: 0x000000,
            outline: 0x000000,
            text: 0x000000,
            accent: 0x000000,
        }
        this.#width = 0;
        this.#height = 0;

        this.cameraOffset = {x: this.canvas.width / 2, y: this.canvas.height / 2};
        this.cameraScale = 1;
        this.hoveredNode = -1;
        this.grabbedNode = -1;
        this.resampleColors();

        this.#pixiInit();

        this.width = this.canvas.width;
        this.height = this.canvas.height;

        this.autoResizeCanvas();

        this.fitToRect(startingCameraRect);
    }

    #pixiInit()
    {
        let { width, height } = this.view;

        this.worker.postMessage(
        {
            type: 'init',
            linkCount: GraphAssembly.linkCount,
            linkSources: GraphAssembly.linkSources,
            linkTargets: GraphAssembly.linkTargets,
            nodeCount: GraphAssembly.nodeCount,
            radii: GraphAssembly.radii,
            labels: graphData.labels,
            linkLength: graphData.graphOptions.linkLength,
            edgePruning: graphData.graphOptions.edgePruning,
            options: { width: width, height: height, view: this.view },
        }, [this.view]);
    }

	fitToRect(rect) // {minX, minY, maxX, maxY}
	{
		let min = {x: rect.minX, y: rect.minY};
		let max = {x: rect.maxX, y: rect.maxY};

		let width = max.x - min.x;
		let height = max.y - min.y;

		let scale = 1/Math.min(width/this.width, height / this.height);

		this.cameraScale = scale;
		this.cameraOffset = { x: (this.width / 2) - ((rect.minX + width / 2) * scale), y: (this.height / 2) - ((rect.minY + height / 2) * scale) };
	}

	fitToNodes()
	{
		this.fitToRect(startingCameraRect);
	}

	sampleColor(variable) 
	{
		let testEl = document.createElement('div');
		document.body.appendChild(testEl);
		testEl.style.setProperty('display', 'none');
		testEl.style.setProperty('color', 'var(' + variable + ')');

		let col = getComputedStyle(testEl).color;
		let opacity = getComputedStyle(testEl).opacity;

		testEl.remove();

		function toColorObject(str)
		{
			var match = str.match(/rgb?\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)/);
			return match ? {
				red: parseInt(match[1]),
				green: parseInt(match[2]),
				blue: parseInt(match[3]),
				alpha: 1
			} : null
		}

		let color = toColorObject(col);
		let alpha = parseFloat(opacity);
		let result = 
		{
			a: (alpha * color?.alpha ?? 1) ?? 1,
			rgb: (color?.red << 16 | color?.green << 8 | color?.blue) ?? 0x888888
		};

		return result;
	};

    resampleColors()
    {
        this.colors =
        {
            background: this.sampleColor('--background-secondary').rgb,
            link: this.sampleColor('--graph-line').rgb,
            node: this.sampleColor('--graph-node').rgb,
            outline: this.sampleColor('--graph-line').rgb,
            text: this.sampleColor('--graph-text').rgb,
            accent: this.sampleColor('--interactive-accent').rgb,
        };
    }

    draw(_positions)
    {
        this.worker.postMessage(
        {
            type: 'draw',
            positions: _positions,
        }, [_positions]);
    }

    resizeCanvas(width, height)
    {
        this.worker.postMessage(
        {
            type: "resize",
            width: width,
            height: height,
        });

        this.#width = width;
        this.#height = height;
    }

    autoResizeCanvas()
    {
		if (this.width != this.canvas.offsetWidth || this.height != this.canvas.offsetHeight)
		{
			this.centerCamera();
        	this.resizeCanvas(this.canvas.offsetWidth, this.canvas.offsetHeight);
		}
    }

    centerCamera()
    {
        this.cameraOffset = { x: this.width / 2, y: this.height / 2 };
    }

    #pixiSetInteraction(hoveredNodeIndex, grabbedNodeIndex)
    {   
        let obj = 
        {
            type: "update_interaction",
            hoveredNode: hoveredNodeIndex,
            grabbedNode: grabbedNodeIndex,
        }

        this.worker.postMessage(obj);
    }

    #pixiSetCamera(cameraOffset, cameraScale)
    {
        this.worker.postMessage(
        {
            type: "update_camera",
            cameraOffset: cameraOffset,
            cameraScale: cameraScale,
        });
    }

    #pixiSetColors(colors)
    {
        this.worker.postMessage(
        {
            type: "update_colors",
            colors: colors,
        });

    }

    set cameraOffset(offset)
    {
        this.#cameraOffset = offset;
        this.#pixiSetCamera(offset, this.cameraScale);
    }

    set cameraScale(scale)
    {
        this.#cameraScale = scale;
        this.#pixiSetCamera(this.cameraOffset, scale);
    }

    get cameraOffset()
    {
        return this.#cameraOffset;
    }

    get cameraScale()
    {
        return this.#cameraScale;
    }

    /**
     * @param {number} node
     */
    set hoveredNode(node)
    {
        this.#hoveredNode = node;
        this.#pixiSetInteraction(node, this.#grabbedNode);
    }

    /**
     * @param {number} node
     */
    set grabbedNode(node)
    {
        this.#grabbedNode = node;
        this.#pixiSetInteraction(this.#hoveredNode, node);
    }

    /**
     * @param {number} node
     */
    set activeNode(node)
    {
        this.worker.postMessage(
        {
            type: 'set_active',
            active: node,
        });
    }

    get hoveredNode()
    {
        return this.#hoveredNode;
    }

    get grabbedNode()
    {
        return this.#grabbedNode;
    }

    /**
     * @param {{ background: number; link: number; node: number; outline: number; text: number; accent: number; }} colors
     */
    set colors(colors)
    {
        this.#colors = colors;
        this.#pixiSetColors(colors);
    }

    get colors()
    {
        return this.#colors;
    }

    set width(width)
    {
        this.#width = width;
        this.resizeCanvas(width, this.#height);
    }

    set height(height)
    {
        this.#height = height;
        this.resizeCanvas(this.#width, height);
    }

    get height()
    {
        return this.#height;
    }

    get width()
    {
        return this.#width;
    }

    /**
     * @param {number} x
     * @param {number} y
     * @param {boolean} floor
     * @returns {{x: number; y: number;}}
     */
    toScreenSpace(x, y, floor = true)
    {
        if (floor)
        {
            return {x: Math.floor((x * this.cameraScale) + this.cameraOffset.x), y: Math.floor((y * this.cameraScale) + this.cameraOffset.y)};
        }
        else
        {
            return {x: (x * this.cameraScale) + this.cameraOffset.x, y: (y * this.cameraScale) + this.cameraOffset.y};
        }
    }

    /**
     * @param {{x: number; y: number;}} vector
     * @param {boolean} floor
     * @returns {{x: number; y: number;}}
    */
    vecToScreenSpace(vector, floor = true)
    {
        return this.toScreenSpace(vector.x, vector.y, floor);
    }

    /**
     * @param {number} x
     * @param {number} y
     * @returns {{x: number; y: number;}}
     */
    toWorldspace(x, y)
    {
        return {x: (x - this.cameraOffset.x) / this.cameraScale, y: (y - this.cameraOffset.y) / this.cameraScale};
    }

    /**
     * @param {{x: number; y: number;}} vector
     * @returns {{x: number; y: number;}}
     */
    vecToWorldspace(vector)
    {
        return this.toWorldspace(vector.x, vector.y);
    }

    setCameraCenterWorldspace({x, y})
    {
        this.cameraOffset = {x: (this.width / 2) - (x * this.cameraScale), y: (this.height / 2) - (y * this.cameraScale)};
    }

    getCameraCenterWorldspace()
    {
        return this.toWorldspace(this.width / 2, this.height / 2);
    }
}

async function initializeGraphView()
{
    if(running) return;
	running = true;

	graphData.graphOptions.repulsionForce /= batchFraction; // compensate for batch fraction
	pixiApp = new PIXI.Application();

    console.log("Module Ready");
    GraphAssembly.init(graphData); // graphData is a global variable set in another script

    graphRenderer = new GraphRenderWorker();
    window.graphRenderer = graphRenderer;

    initializeGraphEvents();

    pixiApp.ticker.maxFPS = targetFPS;
    pixiApp.ticker.add(updateGraph);

    setActiveDocument(new URL(window.location.href), false, false);

    setInterval(() =>
    {
        function isHidden(el) {
            var style = window.getComputedStyle(el);
            return (style.display === 'none')
        }

        try
        {
            var hidden = (graphRenderer.canvasSidebar.classList.contains("is-collapsed"));
        }
        catch(e)
        {
            return;
        }

        if(running && hidden)
        {
            running = false;
        }
        else if (!running && !hidden)
        {
            running = true;
            graphRenderer.autoResizeCanvas();
            graphRenderer.centerCamera();
        }

    }, 1000);
}

let firstUpdate = true;
function updateGraph()
{
    if(!running) return;

	if (graphRenderer.canvasSidebar.classList.contains("is-collapsed")) return;

	if (firstUpdate)
	{
		setTimeout(() => graphRenderer?.canvas?.classList.remove("hide"), 500);
		firstUpdate = false;
	}

    GraphAssembly.update(mouseWorldPos, graphRenderer.grabbedNode, graphRenderer.cameraScale);

    if (GraphAssembly.hoveredNode != graphRenderer.hoveredNode)
    {
        graphRenderer.hoveredNode = GraphAssembly.hoveredNode;
        graphRenderer.canvas.style.cursor = GraphAssembly.hoveredNode == -1 ? "default" : "pointer";
    }

	graphRenderer.autoResizeCanvas();
    graphRenderer.draw(GraphAssembly.positions);

    averageFPS = averageFPS * 0.95 + pixiApp.ticker.FPS * 0.05;

    if (averageFPS < targetFPS * 0.8 && batchFraction > minBatchFraction)
    {
        batchFraction = Math.max(batchFraction - 0.5 * 1/targetFPS, minBatchFraction);
        GraphAssembly.batchFraction = batchFraction;
        GraphAssembly.repulsionForce = graphData.graphOptions.repulsionForce / batchFraction;
    }

	if (averageFPS > targetFPS * 1.2 && batchFraction < 1)
	{
		batchFraction = Math.min(batchFraction + 0.5 * 1/targetFPS, 1);
		GraphAssembly.batchFraction = batchFraction;
		GraphAssembly.repulsionForce = graphData.graphOptions.repulsionForce / batchFraction;
	}

    if (scrollVelocity != 0)
    {
        let cameraCenter = graphRenderer.getCameraCenterWorldspace();

        if (Math.abs(scrollVelocity) < 0.001)
        {
            scrollVelocity = 0;
        }

        zoomGraphViewAroundPoint(mouseWorldPos, scrollVelocity);

        scrollVelocity *= 0.65;
    }
}

function zoomGraphViewAroundPoint(point, zoom, minScale = 0.15, maxScale = 15.0)
{
	let cameraCenter = graphRenderer.getCameraCenterWorldspace();

	graphRenderer.cameraScale = Math.max(Math.min(graphRenderer.cameraScale + zoom * graphRenderer.cameraScale, maxScale), minScale);
	if(graphRenderer.cameraScale != minScale && graphRenderer.cameraScale != maxScale && scrollVelocity > 0 && mouseWorldPos.x != undefined && mouseWorldPos.y != undefined)
	{
		let aroundDiff = {x: point.x - cameraCenter.x, y: point.y - cameraCenter.y};
		let movePos = {x: cameraCenter.x + aroundDiff.x * zoom, y: cameraCenter.y + aroundDiff.y * zoom};
		graphRenderer.setCameraCenterWorldspace(movePos);
	}
	else graphRenderer.setCameraCenterWorldspace(cameraCenter);
}

function scaleGraphViewAroundPoint(point, scale, minScale = 0.15, maxScale = 15.0)
{
	let cameraCenter = graphRenderer.getCameraCenterWorldspace();

	let scaleBefore = graphRenderer.cameraScale;
	graphRenderer.cameraScale = Math.max(Math.min(scale * graphRenderer.cameraScale, maxScale), minScale);
	let diff = (scaleBefore - graphRenderer.cameraScale) / scaleBefore;
	if(graphRenderer.cameraScale != minScale && graphRenderer.cameraScale != maxScale && scale != 0)
	{
		let aroundDiff = {x: point.x - cameraCenter.x, y: point.y - cameraCenter.y};
		let movePos = {x: cameraCenter.x - aroundDiff.x * diff, y: cameraCenter.y - aroundDiff.y * diff};
		graphRenderer.setCameraCenterWorldspace(movePos);
	}
	else graphRenderer.setCameraCenterWorldspace(cameraCenter);
}

function initializeGraphEvents()
{
    window.addEventListener('beforeunload', () => 
    {
        running = false;
        GraphAssembly.free();
    });

	let graphExpanded = false;
    let lastCanvasWidth = graphRenderer.canvas.width;
    window.addEventListener('resize', () =>
    {
        if(graphExpanded)
        {
            graphRenderer.autoResizeCanvas();
            graphRenderer.centerCamera();
        }
        else
        {
            if (graphRenderer.canvas.width != lastCanvasWidth)
            {
                graphRenderer.autoResizeCanvas();
                graphRenderer.centerCamera();
            }
        }
    });

    let container = document.querySelector(".graph-view-container");

	function handleOutsideClick(event)
	{
		if (event.composedPath().includes(container)) 
		{
			return;
		}
		toggleExpandedGraph();
	}

	function toggleExpandedGraph()
    {
        let initialWidth = container.clientWidth;
        let initialHeight = container.clientHeight;

        // scale and fade out animation:
        container.classList.add("scale-down");
        let fadeOutAnimation = container.animate({ opacity: 0 }, {duration: 100, easing: "ease-in", fill: "forwards"});
        fadeOutAnimation.addEventListener("finish", function()
        {
            container.classList.toggle("expanded");

            graphRenderer.autoResizeCanvas();
            graphRenderer.centerCamera();

            let finalWidth = container.clientWidth;
            let finalHeight = container.clientHeight;
            graphRenderer.cameraScale *= ((finalWidth / initialWidth) + (finalHeight / initialHeight)) / 2;

            container.classList.remove("scale-down");
            container.classList.add("scale-up");

            updateGraph();

            let fadeInAnimation = container.animate({ opacity: 1 }, {duration: 200, easing: "ease-out", fill: "forwards"});
            fadeInAnimation.addEventListener("finish", function()
            {
                container.classList.remove("scale-up");
            });
        });

        graphExpanded = !graphExpanded;
		
		if (graphExpanded) document.addEventListener("pointerdown", handleOutsideClick);
		else document.removeEventListener("pointerdown", handleOutsideClick);
    }

	async function navigateToNode(nodeIndex)
	{
		if (!graphExpanded) GraphAssembly.saveState(graphRenderer);
		else toggleExpandedGraph();
		let url = graphData.paths[nodeIndex];
		if(window.location.pathname.endsWith(graphData.paths[nodeIndex])) return;
		await loadDocument(url, true, true);
	}

    // Get the mouse position relative to the canvas.
	function getPointerPosOnCanvas(event)
	{
		var rect = graphRenderer.canvas.getBoundingClientRect();
		let pos = getPointerPosition(event);

		return {
			x: pos.x - rect.left,
			y: pos.y - rect.top
		};
	}

	let startPointerPos = { x: 0, y: 0 };
	let pointerPos = { x: 0, y: 0 };
	let lastPointerPos = { x: 0, y: 0 };
	let pointerDelta = { x: 0, y: 0 };
	let dragDisplacement = { x: 0, y: 0 };
	let startDragTime = 0;
	let pointerDown = false;
	let middleDown = false;
	let pointerInside = false;
	let graphContainer = document.querySelector(".graph-view-container");
	let firstPointerDownId = -1;

	function handlePointerEnter(enter)
	{
		let lastDistance = 0;
		let startZoom = false;

		function handleMouseMove(move)
		{
			pointerPos = getPointerPosOnCanvas(move);
			mouseWorldPos = graphRenderer.vecToWorldspace(pointerPos);
			pointerDelta = { x: pointerPos.x - lastPointerPos.x, y: pointerPos.y - lastPointerPos.y };
			lastPointerPos = pointerPos;

			if (graphRenderer.grabbedNode != -1) dragDisplacement = { x: pointerPos.x - startPointerPos.x, y: pointerPos.y - startPointerPos.y };

			if (pointerDown && graphRenderer.hoveredNode != -1 && graphRenderer.grabbedNode == -1 && graphRenderer.hoveredNode != graphRenderer.grabbedNode)
			{
				graphRenderer.grabbedNode = graphRenderer.hoveredNode;
			}

			if ((pointerDown && graphRenderer.hoveredNode == -1 && graphRenderer.grabbedNode == -1) || middleDown)
			{
				graphRenderer.cameraOffset = { x: graphRenderer.cameraOffset.x + pointerDelta.x, y: graphRenderer.cameraOffset.y + pointerDelta.y };
			}
			else
			{
				if (graphRenderer.hoveredNode != -1) graphRenderer.canvas.style.cursor = "pointer";
				else graphRenderer.canvas.style.cursor = "default";
			}
		}

		function handleTouchMove(move)
		{
			if (move.touches?.length == 1) 
			{
				if(startZoom)
				{
					lastPointerPos = getPointerPosOnCanvas(move);
					startZoom = false;
				}

				handleMouseMove(move);
				return;
			}

			// pinch zoom
			if (move.touches?.length == 2)
			{
				let touch1 = getTouchPosition(move.touches[0]);
				let touch2 = getTouchPosition(move.touches[1]);

				pointerPos = getPointerPosOnCanvas(move);
				pointerDelta = { x: pointerPos.x - lastPointerPos.x, y: pointerPos.y - lastPointerPos.y };
				lastPointerPos = pointerPos;

				let distance = Math.sqrt(Math.pow(touch1.x - touch2.x, 2) + Math.pow(touch1.y - touch2.y, 2));

				if (!startZoom)
				{
					startZoom = true;
					lastDistance = distance;
					pointerDelta = { x: 0, y: 0 };
					mouseWorldPos = { x: undefined, y: undefined};
					graphRenderer.grabbedNode = -1;
					graphRenderer.hoveredNode = -1;
				}

				let distanceDelta = distance - lastDistance;
				let scaleDelta = distanceDelta / lastDistance;

				scaleGraphViewAroundPoint(graphRenderer.vecToWorldspace(pointerPos), 1 + scaleDelta, 0.15, 15.0);
				graphRenderer.cameraOffset = { x: graphRenderer.cameraOffset.x + pointerDelta.x, y: graphRenderer.cameraOffset.y + pointerDelta.y };

				lastDistance = distance;
			}
		}

		function handlePointerUp(up)
		{
			document.removeEventListener("pointerup", handlePointerUp);

			let pointerUpTime = Date.now();

			setTimeout(() => 
			{
				if (pointerDown && graphRenderer.hoveredNode != -1 && Math.abs(dragDisplacement.x) <= 4 && Math.abs(dragDisplacement.y) <= 4 && pointerUpTime - startDragTime < 300)
				{
					navigateToNode(graphRenderer.hoveredNode);
				}

				if (pointerDown && graphRenderer.grabbedNode != -1)
				{
					graphRenderer.grabbedNode = -1;
				}

				if (up.button == 0) pointerDown = false;
				if (up.pointerType == "touch" && firstPointerDownId == up.pointerId) 
				{
					firstPointerDownId = -1;
					pointerDown = false;
				}
				if (up.button == 1) middleDown = false;
				if (!pointerInside) 
				{
					document.removeEventListener("mousemove", handleMouseMove);
					document.removeEventListener("touchmove", handleTouchMove);
				}
			}, 0);
		}

		function handlePointerDown(down)
		{
			document.addEventListener("pointerup", handlePointerUp);
			mouseWorldPos = graphRenderer.vecToWorldspace(pointerPos);
			dragDisplacement = { x: 0, y: 0 };
			if (down.button == 0) pointerDown = true;
			if (down.pointerType == "touch" && firstPointerDownId == -1) 
			{
				firstPointerDownId = down.pointerId;
				pointerDown = true;
			}
			if (down.button == 1) middleDown = true;

			startPointerPos = pointerPos;
			startDragTime = Date.now();

			if (pointerDown && graphRenderer.hoveredNode != -1)
			{
				graphRenderer.grabbedNode = graphRenderer.hoveredNode;
			}
		}

		function handlePointerLeave(leave)
		{
			setTimeout(() => 
			{
				pointerInside = false;
				if (!pointerDown) 
				{
					document.removeEventListener("mousemove", handleMouseMove);
					document.removeEventListener("touchmove", handleTouchMove);
					mouseWorldPos = { x: undefined, y: undefined };
				}
				graphContainer.removeEventListener("pointerdown", handlePointerDown);
				graphContainer.removeEventListener("pointerleave", handlePointerLeave);
			}, 1);
		}

		pointerPos = getPointerPosOnCanvas(enter);
		mouseWorldPos = graphRenderer.vecToWorldspace(pointerPos);
		lastPointerPos = getPointerPosOnCanvas(enter);
		pointerInside = true;

		document.addEventListener("mousemove", handleMouseMove);
		document.addEventListener("touchmove", handleTouchMove);
		graphContainer.addEventListener("pointerdown", handlePointerDown);
		graphContainer.addEventListener("pointerleave", handlePointerLeave);
	}

	graphContainer.addEventListener("pointerenter", handlePointerEnter);

	document.querySelector(".graph-expand.graph-icon")?.addEventListener("click", event =>
    {
        event.stopPropagation();

        toggleExpandedGraph();
    });

	graphContainer.addEventListener("wheel", function(e) 
	{
		let startingScrollVelocity = 0.09;
		let delta = e.deltaY;
		if (delta > 0)
		{
			if(scrollVelocity >= -startingScrollVelocity)
			{
				scrollVelocity = -startingScrollVelocity;
			}
			scrollVelocity *= 1.4;
		}
		else
		{
			if(scrollVelocity <= startingScrollVelocity)
			{
				scrollVelocity = startingScrollVelocity;
			}
			scrollVelocity *= 1.4;
		}
	});

	// recenter the graph on double click
	graphContainer.addEventListener("dblclick", function(e)
	{
		graphRenderer.fitToNodes();
	});

	document.querySelector(".theme-toggle-input")?.addEventListener("change", event =>
	{
		setTimeout(() => graphRenderer.resampleColors(), 0);
	});
}

window.addEventListener("load", () => 
{
	waitLoadScripts(["pixi", "graph-data", "graph-render-worker", "graph-wasm"],  () =>
	{
		Module['onRuntimeInitialized'] = initializeGraphView;
		setTimeout(() => Module['onRuntimeInitialized'](), 300);
	});
});
`;

// assets/graph-wasm.txt.js
var graph_wasm_txt_default = `
// Wasm glue
var Module = typeof Module != "undefined" ? Module : {};
var moduleOverrides = Object.assign({}, Module);
var arguments_ = [];
var thisProgram = "./this.program";
var quit_ = (status,toThrow)=>{
    throw toThrow
}
;
var ENVIRONMENT_IS_WEB = typeof window == "object";
var ENVIRONMENT_IS_WORKER = typeof importScripts == "function";
var ENVIRONMENT_IS_NODE = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string";
var scriptDirectory = "";
function locateFile(path) {
    if (Module["locateFile"]) {
        return Module["locateFile"](path, scriptDirectory)
    }
    return scriptDirectory + path
}
var read_, readAsync, readBinary, setWindowTitle;
if (ENVIRONMENT_IS_NODE) {
    var fs = require("fs");
    var nodePath = require("path");
    if (ENVIRONMENT_IS_WORKER) {
        scriptDirectory = nodePath.dirname(scriptDirectory) + "/"
    } else {
        scriptDirectory = __dirname + "/"
    }
    read_ = (filename,binary)=>{
        filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
        return fs.readFileSync(filename, binary ? undefined : "utf8")
    }
    ;
    readBinary = filename=>{
        var ret = read_(filename, true);
        if (!ret.buffer) {
            ret = new Uint8Array(ret)
        }
        return ret
    }
    ;
    readAsync = (filename,onload,onerror)=>{
        filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
        fs.readFile(filename, function(err, data) {
            if (err)
                onerror(err);
            else
                onload(data.buffer)
        })
    }
    ;
    if (!Module["thisProgram"] && process.argv.length > 1) {
        thisProgram = process.argv[1].replace(/\\\\/g, "/")
    }
    arguments_ = process.argv.slice(2);
    if (typeof module != "undefined") {
        module["exports"] = Module
    }
    process.on("uncaughtException", function(ex) {
        if (ex !== "unwind" && !(ex instanceof ExitStatus) && !(ex.context instanceof ExitStatus)) {
            throw ex
        }
    });
    var nodeMajor = process.versions.node.split(".")[0];
    if (nodeMajor < 15) {
        process.on("unhandledRejection", function(reason) {
            throw reason
        })
    }
    quit_ = (status,toThrow)=>{
        process.exitCode = status;
        throw toThrow
    }
    ;
    Module["inspect"] = function() {
        return "[Emscripten Module object]"
    }
} else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
    if (ENVIRONMENT_IS_WORKER) {
        scriptDirectory = self.location.href
    } else if (typeof document != "undefined" && document.currentScript) {
        scriptDirectory = document.currentScript.src
    }
    if (scriptDirectory.indexOf("blob:") !== 0) {
        scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf("/") + 1)
    } else {
        scriptDirectory = ""
    }
    {
        read_ = url=>{
            var xhr = new XMLHttpRequest;
            xhr.open("GET", url, false);
            xhr.send(null);
            return xhr.responseText
        }
        ;
        if (ENVIRONMENT_IS_WORKER) {
            readBinary = url=>{
                var xhr = new XMLHttpRequest;
                xhr.open("GET", url, false);
                xhr.responseType = "arraybuffer";
                xhr.send(null);
                return new Uint8Array(xhr.response)
            }
        }
        readAsync = (url,onload,onerror)=>{
            var xhr = new XMLHttpRequest;
            xhr.open("GET", url, true);
            xhr.responseType = "arraybuffer";
            xhr.onload = ()=>{
                if (xhr.status == 200 || xhr.status == 0 && xhr.response) {
                    onload(xhr.response);
                    return
                }
                onerror()
            }
            ;
            xhr.onerror = onerror;
            xhr.send(null)
        }
    }
    setWindowTitle = title=>document.title = title
} else {}
var out = Module["print"] || console.log.bind(console);
var err = Module["printErr"] || console.warn.bind(console);
Object.assign(Module, moduleOverrides);
moduleOverrides = null;
if (Module["arguments"])
    arguments_ = Module["arguments"];
if (Module["thisProgram"])
    thisProgram = Module["thisProgram"];
if (Module["quit"])
    quit_ = Module["quit"];
var wasmBinary;
if (Module["wasmBinary"])
    wasmBinary = Module["wasmBinary"];
var noExitRuntime = Module["noExitRuntime"] || true;
if (typeof WebAssembly != "object") {
    abort("no native wasm support detected")
}
var wasmMemory;
var ABORT = false;
var EXITSTATUS;
var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
function updateMemoryViews() {
    var b = wasmMemory.buffer;
    Module["HEAP8"] = HEAP8 = new Int8Array(b);
    Module["HEAP16"] = HEAP16 = new Int16Array(b);
    Module["HEAP32"] = HEAP32 = new Int32Array(b);
    Module["HEAPU8"] = HEAPU8 = new Uint8Array(b);
    Module["HEAPU16"] = HEAPU16 = new Uint16Array(b);
    Module["HEAPU32"] = HEAPU32 = new Uint32Array(b);
    Module["HEAPF32"] = HEAPF32 = new Float32Array(b);
    Module["HEAPF64"] = HEAPF64 = new Float64Array(b)
}
var wasmTable;
var __ATPRERUN__ = [];
var __ATINIT__ = [];
var __ATPOSTRUN__ = [];
var runtimeInitialized = false;
function preRun() {
    if (Module["preRun"]) {
        if (typeof Module["preRun"] == "function")
            Module["preRun"] = [Module["preRun"]];
        while (Module["preRun"].length) {
            addOnPreRun(Module["preRun"].shift())
        }
    }
    callRuntimeCallbacks(__ATPRERUN__)
}
function initRuntime() {
    runtimeInitialized = true;
    callRuntimeCallbacks(__ATINIT__)
}
function postRun() {
    if (Module["postRun"]) {
        if (typeof Module["postRun"] == "function")
            Module["postRun"] = [Module["postRun"]];
        while (Module["postRun"].length) {
            addOnPostRun(Module["postRun"].shift())
        }
    }
    callRuntimeCallbacks(__ATPOSTRUN__)
}
function addOnPreRun(cb) {
    __ATPRERUN__.unshift(cb)
}
function addOnInit(cb) {
    __ATINIT__.unshift(cb)
}
function addOnPostRun(cb) {
    __ATPOSTRUN__.unshift(cb)
}
var runDependencies = 0;
var runDependencyWatcher = null;
var dependenciesFulfilled = null;
function addRunDependency(id) {
    runDependencies++;
    if (Module["monitorRunDependencies"]) {
        Module["monitorRunDependencies"](runDependencies)
    }
}
function removeRunDependency(id) {
    runDependencies--;
    if (Module["monitorRunDependencies"]) {
        Module["monitorRunDependencies"](runDependencies)
    }
    if (runDependencies == 0) {
        if (runDependencyWatcher !== null) {
            clearInterval(runDependencyWatcher);
            runDependencyWatcher = null
        }
        if (dependenciesFulfilled) {
            var callback = dependenciesFulfilled;
            dependenciesFulfilled = null;
            callback()
        }
    }
}
function abort(what) {
    if (Module["onAbort"]) {
        Module["onAbort"](what)
    }
    what = "Aborted(" + what + ")";
    err(what);
    ABORT = true;
    EXITSTATUS = 1;
    what += ". Build with -sASSERTIONS for more info.";
    var e = new WebAssembly.RuntimeError(what);
    throw e
}
var dataURIPrefix = "data:application/octet-stream;base64,";
function isDataURI(filename) {
    return filename.startsWith(dataURIPrefix)
}
function isFileURI(filename) {
    return filename.startsWith("file://")
}
var wasmBinaryFile;
wasmBinaryFile = "graph-wasm.wasm";
if (!isDataURI(wasmBinaryFile)) {
    wasmBinaryFile = locateFile(wasmBinaryFile)
}
function getBinary(file) {
    try {
        if (file == wasmBinaryFile && wasmBinary) {
            return new Uint8Array(wasmBinary)
        }
        if (readBinary) {
            return readBinary(file)
        }
        throw "both async and sync fetching of the wasm failed"
    } catch (err) {
        abort(err)
    }
}
function getBinaryPromise(binaryFile) {
    if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {
        if (typeof fetch == "function" && !isFileURI(binaryFile)) {
            return fetch(binaryFile, {
                credentials: "same-origin"
            }).then(function(response) {
                if (!response["ok"]) {
                    throw "failed to load wasm binary file at '" + binaryFile + "'"
                }
                return response["arrayBuffer"]()
            }).catch(function() {
                return getBinary(binaryFile)
            })
        } else {
            if (readAsync) {
                return new Promise(function(resolve, reject) {
                    readAsync(binaryFile, function(response) {
                        resolve(new Uint8Array(response))
                    }, reject)
                }
                )
            }
        }
    }
    return Promise.resolve().then(function() {
        return getBinary(binaryFile)
    })
}
function instantiateArrayBuffer(binaryFile, imports, receiver) {
    return getBinaryPromise(binaryFile).then(function(binary) {
        return WebAssembly.instantiate(binary, imports)
    }).then(function(instance) {
        return instance
    }).then(receiver, function(reason) {
        err("failed to asynchronously prepare wasm: " + reason);
        abort(reason)
    })
}
function instantiateAsync(binary, binaryFile, imports, callback) {
    if (!binary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(binaryFile) && !isFileURI(binaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == "function") {
        return fetch(binaryFile, {
            credentials: "same-origin"
        }).then(function(response) 
        {
            let responseClone = new Response(response.body, { headers: new Headers({"Content-Type": "application/wasm"}) });
            var result = WebAssembly.instantiateStreaming(responseClone, imports);
            return result.then(callback, function(reason) {
                err("wasm streaming compile failed: " + reason);
                err("falling back to ArrayBuffer instantiation");
                return instantiateArrayBuffer(binaryFile, imports, callback)
            })
        })
    } else {
        return instantiateArrayBuffer(binaryFile, imports, callback)
    }
}
function createWasm() {
    var info = {
        "a": wasmImports
    };
    function receiveInstance(instance, module) {
        var exports = instance.exports;
        Module["asm"] = exports;
        wasmMemory = Module["asm"]["f"];
        updateMemoryViews();
        wasmTable = Module["asm"]["r"];
        addOnInit(Module["asm"]["g"]);
        removeRunDependency("wasm-instantiate");
        return exports
    }
    addRunDependency("wasm-instantiate");
    function receiveInstantiationResult(result) {
        receiveInstance(result["instance"])
    }
    if (Module["instantiateWasm"]) {
        try {
            return Module["instantiateWasm"](info, receiveInstance)
        } catch (e) {
            err("Module.instantiateWasm callback failed with error: " + e);
            return false
        }
    }
    instantiateAsync(wasmBinary, wasmBinaryFile, info, receiveInstantiationResult);
    return {}
}
var tempDouble;
var tempI64;
var ASM_CONSTS = {
    2304: $0=>{
        console.log(UTF8ToString($0))
    }
};
function ExitStatus(status) {
    this.name = "ExitStatus";
    this.message = "Program terminated with exit(" + status + ")";
    this.status = status
}
function callRuntimeCallbacks(callbacks) {
    while (callbacks.length > 0) {
        callbacks.shift()(Module)
    }
}
function getValue(ptr, type="i8") {
    if (type.endsWith("*"))
        type = "*";
    switch (type) {
    case "i1":
        return HEAP8[ptr >> 0];
    case "i8":
        return HEAP8[ptr >> 0];
    case "i16":
        return HEAP16[ptr >> 1];
    case "i32":
        return HEAP32[ptr >> 2];
    case "i64":
        return HEAP32[ptr >> 2];
    case "float":
        return HEAPF32[ptr >> 2];
    case "double":
        return HEAPF64[ptr >> 3];
    case "*":
        return HEAPU32[ptr >> 2];
    default:
        abort("invalid type for getValue: " + type)
    }
}
function setValue(ptr, value, type="i8") {
    if (type.endsWith("*"))
        type = "*";
    switch (type) {
    case "i1":
        HEAP8[ptr >> 0] = value;
        break;
    case "i8":
        HEAP8[ptr >> 0] = value;
        break;
    case "i16":
        HEAP16[ptr >> 1] = value;
        break;
    case "i32":
        HEAP32[ptr >> 2] = value;
        break;
    case "i64":
        tempI64 = [value >>> 0, (tempDouble = value,
        +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)],
        HEAP32[ptr >> 2] = tempI64[0],
        HEAP32[ptr + 4 >> 2] = tempI64[1];
        break;
    case "float":
        HEAPF32[ptr >> 2] = value;
        break;
    case "double":
        HEAPF64[ptr >> 3] = value;
        break;
    case "*":
        HEAPU32[ptr >> 2] = value;
        break;
    default:
        abort("invalid type for setValue: " + type)
    }
}
function _abort() {
    abort("")
}
var readEmAsmArgsArray = [];
function readEmAsmArgs(sigPtr, buf) {
    readEmAsmArgsArray.length = 0;
    var ch;
    buf >>= 2;
    while (ch = HEAPU8[sigPtr++]) {
        buf += ch != 105 & buf;
        readEmAsmArgsArray.push(ch == 105 ? HEAP32[buf] : HEAPF64[buf++ >> 1]);
        ++buf
    }
    return readEmAsmArgsArray
}
function runEmAsmFunction(code, sigPtr, argbuf) {
    var args = readEmAsmArgs(sigPtr, argbuf);
    return ASM_CONSTS[code].apply(null, args)
}
function _emscripten_asm_const_int(code, sigPtr, argbuf) {
    return runEmAsmFunction(code, sigPtr, argbuf)
}
function _emscripten_date_now() {
    return Date.now()
}
function _emscripten_memcpy_big(dest, src, num) {
    HEAPU8.copyWithin(dest, src, src + num)
}
function getHeapMax() {
    return 2147483648
}
function emscripten_realloc_buffer(size) {
    var b = wasmMemory.buffer;
    try {
        wasmMemory.grow(size - b.byteLength + 65535 >>> 16);
        updateMemoryViews();
        return 1
    } catch (e) {}
}
function _emscripten_resize_heap(requestedSize) {
    var oldSize = HEAPU8.length;
    requestedSize = requestedSize >>> 0;
    var maxHeapSize = getHeapMax();
    if (requestedSize > maxHeapSize) {
        return false
    }
    let alignUp = (x,multiple)=>x + (multiple - x % multiple) % multiple;
    for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {
        var overGrownHeapSize = oldSize * (1 + .2 / cutDown);
        overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);
        var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));
        var replacement = emscripten_realloc_buffer(newSize);
        if (replacement) {
            return true
        }
    }
    return false
}
function getCFunc(ident) {
    var func = Module["_" + ident];
    return func
}
function writeArrayToMemory(array, buffer) {
    HEAP8.set(array, buffer)
}
function lengthBytesUTF8(str) {
    var len = 0;
    for (var i = 0; i < str.length; ++i) {
        var c = str.charCodeAt(i);
        if (c <= 127) {
            len++
        } else if (c <= 2047) {
            len += 2
        } else if (c >= 55296 && c <= 57343) {
            len += 4;
            ++i
        } else {
            len += 3
        }
    }
    return len
}
function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
    if (!(maxBytesToWrite > 0))
        return 0;
    var startIdx = outIdx;
    var endIdx = outIdx + maxBytesToWrite - 1;
    for (var i = 0; i < str.length; ++i) {
        var u = str.charCodeAt(i);
        if (u >= 55296 && u <= 57343) {
            var u1 = str.charCodeAt(++i);
            u = 65536 + ((u & 1023) << 10) | u1 & 1023
        }
        if (u <= 127) {
            if (outIdx >= endIdx)
                break;
            heap[outIdx++] = u
        } else if (u <= 2047) {
            if (outIdx + 1 >= endIdx)
                break;
            heap[outIdx++] = 192 | u >> 6;
            heap[outIdx++] = 128 | u & 63
        } else if (u <= 65535) {
            if (outIdx + 2 >= endIdx)
                break;
            heap[outIdx++] = 224 | u >> 12;
            heap[outIdx++] = 128 | u >> 6 & 63;
            heap[outIdx++] = 128 | u & 63
        } else {
            if (outIdx + 3 >= endIdx)
                break;
            heap[outIdx++] = 240 | u >> 18;
            heap[outIdx++] = 128 | u >> 12 & 63;
            heap[outIdx++] = 128 | u >> 6 & 63;
            heap[outIdx++] = 128 | u & 63
        }
    }
    heap[outIdx] = 0;
    return outIdx - startIdx
}
function stringToUTF8(str, outPtr, maxBytesToWrite) {
    return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite)
}
function stringToUTF8OnStack(str) {
    var size = lengthBytesUTF8(str) + 1;
    var ret = stackAlloc(size);
    stringToUTF8(str, ret, size);
    return ret
}
var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : undefined;
function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) {
    var endIdx = idx + maxBytesToRead;
    var endPtr = idx;
    while (heapOrArray[endPtr] && !(endPtr >= endIdx))
        ++endPtr;
    if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
        return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr))
    }
    var str = "";
    while (idx < endPtr) {
        var u0 = heapOrArray[idx++];
        if (!(u0 & 128)) {
            str += String.fromCharCode(u0);
            continue
        }
        var u1 = heapOrArray[idx++] & 63;
        if ((u0 & 224) == 192) {
            str += String.fromCharCode((u0 & 31) << 6 | u1);
            continue
        }
        var u2 = heapOrArray[idx++] & 63;
        if ((u0 & 240) == 224) {
            u0 = (u0 & 15) << 12 | u1 << 6 | u2
        } else {
            u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63
        }
        if (u0 < 65536) {
            str += String.fromCharCode(u0)
        } else {
            var ch = u0 - 65536;
            str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023)
        }
    }
    return str
}
function UTF8ToString(ptr, maxBytesToRead) {
    return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ""
}
function ccall(ident, returnType, argTypes, args, opts) {
    var toC = {
        "string": str=>{
            var ret = 0;
            if (str !== null && str !== undefined && str !== 0) {
                ret = stringToUTF8OnStack(str)
            }
            return ret
        }
        ,
        "array": arr=>{
            var ret = stackAlloc(arr.length);
            writeArrayToMemory(arr, ret);
            return ret
        }
    };
    function convertReturnValue(ret) {
        if (returnType === "string") {
            return UTF8ToString(ret)
        }
        if (returnType === "boolean")
            return Boolean(ret);
        return ret
    }
    var func = getCFunc(ident);
    var cArgs = [];
    var stack = 0;
    if (args) {
        for (var i = 0; i < args.length; i++) {
            var converter = toC[argTypes[i]];
            if (converter) {
                if (stack === 0)
                    stack = stackSave();
                cArgs[i] = converter(args[i])
            } else {
                cArgs[i] = args[i]
            }
        }
    }
    var ret = func.apply(null, cArgs);
    function onDone(ret) {
        if (stack !== 0)
            stackRestore(stack);
        return convertReturnValue(ret)
    }
    ret = onDone(ret);
    return ret
}
function cwrap(ident, returnType, argTypes, opts) {
    var numericArgs = !argTypes || argTypes.every(type=>type === "number" || type === "boolean");
    var numericRet = returnType !== "string";
    if (numericRet && numericArgs && !opts) {
        return getCFunc(ident)
    }
    return function() {
        return ccall(ident, returnType, argTypes, arguments, opts)
    }
}
var wasmImports = {
    "b": _abort,
    "e": _emscripten_asm_const_int,
    "d": _emscripten_date_now,
    "c": _emscripten_memcpy_big,
    "a": _emscripten_resize_heap
};
var asm = createWasm();
var ___wasm_call_ctors = function() {
    return (___wasm_call_ctors = Module["asm"]["g"]).apply(null, arguments)
};
var _SetBatchFractionSize = Module["_SetBatchFractionSize"] = function() {
    return (_SetBatchFractionSize = Module["_SetBatchFractionSize"] = Module["asm"]["h"]).apply(null, arguments)
}
;
var _SetAttractionForce = Module["_SetAttractionForce"] = function() {
    return (_SetAttractionForce = Module["_SetAttractionForce"] = Module["asm"]["i"]).apply(null, arguments)
}
;
var _SetLinkLength = Module["_SetLinkLength"] = function() {
    return (_SetLinkLength = Module["_SetLinkLength"] = Module["asm"]["j"]).apply(null, arguments)
}
;
var _SetRepulsionForce = Module["_SetRepulsionForce"] = function() {
    return (_SetRepulsionForce = Module["_SetRepulsionForce"] = Module["asm"]["k"]).apply(null, arguments)
}
;
var _SetCentralForce = Module["_SetCentralForce"] = function() {
    return (_SetCentralForce = Module["_SetCentralForce"] = Module["asm"]["l"]).apply(null, arguments)
}
;
var _SetDt = Module["_SetDt"] = function() {
    return (_SetDt = Module["_SetDt"] = Module["asm"]["m"]).apply(null, arguments)
}
;
var _Init = Module["_Init"] = function() {
    return (_Init = Module["_Init"] = Module["asm"]["n"]).apply(null, arguments)
}
;
var _Update = Module["_Update"] = function() {
    return (_Update = Module["_Update"] = Module["asm"]["o"]).apply(null, arguments)
}
;
var _SetPosition = Module["_SetPosition"] = function() {
    return (_SetPosition = Module["_SetPosition"] = Module["asm"]["p"]).apply(null, arguments)
}
;
var _FreeMemory = Module["_FreeMemory"] = function() {
    return (_FreeMemory = Module["_FreeMemory"] = Module["asm"]["q"]).apply(null, arguments)
}
;
var ___errno_location = function() {
    return (___errno_location = Module["asm"]["__errno_location"]).apply(null, arguments)
};
var _malloc = Module["_malloc"] = function() {
    return (_malloc = Module["_malloc"] = Module["asm"]["s"]).apply(null, arguments)
}
;
var _free = Module["_free"] = function() {
    return (_free = Module["_free"] = Module["asm"]["t"]).apply(null, arguments)
}
;
var stackSave = function() {
    return (stackSave = Module["asm"]["u"]).apply(null, arguments)
};
var stackRestore = function() {
    return (stackRestore = Module["asm"]["v"]).apply(null, arguments)
};
var stackAlloc = function() {
    return (stackAlloc = Module["asm"]["w"]).apply(null, arguments)
};
var ___cxa_is_pointer_type = function() {
    return (___cxa_is_pointer_type = Module["asm"]["__cxa_is_pointer_type"]).apply(null, arguments)
};
Module["cwrap"] = cwrap;
Module["setValue"] = setValue;
Module["getValue"] = getValue;
var calledRun;
dependenciesFulfilled = function runCaller() {
    if (!calledRun)
        run();
    if (!calledRun)
        dependenciesFulfilled = runCaller
}
;
function run() {
    if (runDependencies > 0) {
        return
    }
    preRun();
    if (runDependencies > 0) {
        return
    }
    function doRun() {
        if (calledRun)
            return;
        calledRun = true;
        Module["calledRun"] = true;
        if (ABORT)
            return;
        initRuntime();
        if (Module["onRuntimeInitialized"])
            Module["onRuntimeInitialized"]();
        postRun()
    }
    if (Module["setStatus"]) {
        Module["setStatus"]("Running...");
        setTimeout(function() {
            setTimeout(function() {
                Module["setStatus"]("")
            }, 1);
            doRun()
        }, 1)
    } else {
        doRun()
    }
}
if (Module["preInit"]) {
    if (typeof Module["preInit"] == "function")
        Module["preInit"] = [Module["preInit"]];
    while (Module["preInit"].length > 0) {
        Module["preInit"].pop()()
    }
}

try
{
	run();
}
catch(e)
{
	console.error(e);
}
`;

// assets/graph-render-worker.txt.js
var graph_render_worker_txt_default = `// Import Pixi.js library
if( 'function' === typeof importScripts) 
{
    importScripts('https://d157l7jdn8e5sf.cloudfront.net/v7.2.0/webworker.js', './tinycolor.js');

    addEventListener('message', onMessage);

    let app;
    let container;
    let graphics;

    isDrawing = false;

    let linkCount = 0;
    let linkSources = [];
    let linkTargets = [];
    let nodeCount = 0;
    let radii = [];
    let labels = [];
	let labelFade = [];
	let labelWidths = [];
	let pixiLabels = [];
    let cameraOffset = {x: 0, y: 0};
    let positions = new Float32Array(0);
    let linkLength = 0;
    let edgePruning = 0;
    let colors = 
    {
        background: 0x232323,
        link: 0xAAAAAA,
        node: 0xCCCCCC,
        outline: 0xAAAAAA,
        text: 0xFFFFFF,
        accent: 0x4023AA
    }

    let hoveredNode = -1;
    let lastHoveredNode = -1;
    let grabbedNode = -1;
    let updateAttached = false;
    let attachedToGrabbed = [];
    let activeNode = -1;
    let attachedToActive = [];

    let cameraScale = 1;
    let cameraScaleRoot = 1;

    function toScreenSpace(x, y, floor = true)
    {
        if (floor)
        {
            return {x: Math.floor((x * cameraScale) + cameraOffset.x), y: Math.floor((y * cameraScale) + cameraOffset.y)};
        }
        else
        {
            return {x: (x * cameraScale) + cameraOffset.x, y: (y * cameraScale) + cameraOffset.y};
        }
    }

    function vecToScreenSpace({x, y}, floor = true)
    {
        return toScreenSpace(x, y, floor);
    }

    function toWorldspace(x, y)
    {
        return {x: (x - cameraOffset.x) / cameraScale, y: (y - cameraOffset.y) / cameraScale};
    }

    function vecToWorldspace({x, y})
    {
        return toWorldspace(x, y);
    }

    function setCameraCenterWorldspace({x, y})
    {
        cameraOffset.x = (canvas.width / 2) - (x * cameraScale);
        cameraOffset.y = (canvas.height / 2) - (y * cameraScale);
    }

    function getCameraCenterWorldspace()
    {
        return toWorldspace(canvas.width / 2, canvas.height / 2);
    }

    function getNodeScreenRadius(radius)
    {
        return radius * cameraScaleRoot;
    }

    function getNodeWorldspaceRadius(radius)
    {
        return radius / cameraScaleRoot;
    }

    function getPosition(index)
    {
        return {x: positions[index * 2], y: positions[index * 2 + 1]};
    }

    function mixColors(hexStart, hexEnd, factor)
    {
        return tinycolor.mix(tinycolor(hexStart.toString(16)), tinycolor(hexEnd.toString(16)), factor).toHexNumber()
    }

    function darkenColor(hexColor, factor)
    {
        return tinycolor(hexColor.toString(16)).darken(factor).toHexNumber();
    }

    function lightenColor(hexColor, factor)
    {
        return tinycolor(hexColor.toString(16)).lighten(factor).toHexNumber();
    }

    function invertColor(hex, bw) 
    {
        hex = hex.toString(16); // force conversion
		// fill extra space up to 6 characters with 0
		while (hex.length < 6) hex = "0" + hex;

        if (hex.indexOf('#') === 0) {
            hex = hex.slice(1);
        }
        // convert 3-digit hex to 6-digits.
        if (hex.length === 3) {
            hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
        }
        if (hex.length !== 6) {
            throw new Error('Invalid HEX color:' + hex);
        }
        var r = parseInt(hex.slice(0, 2), 16),
            g = parseInt(hex.slice(2, 4), 16),
            b = parseInt(hex.slice(4, 6), 16);
        if (bw) {
            // https://stackoverflow.com/a/3943023/112731
            return (r * 0.299 + g * 0.587 + b * 0.114) > 186
                ? '#000000'
                : '#FFFFFF';
        }
        // invert color components
        r = (255 - r).toString(16);
        g = (255 - g).toString(16);
        b = (255 - b).toString(16);
        // pad each with zeros and return
        return "#" + padZero(r) + padZero(g) + padZero(b);
    }

	function clamp(value, min, max)
	{
		return Math.min(Math.max(value, min), max);
	}

	function lerp(a, b, t)
	{
		return a + (b - a) * t;
	}

    let hoverFade = 0;
    let hoverFadeSpeed = 0.2;
	let hoverFontSize = 15;
	let normalFontSize = 12;
	let fontRatio = hoverFontSize / normalFontSize;

	function showLabel(index, fade, hovered = false)
	{
		let label = pixiLabels[index];
		if (!label) return;
		labelFade[index] = fade;

		if(fade > 0.01) label.visible = true;
		else 
		{
			hideLabel(index);
			return;
		}

		if (hovered) label.style.fontSize = hoverFontSize;
		else label.style.fontSize = normalFontSize;


		let nodePos = vecToScreenSpace(getPosition(index));
		let width = (labelWidths[index] * (hovered ? fontRatio : 1)) / 2;
		label.x = nodePos.x - width;
		label.y = nodePos.y + getNodeScreenRadius(radii[index]) + 9;
		label.alpha = fade;
	}

	function hideLabel(index)
	{
		let label = pixiLabels[index];
		label.visible = false;
	}

    function draw()
    {
        graphics.clear();

        let topLines = [];
        if (updateAttached) 
        {
            attachedToGrabbed = [];
            // hoverFade = 0;
        }

        if (hoveredNode != -1 || grabbedNode != -1)
        {
            hoverFade = Math.min(1, hoverFade + hoverFadeSpeed);
        }
        else
        {
            hoverFade = Math.max(0, hoverFade - hoverFadeSpeed);
        }

        graphics.lineStyle(1, mixColors(colors.link, colors.background, hoverFade * 50), 0.7);

        for (let i = 0; i < linkCount; i++)
        {
            let target = linkTargets[i];
            let source = linkSources[i];

            if (hoveredNode == source || hoveredNode == target || ((lastHoveredNode == source || lastHoveredNode == target) && hoverFade != 0)) 
            {
                if (updateAttached && hoveredNode == source) 
                    attachedToGrabbed.push(target);

                else if (updateAttached && hoveredNode == target) 
                    attachedToGrabbed.push(source);

                topLines.push(i);
            }

            let startWorld = getPosition(source);
            let endWorld = getPosition(target);
            
            let start = vecToScreenSpace(startWorld);
            let end = vecToScreenSpace(endWorld);

            let dist = Math.sqrt(Math.pow(startWorld.x - endWorld.x, 2) + Math.pow(startWorld.y - endWorld.y, 2));

            if (dist < (radii[source] + radii[target]) * edgePruning)
            {
                graphics.moveTo(start.x, start.y);
                graphics.lineTo(end.x, end.y);
            }
        }

        let opacity = 1 - (hoverFade * 0.5);
        graphics.beginFill(mixColors(colors.node, colors.background, hoverFade * 50), opacity);
        graphics.lineStyle(0, 0xffffff);
        for (let i = 0; i < nodeCount; i++)
        {
			let screenRadius = getNodeScreenRadius(radii[i]);

			if (hoveredNode != i)
			{
				if (screenRadius > 2)
				{
					
					let labelFade = lerp(0, (screenRadius - 4) / 8 - (1/cameraScaleRoot)/6 * 0.9, Math.max(1 - hoverFade, 0.2));
					showLabel(i, labelFade);
				}
				else 
				{
					hideLabel(i);
				}
			}

            if (hoveredNode == i || (lastHoveredNode == i && hoverFade != 0) || (hoveredNode != -1 && attachedToGrabbed.includes(i))) continue;

            let pos = vecToScreenSpace(getPosition(i));
            graphics.drawCircle(pos.x, pos.y, screenRadius);
        }

        graphics.endFill();


        opacity = hoverFade * 0.7;
        graphics.lineStyle(1, mixColors(mixColors(colors.link, colors.accent, hoverFade * 100), colors.background, 20), opacity);

        for (let i = 0; i < topLines.length; i++)
        {
            let target = linkTargets[topLines[i]];
            let source = linkSources[topLines[i]];

            // draw lines on top when hovered
            let start = vecToScreenSpace(getPosition(source));
            let end = vecToScreenSpace(getPosition(target));

            
            graphics.moveTo(start.x, start.y);
            graphics.lineTo(end.x, end.y);
        }

        if(hoveredNode != -1 || (lastHoveredNode != -1 && hoverFade != 0))
        {
            graphics.beginFill(mixColors(colors.node, colors.accent, hoverFade * 20), 0.9);
            graphics.lineStyle(0, 0xffffff);
            for (let i = 0; i < attachedToGrabbed.length; i++)
            {
                let point = attachedToGrabbed[i];

                let pos = vecToScreenSpace(getPosition(point));

                graphics.drawCircle(pos.x, pos.y, getNodeScreenRadius(radii[point]));
				showLabel(point, Math.max(hoverFade * 0.6, labelFade[point]));
            }
            graphics.endFill();

            let index = hoveredNode != -1 ? hoveredNode : lastHoveredNode;

            let pos = vecToScreenSpace(getPosition(index));
            graphics.beginFill(mixColors(colors.node, colors.accent, hoverFade * 100), 1);
            graphics.lineStyle(hoverFade, mixColors(invertColor(colors.background, true), colors.accent, 50));
            graphics.drawCircle(pos.x, pos.y, getNodeScreenRadius(radii[index]));
            graphics.endFill();

            showLabel(index, Math.max(hoverFade, labelFade[index]), true);
        }

		

        updateAttached = false;

        graphics.lineStyle(2, colors.accent);
        // draw the active node
        if (activeNode != -1)
        {
            let pos = vecToScreenSpace(getPosition(activeNode));
            graphics.drawCircle(pos.x, pos.y, getNodeScreenRadius(radii[activeNode]) + 4);
			
        }
    }

    function onMessage(event)
    {
        if(event.data.type == "draw")
        {
            positions = new Float32Array(event.data.positions);
            draw();
        }
        else if(event.data.type == "update_camera")
        {
            cameraOffset = event.data.cameraOffset;
            cameraScale = event.data.cameraScale;
            cameraScaleRoot = Math.sqrt(cameraScale);
        }
        else if(event.data.type == "update_interaction")
        {
            if(hoveredNode != event.data.hoveredNode && event.data.hoveredNode != -1) updateAttached = true;
            if(grabbedNode != event.data.grabbedNode && event.data.hoveredNode != -1) updateAttached = true;
            
            if(event.data.hoveredNode == -1) lastHoveredNode = hoveredNode;
            else lastHoveredNode = -1;
            
            hoveredNode = event.data.hoveredNode;
            grabbedNode = event.data.grabbedNode;
        }
        else if(event.data.type == "resize")
        {
            app.renderer.resize(event.data.width, event.data.height);
        }
        else if(event.data.type == "set_active")
        {
            activeNode = event.data.active;
        }
        else if(event.data.type == "update_colors")
        {
            colors = event.data.colors;

			for (let label of pixiLabels)
			{
				label.style.fill = invertColor(colors.background, true);
			}
        }
        else if(event.data.type == "init")
        {
            // Extract data from message
            linkCount = event.data.linkCount;
            linkSources = event.data.linkSources;
            linkTargets = event.data.linkTargets;
            nodeCount = event.data.nodeCount;
            radii = event.data.radii;
            labels = event.data.labels;
            linkLength = event.data.linkLength;
            edgePruning = event.data.edgePruning;

            app = new PIXI.Application({... event.data.options, antialias: true, resolution: 2, backgroundAlpha: 0, transparent: true});
            container = new PIXI.Container();
            graphics = new PIXI.Graphics();
            app.stage.addChild(container);
            container.addChild(graphics);

            pixiLabels = [];
			for (let i = 0; i < nodeCount; i++)
			{
				let label = new PIXI.Text(labels[i], {fontFamily : 'Arial', fontSize: 12, fontWeight: "normal", fill : invertColor(colors.background, true), align : 'center', anchor: 0.5});
				pixiLabels.push(label);
				labelWidths.push(label.width);
				labelFade.push(0);
            	app.stage.addChild(label);
			}

        }
        else
        {
            console.log("Unknown message type sent to graph worker: " + event.data.type);
        }
    }
}







`;

// assets/graph-wasm.wasm
var graph_wasm_default = __toBinary(" ");

// assets/website.txt.js
var website_txt_default = `//#region -----------------   Initializations   ----------------- 

let loadedURL = new URL(window.location.href);
let absoluteBasePath = undefined;
let relativeBasePath = undefined;
let relativePathname = undefined;

let webpageContainer;
let documentContainer;
let viewContent;

let leftSidebar;
let rightSidebar;
let sidebarCollapseIcons;
let sidebarGutters;
let sidebars;
let sidebarDefaultWidth;
let sidebarTargetWidth;
let contentTargetWidth;

let themeToggle;
let searchInput;

let fileTree;
let outlineTree;
let fileTreeItems;
let outlineTreeItems;

let canvasWrapper;
let canvas;
let canvasNodes;
let canvasBackground;
let canvasBackgroundPattern;
let focusedCanvasNode;

let loadingIcon;
let isOffline = false;

let collapseIconUp = ["m7 15 5 5 5-5", "m7 9 5-5 5 5"]; // path 1, path 2 - svg paths
let collapseIconDown = ["m7 20 5-5 5 5", "m7 4 5 5 5-5"]; // path 1, path 2 - svg paths

let isTouchDevice = isTouchCapable();

let documentType; // "markdown" | "canvas" | "embed" | "custom" | "none"
let embedType; // "img" | "video" | "audio" | "embed" | "none" 
let customType; // "kanban" | "excalidraw" | "none"
let deviceSize; // "large-screen" | "small screen" | "tablet" | "phone"

let fullyInitialized = false;

async function initGlobalObjects()
{
	if(window.location.protocol != "file:") 
	{
		await loadIncludes();
	}



	loadingIcon = document.createElement("div");
	loadingIcon.classList.add("loading-icon");
	document.body.appendChild(loadingIcon);
	loadingIcon.innerHTML = \`<div></div><div></div><div></div><div></div>\`;

	webpageContainer = document.querySelector(".webpage-container");
	documentContainer = document.querySelector(".document-container");
	leftSidebar = document.querySelector(".sidebar-left");
	rightSidebar = document.querySelector(".sidebar-right");

	fileTree = document.querySelector(".file-tree");
	outlineTree = document.querySelector(".outline-tree");
	fileTreeItems = Array.from(document.querySelectorAll(".tree-container.file-tree .tree-item"));

	sidebars = []
	sidebarGutters = []
	sidebarCollapseIcons = []
	if (leftSidebar && rightSidebar)
	{
		sidebarCollapseIcons = Array.from(document.querySelectorAll(".sidebar-collapse-icon"));
		sidebarGutters = [sidebarCollapseIcons[0].parentElement, sidebarCollapseIcons[1].parentElement];
		sidebars = [sidebarGutters[0].parentElement, sidebarGutters[1].parentElement];
	}

	themeToggle = document.querySelector(".theme-toggle-input");
}

async function initializePage()
{
	focusedCanvasNode = null;
	canvasWrapper = document.querySelector(".canvas-wrapper") ?? canvasWrapper;
	canvas = document.querySelector(".canvas") ?? canvas;

	let canvasNodesTemp = document.querySelectorAll(".canvas-node");
	canvasNodes = canvasNodesTemp.length > 0 ? canvasNodesTemp : canvasNodes;

	canvasBackground = document.querySelector(".canvas-background") ?? canvasBackground;
	canvasBackgroundPattern = document.querySelector(".canvas-background pattern") ?? canvasBackgroundPattern;
	viewContent = document.querySelector(".document-container > .view-content") ?? document.querySelector(".document-container > .markdown-preview-view") ?? viewContent;
	outlineTreeItems = Array.from(document.querySelectorAll(".tree-container.outline-tree .tree-item"));

	if(!fullyInitialized)
	{	
		if (window.location.protocol == "file:") initializeForFileProtocol();
		await initGlobalObjects();
		initializeDocumentTypes(document);
		setupSidebars();
		setupThemeToggle();
		await setupSearch();
		setupRootPath(document);

		sidebarDefaultWidth = await getComputedPixelValue("--sidebar-width");
		contentTargetWidth = await getComputedPixelValue("--line-width") * 0.9;

		window.addEventListener('resize', () => onResize());
		onResize();
	}

	setTimeout(() => documentContainer.classList.remove("hide"));

	// hide the right sidebar when viewing specific file types
	if (rightSidebar && (embedType == "video" || embedType == "embed" || customType == "excalidraw" || customType == "kanban" || documentType == "canvas")) 
	{
		if(!rightSidebar.collapsed)
		{
			rightSidebar.temporaryCollapse();
		}
	}
	else
	{
		// if the right sidebar was temporarily collapsed and it is still collapsed, uncollapse it
		if (rightSidebar && rightSidebar.temporarilyCollapsed && rightSidebar.collapsed) 
		{
			rightSidebar.collapse(false);
			rightSidebar.temporarilyCollapsed = false;
		}
	}

	parseURLParams();
	relativePathname = getVaultRelativePath(loadedURL.href);
}

function initializePageEvents(setupOnNode)
{
	if (!setupOnNode) return;
    setupHeaders(setupOnNode);
    setupTrees(setupOnNode);
	setupLists(setupOnNode);
	setupCallouts(setupOnNode);
	setupCheckboxes(setupOnNode);
	setupCanvas(setupOnNode);
	setupCodeblocks(setupOnNode);
	setupLinks(setupOnNode);
	setupScroll(setupOnNode);
}

function initializeDocumentTypes(fromDocument)
{
	if (fromDocument.querySelector(".document-container > .markdown-preview-view")) documentType = "markdown";
	else if (fromDocument.querySelector(".canvas-wrapper")) documentType = "canvas";
	else 
	{
		documentType = "custom";
		if (fromDocument.querySelector(".kanban-plugin")) customType = "kanban";
		else if (fromDocument.querySelector(".excalidraw-plugin")) customType = "excalidraw";
	}
}

function initializeForFileProtocol()
{
	let graphEl = document.querySelector(".graph-view-placeholder");
	if(graphEl)
	{
		console.log("Running locally, skipping graph view initialization and hiding graph.");
		graphEl.style.display = "none";
		graphEl.previousElementSibling.style.display = "none"; // hide the graph's header
	}
}

window.onload = async function()
{
	await initializePage();
	initializePageEvents(document);
	setActiveDocument(loadedURL, true, false, false);
	fullyInitialized = true;
};

window.onpopstate = function(event)
{
	event.preventDefault();
	event.stopPropagation();

	if (document.body.classList.contains("floating-sidebars") && (!leftSidebar.collapsed || !rightSidebar.collapsed))
	{
		leftSidebar.collapse(true);
		rightSidebar.collapse(true);
		return;
	}

	loadDocument(getURLPath(), false, true);
	console.log("Popped state: " + getURLPath());
}

//#endregion

//#region -----------------       Resize        -----------------

function onEndResize()
{
	document.body.classList.toggle("resizing", false);
}

function onStartResize()
{
	document.body.classList.toggle("resizing", true);
}

let lastScreenWidth = undefined;
let isResizing = false;
let checkStillResizingTimeout = undefined;
function onResize(isInitial = false)
{
	if (!isResizing)
	{
		onStartResize();
		isResizing = true;
	}

	function widthNowInRange(low, high)
	{
		let w = window.innerWidth;
		return (w > low && w < high && lastScreenWidth == undefined) || ((w > low && w < high) && (lastScreenWidth <= low || lastScreenWidth >= high));
	}

	function widthNowGreaterThan(value)
	{
		let w = window.innerWidth;
		return (w > value && lastScreenWidth == undefined) || (w > value && lastScreenWidth < value);
	}

	function widthNowLessThan(value)
	{
		let w = window.innerWidth;
		return (w < value && lastScreenWidth == undefined) || (w < value && lastScreenWidth > value);
	}

	if (widthNowGreaterThan(contentTargetWidth + sidebarDefaultWidth * 2) || widthNowGreaterThan(1025))
	{
		deviceSize = "large-screen";
		document.body.classList.toggle("floating-sidebars", false);
		document.body.classList.toggle("is-large-screen", true);
		document.body.classList.toggle("is-small-screen", false);
		document.body.classList.toggle("is-tablet", false);
		document.body.classList.toggle("is-phone", false);
		sidebars.forEach(function (sidebar) { sidebar.collapse(false) });
		sidebarGutters.forEach(function (gutter) { gutter.collapse(false) });
	}
	else if (widthNowInRange((contentTargetWidth + sidebarDefaultWidth) * 1, contentTargetWidth + sidebarDefaultWidth * 2) || widthNowInRange(769, 1024))
	{
		deviceSize = "small screen";
		document.body.classList.toggle("floating-sidebars", false);
		document.body.classList.toggle("is-large-screen", false);
		document.body.classList.toggle("is-small-screen", true);
		document.body.classList.toggle("is-tablet", false);
		document.body.classList.toggle("is-phone", false);
		sidebarGutters.forEach(function (gutter) { gutter.collapse(false) });

		if (leftSidebar && rightSidebar && !leftSidebar.collapsed) 
		{
			rightSidebar.collapse(true);
		}
	}
	else if (widthNowInRange(sidebarDefaultWidth * 2, (contentTargetWidth + sidebarDefaultWidth) * 1) || widthNowInRange(481, 768))
	{
		deviceSize = "tablet";
		document.body.classList.toggle("floating-sidebars", true);
		document.body.classList.toggle("is-large-screen", false);
		document.body.classList.toggle("is-small-screen", false);
		document.body.classList.toggle("is-tablet", true);
		document.body.classList.toggle("is-phone", false);
		sidebarGutters.forEach(function (gutter) { gutter.collapse(false) });
		
		if (leftSidebar && rightSidebar && !leftSidebar.collapsed) 
		{
			rightSidebar.collapse(true);
		}

		if(leftSidebar && !fullyInitialized) leftSidebar.collapse(true);
	}
	else if (widthNowLessThan(sidebarDefaultWidth * 2) || widthNowLessThan(480))
	{
		deviceSize = "phone";
		document.body.classList.toggle("floating-sidebars", true);
		document.body.classList.toggle("is-large-screen", false);
		document.body.classList.toggle("is-small-screen", false);
		document.body.classList.toggle("is-tablet", false);
		document.body.classList.toggle("is-phone", true);
		sidebars.forEach(function (sidebar) { sidebar.collapse(true) });
		sidebarGutters.forEach(function (gutter) { gutter.collapse(false) });
	}

	lastScreenWidth = window.innerWidth;

	if (checkStillResizingTimeout != undefined) clearTimeout(checkStillResizingTimeout);

	// wait a little bit of time and if the width is still the same then we are done resizing
	let screenWidthSnapshot = window.innerWidth;
	checkStillResizingTimeout = setTimeout(function ()
	{
		if (window.innerWidth == screenWidthSnapshot)
		{
			checkStillResizingTimeout = undefined;
			isResizing = false;
			onEndResize();
		}
	}, 200);

}

// #endregion

//#region -----------------   Helper Functions  ----------------- 

function clamp(value, min, max)
{
	return Math.min(Math.max(value, min), max);
}

async function delay(ms)
{
	return new Promise(resolve => setTimeout(resolve, ms));
}

async function waitUntil(condition, interval = 100, timeout = 2000)
{
	return new Promise(resolve =>
	{
		let intervalId = 0;

		let timeoutId = setTimeout(() =>
		{
			clearInterval(intervalId);
			resolve();
		}, timeout);

		intervalId = setInterval(() =>
		{
			if (condition())
			{
				clearInterval(intervalId);
				clearTimeout(timeoutId);
				resolve();
			}
		}, interval);
	});
}

/**Gets the bounding rect of a given element*/
function getElBounds(El)
{
	let elRect = El.getBoundingClientRect();

	let x = elRect.x;
	let y = elRect.y;
	let width = elRect.width;
	let height = elRect.height;
	let centerX = elRect.x + elRect.width / 2;
	let centerY = elRect.y + elRect.height / 2;

	return { x: x, y: y, width: width, height: height, minX: x, minY: y, maxX: x + width, maxY: y + height, centerX: centerX, centerY: centerY };
}

async function getComputedPixelValue(variableName)
{
	const tempElement = document.createElement('div');
	document.body.appendChild(tempElement);
	tempElement.style.position = 'absolute';
	tempElement.style.width = \`var(\${variableName})\`;

	await new Promise(resolve => setTimeout(resolve, 10));

	const computedWidth = window.getComputedStyle(tempElement).width;
	tempElement.remove();

	return parseFloat(computedWidth);
}

function getPointerPosition(event)
{
	let touches = event.touches ? Array.from(event.touches) : [];
	let x = touches.length > 0 ? (touches.reduce((acc, cur) => acc + cur.clientX, 0) / event.touches.length) : event.clientX;
	let y = touches.length > 0 ? (touches.reduce((acc, cur) => acc + cur.clientY, 0) / event.touches.length) : event.clientY;
	return {x: x, y: y};
}

function getTouchPosition(touch)
{
	return {x: touch.clientX, y: touch.clientY};
}

function getAllChildrenRecursive(element) 
{
	let children = [];

	for (let i = 0; i < element.children.length; i++) {
		const child = element.children[i];
		children.push(child);
		children = children.concat(getAllChildrenRecursive(child));
	}

	return children;
}

function isMobile() 
{
	let check = false;
	(function(a){if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);
	return check;
}

function isTouchCapable() 
{
	return (('ontouchstart' in window) ||
	(navigator.maxTouchPoints > 0) ||
	(navigator.msMaxTouchPoints > 0));
}

function downloadBlob(blob, name = 'file.txt') {
    if (
      window.navigator && 
      window.navigator.msSaveOrOpenBlob
    ) return window.navigator.msSaveOrOpenBlob(blob);

    // For other browsers:
    // Create a link pointing to the ObjectURL containing the blob.
    const data = window.URL.createObjectURL(blob);

    const link = document.createElement('a');
    link.href = data;
    link.download = name;

    // this is necessary as link.click() does not work on the latest firefox
    link.dispatchEvent(
      new MouseEvent('click', { 
        bubbles: true, 
        cancelable: true, 
        view: window 
      })
    );

    setTimeout(() => {
      // For Firefox it is necessary to delay revoking the ObjectURL
      window.URL.revokeObjectURL(data);
      link.remove();
    }, 100);
}

function extentionToTag(extention)
{
	if (["png", "jpg", "jpeg", "svg", "gif", "bmp", "ico"].includes(extention)) return "img";
	if (["mp4", "mov", "avi", "webm", "mpeg"].includes(extention)) return "video";
	if (["mp3", "wav", "ogg", "aac"].includes(extention)) return "audio";
	if (["pdf"].includes(extention)) return "embed";
	return;
}

let slideUp = (target, duration=500) => {

	target.style.transitionProperty = 'height, margin, padding';
	target.style.transitionDuration = duration + 'ms';
	target.style.boxSizing = 'border-box';
	target.style.height = target.offsetHeight + 'px';
	target.offsetHeight;
	target.style.overflow = 'hidden';
	target.style.height = 0;
	target.style.paddingTop = 0;
	target.style.paddingBottom = 0;
	target.style.marginTop = 0;
	target.style.marginBottom = 0;
	window.setTimeout(async () => {
			target.style.display = 'none';
			target.style.removeProperty('height');
			target.style.removeProperty('padding-top');
			target.style.removeProperty('padding-bottom');
			target.style.removeProperty('margin-top');
			target.style.removeProperty('margin-bottom');
			target.style.removeProperty('overflow');
			target.style.removeProperty('transition-duration');
			target.style.removeProperty('transition-property');
	}, duration);
}

let slideUpAll = (targets, duration=500) => {

	targets.forEach(async target => {
		if (!target) return;
		target.style.transitionProperty = 'height, margin, padding';
		target.style.transitionDuration = duration + 'ms';
		target.style.boxSizing = 'border-box';
		target.style.height = target.offsetHeight + 'px';
		target.offsetHeight;
		target.style.overflow = 'hidden';
		target.style.height = 0;
		target.style.paddingTop = 0;
		target.style.paddingBottom = 0;
		target.style.marginTop = 0;
		target.style.marginBottom = 0;
	});

	window.setTimeout(async () => {
		targets.forEach(async target => {
			if (!target) return;
			target.style.display = 'none';
			target.style.removeProperty('height');
			target.style.removeProperty('padding-top');
			target.style.removeProperty('padding-bottom');
			target.style.removeProperty('margin-top');
			target.style.removeProperty('margin-bottom');
			target.style.removeProperty('overflow');
			target.style.removeProperty('transition-duration');
			target.style.removeProperty('transition-property');
		});
	}, duration);
}

let slideDown = (target, duration=500) => {
	target.style.removeProperty('display');
	let display = window.getComputedStyle(target).display;
	if (display === 'none') display = 'block';
	target.style.display = display;
	let height = target.offsetHeight;
	target.style.overflow = 'hidden';
	target.style.height = 0;
	target.style.paddingTop = 0;
	target.style.paddingBottom = 0;
	target.style.marginTop = 0;
	target.style.marginBottom = 0;
	target.offsetHeight;
	target.style.boxSizing = 'border-box';
	target.style.transitionProperty = "height, margin, padding";
	target.style.transitionDuration = duration + 'ms';
	target.style.height = height + 'px';
	target.style.removeProperty('padding-top');
	target.style.removeProperty('padding-bottom');
	target.style.removeProperty('margin-top');
	target.style.removeProperty('margin-bottom');
	window.setTimeout(async () => {
		target.style.removeProperty('height');
		target.style.removeProperty('overflow');
		target.style.removeProperty('transition-duration');
		target.style.removeProperty('transition-property');
	}, duration);
}

let slideDownAll = (targets, duration=500) => {

	targets.forEach(async target => {
		if (!target) return;
		target.style.removeProperty('display');
		let display = window.getComputedStyle(target).display;
		if (display === 'none') display = 'block';
		target.style.display = display;
		let height = target.offsetHeight;
		target.style.overflow = 'hidden';
		target.style.height = 0;
		target.style.paddingTop = 0;
		target.style.paddingBottom = 0;
		target.style.marginTop = 0;
		target.style.marginBottom = 0;
		target.offsetHeight;
		target.style.boxSizing = 'border-box';
		target.style.transitionProperty = "height, margin, padding";
		target.style.transitionDuration = duration + 'ms';
		target.style.height = height + 'px';
		target.style.removeProperty('padding-top');
		target.style.removeProperty('padding-bottom');
		target.style.removeProperty('margin-top');
		target.style.removeProperty('margin-bottom');
	});

	window.setTimeout( async () => {
		targets.forEach(async target => {
			if (!target) return;
			target.style.removeProperty('height');
			target.style.removeProperty('overflow');
			target.style.removeProperty('transition-duration');
			target.style.removeProperty('transition-property');
		});
	}, duration);
}

var slideToggle = (target, duration = 500) => {
	if (window.getComputedStyle(target).display === 'none') {
		return slideDown(target, duration);
	} else {
		return slideUp(target, duration);
	}
}

var slideToggleAll = (targets, duration = 500) => {
	if (window.getComputedStyle(targets[0]).display === 'none') {
		return slideDownAll(targets, duration);
	} else {
		return slideUpAll(targets, duration);
	}
}

function getURLExtention(url)
{
	return url.split(".").pop().split("?")[0].split("#")[0].toLowerCase().trim();
}

//#endregion

//#region -----------------   Loading & Paths   ----------------- 

let transferDocument = document.implementation.createHTMLDocument();
let loading = false;
async function loadDocument(url, changeURL, showInTree)
{
	url = decodeURI(url);
	if (loading)
	{
		console.log("Already loading document.");
		return;
	}

	loading = true;
	let newLoadedURL = new URL(url, absoluteBasePath);
	relativePathname = getVaultRelativePath(newLoadedURL.href);
	console.log("Loading document: ", newLoadedURL.pathname);

	if (newLoadedURL.pathname == loadedURL?.pathname ?? "")
	{
		console.log("Document already loaded.");
		loadedURL = newLoadedURL;
		setActiveDocument(loadedURL, false, false);
		await initializePage();
		loading = false;
		return;
	}

	loadedURL = newLoadedURL;
	let pathname = loadedURL.pathname;

	await showLoading(true);

	let response;
	try { response = await fetch(pathname); }
	catch (error)
	{
		window.location.assign(pathname);
		loading = false;
		return;
	}

	if (response.ok)
	{
		setActiveDocument(loadedURL, showInTree, changeURL);
		let extention = getURLExtention(url);
		if (extention == "/") extention = "html"; // if no extention assume it is html

		documentType = "none";
		embedType = "none";
		customType = "none";

		if(extention == "html")
		{
			let html = (await response.text()).replaceAll("<!DOCTYPE html>", "").replaceAll("<html>", "").replaceAll("</html>", "");
			transferDocument.write(html);

			setupRootPath(transferDocument);
			initializeDocumentTypes(transferDocument);

			// copy document content into DOM
			let newDocumentEl = transferDocument.querySelector(".document-container");
			documentContainer.innerHTML = newDocumentEl.innerHTML;
			
			// copy the outline tree into the DOM
			let newOutline = transferDocument.querySelector(".outline-tree");
			if (outlineTree && newOutline) outlineTree.innerHTML = newOutline.innerHTML;
		
			document.title = transferDocument.title;
			transferDocument.close();
		}
		else
		{
			documentType = "embed";

			embedType = extentionToTag(extention);

			if(embedType != undefined)
			{
				let media = document.createElement(embedType);
				media.controls = true;
				media.src = url;
				
				media.style.maxWidth = "100%";
				if(embedType == "embed")
				{
					media.style.width = "100%";
					media.style.height = "100%";
				}
				
				media.style.objectFit = "contain";

				viewContent.innerHTML = "";
				viewContent.setAttribute("class", "view-content embed");
				viewContent.appendChild(media);

				if (document.querySelector(".outline-tree")) 
					document.querySelector(".outline-tree").innerHTML = "";

				document.title = url.split("/").pop();
			}
			else // just download the file
			{
				let blob = await response.blob();
				downloadBlob(blob, url.split("/").pop());
			}
		}

		await initializePage();
		initializePageEvents(documentContainer);
		initializePageEvents(outlineTree);
	}
	else
	{
		pageNotFound(viewContent);
	}

	await showLoading(false);
	loading = false;

	return;
}

function setActiveDocument(url, showInTree, changeURL, animate = true)
{
	let relativePath = getVaultRelativePath(url.href);
	let decodedRelativePath = decodeURI(relativePath);
	let searchlessHeaderlessPath = decodedRelativePath.split("#")[0].split("?")[0].replace("\\"", "\\\\\\"").replace("\\'", "\\\\\\'");
	
	if (searchlessHeaderlessPath == "/" || searchlessHeaderlessPath == "") searchlessHeaderlessPath = "index.html";

	// switch active file in file tree
	let oldActiveTreeItem = document.querySelector(".file-tree .tree-item.mod-active");
	let newActiveTreeItem = document.querySelector(\`.file-tree .tree-item:has(>.tree-link[href^="\${searchlessHeaderlessPath}"])\`);
	if(newActiveTreeItem && !newActiveTreeItem.isEqualNode(oldActiveTreeItem)) 
	{
		oldActiveTreeItem?.classList.remove("mod-active");
		newActiveTreeItem.classList.add("mod-active");
		if(showInTree) scrollIntoView(newActiveTreeItem, {block: "center", inline: "nearest"}, animate);
	}

	// set the active file in the graph view
	if(typeof graphData != 'undefined' && window.graphRenderer)
	{
		let activeNode = graphData?.paths.findIndex(function(item) { return item.endsWith(searchlessHeaderlessPath); }) ?? -1;
		
		if(activeNode >= 0) 
		{
			window.graphRenderer.activeNode = activeNode;
		}
	}

	console.log("Active document: " + changeURL);

	if(changeURL && window.location.protocol != "file:") 
	{
		window.history.pushState({ path: relativePath }, '', relativePath);
		console.log("Pushed state: " + relativePath);
	}
}

function parseURLParams()
{
	const highlightParam = loadedURL.searchParams.get('mark');
	const searchParam = loadedURL.searchParams.get('query');
	const hashParam = decodeURI(loadedURL.hash);
	
	if (highlightParam) 
	{
		searchCurrentDocument(highlightParam);
	}

	if (searchParam) 
	{
		search(searchParam);
	}

	if (hashParam)
	{
		const headingTarget = document.getElementById(hashParam.substring(1));
		if (headingTarget)
		{
			scrollIntoView(headingTarget, { behavior: "smooth", block: "start"});
		}
		else
		{
			console.log("Heading not found: " + hashParam);
		}
	}
}

async function showLoading(loading)
{
	documentContainer.style.transitionDuration = "";
	loadingIcon.classList.toggle("show", loading);
	documentContainer.classList.toggle("hide", loading);
	if(loading)
	{
		// position loading icon in the center of the screen
		let viewBounds = getViewBounds();
		loadingIcon.style.left = (viewBounds.centerX - loadingIcon.offsetWidth / 2) + "px";
		loadingIcon.style.top = (viewBounds.centerY - loadingIcon.offsetHeight / 2) + "px";

		// hide the left sidebar if on phone
		if (deviceSize == "phone") leftSidebar.collapse(true);
	}

	await delay(200);
}

function pageNotFound(viewContent)
{
	viewContent.innerHTML = 
	\`
	<div>
		<center style='position: relative; transform: translateY(20vh); width: 100%; text-align: center;'>
			<h1 style>Page Not Found</h1>
		</center>
	</div>
	\`;

	if (document.querySelector(".outline-tree"))
		document.querySelector(".outline-tree").innerHTML = "";

	console.log("Page not found: " + absoluteBasePath + loadedURL.pathname);
	let newRootPath = getURLRootPath(absoluteBasePath + loadedURL.pathname);
	relativeBasePath = newRootPath;
	document.querySelector("base").href = newRootPath;

	document.title = "Page Not Found";
}

function setupRootPath(fromDocument)
{
	let rootEl = fromDocument.getElementById("root-path");
	if (!rootEl) return;
	let basePath = rootEl.getAttribute("root-path");
	let newBase = document.createElement("base");
	newBase.href = basePath;
	console.log("Setting root path: " + basePath);
	document.querySelector("base").replaceWith(newBase);
	document.querySelector("#root-path").setAttribute("root-path", basePath);
	relativeBasePath = basePath;
	absoluteBasePath = new URL(basePath, window.location.href).href;
}

function getURLPath(url = window.location.pathname)
{
	if (absoluteBasePath == undefined) setupRootPath(document);
	let pathname = url.replace(absoluteBasePath, "");
	return pathname;
}

function getURLRootPath(url = window.location.pathname)
{
	let path = getURLPath(url);
	let splitPath = path.split("/");
	let rootPath = "";
	for (let i = 0; i < splitPath.length - 1; i++)
	{
		rootPath += "../";
	}
	return rootPath;
}

function getVaultRelativePath(absolutePath)
{
	return absolutePath.replace(absoluteBasePath, "")
}

//#endregion

//#region -----------------       Headers       ----------------- 

function setupHeaders(setupOnNode)
{
	setupOnNode.querySelectorAll(".heading-collapse-indicator").forEach(function (element) 
	{
		element.addEventListener("click", function () 
		{
			toggleTreeHeaderOpen(element.parentElement.parentElement, true);
		});
	});

	setupOnNode.querySelectorAll(".heading-wrapper").forEach(function (element)
	{
		element.collapsed = false;
		element.childrenContainer = element.querySelector(".heading-children");
		element.parentHeader = element.parentElement.parentElement;
		element.headerElement = element.querySelector(".heading");

		element.markdownPreviewSizer = getHeaderSizerEl(element);
		element.collapse = function (collapse, openParents = true, instant = false) { collapseHeader(element, collapse, openParents, instant) };
		element.toggleCollapse = function (openParents = true) { toggleTreeHeaderOpen(element, openParents) };
		element.hide = function () { hideHeader(element) };
		element.show = function (parents = false, children = false, forceStay = false) { showHeader(element, parents, children, forceStay) };
	});

	setupOnNode.querySelectorAll(".heading").forEach(function (element)
	{
		element.headingWrapper = element.parentElement;
	});
}

function isHeadingWrapper(headingWrapper)
{
	if (!headingWrapper) return false;
	return headingWrapper.classList.contains("heading-wrapper");
}

function getHeaderSizerEl(headingWrapper)
{
	// go up the tree until we find a markdown-preview-sizer
	let parent = headingWrapper;
	while (parent && !parent.classList.contains("markdown-preview-sizer")) parent = parent.parentElement;

	if (parent) return parent;
	else return;
}

async function collapseHeader(headingWrapper, collapse, openParents = true, instant = false)
{
	let collapseContainer = headingWrapper.childrenContainer;

	if (openParents && !collapse)
	{
		let parent = headingWrapper.parentHeader;
		if (isHeadingWrapper(parent)) parent.collapse(false, true, instant);
	}

	let needsChange = headingWrapper.classList.contains("is-collapsed") != collapse;
	if (!needsChange)
	{
		// if opening show the header
		if (!collapse && documentType == "canvas") headingWrapper.show(true);
		return;
	}


	if (headingWrapper.timeout) 
	{
		clearTimeout(headingWrapper.timeout);
		collapseContainer.style.transitionDuration = "";
		collapseContainer.style.height = "";
		headingWrapper.classList.toggle("is-animating", false);
	}


	if (collapse) 
	{
		headingWrapper.collapseHeight = collapseContainer.offsetHeight + parseFloat(collapseContainer.lastChild?.marginBottom || 0);

		// show all sibling headers after this one
		// this is so that when the header slides down you aren't left with a blank space
		let next = headingWrapper.nextElementSibling;
		while (next && documentType == "canvas")
		{
			let localNext = next;

			// force show the sibling header for 500ms while this one is collapsing
			if (isHeadingWrapper(localNext)) localNext.show(false, true, true);
			setTimeout(function()
			{
				localNext.forceShown = false;
			}, 500);

			next = next.nextElementSibling;
		}
	}

	let height = headingWrapper.collapseHeight;
	collapseContainer.style.height = height + "px";

	// if opening show the header
	if (!collapse && documentType == "canvas") headingWrapper.show(true);

	headingWrapper.collapsed = collapse;

	function adjustSizerHeight(customHeight = undefined)
	{
		if (customHeight != undefined) headingWrapper.markdownPreviewSizer.style.minHeight = customHeight + "px";
		else
		{
			let newTotalHeight = Array.from(headingWrapper.markdownPreviewSizer.children).reduce((acc, cur) => acc + cur.offsetHeight, 0);
			headingWrapper.markdownPreviewSizer.style.minHeight = newTotalHeight + "px";
		}
	}

	if (instant)
	{
		collapseContainer.style.transitionDuration = "0s";
		headingWrapper.classList.toggle("is-collapsed", collapse);
		collapseContainer.style.height = "";
		collapseContainer.style.transitionDuration = "";
		adjustSizerHeight()
		return;
	}

	// get the length of the height transition on heading container and wait for that time before not displaying the contents
	let transitionDuration = getComputedStyle(collapseContainer).transitionDuration;
	if (transitionDuration.endsWith("s")) transitionDuration = parseFloat(transitionDuration);
	else if (transitionDuration.endsWith("ms")) transitionDuration = parseFloat(transitionDuration) / 1000;
	else transitionDuration = 0;
	
	// multiply the duration by the height so that the transition is the same speed regardless of the height of the header
	let transitionDurationMod = Math.min(transitionDuration * Math.sqrt(height) / 16, 0.5); // longest transition is 0.5s
	collapseContainer.style.transitionDuration = \`\${transitionDurationMod}s\`;


	if (collapse) collapseContainer.style.height = "0px";
	else collapseContainer.style.height = height + "px";
	headingWrapper.classList.toggle("is-animating", true);
	headingWrapper.classList.toggle("is-collapsed", collapse);

	if (headingWrapper.markdownPreviewSizer.closest(".markdown-embed")) // dont change the size of transcluded docments
	{
		adjustSizerHeight(collapse ? 0 : undefined);
	}

	setTimeout(function()
	{
		collapseContainer.style.transitionDuration = "";
		if(!collapse) collapseContainer.style.height = "";
		headingWrapper.classList.toggle("is-animating", false);

		adjustSizerHeight()

	}, transitionDurationMod * 1000);
}

function toggleTreeHeaderOpen(headingWrapper, openParents = true)
{
	headingWrapper.collapse(!headingWrapper.collapsed, openParents);
}

/**Hides everything in a header and then makes the header div take up the same space as the header element */
function hideHeader(headingWrapper)
{
	if(headingWrapper.forceShown) return;
	if(headingWrapper.classList.contains("is-hidden") || headingWrapper.classList.contains("is-collapsed")) return;
	if(getComputedStyle(headingWrapper).display == "none") return;

	let height = headingWrapper.offsetHeight;
	headingWrapper.classList.toggle("is-hidden", true);
	if (height != 0) headingWrapper.style.height = height + "px";
	headingWrapper.style.visibility = "hidden";
}

/**Restores a hidden header back to it's normal function */
function showHeader(headingWrapper, showParents = true, showChildren = false, forceStayShown = false)
{
	if (forceStayShown) headingWrapper.forceShown = true;

	if (showParents)
	{
		let parent = headingWrapper.parentHeader;
		if (isHeadingWrapper(parent)) parent.show(true, false, forceStayShown);
	}

	if (showChildren)
	{
		let children = headingWrapper.querySelectorAll(".heading-wrapper");
		children.forEach(function(child) { child.show(false, true, forceStayShown); });
	}

	if(!headingWrapper.classList.contains("is-hidden") || headingWrapper.classList.contains("is-collapsed")) return;


	headingWrapper.classList.toggle("is-hidden", false);
	headingWrapper.style.height = "";
	headingWrapper.style.visibility = "";
}

//#endregion

//#region -----------------        Trees        ----------------- 

function setupTrees(setupOnNode) 
{

	setupOnNode.querySelectorAll(".collapse-tree-button").forEach(function(button)
	{
		button.treeRoot = button.closest(".tree-container");
		button.icon = button.firstChild;
		button.icon.innerHTML = "<path d></path><path d></path>";
		
		button.setIcon = function(collapse)
		{
			button.icon.children[0].setAttribute("d", collapse ? collapseIconUp[0] : collapseIconDown[0]);
			button.icon.children[1].setAttribute("d", collapse ? collapseIconUp[1] : collapseIconDown[1]);
		}
		button.collapse = function(collapse) 
		{ 
			let treeItems = button.treeRoot.classList.contains("file-tree") ? fileTreeItems : outlineTreeItems;
			setTreeCollapsedAll(treeItems, collapse);
			button.setIcon(collapse);
			button.collapsed = collapse;
		};
		button.toggleCollapse = function() { button.collapse(!button.collapsed); };
		button.toggleState = function(state) 
		{ 
			if (state === undefined) state = !button.collapsed;
			button.collapsed = state;
			button.setIcon(state); 
		};

		button.addEventListener("click", function(event)
		{
			event.preventDefault();
			event.stopPropagation();
			button.toggleCollapse();
			return false;
		});

		// if any outline items are unncollapsed, toggle collapse all button state
		let treeItems = button.treeRoot.classList.contains("file-tree") ? fileTreeItems : outlineTreeItems;
		if (treeItems.some(item => !item.classList.contains("is-collapsed") && item.classList.contains("mod-collapsible")))
		{
			button.toggleState(false);
		}
	});

	let fileTreeClick = Array.from(setupOnNode.querySelectorAll(".tree-container.file-tree .tree-item:has(.collapse-icon) > .tree-link"));
	let outlineTreeClick = Array.from(setupOnNode.querySelectorAll(".tree-container.outline-tree .tree-item:has(.collapse-icon) > .tree-link .collapse-icon"));
	let collapsable = Array.from(fileTreeClick).concat(Array.from(outlineTreeClick));
	
	for (let item of collapsable)
	{
		let closestItem = item?.closest(".tree-item");
		if (closestItem && item) item?.addEventListener("click", function(event)
		{
			event.preventDefault();
			event.stopPropagation();
			toggleTreeCollapsed(closestItem);
		});
	}
	
}

async function setTreeCollapsed(element, collapsed, animate = true, openParents = true)
{
	if (!element.classList.contains("mod-collapsible"))
		element = element.closest(".mod-collapsible");

	if (!element || !element.classList.contains("mod-collapsible"))
	{
		return;
	}

	if (element.classList.contains("is-collapsed") == collapsed)
	{
		return;
	}

	if (openParents)
	{
		let parent = element.parentElement.closest(".mod-collapsible");
		if (parent) await setTreeCollapsed(parent, false, animate, openParents);
	}

	let children = element.querySelector(".tree-item-children");

	if (collapsed)
	{
		element.classList.add("is-collapsed");
		if(animate) slideUp(children, 100);
		else children.style.display = "none";
	}
	else
	{
		element.classList.remove("is-collapsed");
		if(animate) slideDown(children, 100);
		else children.style.display = "";

		// make close all button collapse the tree instead of opening it if it's already open
		let treeContainer = element.closest(".tree-container");
		if (treeContainer)
		{
			let collapseButton = treeContainer.querySelector(".collapse-tree-button");
			if (collapseButton) collapseButton.toggleState(false);
		}
	}

}

async function setTreeCollapsedAll(elements, collapsed, animate = true)
{
	let childrenList = [];
	elements.forEach(async element => 
	{
		if (!element || !element.classList.contains("mod-collapsible")) return;

		let children = element.querySelector(".tree-item-children");

		if (collapsed)
		{
			element.classList.add("is-collapsed");
		}
		else
		{
			element.classList.remove("is-collapsed");
		}

		childrenList.push(children);
	});

	if (collapsed)
	{
		if(animate) slideUpAll(childrenList, 100);
		else childrenList.forEach(async (children) => 
		{
			if(children) children.style.display = "none";
		});
	}
	else
	{
		if(animate) slideDownAll(childrenList, 100);
		else childrenList.forEach(async (children) => 
		{
			if(children) children.style.display = "";
		});
	}
}

function toggleTreeCollapsed(element)
{
	element = element.closest(".tree-item");
	if (!element) return;
	setTreeCollapsed(element, !element.classList.contains("is-collapsed"));
}

function toggleTreeCollapsedAll(elements)
{
	if (!elements) return;
	setTreeCollapsedAll(elements, !elements[0].classList.contains("is-collapsed"));
}

function getFileTreeItemFromPath(path)
{
	return document.querySelector(\`.file-tree .tree-item:has(> .tree-link[href^="\${path}"])\`);
}

// hide all files and folder except the ones in the list (show parents of shown files)
async function filterFileTree(showPathList, hintLabelLists, query, openFileTree = true)
{
	if (openFileTree) await setTreeCollapsedAll(fileTreeItems, false, false);
	// hide all files and folders
	let allItems = Array.from(document.querySelectorAll(".file-tree .tree-item:not(.filtered-out)"));
	for await (let item of allItems)
	{
		item.classList.add("filtered-out");
	}

	await removeTreeHintLabels();

	for (let i = 0; i < showPathList.length; i++)
	{
		let path = showPathList[i];
		let hintLabels = hintLabelLists[i];

		let treeItem = getFileTreeItemFromPath(path);
		if (treeItem)
		{
			// show the file and it's parent tree items
			treeItem.classList.remove("filtered-out");
			let itemLink = treeItem.querySelector(".tree-link");
			if(itemLink) itemLink.href = path + "?mark=" + query;
			let parent = treeItem.parentElement.closest(".tree-item");

			while (parent)
			{
				parent.classList.remove("filtered-out");
				parent = parent.parentElement.closest(".tree-item");
			}

			if (hintLabels.length > 0)
			{
				let treeLink = treeItem.querySelector(".tree-link");
				let hintContainer = treeLink.appendChild(document.createElement("div"));
				hintContainer.classList.add("tree-hint-container");

				function createHintLabel(text, link)
				{
					text = text.trim();
					if (text == "") return;

					let hintLabelEl = document.createElement("a");
					hintLabelEl.classList.add("tree-hint-label");
					hintLabelEl.classList.add("internal-link");
					hintLabelEl.textContent = text;
					hintLabelEl.href = decodeURI(link).replaceAll(" ", "_");
					hintContainer.appendChild(hintLabelEl);
				}

				// create the hint labels
				for (let label of hintLabels)
				{
					createHintLabel(label, path + "#" + label);
				}

				setupLinks(hintContainer);
			}
		}
	}
}

async function clearFileTreeFilter(closeFileTree = true)
{
	await removeTreeHintLabels();

	let filteredItems = document.querySelectorAll(".file-tree .filtered-out");
	for await (let item of filteredItems)
	{
		item.classList.remove("filtered-out");
	}

	let markItems = document.querySelectorAll(".file-tree .tree-link[href*='?mark=']");
	for await (let item of markItems)
	{
		let href = item.href.split("?")[0];
		href = getVaultRelativePath(href);
		item.href = href;
	}

	if (closeFileTree) await setTreeCollapsedAll(fileTreeItems, true, false);
}

async function removeTreeHintLabels()
{
	let hintLabels = document.querySelectorAll(".tree-hint-container");
	for await (let item of hintLabels)
	{
		item.remove();
	}
}

function sortFileTreeDocuments(sortByFunction)
{
	let treeItems = Array.from(document.querySelectorAll(".file-tree .tree-item.mod-tree-file:not(.filtered-out)"));
	treeItems.sort(sortByFunction);

	// sort the files within their parent folders
	for (let i = 1; i < treeItems.length; i++)
	{
		let item = treeItems[i];
		let lastItem = treeItems[i - 1];
		if (item.parentElement == lastItem.parentElement)
		{
			lastItem.after(item);
		}
	}

	// sort the folders using their contents
	let folders = Array.from(document.querySelectorAll(".file-tree .tree-item.mod-tree-folder:not(.filtered-out)"));
	folders.sort(function (a, b)
	{
		let aFirst = a.querySelector(".tree-item.mod-tree-file:not(.filtered-out)");
		let bFirst = b.querySelector(".tree-item.mod-tree-file:not(.filtered-out)");
		return treeItems.indexOf(aFirst) - treeItems.indexOf(bFirst);
	});

	// sort the folders within their parent folders
	for (let i = 1; i < folders.length; i++)
	{
		let item = folders[i];

		let foundPlace = false;
		// iterate backwards until we find an item with the same parent
		for (let j = i - 1; j >= 0; j--)
		{
			let lastItem = folders[j];
			if (item.parentElement == lastItem.parentElement)
			{
				lastItem.after(item);
				foundPlace = true;
				break;
			}
		}

		// if we didn't find an item with the same parent, move it to the top
		if (!foundPlace)
		{
			item.parentElement.prepend(item);
		}
	}
}

function sortFileTree(sortByFunction)
{
	let treeItems = Array.from(document.querySelectorAll(".file-tree .tree-item.mod-tree-file:not(.filtered-out)"));
	treeItems.sort(sortByFunction);

	// sort the files within their parent folders
	for (let i = 1; i < treeItems.length; i++)
	{
		let item = treeItems[i];
		let lastItem = treeItems[i - 1];
		if (item.parentElement == lastItem.parentElement)
		{
			lastItem.after(item);
		}
	}

	// sort the folders using their contents
	let folders = Array.from(document.querySelectorAll(".file-tree .tree-item.mod-tree-folder:not(.filtered-out)"));
	folders.sort(sortByFunction);

	// sort the folders within their parent folders
	for (let i = 1; i < folders.length; i++)
	{
		let item = folders[i];

		let foundPlace = false;
		// iterate backwards until we find an item with the same parent
		for (let j = i - 1; j >= 0; j--)
		{
			let lastItem = folders[j];
			if (item.parentElement == lastItem.parentElement)
			{
				lastItem.after(item);
				foundPlace = true;
				break;
			}
		}

		// if we didn't find an item with the same parent, move it to the top
		if (!foundPlace)
		{
			item.parentElement.prepend(item);
		}
	}
}

function sortFileTreeAlphabetically(reverse = false)
{
	sortFileTree(function (a, b)
	{
		const aTitle = a.querySelector(".tree-item-title");
		const bTitle = b.querySelector(".tree-item-title");
		if (!aTitle || !bTitle) return 0;
		const aName = aTitle.textContent.toLowerCase();
		const bName = bTitle.textContent.toLowerCase();
		return aName.localeCompare(bName, undefined, { numeric: true }) * (reverse ? -1 : 1);
	});
}

//#endregion

//#region ----------------- 	   Lists        -----------------

function setupLists(setupOnNode)
{
	let listCollpaseIcons = Array.from(setupOnNode.querySelectorAll(".list-collapse-indicator"));
	for (let i = 0; i < listCollpaseIcons.length; i++)
	{
		let icon = listCollpaseIcons[i];
		icon.addEventListener("click", function (event)
		{
			let listItem = icon.closest("li");
			if (listItem) 
			{
				listItem.classList.toggle("is-collapsed");
				icon.classList.toggle("is-collapsed");
			}
		});
	}
}

//#endregion

//#region -----------------        Canvas       ----------------- 


function setupCanvas(setupOnNode)
{
	if(documentType != "canvas" || !setupOnNode.querySelector(".canvas-wrapper")) return;

	// initialize canvas tranformations
	setupOnNode.querySelector(".canvas")?.setAttribute("style", "translate: 0px 1px; scale: 1;");

	let nodeBounds = getNodesBounds();
	setViewCenter(nodeBounds.centerX, nodeBounds.centerY);

	// let nodes be focused when hovered over
	setupOnNode.querySelectorAll(".canvas-node-container").forEach(function (element) 
	{
		var parent = element.parentElement;

		function onEnter(event)
		{
			parent.classList.toggle("is-focused");

			if (focusedCanvasNode != null && focusedCanvasNode != parent) 
			{
				focusedCanvasNode.classList.remove("is-focused");
				focusedCanvasNode.querySelector(".canvas-node-container").style.display = "";
			}

			focusedCanvasNode = parent;

			parent.addEventListener("mouseleave", onLeave);
			parent.addEventListener("touchend", onLeave);
		}

		function onLeave(event)
		{
			if (focusedCanvasNode)
			{
				focusedCanvasNode.classList.remove("is-focused");
				focusedCanvasNode = null;
			}

			parent.removeEventListener("mouseleave", onLeave);
			parent.removeEventListener("touchend", onLeave);
		}

		element.addEventListener("mouseenter", onEnter);
		element.addEventListener("touchstart", onEnter);
	});

	// make nodes fit to view when double clicked
	setupOnNode.querySelectorAll(".canvas-node").forEach(function (element)
	{
		element.addEventListener("dblclick", function (event)
		{
			fitViewToNode(element);
		});
	});

	// make whole canvas fit to view when double clicked on background
	setupOnNode.querySelectorAll(".canvas-background").forEach(function (element)
	{
		element.addEventListener("dblclick", function (event)
		{
			fitViewToCanvas();
		});
	});

	// make canvas draggable / panable
	canvasWrapper.addEventListener("mousedown", canvasWrapperMouseDownHandler);
	canvasWrapper.addEventListener("touchstart", canvasWrapperMouseDownHandler);
	let scrollInterferance = false;
	function canvasWrapperMouseDownHandler(mouseDownEv)
	{
		let touchesDown = mouseDownEv.touches ?? [];

		scrollInterferance = false;

		// if there is already one tough down we don't want to start another mouse down event
		// extra fingers are already being handled in the move event below
		if (touchesDown.length > 1) return;

		if (mouseDownEv.button == 1 || mouseDownEv.button == 0 || touchesDown.length > 0)
		{
			let lastPointerPos = getPointerPosition(mouseDownEv);
			let startZoom = false;
			let lastDistance = 0;
			let lastTouchCount = touchesDown.length;

			let mouseMoveHandler = function (mouseMoveEv)
			{
				let touchesMove = mouseMoveEv.touches ?? [];

				let pointer = getPointerPosition(mouseMoveEv);

				if (lastTouchCount != touchesMove.length)
				{
					lastPointerPos = pointer;
					lastTouchCount = touchesMove.length;
				}

				let deltaX = pointer.x - lastPointerPos.x;
				let deltaY = pointer.y - lastPointerPos.y;

				if ((mouseDownEv.button == 1 || touchesMove.length == 1) && focusedCanvasNode)
				{
					let mouseHoriz = Math.abs(deltaX) > Math.abs(deltaY * 1.5);
					let mouseVert = Math.abs(deltaY) > Math.abs(deltaX * 1.5);

					// only skip if the focused node can be scrolled in the direction of mouse movement
					let sizer = focusedCanvasNode.querySelector(".markdown-preview-sizer");
					if(sizer)
					{
						let scrollableVert = sizer.scrollHeight > sizer.parentElement.clientHeight + 1;
						let scrollableHoriz = sizer.scrollWidth > sizer.parentElement.clientWidth + 1;

						if (((mouseHoriz && scrollableHoriz) || (mouseVert && scrollableVert)) && (window?.navigator?.platform?.startsWith("Win") ?? true))
						{
							scrollInterferance = true;
						}
						else
						{
							scrollInterferance = false;
						}
					}
				}
				
				if (mouseDownEv.button == 0 && focusedCanvasNode)
				{
					if (focusedCanvasNode.querySelector(".canvas-node-content").textContent.trim() != "") 
					{
						scrollInterferance = true;
					}
				}

				
				if (!scrollInterferance)
				{
					translateCanvas(deltaX, deltaY);
					lastPointerPos = pointer;
				}

				if (touchesMove.length == 2)
				{
					let touchCenter = getPointerPosition(mouseMoveEv, false);
					let touch1 = getTouchPosition(mouseMoveEv.touches[0]);
					let touch2 = getTouchPosition(mouseMoveEv.touches[1]);
					let distance = Math.sqrt(Math.pow(touch1.x - touch2.x, 2) + Math.pow(touch1.y - touch2.y, 2));

					if (!startZoom)
					{
						startZoom = true;
						lastDistance = distance;
					}

					let distanceDelta = distance - lastDistance;
					let scaleDelta = distanceDelta / lastDistance;

					scaleCanvasAroundPoint(1 + scaleDelta, touchCenter.x, touchCenter.y);

					lastDistance = distance;
				}
			};

			let mouseUpHandler = function (mouseUpEv)
			{
				document.body.removeEventListener("mousemove", mouseMoveHandler);
				document.body.removeEventListener("mouseup", mouseUpHandler);
				document.body.removeEventListener("mouseenter", mouseEnterHandler);
				document.body.removeEventListener("touchmove", mouseMoveHandler);
				document.body.removeEventListener("touchend", mouseUpHandler);
				document.body.removeEventListener("touchcancel", mouseUpHandler);
				scrollInterferance = false;
			};

			let mouseEnterHandler = function (mouseEnterEv)
			{
				if (mouseEnterEv.buttons == 1 || mouseEnterEv.buttons == 4) return;

				mouseUpHandler(mouseEnterEv);
			}

			document.body.addEventListener("mousemove", mouseMoveHandler);
			document.body.addEventListener("mouseup", mouseUpHandler);
			document.body.addEventListener("mouseenter", mouseEnterHandler);
			document.body.addEventListener("touchmove", mouseMoveHandler);
			document.body.addEventListener("touchend", mouseUpHandler);
			document.body.addEventListener("touchcancel", mouseUpHandler);
		}
	}

	// get mouse position on the canvas
	let mouseX = 0;
	let mouseY = 0;
	canvasWrapper.addEventListener("mousemove", function (event)
	{
		let pointer = getPointerPosition(event);
		mouseX = pointer.x;
		mouseY = pointer.y;
	});

	let scale = 1;
	let speed = 0;
	let instant = false;
	// make canvas zoomable
	canvasWrapper.addEventListener("wheel", function (event)
	{
		if (focusedCanvasNode)
		{
			// only skip if the focused node can be scrolled
			let sizer = focusedCanvasNode.querySelector(".markdown-preview-sizer");
			if(sizer && sizer.scrollHeight > sizer.parentElement.clientHeight) return;
		}

		event.preventDefault();
		event.stopPropagation();

		if(instant)
		{
			let scale = 1;
			scale -= event.deltaY / 700 * scale;
			scale = clamp(scale, 0.1, 10);
			let viewBounds = getViewBounds();
			scaleCanvasAroundPoint(scale, viewBounds.centerX, viewBounds.centerY);
		}
		else
		{
			let isFirstFrame = speed == 0;
			speed -= (event.deltaY / 200);
			const maxSpeed = 0.14 * scale;
			speed = clamp(speed, -maxSpeed, maxSpeed);
			if (isFirstFrame) requestAnimationFrame(scrollAnimation);
		}
	});

	let dt = 0;
	let lastTime = 0;
	let averageDt = 0;
	function scrollAnimation(currentTime)
	{
		dt = currentTime - lastTime;
		if (lastTime == 0) dt = 30;
		lastTime = currentTime;

		averageDt = dt * 0.05 + averageDt * 0.95;

		if (averageDt > 50)
		{
			console.log("Scrolling too slow, turning on instant scroll");
			instant = true;
			return;
		}

		let oldScale = scale;
		scale += speed * (dt / 1000) * 30;
		scale = clamp(scale, 0.1, 10);

		let viewBounds = getViewBounds();
		scaleCanvasAroundPoint(scale / oldScale, mouseX, mouseY);

		speed *= 0.4;
		if (Math.abs(speed) < 0.01) 
		{
			speed = 0;
			lastTime = 0;
		}
		else requestAnimationFrame(scrollAnimation);
	}

	// fit all nodes to view on initialization after centering the camera
	// after any animations have possibly played
	setTimeout(fitViewToCanvas, 300);
}

/**Gets the bounding rect of the voew-content or markdown-preview-sizer*/
function getViewBounds()
{
	let viewContentRect = viewContent.getBoundingClientRect();

	let minX = viewContentRect.x;
	let minY = viewContentRect.y;
	let maxX = viewContentRect.x + viewContentRect.width;
	let maxY = viewContentRect.y + viewContentRect.height;
	let centerX = viewContentRect.x + viewContentRect.width / 2;
	let centerY = viewContentRect.y + viewContentRect.height / 2;

	return { x: minX, y: minY, width: maxX - minX, height: maxY - minY, minX: minX, minY: minY, maxX: maxX, maxY: maxY, centerX: centerX, centerY: centerY };
}

/**Gets the bounding rect of all nodes in the canvas*/
function getNodesBounds()
{
	let minX = Infinity;
	let minY = Infinity;
	let maxX = -Infinity;
	let maxY = -Infinity;

	canvasNodes.forEach(function (node)
	{
		let nodeRect = node.getBoundingClientRect();

		if (nodeRect.x < minX) minX = nodeRect.x;
		if (nodeRect.y < minY) minY = nodeRect.y;
		if (nodeRect.x + nodeRect.width > maxX) maxX = nodeRect.x + nodeRect.width;
		if (nodeRect.y + nodeRect.height > maxY) maxY = nodeRect.y + nodeRect.height;

	});

	let x = minX;
	let y = minY;
	let width = maxX - minX;
	let height = maxY - minY;
	let centerX = minX + width / 2;
	let centerY = minY + height / 2;

	return { x: x, y: y, width: width, height: height, minX: minX, minY: minY, maxX: maxX, maxY: maxY, centerX: centerX, centerY: centerY };
}

function getCanvasBounds()
{
	let canvasRect = canvas.getBoundingClientRect();

	let x = canvasRect.x;
	let y = canvasRect.y;
	let width = canvasRect.width;
	let height = canvasRect.height;
	let centerX = canvasRect.x + canvasRect.width / 2;
	let centerY = canvasRect.y + canvasRect.height / 2;

	return { x: x, y: y, width: width, height: height, minX: x, minY: y, maxX: x + width, maxY: y + height, centerX: centerX, centerY: centerY };
}

/**Sets the relative scale of the canvas around a point*/
function scaleCanvasAroundPoint(scaleBy, aroundPointX, aroundPointY)
{
	let canvasBounds = getCanvasBounds();

	let xCenterToTarget = aroundPointX - canvasBounds.x;
	let yCenterToTarget = aroundPointY - canvasBounds.y;

	let xCenterPin = canvasBounds.x + xCenterToTarget * scaleBy;
	let yCenterPin = canvasBounds.y + yCenterToTarget * scaleBy;

	let offsetX = aroundPointX - xCenterPin;
	let offsetY = aroundPointY - yCenterPin;

	scaleCanvas(scaleBy);
	translateCanvas(offsetX, offsetY);
	return { x: offsetX, y: offsetY };
}

/**Sets the relative scale of the canvas*/
function scaleCanvas(scaleBy)
{
	let newScale = Math.max(scaleBy * canvas.style.scale, 0.001);
	canvas.style.scale = newScale;
	canvasWrapper.style.setProperty("--zoom-multiplier", (1/(Math.sqrt(newScale))) );
}

/**Sets the relative translation of the canvas*/
function translateCanvas(x, y)
{
	let translate = canvas.style.translate;
	let split = translate.split(" ");
	let translateX = split.length > 0 ? parseFloat(translate.split(" ")[0].trim()) : 0;
	let translateY = split.length > 1 ? parseFloat(translate.split(" ")[1].trim()) : translateX;

	canvas.style.translate = \`\${translateX + x}px \${translateY + y}px\`;
}

/**Sets the absolute center of the view*/
function setViewCenter(x, y)
{
	let viewContentRect = getViewBounds();
	let deltaX = viewContentRect.centerX - x;
	let deltaY = viewContentRect.centerY - y;

	translateCanvas(deltaX, deltaY);
}

function getCanvasTranslation()
{
	let translate = canvas.style.translate;
	let split = translate.split(" ");
	let translateX = split.length > 0 ? parseFloat(translate.split(" ")[0].trim()) : 0;
	let translateY = split.length > 1 ? parseFloat(translate.split(" ")[1].trim()) : translateX;

	return { x: translateX, y: translateY };
}

/**Sets the absolute scale of the canvas background pattern*/
function scaleCanvasBackground(scaleBy)
{
	let scaleX = scaleBy * canvasBackgroundPattern.getAttribute("width");
	let scaleY = scaleBy * canvasBackgroundPattern.getAttribute("height");

	canvasBackgroundPattern.setAttribute("width", scaleX);
	canvasBackgroundPattern.setAttribute("height", scaleY);
}

/**Sets the absolute translation of the canvas background pattern*/
function translateCanvasBackground(x, y)
{
	canvasBackgroundPattern.setAttribute("x", x + canvasBackgroundPattern.getAttribute("x"));
	canvasBackgroundPattern.setAttribute("y", y + canvasBackgroundPattern.getAttribute("y"));
}

/**Fits the view to contain the given node*/
function fitViewToNode(node)
{
	let nodeRect = getElBounds(node);
	let viewContentRect = getViewBounds();
	let canvasBounds = getCanvasBounds();

	let scale = 0.8 * Math.min(viewContentRect.width/nodeRect.width, viewContentRect.height/nodeRect.height);
	
	let canvasX = canvasBounds.x;
	let canvasY = canvasBounds.y;

	let canvToNodeX = (nodeRect.centerX - canvasX) * scale;
	let canvToNodeY = (nodeRect.centerY - canvasY) * scale;

	let newNodeX = canvasX + canvToNodeX;
	let newNodeY = canvasY + canvToNodeY;
	
	let deltaX = viewContentRect.centerX - newNodeX;
	let deltaY = viewContentRect.centerY - newNodeY;

	nodeRect = getElBounds(node);

	canvas.style.transition = "scale 0.5s cubic-bezier(0.5, -0.1, 0.5, 1.1), translate 0.5s cubic-bezier(0.5, -0.1, 0.5, 1.1)";
	scaleCanvas(scale);
	translateCanvas(deltaX, deltaY);

	setTimeout(function()
	{
		canvas.style.transition = "";
	}, 550);
}

/**Fits the view to contain all nodes in the graph*/
function fitViewToCanvas()
{
	let nodesRect = getNodesBounds();
	let viewContentRect = getViewBounds();
	let canvasBounds = getCanvasBounds();

	let scale = 0.8 * Math.min(viewContentRect.width/nodesRect.width, viewContentRect.height/nodesRect.height);

	let canvasX = canvasBounds.x;
	let canvasY = canvasBounds.y;

	let canvToNodeX = (nodesRect.centerX - canvasX) * scale;
	let canvToNodeY = (nodesRect.centerY - canvasY) * scale;

	let newNodeX = canvasX + canvToNodeX;
	let newNodeY = canvasY + canvToNodeY;
	
	let deltaX = viewContentRect.centerX - newNodeX;
	let deltaY = viewContentRect.centerY - newNodeY;

	canvas.style.transition = "scale 0.5s cubic-bezier(0.5, -0.1, 0.5, 1.1), translate 0.5s cubic-bezier(0.5, -0.1, 0.5, 1.1)";
	scaleCanvas(scale);
	translateCanvas(deltaX, deltaY);

	setTimeout(function()
	{
		canvas.style.transition = "";
	}, 550);
}

//#endregion

//#region -----------------       Callouts      ----------------- 

function setupCallouts(setupOnNode)
{
	// MAKE CALLOUTS COLLAPSIBLE
    // if the callout title is clicked, toggle the display of .callout-content
	setupOnNode.querySelectorAll(".callout.is-collapsible .callout-title").forEach(function (element) 
	{
		element.addEventListener("click", function () 
		{
			var parent = this.parentElement;

			parent.classList.toggle("is-collapsed");
			element.querySelector(".callout-fold").classList.toggle("is-collapsed");

			slideToggle(parent.querySelector(".callout-content"), 100);
		});
	});

}

//#endregion

//#region -----------------      Checkboxes     ----------------- 

function setupCheckboxes(setupOnNode)
{
	// Fix checkboxed toggling .is-checked
	setupOnNode.querySelectorAll(".task-list-item-checkbox").forEach(function (element) 
	{
		element.addEventListener("click", function () 
		{
			var parent = this.parentElement;
			parent.classList.toggle("is-checked");
			parent.setAttribute("data-task", parent.classList.contains("is-checked") ? "x" : " ");
		});
	});

	setupOnNode.querySelectorAll(\`.plugin-tasks-list-item input[type="checkbox"]\`).forEach(function(checkbox)
	{
		checkbox.checked = checkbox.parentElement.classList.contains("is-checked");
	});

	setupOnNode.querySelectorAll('.kanban-plugin__item.is-complete').forEach(function(checkbox)
	{
		checkbox.querySelector('input[type="checkbox"]').checked = true;
	});
}

//#endregion

//#region -----------------     Code Blocks     ----------------- 

function setupCodeblocks(setupOnNode)
{
	// make code snippet block copy button copy the code to the clipboard
	setupOnNode.querySelectorAll(".copy-code-button").forEach(function (element) 
	{
		element.addEventListener("click", function () 
		{
			var code = this.parentElement.querySelector("code").textContent;
			navigator.clipboard.writeText(code);
			this.textContent = "Copied!";
			// set a timeout to change the text back
			setTimeout(function () 
			{
				setupOnNode.querySelectorAll(".copy-code-button").forEach(function (button) 
				{
					button.textContent = "Copy";
				});
			}, 2000);
		});
	});
}

//#endregion

//#region -----------------        Links        ----------------- 

function setupLinks(setupOnNode)
{
	setupOnNode.querySelectorAll(".internal-link, a.tag, .tree-link, .footnote-link").forEach(function(link)
	{
		link.addEventListener("click", function(event)
		{
			let target = link.getAttribute("href");

			event.preventDefault();
			event.stopPropagation();

			if(!target)
			{
				console.log("No target found for link");
				return;
			}
			
			let relativePathnameStrip = relativePathname.split("#")[0].split("?")[0];

			if(target.startsWith("#") || target.startsWith("?")) target = relativePathnameStrip + target;

			loadDocument(target, true, !link.classList.contains("tree-link"));
		});
	});
}

//#endregion

//#region -----------------      Sidebars       ----------------- 

function setupSidebars()
{
	if (!rightSidebar || !leftSidebar) return;

	//#region sidebar object references
	sidebarCollapseIcons[0].otherIcon = sidebarCollapseIcons[1];
	sidebarCollapseIcons[1].otherIcon = sidebarCollapseIcons[0];
	sidebarCollapseIcons[0].gutter = sidebarGutters[0];
	sidebarCollapseIcons[1].gutter = sidebarGutters[1];
	sidebarCollapseIcons[0].sidebar = sidebars[0];
	sidebarCollapseIcons[1].sidebar = sidebars[1];
	sidebarGutters[0].otherGutter = sidebarGutters[1];
	sidebarGutters[1].otherGutter = sidebarGutters[0];
	sidebarGutters[0].collapseIcon = sidebarCollapseIcons[0];
	sidebarGutters[1].collapseIcon = sidebarCollapseIcons[1];
	sidebars[0].otherSidebar = sidebars[1];
	sidebars[1].otherSidebar = sidebars[0];
	sidebars[0].gutter = sidebarGutters[0];
	sidebars[1].gutter = sidebarGutters[1];
	//#endregion

	sidebars.forEach(function (sidebar)
	{
		sidebar.collapsed = sidebar.classList.contains("is-collapsed");
		sidebar.collapse = function (collapsed = true)
		{
			if (!collapsed && this.temporarilyCollapsed && deviceSize == "large-screen") this.gutter.collapse(true);
					

			if (!collapsed && document.body.classList.contains("floating-sidebars"))
			{
				function clickOutsideCollapse(event)
				{
					// don't allow bubbling into sidebar
					if (event.target.closest(".sidebar")) return;

					sidebar.collapse(true);
					document.body.removeEventListener("click", clickOutsideCollapse);
				}

				document.body.addEventListener("click", clickOutsideCollapse);
			}

			// if there isn't enough space for both sidebars then close the other one
			if (deviceSize == "phone")
			{
				if (!collapsed) sidebar.otherSidebar.fullCollapse(true, true);
				if (collapsed) sidebar.gutter.otherGutter.collapse(false, true);
			}

			if (deviceSize == "tablet")
			{
				if (!collapsed) sidebar.otherSidebar.collapse(true);
			}

			this.classList.toggle("is-collapsed", collapsed);
			this.collapsed = collapsed;
		}
		sidebar.temporaryCollapse = function (collapsed = true)
		{
			this.temporarilyCollapsed = true;
			this.collapse(true);
			this.gutter.collapse(false);
			this.collapsed = collapsed;
		}
		sidebar.fullCollapse = function (collapsed = true, force = false)
		{
			this.collapse(collapsed);
			this.gutter.collapse(true, force);
			this.collapsed = collapsed;
		}
		sidebar.toggleCollapse = function ()
		{
			this.collapse(!this.collapsed);
		}
		sidebar.toggleFullCollapse = function ()
		{
			this.fullCollapse(!this.collapsed);
		}
	});

	sidebarGutters.forEach(function (gutter)
	{
		gutter.collapsed = gutter.classList.contains("is-collapsed");
		gutter.collapse = function (collapsed, force = false)
		{
			if(!force) return;

			this.classList.toggle("is-collapsed", collapsed);
			this.collapsed = collapsed;
		}
		gutter.toggleCollapse = function ()
		{
			this.collapse(!this.collapsed);
		}
	});

	sidebarCollapseIcons.forEach(function (icon)
	{
		icon.addEventListener("click", function (event)
		{
			event.stopPropagation();
			icon.sidebar.toggleCollapse();
		});
	});
	
	if (!isMobile()) setupSidebarResize();
}

function setupSidebarResize()
{
	let leftHandle = document.querySelector('.sidebar-left .sidebar-handle');
	let rightHandle = document.querySelector('.sidebar-right .sidebar-handle');
	if (!leftHandle || !rightHandle) return;
	let resizingSidebar = null;

	let minResizeWidth = parseFloat(getComputedStyle(leftHandle.parentElement).fontSize) * 15;
	let collapseWidth = minResizeWidth / 4.0;

	let rightWidth = localStorage.getItem('sidebar-right-width');
	let leftWidth = localStorage.getItem('sidebar-left-width');
	if (rightWidth) document.querySelector('.sidebar-right').style.setProperty('--sidebar-width', rightWidth);
	if (leftWidth) document.querySelector('.sidebar-left').style.setProperty('--sidebar-width', leftWidth);

	function resizeMove(e)
	{
		if (!resizingSidebar) return;
		
		let isLeft = resizingSidebar.classList.contains("sidebar-left");
		var distance = isLeft ? e.clientX : window.innerWidth - e.clientX;
		var newWidth = \`min(max(\${distance}px, 15em), 40vw)\`; // 15em is minResizeWidth

		if (distance < collapseWidth)
		{
			resizingSidebar.collapse(true);
			resizingSidebar.style.removeProperty('transition-duration');
		} 
		else 
		{
			resizingSidebar.collapse(false);
			resizingSidebar.style.setProperty('--sidebar-width', newWidth);
			if (distance > minResizeWidth) resizingSidebar.style.transitionDuration = "0s";
		}
	}

	function handleClick(e) 
	{
		resizingSidebar = e.target.closest('.sidebar');
		resizingSidebar.classList.add('is-resizing');
		document.addEventListener('pointermove', resizeMove);
		document.addEventListener('pointerup', function () 
		{
			document.removeEventListener('pointermove', resizeMove);
			var finalWidth = getComputedStyle(resizingSidebar).getPropertyValue('--sidebar-width');

			let isLeft = resizingSidebar.classList.contains("sidebar-left");
			localStorage.setItem(isLeft ? 'sidebar-left-width' : 'sidebar-right-width', finalWidth);
			resizingSidebar.classList.remove('is-resizing');
			resizingSidebar.style.removeProperty('transition-duration');
		});
	}

	leftHandle.addEventListener('pointerdown', handleClick);
	rightHandle.addEventListener('pointerdown', handleClick);

	// reset sidebar width on double click
	function resetSidebarEvent(e)
	{
		let sidebar = e.target.closest('.sidebar');
		if (sidebar) 
		{
			sidebar.style.removeProperty('transition-duration');
			sidebar.style.removeProperty('--sidebar-width');
			let isLeft = sidebar.classList.contains("sidebar-left");
			localStorage.removeItem(isLeft ? 'sidebar-left-width' : 'sidebar-right-width');
		}
	}

	leftHandle.addEventListener('dblclick', resetSidebarEvent);
	rightHandle.addEventListener('dblclick', resetSidebarEvent);
}

/**Get the computed target sidebar width in px*/
function getSidebarWidthProp()
{
	return getComputedPixelValue("--sidebar-width");
}

//#endregion

//#region -----------------        Theme        ----------------- 

function setupThemeToggle()
{
	if (!themeToggle) return;

	if (localStorage.getItem("theme") != null)
    {
        setThemeToggle(localStorage.getItem("theme") == "light");
    }

	// set initial toggle state based on body theme class
	if (document.body.classList.contains("theme-light"))
	{
		setThemeToggle(true);
	}
	else
	{
		setThemeToggle(false);
	}

	function setThemeToggle(state, instant = false)
	{

		themeToggle.checked = state;

		if (instant) 
		{	
			var oldTransition = document.body.style.transition;
			document.body.style.transition = "none";
		}

		if(!themeToggle.classList.contains("is-checked") && state)
		{
			themeToggle.classList.add("is-checked");
		}
		else if (themeToggle.classList.contains("is-checked") && !state)
		{
			themeToggle.classList.remove("is-checked");
		}

		if(!state)
		{
			if (document.body.classList.contains("theme-light"))
			{
				document.body.classList.remove("theme-light");
			}

			if (!document.body.classList.contains("theme-dark"))
			{
				document.body.classList.add("theme-dark");
			}
		}
		else
		{
			if (document.body.classList.contains("theme-dark"))
			{
				document.body.classList.remove("theme-dark");
			}

			if (!document.body.classList.contains("theme-light"))
			{
				document.body.classList.add("theme-light");
			}
		}

		if (instant)
		{
			setTimeout(function()
			{
				document.body.style.transition = oldTransition;
			}, 100);
		}

		localStorage.setItem("theme", state ? "light" : "dark");
	}

    document.querySelector(".theme-toggle-input")?.addEventListener("change", event =>
	{
		let newVal = !(localStorage.getItem("theme") == "light");
		console.log("Theme toggle changed to: " + newVal);
		setThemeToggle(newVal);
	});
}

//#endregion

//#region -----------------        Scroll       -----------------

let flashElement = null;
let flashAnimation = null;
function scrollIntoView(element, options, animate = true)
{
	setTreeCollapsed(element, false, animate);
    
	const flashTiming = 
	{
		duration: 1500,
		iterations: 1,
		delay: 300,
	};

	const flashAnimationData =
	[
		{ opacity: 0 },
		{ opacity: 0.8 },
		{ opacity: 0.8 },
		{ opacity: 0.8 },
		{ opacity: 0.8 },
		{ opacity: 0.8 },
		{ opacity: 0 },
	];

	if(flashElement) 
	{
		flashElement.remove();
		flashAnimation.cancel();
	}

	flashElement = document.createElement("div");
	flashElement.classList.add("scroll-highlight");
	element.appendChild(flashElement);

	if(options) flashElement.scrollIntoView({ behavior: animate ? "smooth" : "auto", ...options });
	else flashElement.scrollIntoView({ behavior: animate ? "smooth" : "auto" });

	var savePos = element.style.position;
	element.style.position = "relative";

	flashAnimation = flashElement.animate(flashAnimationData, flashTiming);
	flashAnimation.onfinish = function()
	{
		flashElement.remove();
		element.style.position = savePos;
	}
}

function setupScroll(setupOnNode)
{
	// hide elements clipped by scrollable areas in markdown-preview-view elements
	if(documentType != "canvas") return;

	let markdownViews = Array.from(setupOnNode.querySelectorAll(".markdown-preview-view"));
	let nextMarkdownViewId = 0;

	let marginMultiplier = 0.1;
	let maxMargin = 150;
	let margin = 0;

	markdownViews.forEach(async function (view)
	{
		console.log("Setting up markdown view");
		let headers = Array.from(view.querySelectorAll(".heading-wrapper"));

		view.updateVisibleWindowMarkdown = function updateVisibleWindowMarkdown(allowVirtualization = true, allowDevirtualization = true)
		{
			let scrollBounds = view.getBoundingClientRect();
			margin = Math.min(scrollBounds.height * marginMultiplier, maxMargin);
			let scrollBoundsTop = scrollBounds.top - margin;
			let scrollBoundsBottom = scrollBounds.bottom + margin;

			async function updateHeader(header)
			{
				let bounds = header?.getBoundingClientRect();

				if (!bounds) return;
				
				let isClipped = (bounds.top < scrollBoundsTop && bounds.bottom < scrollBoundsTop) || (bounds.top > scrollBoundsBottom && bounds.bottom > scrollBoundsBottom);

				if (isClipped && allowVirtualization)
				{
					header.hide();
				}
				else if (!isClipped && allowDevirtualization)
				{
					header.show();
				}
			}

			for (let i = 0; i < headers.length; i++)
			{
				let h = headers[i];
				if(h) updateHeader(h);
			}
		}

		let lastScrollTop = 0;
		view.addEventListener("scroll", function()
		{
			if (Math.abs(view.scrollTop - lastScrollTop) > margin / 3)
			{
				view.updateVisibleWindowMarkdown(false, true);
			}

			lastScrollTop = view.scrollTop;
		});
	});

	async function periodicUpdate()
	{
		if(markdownViews.length > 0)
		{
			markdownViews[nextMarkdownViewId].updateVisibleWindowMarkdown();
			nextMarkdownViewId = (nextMarkdownViewId + 1) % markdownViews.length;
		}
	}
	
	setInterval(periodicUpdate, 200);
} 

//#endregion

//#region -----------------        Plugins      -----------------

// Excalidraw
function setupExcalidraw(setupOnNode)
{
	setupOnNode.querySelectorAll(".excalidraw-svg svg").forEach(function (svg)
	{
		let isLight = svg.querySelector("rect").getAttribute("fill") > "#7F7F7F";
		svg.classList.add(isLight ? "light" : "dark");
	});
}


//#endregion

//#region -----------------        Search      -----------------

// search box
let index;
let searchResults;

async function setupSearch() 
{
	if (isFileProtocol) return;
	searchInput = document.querySelector('input[type="search"]');
	if (!searchInput) return;

	const indexResp = await fetch('lib/search-index.json');
	const indexJSON = await indexResp.text();
	index = MiniSearch.loadJSON(indexJSON, { fields: ['title', 'path', 'tags', 'headers'] });

	const inputClear = document.querySelector('.search-input-clear-button');

	inputClear.addEventListener('click', (event) => 
	{
		search("");
	});

	searchInput.addEventListener('input', (event) => 
	{
		const query = event.target.value ?? "";

		if (startsWithAny(query, ["#", "tag:", "title:", "name:", "header:", "H:"]))
		{
			searchInput.style.color = "var(--text-accent)";
		}
		else
		{
			searchInput.style.color = "";
		}
		
		search(query);
	});

	searchResults = document.createElement('div');
	searchResults.setAttribute('id', 'search-results');
}

async function search(query)
{
	searchInput.value = query;

	// parse special query filters
	let searchFields = ['title', 'content', 'tags', 'headers', 'path'];
	if (query.startsWith("#")) searchFields = ['tags', 'headers'];
	if (query.startsWith("tag:"))
	{
		query = query.substring(query.indexOf(":") + 1);
		searchFields = ['tags'];
	}
	if (startsWithAny(query, ["title:", "name:"])) 
	{
		query = query.substring(query.indexOf(":") + 1);
		searchFields = ['title'];
	}
	if (startsWithAny(query, ["header:", "H:"]))
	{
		query = query.substring(query.indexOf(":") + 1);
		searchFields = ['headers'];
	}
	if (startsWithAny(query, ["path:"]))
	{
		query = query.substring(query.indexOf(":") + 1);
		searchFields = ['path'];
	}

	if (query.length >= 1)
	{
		const results = index.search(query, { prefix: true, fuzzy: 0.3, boost: { title: 4, headers: 3, tags: 2, path: 1 }, fields: searchFields });
		// search through the file tree and hide documents that don't match the search
		let showPaths = [];
		let hintLabels = [];
		for (let result of results)
		{
			// only show the most relevant results
			if (((result.score < results[0].score * 0.33 || showPaths.length > 12) && showPaths.length > 3) || result.score < results[0].score * 0.1) break;
			showPaths.push(result.path);

			let hints = [];
			let breakEarly = false;
			for (match in result.match)
			{
				if (result.match[match].includes("headers"))
				{
					for (let header of result.headers)
					{
						if (header.toLowerCase().includes(match.toLowerCase()))
						{
							hints.push(header);
							if (query.toLowerCase() != match.toLowerCase()) 
							{
								breakEarly = true;
								break;
							}
						}
					}
				}

				if (breakEarly) break;
			}

			hintLabels.push(hints);
		}

		let fileTree = document.querySelector(".file-tree");
		if (fileTree)
		{
			// filter the file tree and sort it by the order of the search results
			filterFileTree(showPaths, hintLabels, query).then(() =>
			sortFileTreeDocuments((a, b) => 
			{
				if (!a || !b) return 0;
				let aPath = getVaultRelativePath(a.firstChild.href);
				let bPath = getVaultRelativePath(b.firstChild.href);
				return showPaths.findIndex((path) => aPath.startsWith(path)) - showPaths.findIndex((path) => bPath.startsWith(path));
			}));
		}
		else
		{
			const list = document.createElement('div');
			results.slice(0, 10).forEach(result => {

				const item = document.createElement('div');
				item.classList.add('search-result');

				const link = document.createElement('a');
				link.classList.add('tree-link');

				const searchURL = result.path + '?mark=' + encodeURIComponent(query);
				link.setAttribute('href', searchURL);
				link.appendChild(document.createTextNode(result.title));
				item.appendChild(link);
				list.append(item);
			});

			searchResults.replaceChildren(list);
			searchInput.parentElement.after(searchResults);
			initializePageEvents(searchResults);
		}

	}
	else
	{
		if (searchResults && searchResults.parentElement) searchResults.parentNode.removeChild(searchResults);
		clearCurrentDocumentSearch();
		if (fileTree) clearFileTreeFilter().then(() => sortFileTreeAlphabetically());
	}

}

function startsWithAny(string, prefixes)
{
	for (let i = 0; i < prefixes.length; i++)
	{
		if (string.startsWith(prefixes[i])) return true;
	}

	return false;
}

async function searchCurrentDocument(query)
{
	clearCurrentDocumentSearch();
	const textNodes = getTextNodes(document.querySelector(".markdown-preview-sizer") ?? documentContainer);

	textNodes.forEach(async node =>
	{
		const content = node.nodeValue;
		const newContent = content.replace(new RegExp(query, 'gi'), match => \`<mark>\${match}</mark>\`);

		if (newContent !== content) 
		{
			const tempDiv = document.createElement('div');
			tempDiv.innerHTML = newContent;
	
			const newNodes = Array.from(tempDiv.childNodes);
	
			newNodes.forEach(newNode => 
			{
				if (newNode.nodeType != Node.TEXT_NODE)
				{
					newNode.setAttribute('class', 'search-mark');
					
				}
				node.parentNode.insertBefore(newNode, node);
			});
	
			node.parentNode.removeChild(node);
		}
	});

	let firstMark = document.querySelector(".search-mark");

	// wait for page to fade in
	setTimeout(() => 
	{
		if(firstMark) scrollIntoView(firstMark, { behavior: "smooth", block: "start" });
	}, 500);
}

function clearCurrentDocumentSearch()
{
	document.querySelectorAll(".search-mark").forEach(node => 
	{
		node.outerHTML = node.innerHTML;
	});
}
  
function getTextNodes(element) 
{
	const textNodes = [];
	const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false);

	let node;
	while (node = walker.nextNode()) {
		textNodes.push(node);
	}

	return textNodes;
}

//#endregion
`;

// assets/plugin-styles.txt.css
var plugin_styles_txt_default = `/*#region Variables */
body
{
	--color-fade-speed: 0.2s;
}

/*#endregion */

/*#region Tree */

/* Base tree */

.tree-container 
{
	position: relative;
	height: 100%;
	width: auto;
	margin-top: 3em;
    margin-bottom: 0;
}

.tree-container .tree-header 
{
	display: flex;
	flex-direction: row;
	align-items: center;
	position: absolute;
	top: -3em;
}

.tree-container .tree-header .sidebar-section-header 
{
    margin-block: 1em;
    white-space: nowrap;
}

.tree-container:has(.tree-scroll-area:empty) 
{
    display: none;
}

body .webpage-container .tree-container .tree-scroll-area 
{
	width: 100%;
	height: 100%;
	max-height: 100%;
	overflow-y: auto;
	border-radius: 0;
	position: absolute;
	margin: 0;
	background-color: transparent;
}

.tree-container .tree-item 
{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
	padding-block: 1px;
	overflow: hidden !important;
	flex: none;
}

.tree-container .tree-item-children
{
    padding: 0;
	margin: 0;
    border-left: none;
    width: 100%;
}

.tree-item-title > *
{
	padding: 0;
	margin: 0;
	overflow: hidden;
	display: inline;
	text-overflow: ellipsis;
}

.tree-container .tree-item-icon *
{
	color: var(--text-muted); 
	font-family: emoji;
}

.tree-container .tree-item-icon :is(svg,img) 
{
	-webkit-mask-image-repeat: no-repeat;
	-webkit-mask-image-position: center;
	max-width: 1.3em;
	height: 100%;
}

/* Skip outer wrappers around icons */
.tree-container .tree-item-icon *:has(svg)
{
	display: contents !important;
}

.tree-container .tree-item-icon
{
	min-width: 1.6em;
	max-width: 1.6em;
	margin-left: 2px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.tree-container .tree-item.mod-active > .tree-link > .tree-item-contents
{
    color: var(--interactive-accent);
}

.tree-container .tree-link {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
	flex-wrap: wrap;

    border-radius: var(--radius-s);
    color: var(--nav-item-color);
	text-decoration-line: none;

    width: -webkit-fill-available;
	width: -moz-available;
	width: fill-available;

    margin-left: var(--tree-horizontal-spacing);
}

.tree-container .tree-link:active 
{
    color: var(--nav-item-color-active);
}

.tree-container .tree-item-contents 
{
    width: 100%;
    height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	font-size: unset !important;
    padding-left: calc(var(--tree-horizontal-spacing) * 2 + var(--collapse-arrow-size)) !important;
    border-radius: var(--radius-s);
    
	display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
	
    color: var(--nav-item-color);
    transition: background-color .1s;
}

.tree-container .tree-item-title {
    overflow: hidden;
    text-overflow: ellipsis !important;
    text-wrap: nowrap !important;
    white-space: nowrap !important;
    position: relative !important;
    border: none !important;

    width: 100%;
    width: -webkit-fill-available;
    width: -moz-available;
    width: fill-available;

    background-color: transparent !important;
    padding-top: calc(var(--tree-vertical-spacing)/ 2) !important;
    padding-bottom: calc(var(--tree-vertical-spacing)/ 2) !important;
	margin: 0 !important;
	left: 0 !important;
	right: 0 !important;
	top: 0 !important;
	bottom: 0 !important;
}

.tree-container .tree-item-title::after
{
	right: 0;
	position: absolute !important;
	margin-right: 0.5em !important;
}

/* Find tree contents in folders with no other folders in them */
.tree-container .mod-tree-folder:not(:has(.mod-tree-folder)) .mod-tree-file > .tree-link > .tree-item-contents
{
	padding-left: calc(var(--tree-horizontal-spacing) * 2) !important;
}

.tree-container .collapse-icon {
    translate: calc(0px - var(--collapse-arrow-size) - var(--tree-horizontal-spacing) * 2) 0;
    position: absolute;
    height: 100%;
    padding: var(--tree-horizontal-spacing);
}

.tree-container .tree-item.mod-tree-folder > .tree-link > .collapse-icon
{
    width: 100%;
}

.collapse-icon:hover 
{
    color: var(--nav-item-color-hover);
}

.tree-container .clickable-icon
{
	width: 3.2em;
	height: 2.2em;
}

.tree-container .tree-item.is-collapsed > .tree-link > .tree-item-contents > .collapse-icon > svg
{
    transition: transform 0.1s ease-in-out;
    transform: rotate(-90deg);
}

.tree-container .tree-item-contents:hover 
{
	color: var(--nav-item-color-hover);
}

.filtered-out
{
	display: none !important;
}

/* Indentation guide */

.tree-container > .tree-scroll-area > * .tree-item 
{
    margin-left: calc(var(--tree-horizontal-spacing) * 2 + var(--collapse-arrow-size)/2);
    
}
.tree-container > .tree-scroll-area > * .tree-item 
{
	border-left: var(--nav-indentation-guide-width) solid var(--nav-indentation-guide-color);
}

.tree-container .tree-scroll-area > * > * > .tree-item 
{
    margin-left: calc(var(--tree-horizontal-spacing) + var(--collapse-arrow-size)/2);
}

.tree-container:not(.mod-nav-indicator) .tree-scroll-area .tree-item 
{
	border-color: transparent !important;
}

.tree-container .tree-item.mod-active
{
	border-color: var(--interactive-accent) !important;
	box-shadow: 2px 0px 0px 0px var(--interactive-accent) inset;
	transition: box-shadow 0.4s ease-in-out;
}


.tree-container .tree-item:hover:not(.mod-active):not(.mod-collapsible):not(:has(.tree-item:hover)):not(.mod-root > * > *) /* Hover */
{
    border-left: var(--nav-indentation-guide-width) solid var(--nav-item-color-hover);
}

.tree-container .tree-link:hover, .tree-container .mod-active > .tree-link
{
	background-color: var(--nav-item-background-hover);
	cursor: pointer;
}

.webpage-container .tree-container .tree-item:not(.mod-collapsible) > .tree-item-children > .tree-item > .tree-link,
.webpage-container .tree-container > .tree-scroll-area > .tree-item > .tree-link
{
    margin-left: 0 !important;
}

/* Special */

.tree-container.outline-tree .tree-item[data-depth='1'] > .tree-link > .tree-item-contents
{
    font-weight: 900;
    font-size: 1.1em;
    margin-left: 0;
	padding-left: 1em;
}

.nav-folder.mod-root .nav-folder>.nav-folder-children
{
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
}

.nav-file
{
	border-radius: 0 !important;
}

.nav-folder.mod-root .nav-folder > .nav-folder-children
{
	border-radius: var(--radius-s) !important;;
}

.webpage-container .nav-file-tag
{
	margin-right: 1em;
}

.nav-file-title-content, .nav-folder-title-content
{
    margin-bottom: unset !important;
    display: unset !important;
    border-radius: unset !important;
    cursor: unset !important;
    font-size: unset !important;
    font-weight: unset !important;
    line-height: unset !important;
	padding: unset !important;
}

/*#endregion */

/*#region Headers */

#webpage-icon :is(svg, img)
{
  width: 100%;
  height: 100%;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  stroke: currentColor;
}

#webpage-icon *:has(:is(svg, img))
{
	display: contents !important;
}

#webpage-icon:has(:is(svg, img))
{
	font-size: 40px;
	width: 40px;
	height: 40px;
}

#webpage-icon {
  font-size: 40px;
  margin-bottom: 8px;
  font-family: emoji;
  width: fit-content;
}

body.show-inline-title .page-title
{
	font-weight: var(--inline-title-weight);
    font-size: var(--inline-title-size);
    font-style: var(--inline-title-style);
    font-variant: var(--inline-title-variant);
    font-family: var(--inline-title-font);
    letter-spacing: -0.015em;
    color: var(--inline-title-color);
}

.heading
{
	position: relative;
}

.heading-wrapper.is-collapsed > .heading::after 
{
    content: "..." !important;
    display: inline-block !important;
    position: absolute !important;
	margin: 0 !important;
	padding: 0 !important;
    margin-left: 0.3em !important;
    color: var(--text-muted);
}

.heading-wrapper 
{
    transition: height ease-in-out, margin-bottom ease-in-out;
    transition-duration: 0.2s;
    display: flex;
	flex-direction: column;
	position: relative;
}

/* high specificity in order to override other style */
html > body > .webpage-container > .document-container > .markdown-preview-view >  .markdown-preview-sizer > div
{
	margin-inline: 0 !important;
    margin: 0 !important;
	padding: 0 !important;
	width: 100%;
	max-width: 100%;
}

.markdown-rendered .heading-wrapper:has(> .heading-children > div:last-child > :is(p,pre,table,ul,ol)) + .heading-wrapper > .heading:first-child
{
    margin-top: var(--heading-spacing);
}

.heading-children
{
	transition: height ease-in-out, margin-bottom ease-in-out;
	transition-duration: 0.2s;
	display: flow;
	position: relative;
	contain: inline-size;
}

.heading-children.is-collapsed
{
	padding-top: 0em;
}

.heading-wrapper.is-collapsed > .heading-children, .heading-wrapper.is-animating > .heading-children
{
    overflow: hidden; overflow: clip;
}

.heading-wrapper > .heading > .heading-after
{
	display: none;
}

.heading-wrapper.is-collapsed > .heading > .heading-after 
{
    display: inline-block;
    margin-left: 0.3em;
    opacity: 0.4;
    font-size: 1em;
    cursor: auto;
    user-select: none;
}

.heading-wrapper.is-hidden > *
{
	display: none;
}

.heading-wrapper.is-hidden
{
	visibility: hidden;
}

.collapse-icon:not(.list-collapse-indicator) svg.svg-icon {
    color: var(--nav-collapse-icon-color);
    width: var(--collapse-arrow-size);
    height: var(--collapse-arrow-size);
    transition: transform 100ms ease-in-out 0s;
    stroke-width: 4px;
    min-width: 10px;
    min-height: 10px;
}

div.is-collapsed > * > .heading-collapse-indicator.collapse-icon > svg
{
    transition: transform 0.1s ease-in-out;
    transform: rotate(-90deg);
}

.heading-wrapper .heading-collapse-indicator
{
	opacity: 0;
    transition: opacity 0.15s ease-in-out;
	position: absolute;
	z-index: 1;
	padding: 0 !important;
	padding-left: 40px !important;
	padding-right: 40px !important;
	left: -40px !important;
}

.heading:hover > .heading-collapse-indicator,
.heading-wrapper .heading-collapse-indicator:hover
{
	opacity: 1;
}

.heading-wrapper-span 
{
    position: absolute;
    width: 200vw;
    height: calc(100% + var(--p-spacing) * 2);
    top: calc(0px - var(--p-spacing));
    left: -100vw;
	z-index: -1;
}

.markdown-embed .markdown-embed-content .markdown-preview-view .heading-wrapper-span 
{
    width: 100%;
}

/*#endregion */

/*#region Theme Toggle */

.theme-toggle-container {
    --toggle-width: 3.5em;
    --toggle-height: 1.75em;
    --border-radius: calc(var(--toggle-height) / 2);
    --handle-width: calc(var(--toggle-height) * 0.65);
    --handle-radius: calc(var(--handle-width) / 2);
    --handle-margin: calc((var(--toggle-height) / 2.0) - var(--handle-radius));
    --handle-translation: calc(var(--toggle-width) - var(--handle-width) - (var(--handle-margin) * 2));

    display: inline-block;
    cursor: pointer;
}

.sidebar-section-header, .clickable-icon
{
	transition: color var(--color-fade-speed) ease-in-out;
}

/* animation to expand width, move handle, then contract width */
@keyframes toggle-slide-right
{
    0%
    {
        width: var(--handle-width);
        transform: translateX(0);
    }
    50%
    {
        width: calc(var(--toggle-width) * 0.5);
    }
    90%
    {
        width: var(--handle-width);
    }
    100%
    {
        transform: translateX(var(--handle-translation));
    }
}

@keyframes toggle-slide-left
{
    0%
    {
        width: var(--handle-width);
        transform: translateX(calc(var(--handle-translation) - ((var(--toggle-width) * 0.33) - var(--handle-width))));
    }
    70%
    {
        width: calc(var(--toggle-width) * 0.5);
    }
    100%
    {
        width: var(--handle-width);
        transform: translateX(0);
    }
}

/* just exapnd and contract */
@keyframes toggle-expand-right
{
    0%
    {
        width: var(--handle-width);
    }
    100%
    {
        width: calc(var(--toggle-width) * 0.33);
    }
}

@keyframes toggle-expand-left
{
    0%
    {
        width: var(--handle-width);
        transform: translateX(var(--handle-translation));
    }
    100%
    {
        width: calc(var(--toggle-width) * 0.33);
        transform: translateX(calc(var(--handle-translation) - ((var(--toggle-width) * 0.33) - var(--handle-width))));
    }
}

@keyframes toggle-contract
{
    0%
    {
        width: calc(var(--toggle-width) * 0.33);
    }
    100%
    {
        width: var(--handle-width);
    }
}

.theme-toggle-input {
    display: none;
    z-index: 1000;
}

/* Fill in dark mode / default */
.toggle-background {
    position: relative;
    width: var(--toggle-width);
    height: var(--toggle-height);
    border-radius: var(--border-radius);
	background-color: var(--background-modifier-border);

    transition: background-color var(--color-fade-speed);
    z-index: 1000;

	animation-duration: 0.2s;
}

/* Handle default */
.toggle-background::before 
{
    content: "";
    position: absolute;
    left: var(--handle-margin);
    top: var(--handle-margin);
    height: var(--handle-width);
    width: var(--handle-width);
    
    border-radius: var(--handle-radius);
    background-color: var(--text-normal);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
    animation: toggle-slide-left ease-in-out normal both;
	animation-duration: inherit;
    z-index: 1000;
}

/* handle light*/
.theme-toggle-input:checked ~ .toggle-background::before 
{
    animation: toggle-slide-right ease-in-out normal both;
	animation-duration: inherit;
}

.theme-toggle-input:active ~ .toggle-background::before 
{
    animation: toggle-expand-right ease-in-out normal both;
	animation-duration: inherit;
}

.theme-toggle-input:active:checked ~ .toggle-background::before
{
    animation: toggle-expand-left ease-in-out normal both;
	animation-duration: inherit;
}

/* sun moon icon icon default */
.toggle-background::after
{
    content: "";
    position: absolute;
    right: var(--handle-margin);
    top: calc(var(--handle-margin));
    height: var(--handle-width);
    width: var(--handle-width);
    transition: transform 0.3s;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg>') 
	no-repeat center center;
    transform: scale(0.9);
}

/* sun moon icon icon light */
.theme-toggle-input:checked ~ .toggle-background::after
{
    transform: translateX(calc(var(--handle-translation) * -1)) scale(0.9);
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>')
	no-repeat center center;
}

/*#endregion */

/*#region Graph View */

.graph-view-wrapper
{
	--graph-view-max-height: 35vh;
}

#graph-canvas
{
    width: 100%;
    height: 100%;
	aspect-ratio: 1;
	transition: opacity 0.2s ease-in-out;
}

.graph-view-container.expanded
{
    position: fixed;
    width: 90%;
    height: 90%;
	max-height: unset;
    right: 5%;
    top: 5%;
    background-color: var(--background-secondary);
    z-index: 100;
}

body:is(.is-phone, .is-tablet) .graph-view-container.expanded
{
    width: 95%;
    height: 95%;
    right: 2.5%;
    top: 2.5%;
}

.graph-view-container 
{
    position: relative;
    width: 100%;
	aspect-ratio: 1;
	max-height: var(--graph-view-max-height);
    display: flex;
	transition: background-color var(--color-fade-speed) ease-in-out;
	touch-action: none;
	border: 1px solid var(--modal-border-color);
    border-radius: var(--modal-radius);
	overflow: hidden;
}

.graph-icon 
{
    cursor: pointer;
    color: var(--text-muted);
}

.graph-view-container .graph-icon>svg {
    width: 24px;
    height: 24px;

    background-color: var(--color-base-00);
    outline-width: 6px;
    outline-color: var(--color-base-00);
    outline-offset: -1px;
    outline-style: solid;
    border-radius: 100px;
    margin: 10px;
	
    transition: outline-color, background-color;
    transition-timing-function: ease-in-out;
    transition-duration: var(--color-fade-speed);
}

.graph-view-placeholder 
{
    padding: 0;
    width: 100%;
	aspect-ratio: 1;
	max-height: var(--graph-view-max-height);
    position: relative;
    flex: none;
}

.graph-view-placeholder:has(.expanded)
{
    border-radius: var(--modal-radius);
    border: 1px solid var(--modal-border-color);
}

.scale-down 
{
    transition: transform 0.2s ease-in-out;
    transform: scale(0.9);
}

.scale-up 
{
    transition: transform 0.2s ease-in-out;
    transform: scale(1);
}

.graph-expand 
{
    position: absolute;
    top: 5px;
    right: 5px;
}



/*#endregion */

/*#region Canvas */

body :is(.canvas-node-container, .canvas-wrapper)
{
	cursor: unset !important;
}

.canvas
{
	translate: 0 0;
	scale: 1 1;
	will-change: translate, scale;
}

.canvas-controls
{
	display: none;
	cursor: default !important;
}

.canvas-card-menu
{
	display: none;
	cursor: default !important;
}

.canvas-node-content-blocker
{
	pointer-events: none;
}

/*#endregion */

/*#region Phone */

body.is-phone .sidebar 
{
    font-size: 1.15em;
    --tree-vertical-spacing: 0.9em;
	--sidebar-width: 85vw !important;
}

body.is-phone
{
	--collapse-arrow-size: 13px;
	--tree-vertical-spacing: 0.8em;
	--tree-horizontal-spacing: 0.5em;
}

body.is-phone .heading-wrapper .heading-collapse-indicator
{
	transition: transform 0.2s ease-in-out 0.2s;
}

/*#endregion */

/*#region Loading */

.loading-icon 
{
	--width: 80px;
	--height: 80px;

	display: inline-block;
	position: fixed;
	left: calc(50% - var(--width) / 2);
	top: calc(50% - var(--height) / 2);
	width: var(--width);
	height: var(--height);

	opacity: 0;
	transition: opacity 0.5s ease-in-out;
	pointer-events: none;
}

.loading-icon.show
{
	opacity: 1;
}

.loading-icon div {
	position: absolute;
	top: 33px;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: var(--interactive-accent);
	animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading-icon div:nth-child(1) {
	left: 8px;
	animation: lds-ellipsis1 0.6s infinite;
}

.loading-icon div:nth-child(2) {
	left: 8px;
	animation: lds-ellipsis2 0.6s infinite;
}

.loading-icon div:nth-child(3) {
	left: 32px;
	animation: lds-ellipsis2 0.6s infinite;
}

.loading-icon div:nth-child(4) {
	left: 56px;
	animation: lds-ellipsis3 0.6s infinite;
}

.loading-icon:not(.show) div
{
	animation-play-state: paused;
}

@keyframes lds-ellipsis1 {
	0% {
		transform: scale(0);
	}

	100% {
		transform: scale(1);
	}
}

@keyframes lds-ellipsis3 {
	0% {
		transform: scale(1);
	}

	100% {
		transform: scale(0);
	}
}

@keyframes lds-ellipsis2 {
	0% {
		transform: translate(0, 0);
	}

	100% {
		transform: translate(24px, 0);
	}
}

/*#endregion  */

/*#region Media Queries */

@media print 
{
	body .webpage-container .document-container *
	{ 
		overflow: visible !important;
		overflow-y: visible !important;
		overflow-x: visible !important;
	}

	html body.publish :is(.sidebar, script, style, include)
	{
		display: none !important;
	}

	:root, html body.publish > :is(.webpage-container, .document-container, .markdown-preview-view):not(script, style, include)
	{
		display: contents !important;
	}

	:root, html body.publish .document-container > .markdown-preview-view
	{
		background-color: transparent !important;
	}

	body
	{
		display: inline !important;
		background: var(--background-primary);
	}

	.document-container > .markdown-preview-view > .markdown-preview-sizer
	{
		padding: 0 !important;
		margin: 0 !important;
		padding: var(--file-margins) !important;
		padding-bottom: 0 !important;
	}

	html body.publish :is(.document-container, .markdown-preview-view)
	{
		margin: 0 !important;
		padding: 0 !important;
	}


}

/*#endregion  */

/*#region Search */

.tree-hint-label
{
	font-size: var(--font-smallest);
	color: var(--text-accent);
	width: 100%;
	width: -webkit-fill-available;
	width: -moz-available;
	width: fill-available;
	white-space: pre-wrap;
	text-decoration-line: none;
}

.tree-hint-label:hover
{
	text-decoration-line: underline;
}	

.tree-hint-container
{
	width: 100%;
    padding-left: calc(var(--tree-horizontal-spacing) * 2 + var(--collapse-arrow-size));
    padding-bottom: calc(var(--tree-vertical-spacing) / 2);
    display: flex;
    flex-direction: column;
}

/* find hints inside folders with no other folders in them */
.tree-container .mod-tree-folder:not(:has(.mod-tree-folder)) .mod-tree-file > .tree-link > .tree-hint-container
{
	padding-left: calc(var(--tree-horizontal-spacing) * 2);
}

.tree-item-contents:has(.tree-item-icon) + .tree-hint-container
{
	margin-left: calc(1.6em + 2px);
}

a.tree-hint-label:hover
{
	text-decoration-line: underline;
}

.search-mark
{
	margin: 0 !important;
	padding: 0 !important;
	scroll-margin: 2em !important;
}

.search-input-container:has(+ #search-results) > input[type="search"]
{
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

input[type=search] {
    box-shadow: none!important;
    height: 2.5em;
    font-size: 1em;
    transition: background, background-color, border;
    transition-duration: var(--color-fade-speed);
	transition-timing-function: ease-in-out;
}

.search-input-container
{
	width: 100% !important;
}
 
.search-input-container::before 
{
    mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>");
    mask-repeat: no-repeat;
    top: 50%;
    transform: translateY(-50%);
}

/*#endregion */

/*#region Sidebar Resize */

.sidebar .sidebar-handle:hover ~ .sidebar-content, .sidebar.is-resizing .sidebar-content
{
	box-shadow: 0 0 0 var(--divider-width-hover) var(--divider-color-hover);
}

.sidebar-handle {
    width: min(max(calc(var(--sidebar-margin) / 2.0), 3px), 12px);
    height: calc(100vh - 2 * var(--radius-l));
    margin-top: var(--radius-l);
    margin-bottom: var(--radius-l);
    top: 0;
    position: absolute;
    cursor: ew-resize;
    z-index: 1;
    transition: background-color .2s ease-in-out;
}

.sidebar-left .sidebar-handle {
    right: 0;
}

.sidebar-right .sidebar-handle {
    left: 0;
}



/*#endregion */

/* Themes */

/*#region General */

.nav-folder-children .nav-folder-title-content::before
{
	margin-right: 0.5em;
}

.tree-item::before
{
	margin-left: calc(var(--tree-horizontal-spacing) - 0.3em);
}

.tree-item-contents:has(.tree-item-icon) .tree-item-title::before, 
.tree-item-contents:has(.tree-item-icon)::before, 
.tree-item:has(.tree-item-contents > .tree-item-icon)::before
{
	display: none !important;
}

/*#endregion */

/*#region AnuPpuccin */

/* AnuPpuccin rainbow indent support */
.anp-simple-rainbow-color-toggle.anp-simple-rainbow-indentation-toggle .tree-container.file-tree .tree-item
{
	border-color: rgba(var(--rainbow-folder-color), 0.5);
}

/* AnuPpuccin folder icon support */
.anp-collapse-folders .tree-container .tree-item .collapse-icon 
{
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 24' fill='none' stroke='currentColor' stroke-linejoin='round' stroke-linecap='round' stroke-width='2'%3E%3Cpath d='M6 14l1.45-2.9A2 2 0 0 1 9.24 10H22a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H20a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E%0A");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 24' fill='none' stroke='currentColor' stroke-linejoin='round' stroke-linecap='round' stroke-width='2'%3E%3Cpath d='M6 14l1.45-2.9A2 2 0 0 1 9.24 10H22a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H20a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E%0A");
    -webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;

    background-color: currentColor;
    display: flex;
    flex-basis: 100%;
    height: 16px;
    width: 17px;
}

.anp-collapse-folders .tree-container .tree-item.is-collapsed .collapse-icon
{
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 24' fill='none' stroke='currentColor' stroke-linejoin='round' stroke-linecap='round' stroke-width='2'%3E%3Cpath d='M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2z'/%3E%3Cpath d='M2 10h20' /%3E%3C/svg%3E%0A");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 24' fill='none' stroke='currentColor' stroke-linejoin='round' stroke-linecap='round' stroke-width='2'%3E%3Cpath d='M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2z'/%3E%3Cpath d='M2 10h20' /%3E%3C/svg%3E%0A");
}

.anp-file-icons .nav-file .nav-file-title::before
{
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E%0A");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E%0A");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: currentColor;
    content: "";
    display: flex;
    flex-shrink: 0;
    height: var(--size-4-4);
    margin-left: calc(-1 * var(--size-4-5));
    opacity: var(--icon-opacity);
    position: absolute;
    width: var(--size-4-4);
}

.anp-collapse-folders .tree-container .tree-item .collapse-icon:hover
{
	color: currentColor;
}

.anp-collapse-folders .tree-container .tree-item .collapse-icon svg
{
	display: none;
}

/*#endregion */

/* Plugins: */

/*#region Kanban */

.document-container .kanban-plugin
{
    position: absolute;
    padding: 0;
    margin: 0;
    height: 100%;
}

.document-container .kanban-plugin
{
    font-family: var(--font-text, var(--default-font));
    font-size: .875rem;
    line-height: var(--line-height-tight);
    width: unset;
    overflow-y: unset;
    overflow-wrap: unset;
    color: unset;
    user-select: unset;
    -webkit-user-select: unset;
}

.document-container .kanban-plugin__item-button-wrapper, .kanban-plugin__lane-grip, .kanban-plugin__lane-settings-button.clickable-icon, .kanban-plugin__item-postfix-button.clickable-icon
{
    display: none;
}

/*#endregion */

/*#region Excalidraw */

.excalidraw-svg rect, .excalidraw-plugin rect
{
	fill: transparent;
}

body.theme-dark .excalidraw-svg svg.dark, body.theme-dark .excalidraw-plugin svg.dark,
body.theme-light .excalidraw-svg svg.light, body.theme-light .excalidraw-plugin svg.light
{
	filter: invert(93%) hue-rotate(180deg);
}


.excalidraw-plugin > svg
{
	width: 100%;
	height: 100%;
}

.excalidraw-plugin
{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	height: 100%;
	width: 100%;

	padding: 10px;
}

/*#endregion  */

/*#region Obsidian Columns Plugin */
.columnParent {
    display: flex;
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.columnParent {
    white-space: normal;
}

.columnChild {
    flex-grow: 1;
    flex-basis: 0px;
}
/*#endregion */

/*#region Banners */

.obsidian-banner .lock-button
{
	display: none;
}

.markdown-preview-view:has(.obsidian-banner-wrapper)
{
	padding-top: 0 !important;
}

/*#endregion */

/*#region Mind Map  */

.view-content:has(.mm-mindmap)
{
	overflow-y: none;
}

.view-content  .mm-mindmap
{
	transform: scale(1);
	translate: -4000px -4000px;
	top: 70%;
	left: 50%;
	position: absolute;
	overflow: hidden;
	width: 100vw;
}

/*#endregion  */
`;

// assets/deferred.txt.js
var deferred_txt_default = `async function loadIncludes()
{
	if (location.protocol != "file:") 
	{
		// replace include tags with the contents of the file
		let includeTags = document.querySelectorAll("include");
		for (let i = 0; i < includeTags.length; i++)
		{
			let includeTag = includeTags[i];
			let includePath = includeTag.getAttribute("src");

			try
			{
				const request = await fetch(includePath);
				if (!request.ok) 
				{
					console.log("Could not include file: " + includePath);
					includeTag?.remove();
					continue;
				}
				
				let includeText = await request.text();
				let docFrag = document.createRange().createContextualFragment(includeText);
				let includeChildren = Array.from(docFrag.children);
				for (let child of includeChildren)
				{
					child.classList.add("hide");
					child.style.transition = "opacity 0.5s ease-in-out";

					setTimeout(() => 
					{
						child.classList.remove("hide");
					}, 10);
				};

				includeTag.before(docFrag);
				includeTag.remove();

				console.log("Included file: " + includePath);
			}
			catch (e)
			{
				includeTag?.remove();
				console.log("Could not include file: " + includePath, e);
				continue;
			}
		}
	}
	else
	{
		let e = document.querySelectorAll("include");
		if (e.length > 0)
		{
			var error = document.createElement("div");
			error.id = "error";
			error.textContent = "Web server exports must be hosted on an http / web server to be viewed correctly.";
			error.style.position = "fixed";
			error.style.top = "50%";
			error.style.left = "50%";
			error.style.transform = "translate(-50%, -50%)";
			error.style.fontSize = "1.5em";
			error.style.fontWeight = "bold";
			error.style.textAlign = "center";
			document.body.appendChild(error);
			document.querySelector(".document-container")?.classList.remove("hide");
		}
	}
}

document.addEventListener("DOMContentLoaded", () => 
{
	loadIncludes();
});

let isFileProtocol = location.protocol == "file:";

function waitLoadScripts(scriptNames, callback)
{
	let scripts = scriptNames.map(name => document.getElementById(name + "-script"));
	let index = 0;

	function loadNext()
	{
		let script = scripts[index];
		index++;

		if (!script || script.getAttribute('loaded') == "true") // if already loaded 
		{
			if (index < scripts.length)
				loadNext();
		}
		
		if (index < scripts.length) script.addEventListener("load", loadNext);
		else callback();
	}

	loadNext();
}
`;

// assets/deferred.txt.css
var deferred_txt_default2 = "/* Define default values for variables */\nbody\n{\n	--line-width: 40em;\n	--line-width-adaptive: 40em;\n	--file-line-width: 40em;\n	--sidebar-width: min(20em, 80vw);\n	--collapse-arrow-size: 11px;\n	--tree-horizontal-spacing: 0.6em;\n	--tree-vertical-spacing: 0.6em;\n	--sidebar-margin: 12px;\n}\n\n/*#region Sidebars */\n\n.sidebar {\n    height: 100%;\n    min-width: calc(var(--sidebar-width) + var(--divider-width-hover));\n    max-width: calc(var(--sidebar-width) + var(--divider-width-hover));\n    font-size: 14px;\n    z-index: 10;\n\n    position: relative;\n    overflow: hidden;\n    /* overflow: clip; */\n	\n    transition: min-width ease-in-out, max-width ease-in-out;\n	transition-duration: .2s;\n	contain: size;\n}\n\n.sidebar-left {\n    left: 0;\n}\n\n.sidebar-right {\n    right: 0;\n}\n\n.sidebar.is-collapsed {\n    min-width: 0;\n    max-width: 0;\n}\n\nbody.floating-sidebars .sidebar {\n	position: absolute;\n}\n\n.sidebar-content {\n    height: 100%;\n    min-width: calc(var(--sidebar-width) - var(--divider-width-hover));\n    top: 0;\n    padding: var(--sidebar-margin);\n    padding-top: 4em;\n    line-height: var(--line-height-tight);\n    background-color: var(--background-secondary);\n    transition: background-color,border-right,border-left,box-shadow;\n    transition-duration: var(--color-fade-speed);\n    transition-timing-function: ease-in-out;\n    position: absolute;\n    display: flex;\n    flex-direction: column;\n}\n\n/* If the sidebar isn't collapsed the content should have the same width as it */\n.sidebar:not(.is-collapsed) .sidebar-content {\n    min-width: calc(max(100%,var(--sidebar-width)) - 3px);\n    max-width: calc(max(100%,var(--sidebar-width)) - 3px);\n}\n\n.sidebar-left .sidebar-content\n{\n    left: 0;\n    border-top-right-radius: var(--radius-l);\n	border-bottom-right-radius: var(--radius-l);\n}\n\n.sidebar-right .sidebar-content \n{\n    right: 0;\n	border-top-left-radius: var(--radius-l);\n	border-bottom-left-radius: var(--radius-l);\n}\n\n/* Hide empty sidebars */\n.sidebar:has(.sidebar-content:empty):has(.topbar-content:empty)\n{\n	display: none;\n}\n\n.sidebar-topbar {\n    height: 2em;\n    width: var(--sidebar-width);\n    top: var(--sidebar-margin);\n    padding-inline: var(--sidebar-margin);\n    z-index: 1;\n\n    position: fixed;\n    display: flex;\n    align-items: center;\n\n    transition: width ease-in-out;\n    transition-duration: inherit;\n}\n\n.sidebar.is-collapsed .sidebar-topbar {\n    width: calc(2.3em + var(--sidebar-margin) * 2);\n}\n\n.sidebar .sidebar-topbar.is-collapsed\n{\n	width: 0;\n}\n\n.sidebar-left .sidebar-topbar {\n	left: 0;\n}\n\n.sidebar-right .sidebar-topbar {\n	right: 0;\n}\n\n.topbar-content {\n    overflow: hidden;\n    overflow: clip;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    align-items: center;\n    transition: inherit;\n}\n\n.sidebar.is-collapsed .topbar-content {\n	width: 0;\n	transition: inherit;\n}\n\n.clickable-icon.sidebar-collapse-icon {\n    background-color: transparent;\n    color: var(--icon-color-focused);\n    padding: 0!important;\n    margin: 0!important;\n    height: 100%!important;\n	width: 2.3em !important;\n    margin-inline: 0.14em!important;\n    position: absolute;\n}\n\n.sidebar-left .clickable-icon.sidebar-collapse-icon {\n    transform: rotateY(180deg);\n	right: var(--sidebar-margin);\n}\n\n.sidebar-right .clickable-icon.sidebar-collapse-icon {\n    transform: rotateY(180deg);\n	left: var(--sidebar-margin);\n}\n\n.clickable-icon.sidebar-collapse-icon svg.svg-icon {\n    width: 100%;\n	height: 100%;\n}\n\n.sidebar-section-header\n{\n  margin: 0 0 1em 0;\n  text-transform: uppercase;\n  letter-spacing: 0.06em;\n  font-weight: 600;\n}\n\n/*#endregion */\n\n/*#region Content / Markdown Preview View */\n\nbody\n{\n	transition: background-color var(--color-fade-speed) ease-in-out;\n}\n\n.webpage-container {\n    display: flex;\n    flex-direction: row;\n    height: 100%;\n    width: 100%;\n    align-items: stretch;\n    justify-content: center;\n}\n\n.document-container \n{\n	opacity: 1;\n    flex-basis: 100%;\n    max-width: 100%;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n	transition: opacity 0.2s ease-in-out;\n	contain: inline-size;\n}\n\n.hide\n{\n	opacity: 0;\n	transition: opacity 0.2s ease-in-out;\n}\n\n.document-container > .markdown-preview-view \n{\n	margin: var(--sidebar-margin);\n	margin-bottom: 0;\n	width: 100%;\n	width: -webkit-fill-available;\n	width: -moz-available;\n	width: fill-available;\n    background-color: var(--background-primary);\n    transition: background-color var(--color-fade-speed) ease-in-out;\n    border-top-right-radius: var(--window-radius, var(--radius-m));\n    border-top-left-radius: var(--window-radius, var(--radius-m));\n    overflow-x: hidden !important;\n    overflow-y: auto !important;\n    display: flex !important;\n    flex-direction: column !important;\n    align-items: center !important;\n	contain: inline-size;\n}\n\n.document-container>.markdown-preview-view>.markdown-preview-sizer \n{\n    padding-bottom: 80vh !important;\n    width: 100% !important;\n    max-width: var(--line-width) !important;\n    flex-basis: var(--line-width) !important;\n    transition: background-color var(--color-fade-speed) ease-in-out;\n	contain: inline-size;\n}\n\n.view-content img:not([width]), .markdown-rendered img:not([width]) \n{\n    max-width: 100%;\n    outline: none;\n}\n\n/* If the markdown view is displaying a raw file or embed then increase it's size to make everything as large as possible */\n.document-container > .view-content.embed {\n    display: flex;\n    padding: 1em;\n    height: 100%;\n    width: 100%;\n    align-items: center;\n    justify-content: center;\n}\n\n.document-container > .view-content.embed > *\n{\n	max-width: 100%;\n	max-height: 100%;\n	object-fit: contain;\n}\n\n*:has(> :is(.math, table)) {\n    overflow-x: auto !important;\n}\n\n/* For custom view exports */\n.document-container > .view-content\n{\n	overflow-x: auto;\n	contain: content;\n	padding: 0;\n	margin: 0;\n	height: 100%;\n}\n\n/*#endregion */\n\n/*#region Loading */\n\n.scroll-highlight \n{\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    pointer-events: none;\n    z-index: 1000;\n    background-color: hsla(var(--color-accent-hsl),.25);\n    opacity: 0;\n    padding: 1em;\n    inset: 50%;\n    translate: -50% -50%;\n    border-radius: var(--radius-s);\n}\n\n/*#endregion */\n";

// assets/theme-load.txt.js
var theme_load_txt_default = 'let theme = localStorage.getItem("theme") || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");\nif (theme == "dark")\n{\n	document.body.classList.add("theme-dark");\n	document.body.classList.remove("theme-light");\n}\nelse\n{\n	document.body.classList.add("theme-light");\n	document.body.classList.remove("theme-dark");\n}\n\nif (window.innerWidth < 480) document.body.classList.add("is-phone");\nelse if (window.innerWidth < 768) document.body.classList.add("is-tablet");\nelse if (window.innerWidth < 1024) document.body.classList.add("is-small-screen");\nelse document.body.classList.add("is-large-screen");\n';

// assets/tinycolor.txt.js
var tinycolor_txt_default = 'function w3color(t, e) { return this instanceof w3color ? "object" == typeof t ? t : void (this.attachValues(toColorObject(t)), e && (e.style.backgroundColor = this.toRgbString())) : new w3color(t, e) } function toColorObject(t) { var e, r, n, $, a, s, o, f, h, u, l, c = [], b = [], d = []; if (e = (t = w3trim(t.toLowerCase())).substr(0, 1).toUpperCase(), r = t.substr(1), f = 1, "R" != e && "Y" != e && "G" != e && "C" != e && "B" != e && "M" != e && "W" != e || isNaN(r) || (6 != t.length || -1 != t.indexOf(",")) && (t = "ncol(" + t + ")"), 3 == t.length || 6 == t.length || isNaN(t) || (t = "ncol(" + t + ")"), t.indexOf(",") > 0 && -1 == t.indexOf("(") && (t = "ncol(" + t + ")"), "rgb" == t.substr(0, 3) || "hsl" == t.substr(0, 3) || "hwb" == t.substr(0, 3) || "ncol" == t.substr(0, 4) || "cmyk" == t.substr(0, 4)) { if ("ncol" == t.substr(0, 4) ? (4 == t.split(",").length && -1 == t.indexOf("ncola") && (t = t.replace("ncol", "ncola")), n = "ncol", t = t.substr(4)) : "cmyk" == t.substr(0, 4) ? (n = "cmyk", t = t.substr(4)) : (n = t.substr(0, 3), t = t.substr(3)), $ = 3, s = !1, "a" == t.substr(0, 1).toLowerCase() ? ($ = 4, s = !0, t = t.substr(1)) : "cmyk" == n && ($ = 4, 5 == t.split(",").length && ($ = 5, s = !0)), c = (t = (t = t.replace("(", "")).replace(")", "")).split(","), "rgb" == n) { if (c.length != $) return emptyObject(); for (a = 0; a < $; a++) { if (("" == c[a] || " " == c[a]) && (c[a] = "0"), c[a].indexOf("%") > -1 && (c[a] = c[a].replace("%", ""), c[a] = Number(c[a] / 100), a < 3 && (c[a] = Math.round(255 * c[a]))), isNaN(c[a])) return emptyObject(); parseInt(c[a]) > 255 && (c[a] = 255), a < 3 && (c[a] = parseInt(c[a])), 3 == a && Number(c[a]) > 1 && (c[a] = 1) } l = { r: c[0], g: c[1], b: c[2] }, !0 == s && (f = Number(c[3])) } if ("hsl" == n || "hwb" == n || "ncol" == n) { for (; c.length < $;)c.push("0"); for (("hsl" == n || "hwb" == n) && parseInt(c[0]) >= 360 && (c[0] = 0), a = 1; a < $; a++) { if (c[a].indexOf("%") > -1) { if (c[a] = c[a].replace("%", ""), c[a] = Number(c[a]), isNaN(c[a])) return emptyObject(); c[a] = c[a] / 100 } else c[a] = Number(c[a]); Number(c[a]) > 1 && (c[a] = 1), 0 > Number(c[a]) && (c[a] = 0) } "hsl" == n && (l = hslToRgb(c[0], c[1], c[2]), h = Number(c[0]), u = Number(c[1])), "hwb" == n && (l = hwbToRgb(c[0], c[1], c[2])), "ncol" == n && (l = ncolToRgb(c[0], c[1], c[2])), !0 == s && (f = Number(c[3])) } if ("cmyk" == n) { for (; c.length < $;)c.push("0"); for (a = 0; a < $; a++) { if (c[a].indexOf("%") > -1) { if (c[a] = c[a].replace("%", ""), c[a] = Number(c[a]), isNaN(c[a])) return emptyObject(); c[a] = c[a] / 100 } else c[a] = Number(c[a]); Number(c[a]) > 1 && (c[a] = 1), 0 > Number(c[a]) && (c[a] = 0) } l = cmykToRgb(c[0], c[1], c[2], c[3]), !0 == s && (f = Number(c[4])) } } else if ("ncs" == t.substr(0, 3)) l = ncsToRgb(t); else { for (a = 0, o = !1, b = getColorArr("names"); a < b.length; a++)if (t.toLowerCase() == b[a].toLowerCase()) { d = getColorArr("hexs"), o = !0, l = { r: parseInt(d[a].substr(0, 2), 16), g: parseInt(d[a].substr(2, 2), 16), b: parseInt(d[a].substr(4, 2), 16) }; break } if (!1 == o) { for (3 == (t = t.replace("#", "")).length && (t = t.substr(0, 1) + t.substr(0, 1) + t.substr(1, 1) + t.substr(1, 1) + t.substr(2, 1) + t.substr(2, 1)), a = 0; a < t.length; a++)if (!isHex(t.substr(a, 1))) return emptyObject(); for (a = 0, c[0] = parseInt(t.substr(0, 2), 16), c[1] = parseInt(t.substr(2, 2), 16), c[2] = parseInt(t.substr(4, 2), 16); a < 3; a++)if (isNaN(c[a])) return emptyObject(); l = { r: c[0], g: c[1], b: c[2] } } } return colorObject(l, f, h, u) } function colorObject(t, e, r, n) { var $, a, s, o, f, h, u; return t ? (null === e && (e = 1), $ = rgbToHsl(t.r, t.g, t.b), a = rgbToHwb(t.r, t.g, t.b), s = rgbToCmyk(t.r, t.g, t.b), h = r || $.h, u = n || $.s, o = hueToNcol(h), f = roundDecimals(f = { red: t.r, green: t.g, blue: t.b, hue: h, sat: u, lightness: $.l, whiteness: a.w, blackness: a.b, cyan: s.c, magenta: s.m, yellow: s.y, black: s.k, ncol: o, opacity: e, valid: !0 })) : emptyObject() } function emptyObject() { return { red: 0, green: 0, blue: 0, hue: 0, sat: 0, lightness: 0, whiteness: 0, blackness: 0, cyan: 0, magenta: 0, yellow: 0, black: 0, ncol: "R", opacity: 1, valid: !1 } } function getColorArr(t) { return "names" == t ? ["AliceBlue", "AntiqueWhite", "Aqua", "Aquamarine", "Azure", "Beige", "Bisque", "Black", "BlanchedAlmond", "Blue", "BlueViolet", "Brown", "BurlyWood", "CadetBlue", "Chartreuse", "Chocolate", "Coral", "CornflowerBlue", "Cornsilk", "Crimson", "Cyan", "DarkBlue", "DarkCyan", "DarkGoldenRod", "DarkGray", "DarkGrey", "DarkGreen", "DarkKhaki", "DarkMagenta", "DarkOliveGreen", "DarkOrange", "DarkOrchid", "DarkRed", "DarkSalmon", "DarkSeaGreen", "DarkSlateBlue", "DarkSlateGray", "DarkSlateGrey", "DarkTurquoise", "DarkViolet", "DeepPink", "DeepSkyBlue", "DimGray", "DimGrey", "DodgerBlue", "FireBrick", "FloralWhite", "ForestGreen", "Fuchsia", "Gainsboro", "GhostWhite", "Gold", "GoldenRod", "Gray", "Grey", "Green", "GreenYellow", "HoneyDew", "HotPink", "IndianRed", "Indigo", "Ivory", "Khaki", "Lavender", "LavenderBlush", "LawnGreen", "LemonChiffon", "LightBlue", "LightCoral", "LightCyan", "LightGoldenRodYellow", "LightGray", "LightGrey", "LightGreen", "LightPink", "LightSalmon", "LightSeaGreen", "LightSkyBlue", "LightSlateGray", "LightSlateGrey", "LightSteelBlue", "LightYellow", "Lime", "LimeGreen", "Linen", "Magenta", "Maroon", "MediumAquaMarine", "MediumBlue", "MediumOrchid", "MediumPurple", "MediumSeaGreen", "MediumSlateBlue", "MediumSpringGreen", "MediumTurquoise", "MediumVioletRed", "MidnightBlue", "MintCream", "MistyRose", "Moccasin", "NavajoWhite", "Navy", "OldLace", "Olive", "OliveDrab", "Orange", "OrangeRed", "Orchid", "PaleGoldenRod", "PaleGreen", "PaleTurquoise", "PaleVioletRed", "PapayaWhip", "PeachPuff", "Peru", "Pink", "Plum", "PowderBlue", "Purple", "RebeccaPurple", "Red", "RosyBrown", "RoyalBlue", "SaddleBrown", "Salmon", "SandyBrown", "SeaGreen", "SeaShell", "Sienna", "Silver", "SkyBlue", "SlateBlue", "SlateGray", "SlateGrey", "Snow", "SpringGreen", "SteelBlue", "Tan", "Teal", "Thistle", "Tomato", "Turquoise", "Violet", "Wheat", "White", "WhiteSmoke", "Yellow", "YellowGreen"] : "hexs" == t ? ["f0f8ff", "faebd7", "00ffff", "7fffd4", "f0ffff", "f5f5dc", "ffe4c4", "000000", "ffebcd", "0000ff", "8a2be2", "a52a2a", "deb887", "5f9ea0", "7fff00", "d2691e", "ff7f50", "6495ed", "fff8dc", "dc143c", "00ffff", "00008b", "008b8b", "b8860b", "a9a9a9", "a9a9a9", "006400", "bdb76b", "8b008b", "556b2f", "ff8c00", "9932cc", "8b0000", "e9967a", "8fbc8f", "483d8b", "2f4f4f", "2f4f4f", "00ced1", "9400d3", "ff1493", "00bfff", "696969", "696969", "1e90ff", "b22222", "fffaf0", "228b22", "ff00ff", "dcdcdc", "f8f8ff", "ffd700", "daa520", "808080", "808080", "008000", "adff2f", "f0fff0", "ff69b4", "cd5c5c", "4b0082", "fffff0", "f0e68c", "e6e6fa", "fff0f5", "7cfc00", "fffacd", "add8e6", "f08080", "e0ffff", "fafad2", "d3d3d3", "d3d3d3", "90ee90", "ffb6c1", "ffa07a", "20b2aa", "87cefa", "778899", "778899", "b0c4de", "ffffe0", "00ff00", "32cd32", "faf0e6", "ff00ff", "800000", "66cdaa", "0000cd", "ba55d3", "9370db", "3cb371", "7b68ee", "00fa9a", "48d1cc", "c71585", "191970", "f5fffa", "ffe4e1", "ffe4b5", "ffdead", "000080", "fdf5e6", "808000", "6b8e23", "ffa500", "ff4500", "da70d6", "eee8aa", "98fb98", "afeeee", "db7093", "ffefd5", "ffdab9", "cd853f", "ffc0cb", "dda0dd", "b0e0e6", "800080", "663399", "ff0000", "bc8f8f", "4169e1", "8b4513", "fa8072", "f4a460", "2e8b57", "fff5ee", "a0522d", "c0c0c0", "87ceeb", "6a5acd", "708090", "708090", "fffafa", "00ff7f", "4682b4", "d2b48c", "008080", "d8bfd8", "ff6347", "40e0d0", "ee82ee", "f5deb3", "ffffff", "f5f5f5", "ffff00", "9acd32"] : void 0 } function roundDecimals(t) { return t.red = Number(t.red.toFixed(0)), t.green = Number(t.green.toFixed(0)), t.blue = Number(t.blue.toFixed(0)), t.hue = Number(t.hue.toFixed(0)), t.sat = Number(t.sat.toFixed(2)), t.lightness = Number(t.lightness.toFixed(2)), t.whiteness = Number(t.whiteness.toFixed(2)), t.blackness = Number(t.blackness.toFixed(2)), t.cyan = Number(t.cyan.toFixed(2)), t.magenta = Number(t.magenta.toFixed(2)), t.yellow = Number(t.yellow.toFixed(2)), t.black = Number(t.black.toFixed(2)), t.ncol = t.ncol.substr(0, 1) + Math.round(Number(t.ncol.substr(1))), t.opacity = Number(t.opacity.toFixed(2)), t } function hslToRgb(t, e, r) { var n, $, a, s, o; return t /= 60, $ = r <= .5 ? r * (e + 1) : r + e - r * e, a = 255 * hueToRgb(n = 2 * r - $, $, t + 2), { r: a, g: s = 255 * hueToRgb(n, $, t), b: o = 255 * hueToRgb(n, $, t - 2) } } function hueToRgb(t, e, r) { return (r < 0 && (r += 6), r >= 6 && (r -= 6), r < 1) ? (e - t) * r + t : r < 3 ? e : r < 4 ? (e - t) * (4 - r) + t : t } function hwbToRgb(t, e, r) { var n, $, a, s = []; for ($ = hslToRgb(t, 1, .5), s[0] = $.r / 255, s[1] = $.g / 255, s[2] = $.b / 255, (a = e + r) > 1 && (e = Number((e / a).toFixed(2)), r = Number((r / a).toFixed(2))), n = 0; n < 3; n++)s[n] *= 1 - e - r, s[n] += e, s[n] = Number(255 * s[n]); return { r: s[0], g: s[1], b: s[2] } } function cmykToRgb(t, e, r, n) { var $, a, s; return $ = 255 - 255 * Math.min(1, t * (1 - n) + n), { r: $, g: a = 255 - 255 * Math.min(1, e * (1 - n) + n), b: s = 255 - 255 * Math.min(1, r * (1 - n) + n) } } function ncolToRgb(t, e, r) { var n, $, a; if (a = t, isNaN(t.substr(0, 1))) { if (n = t.substr(0, 1).toUpperCase(), "" == ($ = t.substr(1)) && ($ = 0), isNaN($ = Number($))) return !1; "R" == n && (a = 0 + .6 * $), "Y" == n && (a = 60 + .6 * $), "G" == n && (a = 120 + .6 * $), "C" == n && (a = 180 + .6 * $), "B" == n && (a = 240 + .6 * $), "M" == n && (a = 300 + .6 * $), "W" == n && (a = 0, e = 1 - $ / 100, r = $ / 100) } return hwbToRgb(a, e, r) } function hueToNcol(t) { for (; t >= 360;)t -= 360; return t < 60 ? "R" + t / .6 : t < 120 ? "Y" + (t - 60) / .6 : t < 180 ? "G" + (t - 120) / .6 : t < 240 ? "C" + (t - 180) / .6 : t < 300 ? "B" + (t - 240) / .6 : t < 360 ? "M" + (t - 300) / .6 : void 0 } function ncsToRgb(t) { var e, r, n, $, a, s, o, f, h, u, l, c, b, d, g, _, m, p; return -1 == (t = (t = (t = (t = (t = w3trim(t).toUpperCase()).replace("(", "")).replace(")", "")).replace("NCS", "NCS ")).replace(/  /g, " ")).indexOf("NCS") && (t = "NCS " + t), null !== (t = t.match(/^(?:NCS|NCS\\sS)\\s(\\d{2})(\\d{2})-(N|[A-Z])(\\d{2})?([A-Z])?$/)) && (e = parseInt(t[1], 10), r = parseInt(t[2], 10), ("N" == (n = t[3]) || "Y" == n || "R" == n || "B" == n || "G" == n) && ($ = parseInt(t[4], 10) || 0, "N" !== n ? (a = 1.05 * e - 5.25, s = r, "Y" === n && $ <= 60 ? o = 1 : "Y" === n && $ > 60 || "R" === n && $ <= 80 ? o = (Math.sqrt(14884 - Math.pow(f = "Y" === n ? $ - 60 : $ + 40, 2)) - 22) / 100 : "R" === n && $ > 80 || "B" === n ? o = 0 : "G" === n && (o = (Math.sqrt(33800 - Math.pow(f = $ - 170, 2)) - 70) / 100), "Y" === n && $ <= 80 ? h = 0 : "Y" === n && $ > 80 || "R" === n && $ <= 60 ? h = (104 - Math.sqrt(11236 - Math.pow(f = "Y" === n ? $ - 80 + 20.5 : $ + 20 + 20.5, 2))) / 100 : "R" === n && $ > 60 || "B" === n && $ <= 80 ? h = (Math.sqrt(1e4 - Math.pow(f = "R" === n ? $ - 60 - 60 : $ + 40 - 60, 2)) - 10) / 100 : "B" === n && $ > 80 || "G" === n && $ <= 40 ? h = (122 - Math.sqrt(19881 - Math.pow(f = "B" === n ? $ - 80 - 131 : $ + 20 - 131, 2))) / 100 : "G" === n && $ > 40 && (h = 0), "Y" === n ? green1 = (85 - .85 * $) / 100 : "R" === n && $ <= 60 ? green1 = 0 : "R" === n && $ > 60 ? green1 = (67.5 - Math.sqrt(5776 - Math.pow(f = $ - 60 + 35, 2))) / 100 : "B" === n && $ <= 60 ? green1 = (6.5 + Math.sqrt(7044.5 - Math.pow(f = 1 * $ - 68.5, 2))) / 100 : "B" === n && $ > 60 || "G" === n && $ <= 60 ? green1 = .9 : "G" === n && $ > 60 && (green1 = (90 - 1 / 8 * (f = $ - 60)) / 100), u = ((f = (o + green1 + h) / 3) - o) * (100 - s) / 100 + o, l = (f - green1) * (100 - s) / 100 + green1, c = (f - h) * (100 - s) / 100 + h, d = 1 / (b = u > l && u > c ? u : l > u && l > c ? l : c > u && c > l ? c : (u + l + c) / 3), _ = parseInt(u * d * (100 - a) / 100 * 255, 10), m = parseInt(l * d * (100 - a) / 100 * 255, 10), p = parseInt(c * d * (100 - a) / 100 * 255, 10), _ > 255 && (_ = 255), m > 255 && (m = 255), p > 255 && (p = 255), _ < 0 && (_ = 0), m < 0 && (m = 0), p < 0 && (p = 0)) : ((g = parseInt((1 - e / 100) * 255, 10)) > 255 && (g = 255), g < 0 && (g = 0), _ = g, m = g, p = g), { r: _, g: m, b: p })) } function rgbToHsl(t, e, r) { var n, $, a, s, o, f, h, u = []; for (a = 0, u[0] = t / 255, u[1] = e / 255, u[2] = r / 255, n = u[0], $ = u[0], f = 0; a < u.length - 1; a++)u[a + 1] <= n && (n = u[a + 1]), u[a + 1] >= $ && ($ = u[a + 1], f = a + 1); return 0 == f && (h = (u[1] - u[2]) / ($ - n)), 1 == f && (h = 2 + (u[2] - u[0]) / ($ - n)), 2 == f && (h = 4 + (u[0] - u[1]) / ($ - n)), isNaN(h) && (h = 0), (h *= 60) < 0 && (h += 360), s = (n + $) / 2, { h: h, s: o = n == $ ? 0 : s < .5 ? ($ - n) / ($ + n) : ($ - n) / (2 - $ - n), l: s } } function rgbToHwb(t, e, r) { var n, $, a; return t /= 255, e /= 255, r /= 255, n = 0 == (chroma = (max = Math.max(t, e, r)) - (min = Math.min(t, e, r))) ? 0 : t == max ? (e - r) / chroma % 6 * 360 : e == max ? ((r - t) / chroma + 2) % 6 * 360 : ((t - e) / chroma + 4) % 6 * 360, { h: n, w: $ = min, b: a = 1 - max } } function rgbToCmyk(t, e, r) { var n, $, a, s; return t /= 255, e /= 255, r /= 255, 1 == (s = 1 - (max = Math.max(t, e, r))) ? (n = 0, $ = 0, a = 0) : (n = (1 - t - s) / (1 - s), $ = (1 - e - s) / (1 - s), a = (1 - r - s) / (1 - s)), { c: n, m: $, y: a, k: s } } function toHex(t) { for (var e = t.toString(16); e.length < 2;)e = "0" + e; return e } function cl(t) { console.log(t) } function w3trim(t) { return t.replace(/^\\s+|\\s+$/g, "") } function isHex(t) { return "0123456789ABCDEFabcdef".indexOf(t) > -1 } function w3SetColorsByAttribute() { var t, e, r; for (e = 0, t = document.getElementsByTagName("*"); e < t.length; e++)(r = t[e].getAttribute("data-w3-color")) && (t[e].style.backgroundColor = w3color(r).toRgbString()) } !function (t, e) { "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).tinycolor = e() }(this, function () { "use strict"; function t(e) { return (t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t })(e) } var e = /^\\s+/, r = /\\s+$/; function n($, a) { if (a = a || {}, ($ = $ || "") instanceof n) return $; if (!(this instanceof n)) return new n($, a); var s, o, f, h, u, l, c, b, d, g, _, m, p, y, v, S, R, H, B, T, O, L, M, q = (s = $, o = { r: 0, g: 0, b: 0 }, f = 1, h = null, u = null, l = null, c = !1, b = !1, "string" == typeof s && (s = function t(n) { n = n.replace(e, "").replace(r, "").toLowerCase(); var $, a = !1; if (k[n]) n = k[n], a = !0; else if ("transparent" == n) return { r: 0, g: 0, b: 0, a: 0, format: "name" }; return ($ = F.rgb.exec(n)) ? { r: $[1], g: $[2], b: $[3] } : ($ = F.rgba.exec(n)) ? { r: $[1], g: $[2], b: $[3], a: $[4] } : ($ = F.hsl.exec(n)) ? { h: $[1], s: $[2], l: $[3] } : ($ = F.hsla.exec(n)) ? { h: $[1], s: $[2], l: $[3], a: $[4] } : ($ = F.hsv.exec(n)) ? { h: $[1], s: $[2], v: $[3] } : ($ = F.hsva.exec(n)) ? { h: $[1], s: $[2], v: $[3], a: $[4] } : ($ = F.hex8.exec(n)) ? { r: A($[1]), g: A($[2]), b: A($[3]), a: G($[4]), format: a ? "name" : "hex8" } : ($ = F.hex6.exec(n)) ? { r: A($[1]), g: A($[2]), b: A($[3]), format: a ? "name" : "hex" } : ($ = F.hex4.exec(n)) ? { r: A($[1] + "" + $[1]), g: A($[2] + "" + $[2]), b: A($[3] + "" + $[3]), a: G($[4] + "" + $[4]), format: a ? "name" : "hex8" } : !!($ = F.hex3.exec(n)) && { r: A($[1] + "" + $[1]), g: A($[2] + "" + $[2]), b: A($[3] + "" + $[3]), format: a ? "name" : "hex" } }(s)), "object" == t(s) && (D(s.r) && D(s.g) && D(s.b) ? (o = (d = s.r, g = s.g, _ = s.b, { r: 255 * x(d, 255), g: 255 * x(g, 255), b: 255 * x(_, 255) }), c = !0, b = "%" === String(s.r).substr(-1) ? "prgb" : "rgb") : D(s.h) && D(s.s) && D(s.v) ? (h = C(s.s), u = C(s.v), o = (m = s.h, p = h, y = u, m = 6 * x(m, 360), p = x(p, 100), y = x(y, 100), v = Math.floor(m), S = m - v, R = y * (1 - p), H = y * (1 - S * p), B = y * (1 - (1 - S) * p), T = v % 6, O = [y, H, R, R, B, y][T], L = [B, y, y, H, R, R][T], M = [R, R, B, y, y, H][T], { r: 255 * O, g: 255 * L, b: 255 * M }), c = !0, b = "hsv") : D(s.h) && D(s.s) && D(s.l) && (h = C(s.s), l = C(s.l), o = function t(e, r, n) { var $, a, s; function o(t, e, r) { return (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6) ? t + (e - t) * 6 * r : r < .5 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t } if (e = x(e, 360), r = x(r, 100), n = x(n, 100), 0 === r) $ = a = s = n; else { var f = n < .5 ? n * (1 + r) : n + r - n * r, h = 2 * n - f; $ = o(h, f, e + 1 / 3), a = o(h, f, e), s = o(h, f, e - 1 / 3) } return { r: 255 * $, g: 255 * a, b: 255 * s } }(s.h, h, l), c = !0, b = "hsl"), s.hasOwnProperty("a") && (f = s.a)), f = w(f), { ok: c, format: s.format || b, r: Math.min(255, Math.max(o.r, 0)), g: Math.min(255, Math.max(o.g, 0)), b: Math.min(255, Math.max(o.b, 0)), a: f }); this._originalInput = $, this._r = q.r, this._g = q.g, this._b = q.b, this._a = q.a, this._roundA = Math.round(100 * this._a) / 100, this._format = a.format || q.format, this._gradientType = a.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = q.ok } function $(t, e, r) { t = x(t, 255), e = x(e, 255), r = x(r, 255); var n, $, a = Math.max(t, e, r), s = Math.min(t, e, r), o = (a + s) / 2; if (a == s) n = $ = 0; else { var f = a - s; switch ($ = o > .5 ? f / (2 - a - s) : f / (a + s), a) { case t: n = (e - r) / f + (e < r ? 6 : 0); break; case e: n = (r - t) / f + 2; break; case r: n = (t - e) / f + 4 }n /= 6 } return { h: n, s: $, l: o } } function a(t, e, r) { t = x(t, 255), e = x(e, 255), r = x(r, 255); var n, $, a = Math.max(t, e, r), s = Math.min(t, e, r), o = a - s; if ($ = 0 === a ? 0 : o / a, a == s) n = 0; else { switch (a) { case t: n = (e - r) / o + (e < r ? 6 : 0); break; case e: n = (r - t) / o + 2; break; case r: n = (t - e) / o + 4 }n /= 6 } return { h: n, s: $, v: a } } function s(t, e, r, n) { var $ = [R(Math.round(t).toString(16)), R(Math.round(e).toString(16)), R(Math.round(r).toString(16))]; return n && $[0].charAt(0) == $[0].charAt(1) && $[1].charAt(0) == $[1].charAt(1) && $[2].charAt(0) == $[2].charAt(1) ? $[0].charAt(0) + $[1].charAt(0) + $[2].charAt(0) : $.join("") } function o(t, e, r, n) { return [R(H(n)), R(Math.round(t).toString(16)), R(Math.round(e).toString(16)), R(Math.round(r).toString(16))].join("") } function f(t, e) { e = 0 === e ? 0 : e || 10; var r = n(t).toHsl(); return r.s -= e / 100, r.s = S(r.s), n(r) } function h(t, e) { e = 0 === e ? 0 : e || 10; var r = n(t).toHsl(); return r.s += e / 100, r.s = S(r.s), n(r) } function u(t) { return n(t).desaturate(100) } function l(t, e) { e = 0 === e ? 0 : e || 10; var r = n(t).toHsl(); return r.l += e / 100, r.l = S(r.l), n(r) } function c(t, e) { e = 0 === e ? 0 : e || 10; var r = n(t).toRgb(); return r.r = Math.max(0, Math.min(255, r.r - Math.round(-(255 * (e / 100))))), r.g = Math.max(0, Math.min(255, r.g - Math.round(-(255 * (e / 100))))), r.b = Math.max(0, Math.min(255, r.b - Math.round(-(255 * (e / 100))))), n(r) } function b(t, e) { e = 0 === e ? 0 : e || 10; var r = n(t).toHsl(); return r.l -= e / 100, r.l = S(r.l), n(r) } function d(t, e) { var r = n(t).toHsl(), $ = (r.h + e) % 360; return r.h = $ < 0 ? 360 + $ : $, n(r) } function g(t) { var e = n(t).toHsl(); return e.h = (e.h + 180) % 360, n(e) } function _(t, e) { if (isNaN(e) || e <= 0) throw Error("Argument to polyad must be a positive number"); for (var r = n(t).toHsl(), $ = [n(t)], a = 360 / e, s = 1; s < e; s++)$.push(n({ h: (r.h + s * a) % 360, s: r.s, l: r.l })); return $ } function m(t) { var e = n(t).toHsl(), r = e.h; return [n(t), n({ h: (r + 72) % 360, s: e.s, l: e.l }), n({ h: (r + 216) % 360, s: e.s, l: e.l })] } function p(t, e, r) { e = e || 6, r = r || 30; var $ = n(t).toHsl(), a = 360 / r, s = [n(t)]; for ($.h = ($.h - (a * e >> 1) + 720) % 360; --e;)$.h = ($.h + a) % 360, s.push(n($)); return s } function y(t, e) { e = e || 6; for (var r = n(t).toHsv(), $ = r.h, a = r.s, s = r.v, o = [], f = 1 / e; e--;)o.push(n({ h: $, s: a, v: s })), s = (s + f) % 1; return o } n.prototype = { isDark: function t() { return 128 > this.getBrightness() }, isLight: function t() { return !this.isDark() }, isValid: function t() { return this._ok }, getOriginalInput: function t() { return this._originalInput }, getFormat: function t() { return this._format }, getAlpha: function t() { return this._a }, getBrightness: function t() { var e = this.toRgb(); return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 }, getLuminance: function t() { var e, r, n, $, a, s, o = this.toRgb(); return e = o.r / 255, r = o.g / 255, n = o.b / 255, $ = e <= .03928 ? e / 12.92 : Math.pow((e + .055) / 1.055, 2.4), .2126 * $ + .7152 * (a = r <= .03928 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4)) + .0722 * (s = n <= .03928 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4)) }, setAlpha: function t(e) { return this._a = w(e), this._roundA = Math.round(100 * this._a) / 100, this }, toHsv: function t() { var e = a(this._r, this._g, this._b); return { h: 360 * e.h, s: e.s, v: e.v, a: this._a } }, toHsvString: function t() { var e = a(this._r, this._g, this._b), r = Math.round(360 * e.h), n = Math.round(100 * e.s), $ = Math.round(100 * e.v); return 1 == this._a ? "hsv(" + r + ", " + n + "%, " + $ + "%)" : "hsva(" + r + ", " + n + "%, " + $ + "%, " + this._roundA + ")" }, toHsl: function t() { var e = $(this._r, this._g, this._b); return { h: 360 * e.h, s: e.s, l: e.l, a: this._a } }, toHslString: function t() { var e = $(this._r, this._g, this._b), r = Math.round(360 * e.h), n = Math.round(100 * e.s), a = Math.round(100 * e.l); return 1 == this._a ? "hsl(" + r + ", " + n + "%, " + a + "%)" : "hsla(" + r + ", " + n + "%, " + a + "%, " + this._roundA + ")" }, toHex: function t(e) { return s(this._r, this._g, this._b, e) }, toHexString: function t(e) { return "#" + this.toHex(e) }, toHexNumber: function t() { return Number("0x" + this.toHex()) }, toHex8: function t(e) { var r, n, $, a, s, o; return r = this._r, n = this._g, $ = this._b, a = this._a, s = e, o = [R(Math.round(r).toString(16)), R(Math.round(n).toString(16)), R(Math.round($).toString(16)), R(H(a))], s && o[0].charAt(0) == o[0].charAt(1) && o[1].charAt(0) == o[1].charAt(1) && o[2].charAt(0) == o[2].charAt(1) && o[3].charAt(0) == o[3].charAt(1) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join("") }, toHex8String: function t(e) { return "#" + this.toHex8(e) }, toRgb: function t() { return { r: Math.round(this._r), g: Math.round(this._g), b: Math.round(this._b), a: this._a } }, toRgbString: function t() { return 1 == this._a ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")" }, toPercentageRgb: function t() { return { r: Math.round(100 * x(this._r, 255)) + "%", g: Math.round(100 * x(this._g, 255)) + "%", b: Math.round(100 * x(this._b, 255)) + "%", a: this._a } }, toPercentageRgbString: function t() { return 1 == this._a ? "rgb(" + Math.round(100 * x(this._r, 255)) + "%, " + Math.round(100 * x(this._g, 255)) + "%, " + Math.round(100 * x(this._b, 255)) + "%)" : "rgba(" + Math.round(100 * x(this._r, 255)) + "%, " + Math.round(100 * x(this._g, 255)) + "%, " + Math.round(100 * x(this._b, 255)) + "%, " + this._roundA + ")" }, toName: function t() { return 0 === this._a ? "transparent" : !(this._a < 1) && !!v[s(this._r, this._g, this._b, !0)] }, toFilter: function t(e) { var r = "#" + o(this._r, this._g, this._b, this._a), $ = r, a = this._gradientType ? "GradientType = 1, " : ""; if (e) { var s = n(e); $ = "#" + o(s._r, s._g, s._b, s._a) } return "progid:DXImageTransform.Microsoft.gradient(" + a + "startColorstr=" + r + ",endColorstr=" + $ + ")" }, toString: function t(e) { var r = !!e; e = e || this._format; var n = !1, $ = this._a < 1 && this._a >= 0; return !r && $ && ("hex" === e || "hex6" === e || "hex3" === e || "hex4" === e || "hex8" === e || "name" === e) ? "name" === e && 0 === this._a ? this.toName() : this.toRgbString() : ("rgb" === e && (n = this.toRgbString()), "prgb" === e && (n = this.toPercentageRgbString()), ("hex" === e || "hex6" === e) && (n = this.toHexString()), "hex3" === e && (n = this.toHexString(!0)), "hex4" === e && (n = this.toHex8String(!0)), "hex8" === e && (n = this.toHex8String()), "name" === e && (n = this.toName()), "hsl" === e && (n = this.toHslString()), "hsv" === e && (n = this.toHsvString()), n || this.toHexString()) }, clone: function t() { return n(this.toString()) }, _applyModification: function t(e, r) { var n = e.apply(null, [this].concat([].slice.call(r))); return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this }, lighten: function t() { return this._applyModification(l, arguments) }, brighten: function t() { return this._applyModification(c, arguments) }, darken: function t() { return this._applyModification(b, arguments) }, desaturate: function t() { return this._applyModification(f, arguments) }, saturate: function t() { return this._applyModification(h, arguments) }, greyscale: function t() { return this._applyModification(u, arguments) }, spin: function t() { return this._applyModification(d, arguments) }, _applyCombination: function t(e, r) { return e.apply(null, [this].concat([].slice.call(r))) }, analogous: function t() { return this._applyCombination(p, arguments) }, complement: function t() { return this._applyCombination(g, arguments) }, monochromatic: function t() { return this._applyCombination(y, arguments) }, splitcomplement: function t() { return this._applyCombination(m, arguments) }, triad: function t() { return this._applyCombination(_, [3]) }, tetrad: function t() { return this._applyCombination(_, [4]) } }, n.fromRatio = function (e, r) { if ("object" == t(e)) { var $ = {}; for (var a in e) e.hasOwnProperty(a) && ("a" === a ? $[a] = e[a] : $[a] = C(e[a])); e = $ } return n(e, r) }, n.equals = function (t, e) { return !!t && !!e && n(t).toRgbString() == n(e).toRgbString() }, n.random = function () { return n.fromRatio({ r: Math.random(), g: Math.random(), b: Math.random() }) }, n.mix = function (t, e, r) { r = 0 === r ? 0 : r || 50; var $ = n(t).toRgb(), a = n(e).toRgb(), s = r / 100; return n({ r: (a.r - $.r) * s + $.r, g: (a.g - $.g) * s + $.g, b: (a.b - $.b) * s + $.b, a: (a.a - $.a) * s + $.a }) }, n.readability = function (t, e) { var r = n(t), $ = n(e); return (Math.max(r.getLuminance(), $.getLuminance()) + .05) / (Math.min(r.getLuminance(), $.getLuminance()) + .05) }, n.isReadable = function (t, e, r) { var $, a, s, o, f, h = n.readability(t, e); switch (a = !1, ($ = (s = r, o = ((s = s || { level: "AA", size: "small" }).level || "AA").toUpperCase(), f = (s.size || "small").toLowerCase(), "AA" !== o && "AAA" !== o && (o = "AA"), "small" !== f && "large" !== f && (f = "small"), { level: o, size: f })).level + $.size) { case "AAsmall": case "AAAlarge": a = h >= 4.5; break; case "AAlarge": a = h >= 3; break; case "AAAsmall": a = h >= 7 }return a }, n.mostReadable = function (t, e, r) { var $, a, s, o, f = null, h = 0; a = (r = r || {}).includeFallbackColors, s = r.level, o = r.size; for (var u = 0; u < e.length; u++)($ = n.readability(t, e[u])) > h && (h = $, f = n(e[u])); return n.isReadable(t, f, { level: s, size: o }) || !a ? f : (r.includeFallbackColors = !1, n.mostReadable(t, ["#fff", "#000"], r)) }; var k = n.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }, v = n.hexNames = function t(e) { var r = {}; for (var n in e) e.hasOwnProperty(n) && (r[e[n]] = n); return r }(k); function w(t) { return (isNaN(t = parseFloat(t)) || t < 0 || t > 1) && (t = 1), t } function x(t, e) { r = t, "string" == typeof r && -1 != r.indexOf(".") && 1 === parseFloat(r) && (t = "100%"); var r, n, $ = (n = t, "string" == typeof n && -1 != n.indexOf("%")); return (t = Math.min(e, Math.max(0, parseFloat(t))), $ && (t = parseInt(t * e, 10) / 100), 1e-6 > Math.abs(t - e)) ? 1 : t % e / parseFloat(e) } function S(t) { return Math.min(1, Math.max(0, t)) } function A(t) { return parseInt(t, 16) } function R(t) { return 1 == t.length ? "0" + t : "" + t } function C(t) { return t <= 1 && (t = 100 * t + "%"), t } function H(t) { return Math.round(255 * parseFloat(t)).toString(16) } function G(t) { return A(t) / 255 } var B, T, O, F = (T = "[\\\\s|\\\\(]+(" + (B = "(?:[-\\\\+]?\\\\d*\\\\.\\\\d+%?)|(?:[-\\\\+]?\\\\d+%?)") + ")[,|\\\\s]+(" + B + ")[,|\\\\s]+(" + B + ")\\\\s*\\\\)?", O = "[\\\\s|\\\\(]+(" + B + ")[,|\\\\s]+(" + B + ")[,|\\\\s]+(" + B + ")[,|\\\\s]+(" + B + ")\\\\s*\\\\)?", { CSS_UNIT: RegExp(B), rgb: RegExp("rgb" + T), rgba: RegExp("rgba" + O), hsl: RegExp("hsl" + T), hsla: RegExp("hsla" + O), hsv: RegExp("hsv" + T), hsva: RegExp("hsva" + O), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }); function D(t) { return !!F.CSS_UNIT.exec(t) } return n }), w3color.prototype = { toRgbString: function () { return "rgb(" + this.red + ", " + this.green + ", " + this.blue + ")" }, toRgbaString: function () { return "rgba(" + this.red + ", " + this.green + ", " + this.blue + ", " + this.opacity + ")" }, toHwbString: function () { return "hwb(" + this.hue + ", " + Math.round(100 * this.whiteness) + "%, " + Math.round(100 * this.blackness) + "%)" }, toHwbStringDecimal: function () { return "hwb(" + this.hue + ", " + this.whiteness + ", " + this.blackness + ")" }, toHwbaString: function () { return "hwba(" + this.hue + ", " + Math.round(100 * this.whiteness) + "%, " + Math.round(100 * this.blackness) + "%, " + this.opacity + ")" }, toHslString: function () { return "hsl(" + this.hue + ", " + Math.round(100 * this.sat) + "%, " + Math.round(100 * this.lightness) + "%)" }, toHslStringDecimal: function () { return "hsl(" + this.hue + ", " + this.sat + ", " + this.lightness + ")" }, toHslaString: function () { return "hsla(" + this.hue + ", " + Math.round(100 * this.sat) + "%, " + Math.round(100 * this.lightness) + "%, " + this.opacity + ")" }, toCmykString: function () { return "cmyk(" + Math.round(100 * this.cyan) + "%, " + Math.round(100 * this.magenta) + "%, " + Math.round(100 * this.yellow) + "%, " + Math.round(100 * this.black) + "%)" }, toCmykStringDecimal: function () { return "cmyk(" + this.cyan + ", " + this.magenta + ", " + this.yellow + ", " + this.black + ")" }, toNcolString: function () { return this.ncol + ", " + Math.round(100 * this.whiteness) + "%, " + Math.round(100 * this.blackness) + "%" }, toNcolStringDecimal: function () { return this.ncol + ", " + this.whiteness + ", " + this.blackness }, toNcolaString: function () { return this.ncol + ", " + Math.round(100 * this.whiteness) + "%, " + Math.round(100 * this.blackness) + "%, " + this.opacity }, toName: function () { var t, e, r, n = getColorArr("hexs"); for (i = 0; i < n.length; i++)if (t = parseInt(n[i].substr(0, 2), 16), e = parseInt(n[i].substr(2, 2), 16), r = parseInt(n[i].substr(4, 2), 16), this.red == t && this.green == e && this.blue == r) return getColorArr("names")[i]; return "" }, toHexString: function () { var t = toHex(this.red), e = toHex(this.green), r = toHex(this.blue); return "#" + t + e + r }, toRgb: function () { return { r: this.red, g: this.green, b: this.blue, a: this.opacity } }, toHsl: function () { return { h: this.hue, s: this.sat, l: this.lightness, a: this.opacity } }, toHwb: function () { return { h: this.hue, w: this.whiteness, b: this.blackness, a: this.opacity } }, toCmyk: function () { return { c: this.cyan, m: this.magenta, y: this.yellow, k: this.black, a: this.opacity } }, toNcol: function () { return { ncol: this.ncol, w: this.whiteness, b: this.blackness, a: this.opacity } }, isDark: function (t) { return (299 * this.red + 587 * this.green + 114 * this.blue) / 1e3 < (t || 128) }, saturate: function (t) { var e, r, n; e = t / 100 || .1, this.sat += e, this.sat > 1 && (this.sat = 1), n = colorObject(r = hslToRgb(this.hue, this.sat, this.lightness), this.opacity, this.hue, this.sat), this.attachValues(n) }, desaturate: function (t) { var e, r, n; e = t / 100 || .1, this.sat -= e, this.sat < 0 && (this.sat = 0), n = colorObject(r = hslToRgb(this.hue, this.sat, this.lightness), this.opacity, this.hue, this.sat), this.attachValues(n) }, lighter: function (t) { var e, r, n; e = t / 100 || .1, this.lightness += e, this.lightness > 1 && (this.lightness = 1), n = colorObject(r = hslToRgb(this.hue, this.sat, this.lightness), this.opacity, this.hue, this.sat), this.attachValues(n) }, darker: function (t) { var e, r, n; e = t / 100 || .1, this.lightness -= e, this.lightness < 0 && (this.lightness = 0), n = colorObject(r = hslToRgb(this.hue, this.sat, this.lightness), this.opacity, this.hue, this.sat), this.attachValues(n) }, attachValues: function (t) { this.red = t.red, this.green = t.green, this.blue = t.blue, this.hue = t.hue, this.sat = t.sat, this.lightness = t.lightness, this.whiteness = t.whiteness, this.blackness = t.blackness, this.cyan = t.cyan, this.magenta = t.magenta, this.yellow = t.yellow, this.black = t.black, this.ncol = t.ncol, this.opacity = t.opacity, this.valid = t.valid } };\n';

// assets/pixi.txt.js
var pixi_txt_default = 'var qd=Object.defineProperty,Kd=Object.defineProperties;var Zd=Object.getOwnPropertyDescriptors;var ir=Object.getOwnPropertySymbols;var $h=Object.prototype.hasOwnProperty,jh=Object.prototype.propertyIsEnumerable;var Wh=(m,et,pt)=>et in m?qd(m,et,{enumerable:!0,configurable:!0,writable:!0,value:pt}):m[et]=pt,bt=(m,et)=>{for(var pt in et||(et={}))$h.call(et,pt)&&Wh(m,pt,et[pt]);if(ir)for(var pt of ir(et))jh.call(et,pt)&&Wh(m,pt,et[pt]);return m},Qi=(m,et)=>Kd(m,Zd(et));var zn=(m,et)=>{var pt={};for(var Rt in m)$h.call(m,Rt)&&et.indexOf(Rt)<0&&(pt[Rt]=m[Rt]);if(m!=null&&ir)for(var Rt of ir(m))et.indexOf(Rt)<0&&jh.call(m,Rt)&&(pt[Rt]=m[Rt]);return pt};/*!\n * pixi.js - v7.2.4\n * Compiled Thu, 06 Apr 2023 19:36:45 UTC\n *\n * pixi.js is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */var PIXI=function(m){var zh;"use strict";var et=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(et||{}),pt=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(pt||{}),Rt=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(Rt||{}),G=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(G||{}),zt=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(zt||{}),C=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(C||{}),Re=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(Re||{}),k=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(k||{}),ts=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(ts||{}),ee=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(ee||{}),ie=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(ie||{}),Wt=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Wt||{}),Nt=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(Nt||{}),$t=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))($t||{}),es=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(es||{}),Pt=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(Pt||{}),ct=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(ct||{}),Wn=(e=>(e[e.RED=1]="RED",e[e.GREEN=2]="GREEN",e[e.BLUE=4]="BLUE",e[e.ALPHA=8]="ALPHA",e))(Wn||{}),ht=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(ht||{}),jt=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(jt||{});const $n={createCanvas:(e,t)=>{const i=document.createElement("canvas");return i.width=e,i.height=t,i},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>{var e;return(e=document.baseURI)!=null?e:window.location.href},getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},P={ADAPTER:$n,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var sr=/iPhone/i,jn=/iPod/i,Yn=/iPad/i,qn=/\\biOS-universal(?:.+)Mac\\b/i,rr=/\\bAndroid(?:.+)Mobile\\b/i,Kn=/Android/i,Xe=/(?:SD4930UR|\\bSilk(?:.+)Mobile\\b)/i,is=/Silk/i,ce=/Windows Phone/i,Zn=/\\bWindows(?:.+)ARM\\b/i,Jn=/BlackBerry/i,Qn=/BB10/i,to=/Opera Mini/i,eo=/\\b(CriOS|Chrome)(?:.+)Mobile/i,io=/Mobile(?:.+)Firefox\\b/i,so=function(e){return typeof e!="undefined"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream=="undefined"};function Yh(e){return function(t){return t.test(e)}}function ro(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator!="undefined"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var i=t.userAgent,s=i.split("[FBAN");typeof s[1]!="undefined"&&(i=s[0]),s=i.split("Twitter"),typeof s[1]!="undefined"&&(i=s[0]);var r=Yh(i),n={apple:{phone:r(sr)&&!r(ce),ipod:r(jn),tablet:!r(sr)&&(r(Yn)||so(t))&&!r(ce),universal:r(qn),device:(r(sr)||r(jn)||r(Yn)||r(qn)||so(t))&&!r(ce)},amazon:{phone:r(Xe),tablet:!r(Xe)&&r(is),device:r(Xe)||r(is)},android:{phone:!r(ce)&&r(Xe)||!r(ce)&&r(rr),tablet:!r(ce)&&!r(Xe)&&!r(rr)&&(r(is)||r(Kn)),device:!r(ce)&&(r(Xe)||r(is)||r(rr)||r(Kn))||r(/\\bokhttp\\b/i)},windows:{phone:r(ce),tablet:r(Zn),device:r(ce)||r(Zn)},other:{blackberry:r(Jn),blackberry10:r(Qn),opera:r(to),firefox:r(io),chrome:r(eo),device:r(Jn)||r(Qn)||r(to)||r(io)||r(eo)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}const Yt=((zh=ro.default)!=null?zh:ro)(globalThis.navigator);P.RETINA_PREFIX=/@([0-9\\.]+)x/,P.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var nr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Qd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function or(e,t,i){return i={path:t,exports:{},require:function(s,r){return qh(s,r==null?i.path:r)}},e(i,i.exports),i.exports}function tf(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ef(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}function sf(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),t}function qh(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Ve=or(function(e){"use strict";var t=Object.prototype.hasOwnProperty,i="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(i=!1));function r(h,l,c){this.fn=h,this.context=l,this.once=c||!1}function n(h,l,c,u,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var f=new r(c,u||h,d),p=i?i+l:l;return h._events[p]?h._events[p].fn?h._events[p]=[h._events[p],f]:h._events[p].push(f):(h._events[p]=f,h._eventsCount++),h}function o(h,l){--h._eventsCount===0?h._events=new s:delete h._events[l]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],c,u;if(this._eventsCount===0)return l;for(u in c=this._events)t.call(c,u)&&l.push(i?u.slice(1):u);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},a.prototype.listeners=function(l){var c=i?i+l:l,u=this._events[c];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,f=u.length,p=new Array(f);d<f;d++)p[d]=u[d].fn;return p},a.prototype.listenerCount=function(l){var c=i?i+l:l,u=this._events[c];return u?u.fn?1:u.length:0},a.prototype.emit=function(l,c,u,d,f,p){var _=i?i+l:l;if(!this._events[_])return!1;var g=this._events[_],v=arguments.length,b,y;if(g.fn){switch(g.once&&this.removeListener(l,g.fn,void 0,!0),v){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,u),!0;case 4:return g.fn.call(g.context,c,u,d),!0;case 5:return g.fn.call(g.context,c,u,d,f),!0;case 6:return g.fn.call(g.context,c,u,d,f,p),!0}for(y=1,b=new Array(v-1);y<v;y++)b[y-1]=arguments[y];g.fn.apply(g.context,b)}else{var x=g.length,A;for(y=0;y<x;y++)switch(g[y].once&&this.removeListener(l,g[y].fn,void 0,!0),v){case 1:g[y].fn.call(g[y].context);break;case 2:g[y].fn.call(g[y].context,c);break;case 3:g[y].fn.call(g[y].context,c,u);break;case 4:g[y].fn.call(g[y].context,c,u,d);break;default:if(!b)for(A=1,b=new Array(v-1);A<v;A++)b[A-1]=arguments[A];g[y].fn.apply(g[y].context,b)}}return!0},a.prototype.on=function(l,c,u){return n(this,l,c,u,!1)},a.prototype.once=function(l,c,u){return n(this,l,c,u,!0)},a.prototype.removeListener=function(l,c,u,d){var f=i?i+l:l;if(!this._events[f])return this;if(!c)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===c&&(!d||p.once)&&(!u||p.context===u)&&o(this,f);else{for(var _=0,g=[],v=p.length;_<v;_++)(p[_].fn!==c||d&&!p[_].once||u&&p[_].context!==u)&&g.push(p[_]);g.length?this._events[f]=g.length===1?g[0]:g:o(this,f)}return this},a.prototype.removeAllListeners=function(l){var c;return l?(c=i?i+l:l,this._events[c]&&o(this,c)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,e.exports=a}),ar=ss,Kh=ss;function ss(e,t,i){i=i||2;var s=t&&t.length,r=s?t[0]*i:e.length,n=no(e,0,r,i,!0),o=[];if(!n||n.next===n.prev)return o;var a,h,l,c,u,d,f;if(s&&(n=el(e,t,n,i)),e.length>80*i){a=l=e[0],h=c=e[1];for(var p=i;p<r;p+=i)u=e[p],d=e[p+1],u<a&&(a=u),d<h&&(h=d),u>l&&(l=u),d>c&&(c=d);f=Math.max(l-a,c-h),f=f!==0?32767/f:0}return li(n,o,i,a,h,f,0),o}function no(e,t,i,s,r){var n,o;if(r===cr(e,t,i,s)>0)for(n=t;n<i;n+=s)o=ho(n,e[n],e[n+1],o);else for(n=i-s;n>=t;n-=s)o=ho(n,e[n],e[n+1],o);return o&&rs(o,o.next)&&(ui(o),o=o.next),o}function Ce(e,t){if(!e)return e;t||(t=e);var i=e,s;do if(s=!1,!i.steiner&&(rs(i,i.next)||nt(i.prev,i,i.next)===0)){if(ui(i),i=t=i.prev,i===i.next)break;s=!0}else i=i.next;while(s||i!==t);return t}function li(e,t,i,s,r,n,o){if(!!e){!o&&n&&ol(e,s,r,n);for(var a=e,h,l;e.prev!==e.next;){if(h=e.prev,l=e.next,n?Jh(e,s,r,n):Zh(e)){t.push(h.i/i|0),t.push(e.i/i|0),t.push(l.i/i|0),ui(e),e=l.next,a=l.next;continue}if(e=l,e===a){o?o===1?(e=Qh(Ce(e),t,i),li(e,t,i,s,r,n,2)):o===2&&tl(e,t,i,s,r,n):li(Ce(e),t,i,s,r,n,1);break}}}}function Zh(e){var t=e.prev,i=e,s=e.next;if(nt(t,i,s)>=0)return!1;for(var r=t.x,n=i.x,o=s.x,a=t.y,h=i.y,l=s.y,c=r<n?r<o?r:o:n<o?n:o,u=a<h?a<l?a:l:h<l?h:l,d=r>n?r>o?r:o:n>o?n:o,f=a>h?a>l?a:l:h>l?h:l,p=s.next;p!==t;){if(p.x>=c&&p.x<=d&&p.y>=u&&p.y<=f&&ze(r,a,n,h,o,l,p.x,p.y)&&nt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Jh(e,t,i,s){var r=e.prev,n=e,o=e.next;if(nt(r,n,o)>=0)return!1;for(var a=r.x,h=n.x,l=o.x,c=r.y,u=n.y,d=o.y,f=a<h?a<l?a:l:h<l?h:l,p=c<u?c<d?c:d:u<d?u:d,_=a>h?a>l?a:l:h>l?h:l,g=c>u?c>d?c:d:u>d?u:d,v=hr(f,p,t,i,s),b=hr(_,g,t,i,s),y=e.prevZ,x=e.nextZ;y&&y.z>=v&&x&&x.z<=b;){if(y.x>=f&&y.x<=_&&y.y>=p&&y.y<=g&&y!==r&&y!==o&&ze(a,c,h,u,l,d,y.x,y.y)&&nt(y.prev,y,y.next)>=0||(y=y.prevZ,x.x>=f&&x.x<=_&&x.y>=p&&x.y<=g&&x!==r&&x!==o&&ze(a,c,h,u,l,d,x.x,x.y)&&nt(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;y&&y.z>=v;){if(y.x>=f&&y.x<=_&&y.y>=p&&y.y<=g&&y!==r&&y!==o&&ze(a,c,h,u,l,d,y.x,y.y)&&nt(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;x&&x.z<=b;){if(x.x>=f&&x.x<=_&&x.y>=p&&x.y<=g&&x!==r&&x!==o&&ze(a,c,h,u,l,d,x.x,x.y)&&nt(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Qh(e,t,i){var s=e;do{var r=s.prev,n=s.next.next;!rs(r,n)&&oo(r,s,s.next,n)&&ci(r,n)&&ci(n,r)&&(t.push(r.i/i|0),t.push(s.i/i|0),t.push(n.i/i|0),ui(s),ui(s.next),s=e=n),s=s.next}while(s!==e);return Ce(s)}function tl(e,t,i,s,r,n){var o=e;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&ll(o,a)){var h=ao(o,a);o=Ce(o,o.next),h=Ce(h,h.next),li(o,t,i,s,r,n,0),li(h,t,i,s,r,n,0);return}a=a.next}o=o.next}while(o!==e)}function el(e,t,i,s){var r=[],n,o,a,h,l;for(n=0,o=t.length;n<o;n++)a=t[n]*s,h=n<o-1?t[n+1]*s:e.length,l=no(e,a,h,s,!1),l===l.next&&(l.steiner=!0),r.push(hl(l));for(r.sort(il),n=0;n<r.length;n++)i=sl(r[n],i);return i}function il(e,t){return e.x-t.x}function sl(e,t){var i=rl(e,t);if(!i)return t;var s=ao(i,e);return Ce(s,s.next),Ce(i,i.next)}function rl(e,t){var i=t,s=e.x,r=e.y,n=-1/0,o;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){var a=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=s&&a>n&&(n=a,o=i.x<i.next.x?i:i.next,a===s))return o}i=i.next}while(i!==t);if(!o)return null;var h=o,l=o.x,c=o.y,u=1/0,d;i=o;do s>=i.x&&i.x>=l&&s!==i.x&&ze(r<c?s:n,r,l,c,r<c?n:s,r,i.x,i.y)&&(d=Math.abs(r-i.y)/(s-i.x),ci(i,e)&&(d<u||d===u&&(i.x>o.x||i.x===o.x&&nl(o,i)))&&(o=i,u=d)),i=i.next;while(i!==h);return o}function nl(e,t){return nt(e.prev,e,t.prev)<0&&nt(t.next,e,e.next)<0}function ol(e,t,i,s){var r=e;do r.z===0&&(r.z=hr(r.x,r.y,t,i,s)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,al(r)}function al(e){var t,i,s,r,n,o,a,h,l=1;do{for(i=e,e=null,n=null,o=0;i;){for(o++,s=i,a=0,t=0;t<l&&(a++,s=s.nextZ,!!s);t++);for(h=l;a>0||h>0&&s;)a!==0&&(h===0||!s||i.z<=s.z)?(r=i,i=i.nextZ,a--):(r=s,s=s.nextZ,h--),n?n.nextZ=r:e=r,r.prevZ=n,n=r;i=s}n.nextZ=null,l*=2}while(o>1);return e}function hr(e,t,i,s,r){return e=(e-i)*r|0,t=(t-s)*r|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function hl(e){var t=e,i=e;do(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next;while(t!==e);return i}function ze(e,t,i,s,r,n,o,a){return(r-o)*(t-a)>=(e-o)*(n-a)&&(e-o)*(s-a)>=(i-o)*(t-a)&&(i-o)*(n-a)>=(r-o)*(s-a)}function ll(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!cl(e,t)&&(ci(e,t)&&ci(t,e)&&ul(e,t)&&(nt(e.prev,e,t.prev)||nt(e,t.prev,t))||rs(e,t)&&nt(e.prev,e,e.next)>0&&nt(t.prev,t,t.next)>0)}function nt(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function rs(e,t){return e.x===t.x&&e.y===t.y}function oo(e,t,i,s){var r=os(nt(e,t,i)),n=os(nt(e,t,s)),o=os(nt(i,s,e)),a=os(nt(i,s,t));return!!(r!==n&&o!==a||r===0&&ns(e,i,t)||n===0&&ns(e,s,t)||o===0&&ns(i,e,s)||a===0&&ns(i,t,s))}function ns(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function os(e){return e>0?1:e<0?-1:0}function cl(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&oo(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}function ci(e,t){return nt(e.prev,e,e.next)<0?nt(e,t,e.next)>=0&&nt(e,e.prev,t)>=0:nt(e,t,e.prev)<0||nt(e,e.next,t)<0}function ul(e,t){var i=e,s=!1,r=(e.x+t.x)/2,n=(e.y+t.y)/2;do i.y>n!=i.next.y>n&&i.next.y!==i.y&&r<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next;while(i!==e);return s}function ao(e,t){var i=new lr(e.i,e.x,e.y),s=new lr(t.i,t.x,t.y),r=e.next,n=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,s.next=i,i.prev=s,n.next=s,s.prev=n,s}function ho(e,t,i,s){var r=new lr(e,t,i);return s?(r.next=s.next,r.prev=s,s.next.prev=r,s.next=r):(r.prev=r,r.next=r),r}function ui(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function lr(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}ss.deviation=function(e,t,i,s){var r=t&&t.length,n=r?t[0]*i:e.length,o=Math.abs(cr(e,0,n,i));if(r)for(var a=0,h=t.length;a<h;a++){var l=t[a]*i,c=a<h-1?t[a+1]*i:e.length;o-=Math.abs(cr(e,l,c,i))}var u=0;for(a=0;a<s.length;a+=3){var d=s[a]*i,f=s[a+1]*i,p=s[a+2]*i;u+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return o===0&&u===0?0:Math.abs((u-o)/o)};function cr(e,t,i,s){for(var r=0,n=t,o=i-s;n<i;n+=s)r+=(e[o]-e[n])*(e[n+1]+e[o+1]),o=n;return r}ss.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},s=0,r=0;r<e.length;r++){for(var n=0;n<e[r].length;n++)for(var o=0;o<t;o++)i.vertices.push(e[r][n][o]);r>0&&(s+=e[r-1].length,i.holes.push(s))}return i},ar.default=Kh;var dl=or(function(e,t){/*! https://mths.be/punycode v1.3.2 by @mathias */(function(i){var s=t&&!t.nodeType&&t,r=e&&!e.nodeType&&e,n=typeof nr=="object"&&nr;(n.global===n||n.window===n||n.self===n)&&(i=n);var o,a=2147483647,h=36,l=1,c=26,u=38,d=700,f=72,p=128,_="-",g=/^xn--/,v=/[^\\x20-\\x7E]/,b=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=h-l,A=Math.floor,D=String.fromCharCode,R;function E(S){throw RangeError(y[S])}function O(S,X){for(var K=S.length,J=[];K--;)J[K]=X(S[K]);return J}function H(S,X){var K=S.split("@"),J="";K.length>1&&(J=K[0]+"@",S=K[1]),S=S.replace(b,".");var Q=S.split("."),vt=O(Q,X).join(".");return J+vt}function I(S){for(var X=[],K=0,J=S.length,Q,vt;K<J;)Q=S.charCodeAt(K++),Q>=55296&&Q<=56319&&K<J?(vt=S.charCodeAt(K++),(vt&64512)==56320?X.push(((Q&1023)<<10)+(vt&1023)+65536):(X.push(Q),K--)):X.push(Q);return X}function N(S){return O(S,function(X){var K="";return X>65535&&(X-=65536,K+=D(X>>>10&1023|55296),X=56320|X&1023),K+=D(X),K}).join("")}function w(S){return S-48<10?S-22:S-65<26?S-65:S-97<26?S-97:h}function T(S,X){return S+22+75*(S<26)-((X!=0)<<5)}function W(S,X,K){var J=0;for(S=K?A(S/d):S>>1,S+=A(S/X);S>x*c>>1;J+=h)S=A(S/x);return A(J+(x+1)*S/(S+u))}function q(S){var X=[],K=S.length,J,Q=0,vt=p,ut=f,xt,wt,Ft,Et,rt,dt,ft,he,le;for(xt=S.lastIndexOf(_),xt<0&&(xt=0),wt=0;wt<xt;++wt)S.charCodeAt(wt)>=128&&E("not-basic"),X.push(S.charCodeAt(wt));for(Ft=xt>0?xt+1:0;Ft<K;){for(Et=Q,rt=1,dt=h;Ft>=K&&E("invalid-input"),ft=w(S.charCodeAt(Ft++)),(ft>=h||ft>A((a-Q)/rt))&&E("overflow"),Q+=ft*rt,he=dt<=ut?l:dt>=ut+c?c:dt-ut,!(ft<he);dt+=h)le=h-he,rt>A(a/le)&&E("overflow"),rt*=le;J=X.length+1,ut=W(Q-Et,J,Et==0),A(Q/J)>a-vt&&E("overflow"),vt+=A(Q/J),Q%=J,X.splice(Q++,0,vt)}return N(X)}function F(S){var X,K,J,Q,vt,ut,xt,wt,Ft,Et,rt,dt=[],ft,he,le,Ji;for(S=I(S),ft=S.length,X=p,K=0,vt=f,ut=0;ut<ft;++ut)rt=S[ut],rt<128&&dt.push(D(rt));for(J=Q=dt.length,Q&&dt.push(_);J<ft;){for(xt=a,ut=0;ut<ft;++ut)rt=S[ut],rt>=X&&rt<xt&&(xt=rt);for(he=J+1,xt-X>A((a-K)/he)&&E("overflow"),K+=(xt-X)*he,X=xt,ut=0;ut<ft;++ut)if(rt=S[ut],rt<X&&++K>a&&E("overflow"),rt==X){for(wt=K,Ft=h;Et=Ft<=vt?l:Ft>=vt+c?c:Ft-vt,!(wt<Et);Ft+=h)Ji=wt-Et,le=h-Et,dt.push(D(T(Et+Ji%le,0))),wt=A(Ji/le);dt.push(D(T(wt,0))),vt=W(K,he,J==Q),K=0,++J}++K,++X}return dt.join("")}function Z(S){return H(S,function(X){return g.test(X)?q(X.slice(4).toLowerCase()):X})}function at(S){return H(S,function(X){return v.test(X)?"xn--"+F(X):X})}if(o={version:"1.3.2",ucs2:{decode:I,encode:N},decode:q,encode:F,toASCII:at,toUnicode:Z},s&&r)if(e.exports==s)r.exports=o;else for(R in o)o.hasOwnProperty(R)&&(s[R]=o[R]);else i.punycode=o})(nr)}),se={isString:function(e){return typeof e=="string"},isObject:function(e){return typeof e=="object"&&e!==null},isNull:function(e){return e===null},isNullOrUndefined:function(e){return e==null}};function fl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var pl=function(e,t,i,s){t=t||"&",i=i||"=";var r={};if(typeof e!="string"||e.length===0)return r;var n=/\\+/g;e=e.split(t);var o=1e3;s&&typeof s.maxKeys=="number"&&(o=s.maxKeys);var a=e.length;o>0&&a>o&&(a=o);for(var h=0;h<a;++h){var l=e[h].replace(n,"%20"),c=l.indexOf(i),u,d,f,p;c>=0?(u=l.substr(0,c),d=l.substr(c+1)):(u=l,d=""),f=decodeURIComponent(u),p=decodeURIComponent(d),fl(r,f)?Array.isArray(r[f])?r[f].push(p):r[f]=[r[f],p]:r[f]=p}return r},di=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},ml=function(e,t,i,s){return t=t||"&",i=i||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(r){var n=encodeURIComponent(di(r))+i;return Array.isArray(e[r])?e[r].map(function(o){return n+encodeURIComponent(di(o))}).join(t):n+encodeURIComponent(di(e[r]))}).join(t):s?encodeURIComponent(di(s))+i+encodeURIComponent(di(e)):""},ur=or(function(e,t){"use strict";t.decode=t.parse=pl,t.encode=t.stringify=ml}),lo=fi,co=Rl,_l=Cl,uo=Al,gl=Lt;function Lt(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var yl=/^([a-z0-9.+-]+:)/i,vl=/:[0-9]*$/,xl=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,bl=["<",">",\'"\',"`"," ","\\r",`\n`,"	"],Tl=["{","}","|","\\\\","^","`"].concat(bl),dr=["\'"].concat(Tl),fo=["%","/","?",";","#"].concat(dr),po=["/","?","#"],El=255,mo=/^[+a-z0-9A-Z_-]{0,63}$/,wl=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Sl={javascript:!0,"javascript:":!0},fr={javascript:!0,"javascript:":!0},We={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function fi(e,t,i){if(e&&se.isObject(e)&&e instanceof Lt)return e;var s=new Lt;return s.parse(e,t,i),s}Lt.prototype.parse=function(e,t,i){if(!se.isString(e))throw new TypeError("Parameter \'url\' must be a string, not "+typeof e);var s=e.indexOf("?"),r=s!==-1&&s<e.indexOf("#")?"?":"#",n=e.split(r),o=/\\\\/g;n[0]=n[0].replace(o,"/"),e=n.join(r);var a=e;if(a=a.trim(),!i&&e.split("#").length===1){var h=xl.exec(a);if(h)return this.path=a,this.href=a,this.pathname=h[1],h[2]?(this.search=h[2],t?this.query=ur.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var l=yl.exec(a);if(l){l=l[0];var c=l.toLowerCase();this.protocol=c,a=a.substr(l.length)}if(i||l||a.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)){var u=a.substr(0,2)==="//";u&&!(l&&fr[l])&&(a=a.substr(2),this.slashes=!0)}if(!fr[l]&&(u||l&&!We[l])){for(var d=-1,f=0;f<po.length;f++){var p=a.indexOf(po[f]);p!==-1&&(d===-1||p<d)&&(d=p)}var _,g;d===-1?g=a.lastIndexOf("@"):g=a.lastIndexOf("@",d),g!==-1&&(_=a.slice(0,g),a=a.slice(g+1),this.auth=decodeURIComponent(_)),d=-1;for(var f=0;f<fo.length;f++){var p=a.indexOf(fo[f]);p!==-1&&(d===-1||p<d)&&(d=p)}d===-1&&(d=a.length),this.host=a.slice(0,d),a=a.slice(d),this.parseHost(),this.hostname=this.hostname||"";var v=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!v)for(var b=this.hostname.split(/\\./),f=0,y=b.length;f<y;f++){var x=b[f];if(!!x&&!x.match(mo)){for(var A="",D=0,R=x.length;D<R;D++)x.charCodeAt(D)>127?A+="x":A+=x[D];if(!A.match(mo)){var E=b.slice(0,f),O=b.slice(f+1),H=x.match(wl);H&&(E.push(H[1]),O.unshift(H[2])),O.length&&(a="/"+O.join(".")+a),this.hostname=E.join(".");break}}}this.hostname.length>El?this.hostname="":this.hostname=this.hostname.toLowerCase(),v||(this.hostname=dl.toASCII(this.hostname));var I=this.port?":"+this.port:"",N=this.hostname||"";this.host=N+I,this.href+=this.host,v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),a[0]!=="/"&&(a="/"+a))}if(!Sl[c])for(var f=0,y=dr.length;f<y;f++){var w=dr[f];if(a.indexOf(w)!==-1){var T=encodeURIComponent(w);T===w&&(T=escape(w)),a=a.split(w).join(T)}}var W=a.indexOf("#");W!==-1&&(this.hash=a.substr(W),a=a.slice(0,W));var q=a.indexOf("?");if(q!==-1?(this.search=a.substr(q),this.query=a.substr(q+1),t&&(this.query=ur.parse(this.query)),a=a.slice(0,q)):t&&(this.search="",this.query={}),a&&(this.pathname=a),We[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var I=this.pathname||"",F=this.search||"";this.path=I+F}return this.href=this.format(),this};function Al(e){return se.isString(e)&&(e=fi(e)),e instanceof Lt?e.format():Lt.prototype.format.call(e)}Lt.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",i=this.pathname||"",s=this.hash||"",r=!1,n="";this.host?r=e+this.host:this.hostname&&(r=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&se.isObject(this.query)&&Object.keys(this.query).length&&(n=ur.stringify(this.query));var o=this.search||n&&"?"+n||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||We[t])&&r!==!1?(r="//"+(r||""),i&&i.charAt(0)!=="/"&&(i="/"+i)):r||(r=""),s&&s.charAt(0)!=="#"&&(s="#"+s),o&&o.charAt(0)!=="?"&&(o="?"+o),i=i.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),o=o.replace("#","%23"),t+r+i+o+s};function Rl(e,t){return fi(e,!1,!0).resolve(t)}Lt.prototype.resolve=function(e){return this.resolveObject(fi(e,!1,!0)).format()};function Cl(e,t){return e?fi(e,!1,!0).resolveObject(t):t}Lt.prototype.resolveObject=function(e){if(se.isString(e)){var t=new Lt;t.parse(e,!1,!0),e=t}for(var i=new Lt,s=Object.keys(this),r=0;r<s.length;r++){var n=s[r];i[n]=this[n]}if(i.hash=e.hash,e.href==="")return i.href=i.format(),i;if(e.slashes&&!e.protocol){for(var o=Object.keys(e),a=0;a<o.length;a++){var h=o[a];h!=="protocol"&&(i[h]=e[h])}return We[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(e.protocol&&e.protocol!==i.protocol){if(!We[e.protocol]){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];i[u]=e[u]}return i.href=i.format(),i}if(i.protocol=e.protocol,!e.host&&!fr[e.protocol]){for(var y=(e.pathname||"").split("/");y.length&&!(e.host=y.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),y[0]!==""&&y.unshift(""),y.length<2&&y.unshift(""),i.pathname=y.join("/")}else i.pathname=e.pathname;if(i.search=e.search,i.query=e.query,i.host=e.host||"",i.auth=e.auth,i.hostname=e.hostname||e.host,i.port=e.port,i.pathname||i.search){var d=i.pathname||"",f=i.search||"";i.path=d+f}return i.slashes=i.slashes||e.slashes,i.href=i.format(),i}var p=i.pathname&&i.pathname.charAt(0)==="/",_=e.host||e.pathname&&e.pathname.charAt(0)==="/",g=_||p||i.host&&e.pathname,v=g,b=i.pathname&&i.pathname.split("/")||[],y=e.pathname&&e.pathname.split("/")||[],x=i.protocol&&!We[i.protocol];if(x&&(i.hostname="",i.port=null,i.host&&(b[0]===""?b[0]=i.host:b.unshift(i.host)),i.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(y[0]===""?y[0]=e.host:y.unshift(e.host)),e.host=null),g=g&&(y[0]===""||b[0]==="")),_)i.host=e.host||e.host===""?e.host:i.host,i.hostname=e.hostname||e.hostname===""?e.hostname:i.hostname,i.search=e.search,i.query=e.query,b=y;else if(y.length)b||(b=[]),b.pop(),b=b.concat(y),i.search=e.search,i.query=e.query;else if(!se.isNullOrUndefined(e.search)){if(x){i.hostname=i.host=b.shift();var A=i.host&&i.host.indexOf("@")>0?i.host.split("@"):!1;A&&(i.auth=A.shift(),i.host=i.hostname=A.shift())}return i.search=e.search,i.query=e.query,(!se.isNull(i.pathname)||!se.isNull(i.search))&&(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!b.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var D=b.slice(-1)[0],R=(i.host||e.host||b.length>1)&&(D==="."||D==="..")||D==="",E=0,O=b.length;O>=0;O--)D=b[O],D==="."?b.splice(O,1):D===".."?(b.splice(O,1),E++):E&&(b.splice(O,1),E--);if(!g&&!v)for(;E--;E)b.unshift("..");g&&b[0]!==""&&(!b[0]||b[0].charAt(0)!=="/")&&b.unshift(""),R&&b.join("/").substr(-1)!=="/"&&b.push("");var H=b[0]===""||b[0]&&b[0].charAt(0)==="/";if(x){i.hostname=i.host=H?"":b.length?b.shift():"";var A=i.host&&i.host.indexOf("@")>0?i.host.split("@"):!1;A&&(i.auth=A.shift(),i.host=i.hostname=A.shift())}return g=g||i.host&&b.length,g&&!H&&b.unshift(""),b.length?i.pathname=b.join("/"):(i.pathname=null,i.path=null),(!se.isNull(i.pathname)||!se.isNull(i.search))&&(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=e.auth||i.auth,i.slashes=i.slashes||e.slashes,i.href=i.format(),i},Lt.prototype.parseHost=function(){var e=this.host,t=vl.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var rf={parse:lo,resolve:co,resolveObject:_l,format:uo,Url:gl};const _o={parse:lo,format:uo,resolve:co};function qt(e){if(typeof e!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function pi(e){return e.split("?")[0].split("#")[0]}function Il(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function Pl(e,t,i){return e.replace(new RegExp(Il(t),"g"),i)}function Ml(e,t){let i="",s=0,r=-1,n=0,o=-1;for(let a=0;a<=e.length;++a){if(a<e.length)o=e.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(r===a-1||n===1))if(r!==a-1&&n===2){if(i.length<2||s!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){const h=i.lastIndexOf("/");if(h!==i.length-1){h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf("/")),r=a,n=0;continue}}else if(i.length===2||i.length===1){i="",s=0,r=a,n=0;continue}}t&&(i.length>0?i+="/..":i="..",s=2)}else i.length>0?i+=`/${e.slice(r+1,a)}`:i=e.slice(r+1,a),s=a-r-1;r=a,n=0}else o===46&&n!==-1?++n:n=-1}return i}const Tt={toPosix(e){return Pl(e,"\\\\","/")},isUrl(e){return/^https?:/.test(this.toPosix(e))},isDataUrl(e){return/^data:([a-z]+\\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&\',()*+;=\\-._~:@\\/?%\\s<>]*?)$/i.test(e)},hasProtocol(e){return/^[^/:]+:\\//.test(this.toPosix(e))},getProtocol(e){qt(e),e=this.toPosix(e);let t="";const i=/^file:\\/\\/\\//.exec(e),s=/^[^/:]+:\\/\\//.exec(e),r=/^[^/:]+:\\//.exec(e);if(i||s||r){const n=(i==null?void 0:i[0])||(s==null?void 0:s[0])||(r==null?void 0:r[0]);t=n,e=e.slice(n.length)}return t},toAbsolute(e,t,i){if(this.isDataUrl(e))return e;const s=pi(this.toPosix(t!=null?t:P.ADAPTER.getBaseUrl())),r=pi(this.toPosix(i!=null?i:this.rootname(s)));return qt(e),e=this.toPosix(e),e.startsWith("/")?Tt.join(r,e.slice(1)):this.isAbsolute(e)?e:this.join(s,e)},normalize(e){if(e=this.toPosix(e),qt(e),e.length===0)return".";let t="";const i=e.startsWith("/");this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));const s=e.endsWith("/");return e=Ml(e,!1),e.length>0&&s&&(e+="/"),i?`/${e}`:t+e},isAbsolute(e){return qt(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith("/")},join(...e){var i;if(e.length===0)return".";let t;for(let s=0;s<e.length;++s){const r=e[s];if(qt(r),r.length>0)if(t===void 0)t=r;else{const n=(i=e[s-1])!=null?i:"";this.extname(n)?t+=`/../${r}`:t+=`/${r}`}}return t===void 0?".":this.normalize(t)},dirname(e){if(qt(e),e.length===0)return".";e=this.toPosix(e);let t=e.charCodeAt(0);const i=t===47;let s=-1,r=!0;const n=this.getProtocol(e),o=e;e=e.slice(n.length);for(let a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),t===47){if(!r){s=a;break}}else r=!1;return s===-1?i?"/":this.isUrl(o)?n+e:n:i&&s===1?"//":n+e.slice(0,s)},rootname(e){qt(e),e=this.toPosix(e);let t="";if(e.startsWith("/")?t="/":t=this.getProtocol(e),this.isUrl(e)){const i=e.indexOf("/",t.length);i!==-1?t=e.slice(0,i):t=e,t.endsWith("/")||(t+="/")}return t},basename(e,t){qt(e),t&&qt(t),e=pi(this.toPosix(e));let i=0,s=-1,r=!0,n;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let o=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const h=e.charCodeAt(n);if(h===47){if(!r){i=n+1;break}}else a===-1&&(r=!1,a=n+1),o>=0&&(h===t.charCodeAt(o)?--o===-1&&(s=n):(o=-1,s=a))}return i===s?s=a:s===-1&&(s=e.length),e.slice(i,s)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!r){i=n+1;break}}else s===-1&&(r=!1,s=n+1);return s===-1?"":e.slice(i,s)},extname(e){qt(e),e=pi(this.toPosix(e));let t=-1,i=0,s=-1,r=!0,n=0;for(let o=e.length-1;o>=0;--o){const a=e.charCodeAt(o);if(a===47){if(!r){i=o+1;break}continue}s===-1&&(r=!1,s=o+1),a===46?t===-1?t=o:n!==1&&(n=1):t!==-1&&(n=-1)}return t===-1||s===-1||n===0||n===1&&t===s-1&&t===i+1?"":e.slice(t,s)},parse(e){qt(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;e=pi(this.toPosix(e));let i=e.charCodeAt(0);const s=this.isAbsolute(e);let r;const n="";t.root=this.rootname(e),s||this.hasProtocol(e)?r=1:r=0;let o=-1,a=0,h=-1,l=!0,c=e.length-1,u=0;for(;c>=r;--c){if(i=e.charCodeAt(c),i===47){if(!l){a=c+1;break}continue}h===-1&&(l=!1,h=c+1),i===46?o===-1?o=c:u!==1&&(u=1):o!==-1&&(u=-1)}return o===-1||h===-1||u===0||u===1&&o===h-1&&o===a+1?h!==-1&&(a===0&&s?t.base=t.name=e.slice(1,h):t.base=t.name=e.slice(a,h)):(a===0&&s?(t.name=e.slice(1,o),t.base=e.slice(1,h)):(t.name=e.slice(a,o),t.base=e.slice(a,h)),t.ext=e.slice(o,h)),t.dir=this.dirname(e),n&&(t.dir=n+t.dir),t},sep:"/",delimiter:":"},go={};function z(e,t,i=3){if(go[t])return;let s=new Error().stack;typeof s=="undefined"?console.warn("PixiJS Deprecation Warning: ",`${t}\nDeprecated since v${e}`):(s=s.split(`\n`).splice(i).join(`\n`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t}\nDeprecated since v${e}`),console.warn(s),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t}\nDeprecated since v${e}`),console.warn(s))),go[t]=!0}function Bl(){z("7.0.0","skipHello is deprecated, please use settings.RENDER_OPTIONS.hello")}function Dl(){z("7.0.0",`sayHello is deprecated, please use Renderer\'s "hello" option`)}let pr;function yo(){return typeof pr=="undefined"&&(pr=function(){var i;const t={stencil:!0,failIfMajorPerformanceCaveat:P.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!P.ADAPTER.getWebGLRenderingContext())return!1;const s=P.ADAPTER.createCanvas();let r=s.getContext("webgl",t)||s.getContext("experimental-webgl",t);const n=!!((i=r==null?void 0:r.getContextAttributes())!=null&&i.stencil);if(r){const o=r.getExtension("WEBGL_lose_context");o&&o.loseContext()}return r=null,n}catch(s){return!1}}()),pr}var Fl={grad:.9,turn:360,rad:360/(2*Math.PI)},ue=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},mt=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=Math.pow(10,t)),Math.round(i*e)/i+0},Ot=function(e,t,i){return t===void 0&&(t=0),i===void 0&&(i=1),e>i?i:e>t?e:t},vo=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},xo=function(e){return{r:Ot(e.r,0,255),g:Ot(e.g,0,255),b:Ot(e.b,0,255),a:Ot(e.a)}},mr=function(e){return{r:mt(e.r),g:mt(e.g),b:mt(e.b),a:mt(e.a,3)}},Nl=/^#([0-9a-f]{3,8})$/i,as=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},bo=function(e){var t=e.r,i=e.g,s=e.b,r=e.a,n=Math.max(t,i,s),o=n-Math.min(t,i,s),a=o?n===t?(i-s)/o:n===i?2+(s-t)/o:4+(t-i)/o:0;return{h:60*(a<0?a+6:a),s:n?o/n*100:0,v:n/255*100,a:r}},To=function(e){var t=e.h,i=e.s,s=e.v,r=e.a;t=t/360*6,i/=100,s/=100;var n=Math.floor(t),o=s*(1-i),a=s*(1-(t-n)*i),h=s*(1-(1-t+n)*i),l=n%6;return{r:255*[s,a,o,o,h,s][l],g:255*[h,s,s,a,o,o][l],b:255*[o,o,h,s,s,a][l],a:r}},Eo=function(e){return{h:vo(e.h),s:Ot(e.s,0,100),l:Ot(e.l,0,100),a:Ot(e.a)}},wo=function(e){return{h:mt(e.h),s:mt(e.s),l:mt(e.l),a:mt(e.a,3)}},So=function(e){return To((i=(t=e).s,{h:t.h,s:(i*=((s=t.l)<50?s:100-s)/100)>0?2*i/(s+i)*100:0,v:s+i,a:t.a}));var t,i,s},mi=function(e){return{h:(t=bo(e)).h,s:(r=(200-(i=t.s))*(s=t.v)/100)>0&&r<200?i*s/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,i,s,r},Ll=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,Ol=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,Ul=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,kl=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,_r={string:[[function(e){var t=Nl.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?mt(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?mt(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Ul.exec(e)||kl.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:xo({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Ll.exec(e)||Ol.exec(e);if(!t)return null;var i,s,r=Eo({h:(i=t[1],s=t[2],s===void 0&&(s="deg"),Number(i)*(Fl[s]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return So(r)},"hsl"]],object:[[function(e){var t=e.r,i=e.g,s=e.b,r=e.a,n=r===void 0?1:r;return ue(t)&&ue(i)&&ue(s)?xo({r:Number(t),g:Number(i),b:Number(s),a:Number(n)}):null},"rgb"],[function(e){var t=e.h,i=e.s,s=e.l,r=e.a,n=r===void 0?1:r;if(!ue(t)||!ue(i)||!ue(s))return null;var o=Eo({h:Number(t),s:Number(i),l:Number(s),a:Number(n)});return So(o)},"hsl"],[function(e){var t=e.h,i=e.s,s=e.v,r=e.a,n=r===void 0?1:r;if(!ue(t)||!ue(i)||!ue(s))return null;var o=function(a){return{h:vo(a.h),s:Ot(a.s,0,100),v:Ot(a.v,0,100),a:Ot(a.a)}}({h:Number(t),s:Number(i),v:Number(s),a:Number(n)});return To(o)},"hsv"]]},Ao=function(e,t){for(var i=0;i<t.length;i++){var s=t[i][0](e);if(s)return[s,t[i][1]]}return[null,void 0]},Ro=function(e){return typeof e=="string"?Ao(e.trim(),_r.string):typeof e=="object"&&e!==null?Ao(e,_r.object):[null,void 0]},nf=function(e){return Ro(e)[1]},gr=function(e,t){var i=mi(e);return{h:i.h,s:Ot(i.s+100*t,0,100),l:i.l,a:i.a}},yr=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Co=function(e,t){var i=mi(e);return{h:i.h,s:i.s,l:Ot(i.l+100*t,0,100),a:i.a}},hs=function(){function e(t){this.parsed=Ro(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return mt(yr(this.rgba),2)},e.prototype.isDark=function(){return yr(this.rgba)<.5},e.prototype.isLight=function(){return yr(this.rgba)>=.5},e.prototype.toHex=function(){return t=mr(this.rgba),i=t.r,s=t.g,r=t.b,o=(n=t.a)<1?as(mt(255*n)):"","#"+as(i)+as(s)+as(r)+o;var t,i,s,r,n,o},e.prototype.toRgb=function(){return mr(this.rgba)},e.prototype.toRgbString=function(){return t=mr(this.rgba),i=t.r,s=t.g,r=t.b,(n=t.a)<1?"rgba("+i+", "+s+", "+r+", "+n+")":"rgb("+i+", "+s+", "+r+")";var t,i,s,r,n},e.prototype.toHsl=function(){return wo(mi(this.rgba))},e.prototype.toHslString=function(){return t=wo(mi(this.rgba)),i=t.h,s=t.s,r=t.l,(n=t.a)<1?"hsla("+i+", "+s+"%, "+r+"%, "+n+")":"hsl("+i+", "+s+"%, "+r+"%)";var t,i,s,r,n},e.prototype.toHsv=function(){return t=bo(this.rgba),{h:mt(t.h),s:mt(t.s),v:mt(t.v),a:mt(t.a,3)};var t},e.prototype.invert=function(){return re({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),re(gr(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),re(gr(this.rgba,-t))},e.prototype.grayscale=function(){return re(gr(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),re(Co(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),re(Co(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?re({r:(i=this.rgba).r,g:i.g,b:i.b,a:t}):mt(this.rgba.a,3);var i},e.prototype.hue=function(t){var i=mi(this.rgba);return typeof t=="number"?re({h:t,s:i.s,l:i.l,a:i.a}):mt(i.h)},e.prototype.isEqual=function(t){return this.toHex()===re(t).toHex()},e}(),re=function(e){return e instanceof hs?e:new hs(e)},Io=[],Gl=function(e){e.forEach(function(t){Io.indexOf(t)<0&&(t(hs,_r),Io.push(t))})},of=function(){return new hs({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};function Hl(e,t){var i={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},s={};for(var r in i)s[i[r]]=r;var n={};e.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,h,l=s[this.toHex()];if(l)return l;if(o!=null&&o.closest){var c=this.toRgb(),u=1/0,d="black";if(!n.length)for(var f in i)n[f]=new e(i[f]).toRgb();for(var p in i){var _=(a=c,h=n[p],Math.pow(a.r-h.r,2)+Math.pow(a.g-h.g,2)+Math.pow(a.b-h.b,2));_<u&&(u=_,d=p)}return d}},t.string.push([function(o){var a=o.toLowerCase(),h=a==="transparent"?"#0000":i[a];return h?new e(h).toRgb():null},"name"])}Gl([Hl]);const $e=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof $e)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?bt({},e):e}isSourceEqual(e,t){const i=typeof e;if(i!==typeof t)return!1;if(i==="number"||i==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((r,n)=>r===t[n]);if(e!==null&&t!==null){const r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(o=>e[o]===t[o])}return e===t}toRgba(){const[e,t,i,s]=this._components;return{r:e,g:t,b:i,a:s}}toRgb(){const[e,t,i]=this._components;return{r:e,g:t,b:i}}toRgbaString(){const[e,t,i]=this.toUint8RgbArray();return`rgba(${e},${t},${i},${this.alpha})`}toUint8RgbArray(e){const[t,i,s]=this._components;return e=e!=null?e:[],e[0]=Math.round(t*255),e[1]=Math.round(i*255),e[2]=Math.round(s*255),e}toRgbArray(e){e=e!=null?e:[];const[t,i,s]=this._components;return e[0]=t,e[1]=i,e[2]=s,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,i,s,r]=$e.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=i,this._components[2]*=s,this._components[3]*=r,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let i=this._int>>16&255,s=this._int>>8&255,r=this._int&255;return t&&(i=i*e+.5|0,s=s*e+.5|0,r=r*e+.5|0),(e*255<<24)+(i<<16)+(s<<8)+r}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,i,s]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(i*e)/e,this._components[2]=Math.round(s*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e!=null?e:[];const[t,i,s,r]=this._components;return e[0]=t,e[1]=i,e[2]=s,e[3]=r,e}normalize(e){let t,i,s,r;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const n=e;t=(n>>16&255)/255,i=(n>>8&255)/255,s=(n&255)/255,r=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,i,s,r=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,i,s,r=255]=e,t/=255,i/=255,s/=255,r/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const o=$e.HEX_PATTERN.exec(e);o&&(e=`#${o[2]}`)}const n=re(e);n.isValid()&&({r:t,g:i,b:s,a:r}=n.rgba,t/=255,i/=255,s/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=i,this._components[2]=s,this._components[3]=r,this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,i]=this._components;this._int=(e*255<<16)+(t*255<<8)+(i*255|0)}_clamp(e,t=0,i=1){return typeof e=="number"?Math.min(Math.max(e,t),i):(e.forEach((s,r)=>{e[r]=Math.min(Math.max(s,t),i)}),e)}};let j=$e;j.shared=new $e,j.temp=new $e,j.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function Xl(e,t=[]){return z("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),j.shared.setValue(e).toRgbArray(t)}function Po(e){return z("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),j.shared.setValue(e).toHex()}function Vl(e){return z("7.2.0","utils.string2hex is deprecated, use Color#toNumber instead"),j.shared.setValue(e).toNumber()}function Mo(e){return z("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),j.shared.setValue(e).toNumber()}function zl(){const e=[],t=[];for(let s=0;s<32;s++)e[s]=s,t[s]=s;e[G.NORMAL_NPM]=G.NORMAL,e[G.ADD_NPM]=G.ADD,e[G.SCREEN_NPM]=G.SCREEN,t[G.NORMAL]=G.NORMAL_NPM,t[G.ADD]=G.ADD_NPM,t[G.SCREEN]=G.SCREEN_NPM;const i=[];return i.push(t),i.push(e),i}const vr=zl();function xr(e,t){return vr[t?1:0][e]}function Wl(e,t,i,s=!0){return z("7.2.0","utils.premultiplyRgba has moved to Color.premultiply"),j.shared.setValue(e).premultiply(t,s).toArray(i!=null?i:new Float32Array(4))}function $l(e,t){return z("7.2.0","utils.premultiplyTint has moved to Color.toPremultiplied"),j.shared.setValue(e).toPremultiplied(t)}function jl(e,t,i,s=!0){return z("7.2.0","utils.premultiplyTintToRgba has moved to Color.premultiply"),j.shared.setValue(e).premultiply(t,s).toArray(i!=null?i:new Float32Array(4))}const Bo=/^\\s*data:(?:([\\w-]+)\\/([\\w+.-]+))?(?:;charset=([\\w-]+))?(?:;(base64))?,(.*)/i;function Do(e,t=null){const i=e*6;if(t=t||new Uint16Array(i),t.length!==i)throw new Error(`Out buffer length is incorrect, got ${t.length} and expected ${i}`);for(let s=0,r=0;s<i;s+=6,r+=4)t[s+0]=r+0,t[s+1]=r+1,t[s+2]=r+2,t[s+3]=r+0,t[s+4]=r+2,t[s+5]=r+3;return t}function ls(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}const Yl={Float32Array,Uint32Array,Int32Array,Uint8Array};function ql(e,t){let i=0,s=0;const r={};for(let h=0;h<e.length;h++)s+=t[h],i+=e[h].length;const n=new ArrayBuffer(i*4);let o=null,a=0;for(let h=0;h<e.length;h++){const l=t[h],c=e[h],u=ls(c);r[u]||(r[u]=new Yl[u](n)),o=r[u];for(let d=0;d<c.length;d++){const f=(d/l|0)*s+a,p=d%l;o[f+p]=c[d]}a+=l}return new Float32Array(n)}function _i(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function br(e){return!(e&e-1)&&!!e}function Tr(e){let t=(e>65535?1:0)<<4;e>>>=t;let i=(e>255?1:0)<<3;return e>>>=i,t|=i,i=(e>15?1:0)<<2,e>>>=i,t|=i,i=(e>3?1:0)<<1,e>>>=i,t|=i,t|e>>1}function Ie(e,t,i){const s=e.length;let r;if(t>=s||i===0)return;i=t+i>s?s-t:i;const n=s-i;for(r=t;r<n;++r)e[r]=e[r+i];e.length=n}function de(e){return e===0?0:e<0?-1:1}let Kl=0;function xe(){return++Kl}const Fo=class{constructor(e,t,i,s){this.left=e,this.top=t,this.right=i,this.bottom=s}get width(){return this.right-this.left}get height(){return this.bottom-this.top}isEmpty(){return this.left===this.right||this.top===this.bottom}};let cs=Fo;cs.EMPTY=new Fo(0,0,0,0);const Er={},St=Object.create(null),Mt=Object.create(null);function Zl(){let e;for(e in St)St[e].destroy();for(e in Mt)Mt[e].destroy()}function Jl(){let e;for(e in St)delete St[e];for(e in Mt)delete Mt[e]}class No{constructor(t,i,s){this._canvas=P.ADAPTER.createCanvas(),this._context=this._canvas.getContext("2d"),this.resolution=s||P.RESOLUTION,this.resize(t,i)}clear(){this._checkDestroyed(),this._context.setTransform(1,0,0,1,0,0),this._context.clearRect(0,0,this._canvas.width,this._canvas.height)}resize(t,i){this._checkDestroyed(),this._canvas.width=Math.round(t*this.resolution),this._canvas.height=Math.round(i*this.resolution)}destroy(){this._context=null,this._canvas=null}get width(){return this._checkDestroyed(),this._canvas.width}set width(t){this._checkDestroyed(),this._canvas.width=Math.round(t)}get height(){return this._checkDestroyed(),this._canvas.height}set height(t){this._checkDestroyed(),this._canvas.height=Math.round(t)}get canvas(){return this._checkDestroyed(),this._canvas}get context(){return this._checkDestroyed(),this._context}_checkDestroyed(){if(this._canvas===null)throw new TypeError("The CanvasRenderTarget has already been destroyed")}}function Lo(e,t,i){for(let s=0,r=4*i*t;s<t;++s,r+=4)if(e[r+3]!==0)return!1;return!0}function Oo(e,t,i,s,r){const n=4*t;for(let o=s,a=s*n+4*i;o<=r;++o,a+=n)if(e[a+3]!==0)return!1;return!0}function Uo(e){const{width:t,height:i}=e,s=e.getContext("2d",{willReadFrequently:!0});if(s===null)throw new TypeError("Failed to get canvas 2D context");const n=s.getImageData(0,0,t,i).data;let o=0,a=0,h=t-1,l=i-1;for(;a<i&&Lo(n,t,a);)++a;if(a===i)return cs.EMPTY;for(;Lo(n,t,l);)--l;for(;Oo(n,t,o,a,l);)++o;for(;Oo(n,t,h,a,l);)--h;return++h,++l,new cs(o,a,h,l)}function ko(e){const t=Uo(e),{width:i,height:s}=t;let r=null;if(!t.isEmpty()){const n=e.getContext("2d");if(n===null)throw new TypeError("Failed to get canvas 2D context");r=n.getImageData(t.left,t.top,i,s)}return{width:i,height:s,data:r}}function Ql(e){const t=Bo.exec(e);if(t)return{mediaType:t[1]?t[1].toLowerCase():void 0,subType:t[2]?t[2].toLowerCase():void 0,charset:t[3]?t[3].toLowerCase():void 0,encoding:t[4]?t[4].toLowerCase():void 0,data:t[5]}}let us;function Go(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,us||(us=document.createElement("a")),us.href=e;const i=_o.parse(us.href),s=!i.port&&t.port===""||i.port===t.port;return i.hostname!==t.hostname||!s||i.protocol!==t.protocol?"anonymous":""}function fe(e,t=1){var s;const i=(s=P.RETINA_PREFIX)==null?void 0:s.exec(e);return i?parseFloat(i[1]):t}var tc={__proto__:null,isMobile:Yt,EventEmitter:Ve,earcut:ar,url:_o,path:Tt,sayHello:Dl,skipHello:Bl,isWebGLSupported:yo,hex2rgb:Xl,hex2string:Po,rgb2hex:Mo,string2hex:Vl,correctBlendMode:xr,premultiplyBlendMode:vr,premultiplyRgba:Wl,premultiplyTint:$l,premultiplyTintToRgba:jl,DATA_URI:Bo,createIndicesForQuads:Do,getBufferType:ls,interleaveTypedArrays:ql,isPow2:br,log2:Tr,nextPow2:_i,removeItems:Ie,sign:de,uid:xe,deprecation:z,BoundingBox:cs,BaseTextureCache:Mt,ProgramCache:Er,TextureCache:St,clearTextureCache:Jl,destroyTextureCache:Zl,CanvasRenderTarget:No,getCanvasBoundingBox:Uo,trimCanvas:ko,decomposeDataUri:Ql,determineCrossOrigin:Go,getResolutionOfUrl:fe},M=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(M||{});const wr=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");const t=typeof e.extension!="object"?{type:e.extension}:e.extension;e=Qi(bt({},t),{ref:e})}if(typeof e=="object")e=bt({},e);else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},Ho=(e,t)=>{var i;return(i=wr(e).priority)!=null?i:t},U={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(wr).forEach(t=>{t.type.forEach(i=>{var s,r;return(r=(s=this._removeHandlers)[i])==null?void 0:r.call(s,t)})}),this},add(...e){return e.map(wr).forEach(t=>{t.type.forEach(i=>{const s=this._addHandlers,r=this._queue;s[i]?s[i](t):(r[i]=r[i]||[],r[i].push(t))})}),this},handle(e,t,i){const s=this._addHandlers,r=this._removeHandlers;if(s[e]||r[e])throw new Error(`Extension type ${e} already has a handler`);s[e]=t,r[e]=i;const n=this._queue;return n[e]&&(n[e].forEach(o=>t(o)),delete n[e]),this},handleByMap(e,t){return this.handle(e,i=>{t[i.name]=i.ref},i=>{delete t[i.name]})},handleByList(e,t,i=-1){return this.handle(e,s=>{t.includes(s.ref)||(t.push(s.ref),t.sort((r,n)=>Ho(n,i)-Ho(r,i)))},s=>{const r=t.indexOf(s.ref);r!==-1&&t.splice(r,1)})}};class ds{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn\'t a valid view type`)}}}const ec=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`\n`);function ic(e){let t="";for(let i=0;i<e;++i)i>0&&(t+=`\nelse `),i<e-1&&(t+=`if(test == ${i}.0){}`);return t}function Xo(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const i=t.createShader(t.FRAGMENT_SHADER);for(;;){const s=ec.replace(/%forloop%/gi,ic(e));if(t.shaderSource(i,s),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Sr=0,Ar=1,Rr=2,Cr=3,Ir=4,Pr=5;class ne{constructor(){this.data=0,this.blendMode=G.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Sr)}set blend(t){!!(this.data&1<<Sr)!==t&&(this.data^=1<<Sr)}get offsets(){return!!(this.data&1<<Ar)}set offsets(t){!!(this.data&1<<Ar)!==t&&(this.data^=1<<Ar)}get culling(){return!!(this.data&1<<Rr)}set culling(t){!!(this.data&1<<Rr)!==t&&(this.data^=1<<Rr)}get depthTest(){return!!(this.data&1<<Cr)}set depthTest(t){!!(this.data&1<<Cr)!==t&&(this.data^=1<<Cr)}get depthMask(){return!!(this.data&1<<Pr)}set depthMask(t){!!(this.data&1<<Pr)!==t&&(this.data^=1<<Pr)}get clockwiseFrontFace(){return!!(this.data&1<<Ir)}set clockwiseFrontFace(t){!!(this.data&1<<Ir)!==t&&(this.data^=1<<Ir)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==G.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new ne;return t.depthTest=!1,t.blend=!0,t}}const fs=[];function Mr(e,t){if(!e)return null;let i="";if(typeof e=="string"){const s=/\\.(\\w{3,4})(?:$|\\?|#)/i.exec(e);s&&(i=s[1].toLowerCase())}for(let s=fs.length-1;s>=0;--s){const r=fs[s];if(r.test&&r.test(e,i))return new r(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class Bt{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,i,s,r,n,o,a,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,d=c.length;u<d;u++)c[u][l](t,i,s,r,n,o,a,h);return c===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const i=this.items.indexOf(t);return i!==-1&&(this.ensureNonAliasedItems(),this.items.splice(i,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(Bt.prototype,{dispatch:{value:Bt.prototype.emit},run:{value:Bt.prototype.emit}});class je{constructor(t=0,i=0){this._width=t,this._height=i,this.destroyed=!1,this.internal=!1,this.onResize=new Bt("setRealSize"),this.onUpdate=new Bt("update"),this.onError=new Bt("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,i){(t!==this._width||i!==this._height)&&(this._width=t,this._height=i,this.onResize.emit(t,i))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,i,s){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,i){return!1}}class Ye extends je{constructor(t,i){const{width:s,height:r}=i||{};if(!s||!r)throw new Error("BufferResource width or height invalid");super(s,r),this.data=t}upload(t,i,s){const r=t.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.alphaMode===Nt.UNPACK);const n=i.realWidth,o=i.realHeight;return s.width===n&&s.height===o?r.texSubImage2D(i.target,0,0,0,n,o,i.format,s.type,this.data):(s.width=n,s.height=o,r.texImage2D(i.target,0,s.internalFormat,n,o,0,i.format,s.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const sc={scaleMode:ee.NEAREST,format:C.RGBA,alphaMode:Nt.NPM},qe=class extends Ve{constructor(e=null,t=null){super(),t=Object.assign({},qe.defaultOptions,t);const{alphaMode:i,mipmap:s,anisotropicLevel:r,scaleMode:n,width:o,height:a,wrapMode:h,format:l,type:c,target:u,resolution:d,resourceOptions:f}=t;e&&!(e instanceof je)&&(e=Mr(e,f),e.internal=!0),this.resolution=d||P.RESOLUTION,this.width=Math.round((o||0)*this.resolution)/this.resolution,this.height=Math.round((a||0)*this.resolution)/this.resolution,this._mipmap=s,this.anisotropicLevel=r,this._wrapMode=h,this._scaleMode=n,this.format=l,this.type=c,this.target=u,this.alphaMode=i,this.uid=xe(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=o>0&&a>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let i;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,i=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,i=!0),i&&this.dirtyStyleId++,this}setSize(e,t,i){return i=i||this.resolution,this.setRealSize(e*i,t*i,i)}setRealSize(e,t,i){return this.resolution=i||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=br(this.realWidth)&&br(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Mt[this.cacheId],delete St[this.cacheId],this.cacheId=null),this.dispose(),qe.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,i=P.STRICT_TEXTURE_CACHE){const s=typeof e=="string";let r=null;if(s)r=e;else{if(!e._pixiId){const o=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${o}_${xe()}`}r=e._pixiId}let n=Mt[r];if(s&&i&&!n)throw new Error(`The cacheId "${r}" does not exist in BaseTextureCache.`);return n||(n=new qe(e,t),n.cacheId=r,qe.addToCache(n,r)),n}static fromBuffer(e,t,i,s){e=e||new Float32Array(t*i*4);const r=new Ye(e,{width:t,height:i}),n=e instanceof Float32Array?k.FLOAT:k.UNSIGNED_BYTE;return new qe(r,Object.assign({},sc,{type:n},s))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),Mt[t]&&Mt[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),Mt[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=Mt[e];if(t){const i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete Mt[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete Mt[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let V=qe;V.defaultOptions={mipmap:Wt.POW2,anisotropicLevel:0,scaleMode:ee.LINEAR,wrapMode:ie.CLAMP,alphaMode:Nt.UNPACK,target:Re.TEXTURE_2D,format:C.RGBA,type:k.UNSIGNED_BYTE},V._globalBatch=0;class ps{constructor(){this.texArray=null,this.blend=0,this.type=zt.TRIANGLES,this.start=0,this.size=0,this.data=null}}let rc=0;class ot{constructor(t,i=!0,s=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=s,this.static=i,this.id=rc++,this.disposeRunner=new Bt("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?jt.ELEMENT_ARRAY_BUFFER:jt.ARRAY_BUFFER}get index(){return this.type===jt.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new ot(t)}}class gi{constructor(t,i=0,s=!1,r=k.FLOAT,n,o,a,h=1){this.buffer=t,this.size=i,this.normalized=s,this.type=r,this.stride=n,this.start=o,this.instance=a,this.divisor=h}destroy(){this.buffer=null}static from(t,i,s,r,n){return new gi(t,i,s,r,n)}}const nc={Float32Array,Uint32Array,Int32Array,Uint8Array};function oc(e,t){let i=0,s=0;const r={};for(let h=0;h<e.length;h++)s+=t[h],i+=e[h].length;const n=new ArrayBuffer(i*4);let o=null,a=0;for(let h=0;h<e.length;h++){const l=t[h],c=e[h],u=ls(c);r[u]||(r[u]=new nc[u](n)),o=r[u];for(let d=0;d<c.length;d++){const f=(d/l|0)*s+a,p=d%l;o[f+p]=c[d]}a+=l}return new Float32Array(n)}const Vo={5126:4,5123:2,5121:1};let ac=0;const hc={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class pe{constructor(t=[],i={}){this.buffers=t,this.indexBuffer=null,this.attributes=i,this.glVertexArrayObjects={},this.id=ac++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new Bt("disposeGeometry"),this.refCount=0}addAttribute(t,i,s=0,r=!1,n,o,a,h=!1){if(!i)throw new Error("You must pass a buffer when creating an attribute");i instanceof ot||(i instanceof Array&&(i=new Float32Array(i)),i=new ot(i));const l=t.split("|");if(l.length>1){for(let u=0;u<l.length;u++)this.addAttribute(l[u],i,s,r,n);return this}let c=this.buffers.indexOf(i);return c===-1&&(this.buffers.push(i),c=this.buffers.length-1),this.attributes[t]=new gi(c,s,r,n,o,a,h),this.instanced=this.instanced||h,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof ot||(t instanceof Array&&(t=new Uint16Array(t)),t=new ot(t)),t.type=jt.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],i=[],s=new ot;let r;for(r in this.attributes){const n=this.attributes[r],o=this.buffers[n.buffer];t.push(o.data),i.push(n.size*Vo[n.type]/4),n.buffer=0}for(s.data=oc(t,i),r=0;r<this.buffers.length;r++)this.buffers[r]!==this.indexBuffer&&this.buffers[r].destroy();return this.buffers=[s],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const i=this.attributes[t];return this.buffers[i.buffer].data.length/(i.stride/4||i.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const t=new pe;for(let i=0;i<this.buffers.length;i++)t.buffers[i]=new ot(this.buffers[i].data.slice(0));for(const i in this.attributes){const s=this.attributes[i];t.attributes[i]=new gi(s.buffer,s.size,s.normalized,s.type,s.stride,s.start,s.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=jt.ELEMENT_ARRAY_BUFFER),t}static merge(t){const i=new pe,s=[],r=[],n=[];let o;for(let a=0;a<t.length;a++){o=t[a];for(let h=0;h<o.buffers.length;h++)r[h]=r[h]||0,r[h]+=o.buffers[h].data.length,n[h]=0}for(let a=0;a<o.buffers.length;a++)s[a]=new hc[ls(o.buffers[a].data)](r[a]),i.buffers[a]=new ot(s[a]);for(let a=0;a<t.length;a++){o=t[a];for(let h=0;h<o.buffers.length;h++)s[h].set(o.buffers[h].data,n[h]),n[h]+=o.buffers[h].data.length}if(i.attributes=o.attributes,o.indexBuffer){i.indexBuffer=i.buffers[o.buffers.indexOf(o.indexBuffer)],i.indexBuffer.type=jt.ELEMENT_ARRAY_BUFFER;let a=0,h=0,l=0,c=0;for(let u=0;u<o.buffers.length;u++)if(o.buffers[u]!==o.indexBuffer){c=u;break}for(const u in o.attributes){const d=o.attributes[u];(d.buffer|0)===c&&(h+=d.size*Vo[d.type]/4)}for(let u=0;u<t.length;u++){const d=t[u].indexBuffer.data;for(let f=0;f<d.length;f++)i.indexBuffer.data[f+l]+=a;a+=t[u].buffers[c].data.length/h,l+=d.length}}return i}}class Br extends pe{constructor(t=!1){super(),this._buffer=new ot(null,t,!1),this._indexBuffer=new ot(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,k.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,k.FLOAT).addAttribute("aColor",this._buffer,4,!0,k.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,k.FLOAT).addIndex(this._indexBuffer)}}const yi=Math.PI*2,zo=180/Math.PI,Wo=Math.PI/180;var _t=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(_t||{});class Y{constructor(t=0,i=0){this.x=0,this.y=0,this.x=t,this.y=i}clone(){return new Y(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,i=t){return this.x=t,this.y=i,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const ms=[new Y,new Y,new Y,new Y];class ${constructor(t=0,i=0,s=0,r=0){this.x=Number(t),this.y=Number(i),this.width=Number(s),this.height=Number(r),this.type=_t.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new $(0,0,0,0)}clone(){return new $(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,i){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&i>=this.y&&i<this.y+this.height}intersects(t,i){if(!i){const E=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=E)return!1;const H=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>H}const s=this.left,r=this.right,n=this.top,o=this.bottom;if(r<=s||o<=n)return!1;const a=ms[0].set(t.left,t.top),h=ms[1].set(t.left,t.bottom),l=ms[2].set(t.right,t.top),c=ms[3].set(t.right,t.bottom);if(l.x<=a.x||h.y<=a.y)return!1;const u=Math.sign(i.a*i.d-i.b*i.c);if(u===0||(i.apply(a,a),i.apply(h,h),i.apply(l,l),i.apply(c,c),Math.max(a.x,h.x,l.x,c.x)<=s||Math.min(a.x,h.x,l.x,c.x)>=r||Math.max(a.y,h.y,l.y,c.y)<=n||Math.min(a.y,h.y,l.y,c.y)>=o))return!1;const d=u*(h.y-a.y),f=u*(a.x-h.x),p=d*s+f*n,_=d*r+f*n,g=d*s+f*o,v=d*r+f*o;if(Math.max(p,_,g,v)<=d*a.x+f*a.y||Math.min(p,_,g,v)>=d*c.x+f*c.y)return!1;const b=u*(a.y-l.y),y=u*(l.x-a.x),x=b*s+y*n,A=b*r+y*n,D=b*s+y*o,R=b*r+y*o;return!(Math.max(x,A,D,R)<=b*a.x+y*a.y||Math.min(x,A,D,R)>=b*c.x+y*c.y)}pad(t=0,i=t){return this.x-=t,this.y-=i,this.width+=t*2,this.height+=i*2,this}fit(t){const i=Math.max(this.x,t.x),s=Math.min(this.x+this.width,t.x+t.width),r=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=i,this.width=Math.max(s-i,0),this.y=r,this.height=Math.max(n-r,0),this}ceil(t=1,i=.001){const s=Math.ceil((this.x+this.width-i)*t)/t,r=Math.ceil((this.y+this.height-i)*t)/t;return this.x=Math.floor((this.x+i)*t)/t,this.y=Math.floor((this.y+i)*t)/t,this.width=s-this.x,this.height=r-this.y,this}enlarge(t){const i=Math.min(this.x,t.x),s=Math.max(this.x+this.width,t.x+t.width),r=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=i,this.width=s-i,this.y=r,this.height=n-r,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class _s{constructor(t=0,i=0,s=0){this.x=t,this.y=i,this.radius=s,this.type=_t.CIRC}clone(){return new _s(this.x,this.y,this.radius)}contains(t,i){if(this.radius<=0)return!1;const s=this.radius*this.radius;let r=this.x-t,n=this.y-i;return r*=r,n*=n,r+n<=s}getBounds(){return new $(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class gs{constructor(t=0,i=0,s=0,r=0){this.x=t,this.y=i,this.width=s,this.height=r,this.type=_t.ELIP}clone(){return new gs(this.x,this.y,this.width,this.height)}contains(t,i){if(this.width<=0||this.height<=0)return!1;let s=(t-this.x)/this.width,r=(i-this.y)/this.height;return s*=s,r*=r,s+r<=1}getBounds(){return new $(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Pe{constructor(...t){let i=Array.isArray(t[0])?t[0]:t;if(typeof i[0]!="number"){const s=[];for(let r=0,n=i.length;r<n;r++)s.push(i[r].x,i[r].y);i=s}this.points=i,this.type=_t.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),i=new Pe(t);return i.closeStroke=this.closeStroke,i}contains(t,i){let s=!1;const r=this.points.length/2;for(let n=0,o=r-1;n<r;o=n++){const a=this.points[n*2],h=this.points[n*2+1],l=this.points[o*2],c=this.points[o*2+1];h>i!=c>i&&t<(l-a)*((i-h)/(c-h))+a&&(s=!s)}return s}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,i)=>`${t}, ${i}`,"")}]`}}class ys{constructor(t=0,i=0,s=0,r=0,n=20){this.x=t,this.y=i,this.width=s,this.height=r,this.radius=n,this.type=_t.RREC}clone(){return new ys(this.x,this.y,this.width,this.height,this.radius)}contains(t,i){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&i>=this.y&&i<=this.y+this.height){const s=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(i>=this.y+s&&i<=this.y+this.height-s||t>=this.x+s&&t<=this.x+this.width-s)return!0;let r=t-(this.x+s),n=i-(this.y+s);const o=s*s;if(r*r+n*n<=o||(r=t-(this.x+this.width-s),r*r+n*n<=o)||(n=i-(this.y+this.height-s),r*r+n*n<=o)||(r=t-(this.x+s),r*r+n*n<=o))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}class tt{constructor(t=1,i=0,s=0,r=1,n=0,o=0){this.array=null,this.a=t,this.b=i,this.c=s,this.d=r,this.tx=n,this.ty=o}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,i,s,r,n,o){return this.a=t,this.b=i,this.c=s,this.d=r,this.tx=n,this.ty=o,this}toArray(t,i){this.array||(this.array=new Float32Array(9));const s=i||this.array;return t?(s[0]=this.a,s[1]=this.b,s[2]=0,s[3]=this.c,s[4]=this.d,s[5]=0,s[6]=this.tx,s[7]=this.ty,s[8]=1):(s[0]=this.a,s[1]=this.c,s[2]=this.tx,s[3]=this.b,s[4]=this.d,s[5]=this.ty,s[6]=0,s[7]=0,s[8]=1),s}apply(t,i){i=i||new Y;const s=t.x,r=t.y;return i.x=this.a*s+this.c*r+this.tx,i.y=this.b*s+this.d*r+this.ty,i}applyInverse(t,i){i=i||new Y;const s=1/(this.a*this.d+this.c*-this.b),r=t.x,n=t.y;return i.x=this.d*s*r+-this.c*s*n+(this.ty*this.c-this.tx*this.d)*s,i.y=this.a*s*n+-this.b*s*r+(-this.ty*this.a+this.tx*this.b)*s,i}translate(t,i){return this.tx+=t,this.ty+=i,this}scale(t,i){return this.a*=t,this.d*=i,this.c*=t,this.b*=i,this.tx*=t,this.ty*=i,this}rotate(t){const i=Math.cos(t),s=Math.sin(t),r=this.a,n=this.c,o=this.tx;return this.a=r*i-this.b*s,this.b=r*s+this.b*i,this.c=n*i-this.d*s,this.d=n*s+this.d*i,this.tx=o*i-this.ty*s,this.ty=o*s+this.ty*i,this}append(t){const i=this.a,s=this.b,r=this.c,n=this.d;return this.a=t.a*i+t.b*r,this.b=t.a*s+t.b*n,this.c=t.c*i+t.d*r,this.d=t.c*s+t.d*n,this.tx=t.tx*i+t.ty*r+this.tx,this.ty=t.tx*s+t.ty*n+this.ty,this}setTransform(t,i,s,r,n,o,a,h,l){return this.a=Math.cos(a+l)*n,this.b=Math.sin(a+l)*n,this.c=-Math.sin(a-h)*o,this.d=Math.cos(a-h)*o,this.tx=t-(s*this.a+r*this.c),this.ty=i-(s*this.b+r*this.d),this}prepend(t){const i=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const s=this.a,r=this.c;this.a=s*t.a+this.b*t.c,this.b=s*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=i*t.a+this.ty*t.c+t.tx,this.ty=i*t.b+this.ty*t.d+t.ty,this}decompose(t){const i=this.a,s=this.b,r=this.c,n=this.d,o=t.pivot,a=-Math.atan2(-r,n),h=Math.atan2(s,i),l=Math.abs(a+h);return l<1e-5||Math.abs(yi-l)<1e-5?(t.rotation=h,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=h),t.scale.x=Math.sqrt(i*i+s*s),t.scale.y=Math.sqrt(r*r+n*n),t.position.x=this.tx+(o.x*i+o.y*r),t.position.y=this.ty+(o.x*s+o.y*n),t}invert(){const t=this.a,i=this.b,s=this.c,r=this.d,n=this.tx,o=t*r-i*s;return this.a=r/o,this.b=-i/o,this.c=-s/o,this.d=t/o,this.tx=(s*this.ty-r*n)/o,this.ty=-(t*this.ty-i*n)/o,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new tt;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new tt}static get TEMP_MATRIX(){return new tt}}const Me=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Be=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],De=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Fe=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Dr=[],$o=[],vs=Math.sign;function lc(){for(let e=0;e<16;e++){const t=[];Dr.push(t);for(let i=0;i<16;i++){const s=vs(Me[e]*Me[i]+De[e]*Be[i]),r=vs(Be[e]*Me[i]+Fe[e]*Be[i]),n=vs(Me[e]*De[i]+De[e]*Fe[i]),o=vs(Be[e]*De[i]+Fe[e]*Fe[i]);for(let a=0;a<16;a++)if(Me[a]===s&&Be[a]===r&&De[a]===n&&Fe[a]===o){t.push(a);break}}}for(let e=0;e<16;e++){const t=new tt;t.set(Me[e],Be[e],De[e],Fe[e],0,0),$o.push(t)}}lc();const it={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Me[e],uY:e=>Be[e],vX:e=>De[e],vY:e=>Fe[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>Dr[e][t],sub:(e,t)=>Dr[e][it.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?it.S:it.N:Math.abs(t)*2<=Math.abs(e)?e>0?it.E:it.W:t>0?e>0?it.SE:it.SW:e>0?it.NE:it.NW,matrixAppendRotationInv:(e,t,i=0,s=0)=>{const r=$o[it.inv(t)];r.tx=i,r.ty=s,e.append(r)}};class me{constructor(t,i,s=0,r=0){this._x=s,this._y=r,this.cb=t,this.scope=i}clone(t=this.cb,i=this.scope){return new me(t,i,this._x,this._y)}set(t=0,i=t){return(this._x!==t||this._y!==i)&&(this._x=t,this._y=i,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=${0} y=${0} scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const jo=class{constructor(){this.worldTransform=new tt,this.localTransform=new tt,this.position=new me(this.onChange,this,0,0),this.scale=new me(this.onChange,this,1,1),this.pivot=new me(this.onChange,this,0,0),this.skew=new me(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const i=e.worldTransform,s=this.worldTransform;s.a=t.a*i.a+t.b*i.c,s.b=t.a*i.b+t.b*i.d,s.c=t.c*i.a+t.d*i.c,s.d=t.c*i.b+t.d*i.d,s.tx=t.tx*i.a+t.ty*i.c+i.tx,s.ty=t.tx*i.b+t.ty*i.d+i.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let vi=jo;vi.IDENTITY=new jo;var cc=`varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}`,uc=`attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vTextureCoord = aTextureCoord;\n}\n`;function Yo(e,t,i){const s=e.createShader(t);return e.shaderSource(s,i),e.compileShader(s),s}function Fr(e){const t=new Array(e);for(let i=0;i<t.length;i++)t[i]=!1;return t}function qo(e,t){switch(e){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return Fr(2*t);case"bvec3":return Fr(3*t);case"bvec4":return Fr(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const Ne=[{test:e=>e.type==="float"&&e.size===1&&!e.isArray,code:e=>`\n            if(uv["${e}"] !== ud["${e}"].value)\n            {\n                ud["${e}"].value = uv["${e}"]\n                gl.uniform1f(ud["${e}"].location, uv["${e}"])\n            }\n            `},{test:(e,t)=>(e.type==="sampler2D"||e.type==="samplerCube"||e.type==="sampler2DArray")&&e.size===1&&!e.isArray&&(t==null||t.castToBaseTexture!==void 0),code:e=>`t = syncData.textureCount++;\n\n            renderer.texture.bind(uv["${e}"], t);\n\n            if(ud["${e}"].value !== t)\n            {\n                ud["${e}"].value = t;\n                gl.uniform1i(ud["${e}"].location, t);\n; // eslint-disable-line max-len\n            }`},{test:(e,t)=>e.type==="mat3"&&e.size===1&&!e.isArray&&t.a!==void 0,code:e=>`\n            gl.uniformMatrix3fv(ud["${e}"].location, false, uv["${e}"].toArray(true));\n            `,codeUbo:e=>`\n                var ${e}_matrix = uv.${e}.toArray(true);\n\n                data[offset] = ${e}_matrix[0];\n                data[offset+1] = ${e}_matrix[1];\n                data[offset+2] = ${e}_matrix[2];\n        \n                data[offset + 4] = ${e}_matrix[3];\n                data[offset + 5] = ${e}_matrix[4];\n                data[offset + 6] = ${e}_matrix[5];\n        \n                data[offset + 8] = ${e}_matrix[6];\n                data[offset + 9] = ${e}_matrix[7];\n                data[offset + 10] = ${e}_matrix[8];\n            `},{test:(e,t)=>e.type==="vec2"&&e.size===1&&!e.isArray&&t.x!==void 0,code:e=>`\n                cv = ud["${e}"].value;\n                v = uv["${e}"];\n\n                if(cv[0] !== v.x || cv[1] !== v.y)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    gl.uniform2f(ud["${e}"].location, v.x, v.y);\n                }`,codeUbo:e=>`\n                v = uv.${e};\n\n                data[offset] = v.x;\n                data[offset+1] = v.y;\n            `},{test:e=>e.type==="vec2"&&e.size===1&&!e.isArray,code:e=>`\n                cv = ud["${e}"].value;\n                v = uv["${e}"];\n\n                if(cv[0] !== v[0] || cv[1] !== v[1])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    gl.uniform2f(ud["${e}"].location, v[0], v[1]);\n                }\n            `},{test:(e,t)=>e.type==="vec4"&&e.size===1&&!e.isArray&&t.width!==void 0,code:e=>`\n                cv = ud["${e}"].value;\n                v = uv["${e}"];\n\n                if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    cv[2] = v.width;\n                    cv[3] = v.height;\n                    gl.uniform4f(ud["${e}"].location, v.x, v.y, v.width, v.height)\n                }`,codeUbo:e=>`\n                    v = uv.${e};\n\n                    data[offset] = v.x;\n                    data[offset+1] = v.y;\n                    data[offset+2] = v.width;\n                    data[offset+3] = v.height;\n                `},{test:(e,t)=>e.type==="vec4"&&e.size===1&&!e.isArray&&t.red!==void 0,code:e=>`\n                cv = ud["${e}"].value;\n                v = uv["${e}"];\n\n                if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)\n                {\n                    cv[0] = v.red;\n                    cv[1] = v.green;\n                    cv[2] = v.blue;\n                    cv[3] = v.alpha;\n                    gl.uniform4f(ud["${e}"].location, v.red, v.green, v.blue, v.alpha)\n                }`,codeUbo:e=>`\n                    v = uv.${e};\n\n                    data[offset] = v.red;\n                    data[offset+1] = v.green;\n                    data[offset+2] = v.blue;\n                    data[offset+3] = v.alpha;\n                `},{test:(e,t)=>e.type==="vec3"&&e.size===1&&!e.isArray&&t.red!==void 0,code:e=>`\n                cv = ud["${e}"].value;\n                v = uv["${e}"];\n\n                if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)\n                {\n                    cv[0] = v.red;\n                    cv[1] = v.green;\n                    cv[2] = v.blue;\n    \n                    gl.uniform3f(ud["${e}"].location, v.red, v.green, v.blue)\n                }`,codeUbo:e=>`\n                    v = uv.${e};\n\n                    data[offset] = v.red;\n                    data[offset+1] = v.green;\n                    data[offset+2] = v.blue;\n                `},{test:e=>e.type==="vec4"&&e.size===1&&!e.isArray,code:e=>`\n                cv = ud["${e}"].value;\n                v = uv["${e}"];\n\n                if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    cv[2] = v[2];\n                    cv[3] = v[3];\n\n                    gl.uniform4f(ud["${e}"].location, v[0], v[1], v[2], v[3])\n                }`}],dc={float:`\n    if (cv !== v)\n    {\n        cu.value = v;\n        gl.uniform1f(location, v);\n    }`,vec2:`\n    if (cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n\n        gl.uniform2f(location, v[0], v[1])\n    }`,vec3:`\n    if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3f(location, v[0], v[1], v[2])\n    }`,vec4:`\n    if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n        cv[3] = v[3];\n\n        gl.uniform4f(location, v[0], v[1], v[2], v[3]);\n    }`,int:`\n    if (cv !== v)\n    {\n        cu.value = v;\n\n        gl.uniform1i(location, v);\n    }`,ivec2:`\n    if (cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n\n        gl.uniform2i(location, v[0], v[1]);\n    }`,ivec3:`\n    if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3i(location, v[0], v[1], v[2]);\n    }`,ivec4:`\n    if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n        cv[3] = v[3];\n\n        gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n    }`,uint:`\n    if (cv !== v)\n    {\n        cu.value = v;\n\n        gl.uniform1ui(location, v);\n    }`,uvec2:`\n    if (cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n\n        gl.uniform2ui(location, v[0], v[1]);\n    }`,uvec3:`\n    if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3ui(location, v[0], v[1], v[2]);\n    }`,uvec4:`\n    if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n        cv[3] = v[3];\n\n        gl.uniform4ui(location, v[0], v[1], v[2], v[3]);\n    }`,bool:`\n    if (cv !== v)\n    {\n        cu.value = v;\n        gl.uniform1i(location, v);\n    }`,bvec2:`\n    if (cv[0] != v[0] || cv[1] != v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n\n        gl.uniform2i(location, v[0], v[1]);\n    }`,bvec3:`\n    if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3i(location, v[0], v[1], v[2]);\n    }`,bvec4:`\n    if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n        cv[3] = v[3];\n\n        gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n    }`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:`\n    if (cv !== v)\n    {\n        cu.value = v;\n\n        gl.uniform1i(location, v);\n    }`,samplerCube:`\n    if (cv !== v)\n    {\n        cu.value = v;\n\n        gl.uniform1i(location, v);\n    }`,sampler2DArray:`\n    if (cv !== v)\n    {\n        cu.value = v;\n\n        gl.uniform1i(location, v);\n    }`},fc={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function pc(e,t){var s;const i=[`\n        var v = null;\n        var cv = null;\n        var cu = null;\n        var t = 0;\n        var gl = renderer.gl;\n    `];for(const r in e.uniforms){const n=t[r];if(!n){(s=e.uniforms[r])!=null&&s.group&&(e.uniforms[r].ubo?i.push(`\n                        renderer.shader.syncUniformBufferGroup(uv.${r}, \'${r}\');\n                    `):i.push(`\n                        renderer.shader.syncUniformGroup(uv.${r}, syncData);\n                    `));continue}const o=e.uniforms[r];let a=!1;for(let h=0;h<Ne.length;h++)if(Ne[h].test(n,o)){i.push(Ne[h].code(r,o)),a=!0;break}if(!a){const l=(n.size===1&&!n.isArray?dc:fc)[n.type].replace("location",`ud["${r}"].location`);i.push(`\n            cu = ud["${r}"];\n            cv = cu.value;\n            v = uv["${r}"];\n            ${l};`)}}return new Function("ud","uv","renderer","syncData",i.join(`\n`))}const Ko={};let Ke=Ko;function Zo(){if(Ke===Ko||(Ke==null?void 0:Ke.isContextLost())){const e=P.ADAPTER.createCanvas();let t;P.PREFER_ENV>=et.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),Ke=t}return Ke}let xs;function mc(){if(!xs){xs=Pt.MEDIUM;const e=Zo();e&&e.getShaderPrecisionFormat&&(xs=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?Pt.HIGH:Pt.MEDIUM)}return xs}function Jo(e,t){const i=e.getShaderSource(t).split(`\n`).map((l,c)=>`${c}: ${l}`),s=e.getShaderInfoLog(t),r=s.split(`\n`),n={},o=r.map(l=>parseFloat(l.replace(/^ERROR\\: 0\\:([\\d]+)\\:.*$/,"$1"))).filter(l=>l&&!n[l]?(n[l]=!0,!0):!1),a=[""];o.forEach(l=>{i[l-1]=`%c${i[l-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const h=i.join(`\n`);a[0]=h,console.error(s),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function _c(e,t,i,s){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(i,e.COMPILE_STATUS)||Jo(e,i),e.getShaderParameter(s,e.COMPILE_STATUS)||Jo(e,s),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const gc={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Qo(e){return gc[e]}let bs=null;const ta={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function ea(e,t){if(!bs){const i=Object.keys(ta);bs={};for(let s=0;s<i.length;++s){const r=i[s];bs[e[r]]=ta[r]}}return bs[t]}function ia(e,t,i){if(e.substring(0,9)!=="precision"){let s=t;return t===Pt.HIGH&&i!==Pt.HIGH&&(s=Pt.MEDIUM),`precision ${s} float;\n${e}`}else if(i!==Pt.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}let xi;function sa(){if(typeof xi=="boolean")return xi;try{xi=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch(e){xi=!1}return xi}let yc=0;const Ts={},Ze=class{constructor(e,t,i="pixi-shader",s={}){this.extra={},this.id=yc++,this.vertexSrc=e||Ze.defaultVertexSrc,this.fragmentSrc=t||Ze.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=s,this.vertexSrc.substring(0,8)!=="#version"&&(i=i.replace(/\\s+/g,"-"),Ts[i]?(Ts[i]++,i+=`-${Ts[i]}`):Ts[i]=1,this.vertexSrc=`#define SHADER_NAME ${i}\n${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${i}\n${this.fragmentSrc}`,this.vertexSrc=ia(this.vertexSrc,Ze.defaultVertexPrecision,Pt.HIGH),this.fragmentSrc=ia(this.fragmentSrc,Ze.defaultFragmentPrecision,mc())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return uc}static get defaultFragmentSrc(){return cc}static from(e,t,i){const s=e+t;let r=Er[s];return r||(Er[s]=r=new Ze(e,t,i)),r}};let Ut=Ze;Ut.defaultVertexPrecision=Pt.HIGH,Ut.defaultFragmentPrecision=Yt.apple.device?Pt.HIGH:Pt.MEDIUM;let vc=0;class kt{constructor(t,i,s){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=vc++,this.static=!!i,this.ubo=!!s,t instanceof ot?(this.buffer=t,this.buffer.type=jt.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new ot(new Float32Array(1)),this.buffer.type=jt.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(t,i,s){if(!this.ubo)this.uniforms[t]=new kt(i,s);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(t,i,s){return new kt(t,i,s)}static uboFrom(t,i){return new kt(t,i!=null?i:!0,!0)}}class Kt{constructor(t,i){this.uniformBindCount=0,this.program=t,i?i instanceof kt?this.uniformGroup=i:this.uniformGroup=new kt(i):this.uniformGroup=new kt({}),this.disposeRunner=new Bt("disposeShader")}checkUniformExists(t,i){if(i.uniforms[t])return!0;for(const s in i.uniforms){const r=i.uniforms[s];if(r.group&&this.checkUniformExists(t,r))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(t,i,s){const r=Ut.from(t,i);return new Kt(r,s)}}class ra{constructor(t,i){if(this.vertexSrc=t,this.fragTemplate=i,this.programCache={},this.defaultGroupCache={},!i.includes("%count%"))throw new Error(\'Fragment template must contain "%count%".\');if(!i.includes("%forloop%"))throw new Error(\'Fragment template must contain "%forloop%".\')}generateShader(t){if(!this.programCache[t]){const s=new Int32Array(t);for(let n=0;n<t;n++)s[n]=n;this.defaultGroupCache[t]=kt.from({uSamplers:s},!0);let r=this.fragTemplate;r=r.replace(/%count%/gi,`${t}`),r=r.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Ut(this.vertexSrc,r)}const i={tint:new Float32Array([1,1,1,1]),translationMatrix:new tt,default:this.defaultGroupCache[t]};return new Kt(this.programCache[t],i)}generateSampleSrc(t){let i="";i+=`\n`,i+=`\n`;for(let s=0;s<t;s++)s>0&&(i+=`\nelse `),s<t-1&&(i+=`if(vTextureId < ${s}.5)`),i+=`\n{`,i+=`\n	color = texture2D(uSamplers[${s}], vTextureCoord);`,i+=`\n}`;return i+=`\n`,i+=`\n`,i}}class Es{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let t=0;t<this.count;t++)this.elements[t]=null;this.count=0}}function xc(){return!Yt.apple.device}function bc(e){let t=!0;const i=P.ADAPTER.getNavigator();if(Yt.tablet||Yt.phone){if(Yt.apple.device){const s=i.userAgent.match(/OS (\\d+)_(\\d+)?/);s&&parseInt(s[1],10)<11&&(t=!1)}if(Yt.android.device){const s=i.userAgent.match(/Android\\s([0-9.]*)/);s&&parseInt(s[1],10)<7&&(t=!1)}}return t?e:4}class bi{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var Tc=`varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n    vec4 color;\n    %forloop%\n    gl_FragColor = color * vColor;\n}\n`,Ec=`precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vTextureId = aTextureId;\n    vColor = aColor * tint;\n}\n`;const Zt=class extends bi{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=Br,this.vertexSize=6,this.state=ne.for2d(),this.size=Zt.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){var e;return this._defaultMaxTextures=(e=this._defaultMaxTextures)!=null?e:bc(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){var e;return this._canUploadSameBuffer=(e=this._canUploadSameBuffer)!=null?e:xc(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return z("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Ec}static get defaultFragmentTemplate(){return Tc}setShaderGenerator({vertex:e=Zt.defaultVertexSrc,fragment:t=Zt.defaultFragmentTemplate}={}){this.shaderGenerator=new ra(e,t)}contextChange(){const e=this.renderer.gl;P.PREFER_ENV===et.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),Zt.defaultMaxTextures),this.maxTextures=Xo(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=Zt,i=this.size/4,s=Math.floor(i/this.maxTextures)+1;for(;e.length<i;)e.push(new ps);for(;t.length<s;)t.push(new Es);for(let r=0;r<this.maxTextures;r++)this._tempBoundTextures[r]=null}onPrerender(){this._flushId=0}render(e){!e._texture.valid||(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,i=Zt._textureArrayPool,s=this.renderer.batch,r=this._tempBoundTextures,n=this.renderer.textureGC.count;let o=++V._globalBatch,a=0,h=i[0],l=0;s.copyBoundTextures(r,t);for(let c=0;c<this._bufferSize;++c){const u=e[c];e[c]=null,u._batchEnabled!==o&&(h.count>=t&&(s.boundArray(h,r,o,t),this.buildDrawCalls(h,l,c),l=c,h=i[++a],++o),u._batchEnabled=o,u.touched=n,h.elements[h.count++]=u)}h.count>0&&(s.boundArray(h,r,o,t),this.buildDrawCalls(h,l,this._bufferSize),++a,++o);for(let c=0;c<r.length;c++)r[c]=null;V._globalBatch=o}buildDrawCalls(e,t,i){const{_bufferedElements:s,_attributeBuffer:r,_indexBuffer:n,vertexSize:o}=this,a=Zt._drawCallPool;let h=this._dcIndex,l=this._aIndex,c=this._iIndex,u=a[h];u.start=this._iIndex,u.texArray=e;for(let d=t;d<i;++d){const f=s[d],p=f._texture.baseTexture,_=vr[p.alphaMode?1:0][f.blendMode];s[d]=null,t<d&&u.blend!==_&&(u.size=c-u.start,t=d,u=a[++h],u.texArray=e,u.start=c),this.packInterleavedGeometry(f,r,n,l,c),l+=f.vertexData.length/2*o,c+=f.indices.length,u.blend=_}t<i&&(u.size=c-u.start,++h),this._dcIndex=h,this._aIndex=l,this._iIndex=c}bindAndClearTexArray(e){const t=this.renderer.texture;for(let i=0;i<e.count;i++)t.bind(e.elements[i],e.ids[i]),e.elements[i]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:i}=this;Zt.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:i}=this.renderer,s=Zt._drawCallPool;let r=null;for(let n=0;n<e;n++){const{texArray:o,type:a,size:h,start:l,blend:c}=s[n];r!==o&&(r=o,this.bindAndClearTexArray(o)),this.state.blendMode=c,i.set(this.state),t.drawElements(a,h,t.UNSIGNED_SHORT,l*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),Zt.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(e){const t=_i(Math.ceil(e/8)),i=Tr(t),s=t*8;this._aBuffers.length<=i&&(this._iBuffers.length=i+1);let r=this._aBuffers[s];return r||(this._aBuffers[s]=r=new ds(s*this.vertexSize*4)),r}getIndexBuffer(e){const t=_i(Math.ceil(e/12)),i=Tr(t),s=t*12;this._iBuffers.length<=i&&(this._iBuffers.length=i+1);let r=this._iBuffers[i];return r||(this._iBuffers[i]=r=new Uint16Array(s)),r}packInterleavedGeometry(e,t,i,s,r){const{uint32View:n,float32View:o}=t,a=s/this.vertexSize,h=e.uvs,l=e.indices,c=e.vertexData,u=e._texture.baseTexture._batchLocation,d=Math.min(e.worldAlpha,1),f=j.shared.setValue(e._tintRGB).toPremultiplied(d,e._texture.baseTexture.alphaMode>0);for(let p=0;p<c.length;p+=2)o[s++]=c[p],o[s++]=c[p+1],o[s++]=h[p],o[s++]=h[p+1],n[s++]=f,o[s++]=u;for(let p=0;p<l.length;p++)i[r++]=a+l[p]}};let Gt=Zt;Gt.defaultBatchSize=4096,Gt.extension={name:"batch",type:M.RendererPlugin},Gt._drawCallPool=[],Gt._textureArrayPool=[],U.add(Gt);var wc=`varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n`,Sc=`attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n`;const Ti=class extends Kt{constructor(e,t,i){const s=Ut.from(e||Ti.defaultVertexSrc,t||Ti.defaultFragmentSrc);super(s,i),this.padding=0,this.resolution=Ti.defaultResolution,this.multisample=Ti.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new ne}apply(e,t,i,s,r){e.applyFilter(this,t,i,s)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return Sc}static get defaultFragmentSrc(){return wc}};let gt=Ti;gt.defaultResolution=1,gt.defaultMultisample=ht.NONE;class Ei{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new j(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:i,background:s,backgroundAlpha:r}=t,n=s!=null?s:i;n!==void 0&&(this.color=n),this.alpha=r}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}Ei.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},Ei.extension={type:[M.RendererSystem,M.CanvasRendererSystem],name:"background"},U.add(Ei);class Nr{constructor(t){this.renderer=t,this.emptyRenderer=new bi(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,i){const{boundTextures:s}=this.renderer.texture;for(let r=i-1;r>=0;--r)t[r]=s[r]||null,t[r]&&(t[r]._batchLocation=r)}boundArray(t,i,s,r){const{elements:n,ids:o,count:a}=t;let h=0;for(let l=0;l<a;l++){const c=n[l],u=c._batchLocation;if(u>=0&&u<r&&i[u]===c){o[l]=u;continue}for(;h<r;){const d=i[h];if(d&&d._batchEnabled===s&&d._batchLocation===h){h++;continue}o[l]=h,c._batchLocation=h,i[h]=c;break}}}destroy(){this.renderer=null}}Nr.extension={type:M.RendererSystem,name:"batch"},U.add(Nr);let na=0;class wi{constructor(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=na++}init(t){if(t.context)this.initFromContext(t.context);else{const i=this.renderer.background.alpha<1,s=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:i,premultipliedAlpha:s,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=na++,this.renderer.runners.contextChange.emit(t);const i=this.renderer.view;i.addEventListener!==void 0&&(i.addEventListener("webglcontextlost",this.handleContextLost,!1),i.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const i=this.createContext(this.renderer.view,t);this.initFromContext(i)}createContext(t,i){let s;if(P.PREFER_ENV>=et.WEBGL2&&(s=t.getContext("webgl2",i)),s)this.webGLVersion=2;else if(this.webGLVersion=1,s=t.getContext("webgl",i)||t.getContext("experimental-webgl",i),!s)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=s,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,i={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,i,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,i,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const i=t.getContextAttributes(),s="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;s&&(this.webGLVersion=2),i&&!i.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const r=s||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=r,r||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}wi.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},wi.extension={type:M.RendererSystem,name:"context"},U.add(wi);class Ac extends Ye{upload(t,i,s){const r=t.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.alphaMode===Nt.UNPACK);const n=i.realWidth,o=i.realHeight;return s.width===n&&s.height===o?r.texSubImage2D(i.target,0,0,0,n,o,i.format,s.type,this.data):(s.width=n,s.height=o,r.texImage2D(i.target,0,s.internalFormat,n,o,0,i.format,s.type,this.data)),!0}}class ws{constructor(t,i){this.width=Math.round(t||100),this.height=Math.round(i||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Bt("disposeFramebuffer"),this.multisample=ht.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,i){return this.colorTextures[t]=i||new V(null,{scaleMode:ee.NEAREST,resolution:1,mipmap:Wt.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new V(new Ac(null,{width:this.width,height:this.height}),{scaleMode:ee.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Wt.OFF,format:C.DEPTH_COMPONENT,type:k.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,i){if(t=Math.round(t),i=Math.round(i),!(t===this.width&&i===this.height)){this.width=t,this.height=i,this.dirtyId++,this.dirtySize++;for(let s=0;s<this.colorTextures.length;s++){const r=this.colorTextures[s],n=r.resolution;r.setSize(t/n,i/n)}if(this.depthTexture){const s=this.depthTexture.resolution;this.depthTexture.setSize(t/s,i/s)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class Lr extends V{constructor(t={}){var i;if(typeof t=="number"){const s=arguments[0],r=arguments[1],n=arguments[2],o=arguments[3];t={width:s,height:r,scaleMode:n,resolution:o}}t.width=t.width||100,t.height=t.height||100,(i=t.multisample)!=null||(t.multisample=ht.NONE),super(null,t),this.mipmap=Wt.OFF,this.valid=!0,this._clear=new j([0,0,0,0]),this.framebuffer=new ws(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=t.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(t){this._clear.setValue(t)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(t,i){this.framebuffer.resize(t*this.resolution,i*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class _e extends je{constructor(t){const i=t,s=i.naturalWidth||i.videoWidth||i.width,r=i.naturalHeight||i.videoHeight||i.height;super(s,r),this.source=t,this.noSubImage=!1}static crossOrigin(t,i,s){s===void 0&&!i.startsWith("data:")?t.crossOrigin=Go(i):s!==!1&&(t.crossOrigin=typeof s=="string"?s:"anonymous")}upload(t,i,s,r){const n=t.gl,o=i.realWidth,a=i.realHeight;if(r=r||this.source,typeof HTMLImageElement!="undefined"&&r instanceof HTMLImageElement){if(!r.complete||r.naturalWidth===0)return!1}else if(typeof HTMLVideoElement!="undefined"&&r instanceof HTMLVideoElement&&r.readyState<=1&&r.buffered.length===0)return!1;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.alphaMode===Nt.UNPACK),!this.noSubImage&&i.target===n.TEXTURE_2D&&s.width===o&&s.height===a?n.texSubImage2D(n.TEXTURE_2D,0,0,0,i.format,s.type,r):(s.width=o,s.height=a,n.texImage2D(i.target,0,s.internalFormat,i.format,s.type,r)),!0}update(){if(this.destroyed)return;const t=this.source,i=t.naturalWidth||t.videoWidth||t.width,s=t.naturalHeight||t.videoHeight||t.height;this.resize(i,s),super.update()}dispose(){this.source=null}}class Or extends _e{constructor(t,i){var s;if(i=i||{},typeof t=="string"){const r=new Image;_e.crossOrigin(r,t,i.crossorigin),r.src=t,t=r}super(t),!t.complete&&!!this._width&&!!this._height&&(this._width=0,this._height=0),this.url=t.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=((s=i.createBitmap)!=null?s:P.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof i.alphaMode=="number"?i.alphaMode:null,this.bitmap=null,this._load=null,i.autoLoad!==!1&&this.load()}load(t){return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise((i,s)=>{const r=this.source;this.url=r.src;const n=()=>{this.destroyed||(r.onload=null,r.onerror=null,this.resize(r.width,r.height),this._load=null,this.createBitmap?i(this.process()):i(this))};r.complete&&r.src?n():(r.onload=n,r.onerror=o=>{s(o),this.onError.emit(o)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const i=globalThis.createImageBitmap,s=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:s?"cors":"no-cors"}).then(r=>r.blob()).then(r=>i(r,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Nt.UNPACK?"premultiply":"none"})).then(r=>this.destroyed?Promise.reject():(this.bitmap=r,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,i,s){if(typeof this.alphaMode=="number"&&(i.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,i,s);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,i,s,this.bitmap),!this.preserveBitmap){let r=!0;const n=i._glTextures;for(const o in n){const a=n[o];if(a!==s&&a.dirtyId!==i.dirtyId){r=!1;break}}r&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement!="undefined"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class Ur{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,i,s){const r=i.width,n=i.height;if(s){const o=t.width/2/r,a=t.height/2/n,h=t.x/r+o,l=t.y/n+a;s=it.add(s,it.NW),this.x0=h+o*it.uX(s),this.y0=l+a*it.uY(s),s=it.add(s,2),this.x1=h+o*it.uX(s),this.y1=l+a*it.uY(s),s=it.add(s,2),this.x2=h+o*it.uX(s),this.y2=l+a*it.uY(s),s=it.add(s,2),this.x3=h+o*it.uX(s),this.y3=l+a*it.uY(s)}else this.x0=t.x/r,this.y0=t.y/n,this.x1=(t.x+t.width)/r,this.y1=t.y/n,this.x2=(t.x+t.width)/r,this.y2=(t.y+t.height)/n,this.x3=t.x/r,this.y3=(t.y+t.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const oa=new Ur;function Ss(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class B extends Ve{constructor(t,i,s,r,n,o,a){if(super(),this.noFrame=!1,i||(this.noFrame=!0,i=new $(0,0,1,1)),t instanceof B&&(t=t.baseTexture),this.baseTexture=t,this._frame=i,this.trim=r,this.valid=!1,this._uvs=oa,this.uvMatrix=null,this.orig=s||i,this._rotate=Number(n||0),n===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=o?new Y(o.x,o.y):new Y(0,0),this.defaultBorders=a,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=i:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:i}=this.baseTexture;(i==null?void 0:i.url)&&St[i.url]&&B.removeFromCache(i.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,B.removeFromCache(this),this.textureCacheIds=null}clone(){var r;const t=this._frame.clone(),i=this._frame===this.orig?t:this.orig.clone(),s=new B(this.baseTexture,!this.noFrame&&t,i,(r=this.trim)==null?void 0:r.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(s._frame=t),s}updateUvs(){this._uvs===oa&&(this._uvs=new Ur),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,i={},s=P.STRICT_TEXTURE_CACHE){const r=typeof t=="string";let n=null;if(r)n=t;else if(t instanceof V){if(!t.cacheId){const a=(i==null?void 0:i.pixiIdPrefix)||"pixiid";t.cacheId=`${a}-${xe()}`,V.addToCache(t,t.cacheId)}n=t.cacheId}else{if(!t._pixiId){const a=(i==null?void 0:i.pixiIdPrefix)||"pixiid";t._pixiId=`${a}_${xe()}`}n=t._pixiId}let o=St[n];if(r&&s&&!o)throw new Error(`The cacheId "${n}" does not exist in TextureCache.`);return!o&&!(t instanceof V)?(i.resolution||(i.resolution=fe(t)),o=new B(new V(t,i)),o.baseTexture.cacheId=n,V.addToCache(o.baseTexture,n),B.addToCache(o,n)):!o&&t instanceof V&&(o=new B(t),B.addToCache(o,n)),o}static fromURL(t,i){const s=Object.assign({autoLoad:!1},i==null?void 0:i.resourceOptions),r=B.from(t,Object.assign({resourceOptions:s},i),!1),n=r.baseTexture.resource;return r.baseTexture.valid?Promise.resolve(r):n.load().then(()=>Promise.resolve(r))}static fromBuffer(t,i,s,r){return new B(V.fromBuffer(t,i,s,r))}static fromLoader(t,i,s,r){const n=new V(t,Object.assign({scaleMode:V.defaultOptions.scaleMode,resolution:fe(i)},r)),{resource:o}=n;o instanceof Or&&(o.url=i);const a=new B(n);return s||(s=i),V.addToCache(a.baseTexture,s),B.addToCache(a,s),s!==i&&(V.addToCache(a.baseTexture,i),B.addToCache(a,i)),a.baseTexture.valid?Promise.resolve(a):new Promise(h=>{a.baseTexture.once("loaded",()=>h(a))})}static addToCache(t,i){i&&(t.textureCacheIds.includes(i)||t.textureCacheIds.push(i),St[i]&&St[i]!==t&&console.warn(`Texture added to the cache with an id [${i}] that already had an entry`),St[i]=t)}static removeFromCache(t){if(typeof t=="string"){const i=St[t];if(i){const s=i.textureCacheIds.indexOf(t);return s>-1&&i.textureCacheIds.splice(s,1),delete St[t],i}}else if(t!=null&&t.textureCacheIds){for(let i=0;i<t.textureCacheIds.length;++i)St[t.textureCacheIds[i]]===t&&delete St[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(t){this._frame=t,this.noFrame=!1;const{x:i,y:s,width:r,height:n}=t,o=i+r>this.baseTexture.width,a=s+n>this.baseTexture.height;if(o||a){const h=o&&a?"and":"or",l=`X: ${i} + ${r} = ${i+r} > ${this.baseTexture.width}`,c=`Y: ${s} + ${n} = ${s+n} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${l} ${h} ${c}`)}this.valid=r&&n&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return B._EMPTY||(B._EMPTY=new B(new V),Ss(B._EMPTY),Ss(B._EMPTY.baseTexture)),B._EMPTY}static get WHITE(){if(!B._WHITE){const t=P.ADAPTER.createCanvas(16,16),i=t.getContext("2d");t.width=16,t.height=16,i.fillStyle="white",i.fillRect(0,0,16,16),B._WHITE=new B(V.from(t)),Ss(B._WHITE),Ss(B._WHITE.baseTexture)}return B._WHITE}}class be extends B{constructor(t,i){super(t,i),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,i,s=!0){const r=this.baseTexture.resolution,n=Math.round(t*r)/r,o=Math.round(i*r)/r;this.valid=n>0&&o>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=o,s&&this.baseTexture.resize(n,o),this.updateUvs()}setResolution(t){const{baseTexture:i}=this;i.resolution!==t&&(i.setResolution(t),this.resize(i.width,i.height,!1))}static create(t){return new be(new Lr(t))}}class kr{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,i,s=ht.NONE){const r=new Lr(Object.assign({width:t,height:i,resolution:1,multisample:s},this.textureOptions));return new be(r)}getOptimalTexture(t,i,s=1,r=ht.NONE){let n;t=Math.ceil(t*s-1e-6),i=Math.ceil(i*s-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||i!==this._pixelsHeight?(t=_i(t),i=_i(i),n=((t&65535)<<16|i&65535)>>>0,r>1&&(n+=r*4294967296)):n=r>1?-r:-1,this.texturePool[n]||(this.texturePool[n]=[]);let o=this.texturePool[n].pop();return o||(o=this.createTexture(t,i,r)),o.filterPoolKey=n,o.setResolution(s),o}getFilterTexture(t,i,s){const r=this.getOptimalTexture(t.width,t.height,i||t.resolution,s||ht.NONE);return r.filterFrame=t.filterFrame,r}returnTexture(t){const i=t.filterPoolKey;t.filterFrame=null,this.texturePool[i].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const i in this.texturePool){const s=this.texturePool[i];if(s)for(let r=0;r<s.length;r++)s[r].destroy(!0)}this.texturePool={}}setScreenSize(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(const i in this.texturePool){if(!(Number(i)<0))continue;const s=this.texturePool[i];if(s)for(let r=0;r<s.length;r++)s[r].destroy(!0);this.texturePool[i]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}}}kr.SCREEN_KEY=-1;class aa extends pe{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Gr extends pe{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new ot(this.vertices),this.uvBuffer=new ot(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(t,i){let s=0,r=0;return this.uvs[0]=s,this.uvs[1]=r,this.uvs[2]=s+i.width/t.width,this.uvs[3]=r,this.uvs[4]=s+i.width/t.width,this.uvs[5]=r+i.height/t.height,this.uvs[6]=s,this.uvs[7]=r+i.height/t.height,s=i.x,r=i.y,this.vertices[0]=s,this.vertices[1]=r,this.vertices[2]=s+i.width,this.vertices[3]=r,this.vertices[4]=s+i.width,this.vertices[5]=r+i.height,this.vertices[6]=s,this.vertices[7]=r+i.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class ha{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=ht.NONE,this.sourceFrame=new $,this.destinationFrame=new $,this.bindingSourceFrame=new $,this.bindingDestinationFrame=new $,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const As=[new Y,new Y,new Y,new Y],Hr=new tt;class Xr{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new kr,this.statePool=[],this.quad=new aa,this.quadUv=new Gr,this.tempRect=new $,this.activeState={},this.globalUniforms=new kt({outputFrame:new $,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(t,i){var p,_;const s=this.renderer,r=this.defaultFilterStack,n=this.statePool.pop()||new ha,o=this.renderer.renderTexture;let a=i[0].resolution,h=i[0].multisample,l=i[0].padding,c=i[0].autoFit,u=(p=i[0].legacy)!=null?p:!0;for(let g=1;g<i.length;g++){const v=i[g];a=Math.min(a,v.resolution),h=Math.min(h,v.multisample),l=this.useMaxPadding?Math.max(l,v.padding):l+v.padding,c=c&&v.autoFit,u=u||((_=v.legacy)!=null?_:!0)}r.length===1&&(this.defaultFilterStack[0].renderTexture=o.current),r.push(n),n.resolution=a,n.multisample=h,n.legacy=u,n.target=t,n.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),n.sourceFrame.pad(l);const d=this.tempRect.copyFrom(o.sourceFrame);s.projection.transform&&this.transformAABB(Hr.copyFrom(s.projection.transform).invert(),d),c?(n.sourceFrame.fit(d),(n.sourceFrame.width<=0||n.sourceFrame.height<=0)&&(n.sourceFrame.width=0,n.sourceFrame.height=0)):n.sourceFrame.intersects(d)||(n.sourceFrame.width=0,n.sourceFrame.height=0),this.roundFrame(n.sourceFrame,o.current?o.current.resolution:s.resolution,o.sourceFrame,o.destinationFrame,s.projection.transform),n.renderTexture=this.getOptimalFilterTexture(n.sourceFrame.width,n.sourceFrame.height,a,h),n.filters=i,n.destinationFrame.width=n.renderTexture.width,n.destinationFrame.height=n.renderTexture.height;const f=this.tempRect;f.x=0,f.y=0,f.width=n.sourceFrame.width,f.height=n.sourceFrame.height,n.renderTexture.filterFrame=n.sourceFrame,n.bindingSourceFrame.copyFrom(o.sourceFrame),n.bindingDestinationFrame.copyFrom(o.destinationFrame),n.transform=s.projection.transform,s.projection.transform=null,o.bind(n.renderTexture,n.sourceFrame,f),s.framebuffer.clear(0,0,0,0)}pop(){const t=this.defaultFilterStack,i=t.pop(),s=i.filters;this.activeState=i;const r=this.globalUniforms.uniforms;r.outputFrame=i.sourceFrame,r.resolution=i.resolution;const n=r.inputSize,o=r.inputPixel,a=r.inputClamp;if(n[0]=i.destinationFrame.width,n[1]=i.destinationFrame.height,n[2]=1/n[0],n[3]=1/n[1],o[0]=Math.round(n[0]*i.resolution),o[1]=Math.round(n[1]*i.resolution),o[2]=1/o[0],o[3]=1/o[1],a[0]=.5*o[2],a[1]=.5*o[3],a[2]=i.sourceFrame.width*n[2]-.5*o[2],a[3]=i.sourceFrame.height*n[3]-.5*o[3],i.legacy){const l=r.filterArea;l[0]=i.destinationFrame.width,l[1]=i.destinationFrame.height,l[2]=i.sourceFrame.x,l[3]=i.sourceFrame.y,r.filterClamp=r.inputClamp}this.globalUniforms.update();const h=t[t.length-1];if(this.renderer.framebuffer.blit(),s.length===1)s[0].apply(this,i.renderTexture,h.renderTexture,$t.BLEND,i),this.returnFilterTexture(i.renderTexture);else{let l=i.renderTexture,c=this.getOptimalFilterTexture(l.width,l.height,i.resolution);c.filterFrame=l.filterFrame;let u=0;for(u=0;u<s.length-1;++u){u===1&&i.multisample>1&&(c=this.getOptimalFilterTexture(l.width,l.height,i.resolution),c.filterFrame=l.filterFrame),s[u].apply(this,l,c,$t.CLEAR,i);const d=l;l=c,c=d}s[u].apply(this,l,h.renderTexture,$t.BLEND,i),u>1&&i.multisample>1&&this.returnFilterTexture(i.renderTexture),this.returnFilterTexture(l),this.returnFilterTexture(c)}i.clear(),this.statePool.push(i)}bindAndClear(t,i=$t.CLEAR){const{renderTexture:s,state:r}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const o=this.tempRect;o.x=0,o.y=0,o.width=t.filterFrame.width,o.height=t.filterFrame.height,s.bind(t,t.filterFrame,o)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?s.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const n=r.stateId&1||this.forceClear;(i===$t.CLEAR||i===$t.BLIT&&n)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,i,s,r){const n=this.renderer;n.state.set(t.state),this.bindAndClear(s,r),t.uniforms.uSampler=i,t.uniforms.filterGlobals=this.globalUniforms,n.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(i._frame,i.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(zt.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(zt.TRIANGLE_STRIP))}calculateSpriteMatrix(t,i){const{sourceFrame:s,destinationFrame:r}=this.activeState,{orig:n}=i._texture,o=t.set(r.width,0,0,r.height,s.x,s.y),a=i.worldTransform.copyTo(tt.TEMP_MATRIX);return a.invert(),o.prepend(a),o.scale(1/n.width,1/n.height),o.translate(i.anchor.x,i.anchor.y),o}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,i,s=1,r=ht.NONE){return this.texturePool.getOptimalTexture(t,i,s,r)}getFilterTexture(t,i,s){if(typeof t=="number"){const n=t;t=i,i=n}t=t||this.activeState.renderTexture;const r=this.texturePool.getOptimalTexture(t.width,t.height,i||t.resolution,s||ht.NONE);return r.filterFrame=t.filterFrame,r}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,i){const s=As[0],r=As[1],n=As[2],o=As[3];s.set(i.left,i.top),r.set(i.left,i.bottom),n.set(i.right,i.top),o.set(i.right,i.bottom),t.apply(s,s),t.apply(r,r),t.apply(n,n),t.apply(o,o);const a=Math.min(s.x,r.x,n.x,o.x),h=Math.min(s.y,r.y,n.y,o.y),l=Math.max(s.x,r.x,n.x,o.x),c=Math.max(s.y,r.y,n.y,o.y);i.x=a,i.y=h,i.width=l-a,i.height=c-h}roundFrame(t,i,s,r,n){if(!(t.width<=0||t.height<=0||s.width<=0||s.height<=0)){if(n){const{a:o,b:a,c:h,d:l}=n;if((Math.abs(a)>1e-4||Math.abs(h)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(l)>1e-4))return}n=n?Hr.copyFrom(n):Hr.identity(),n.translate(-s.x,-s.y).scale(r.width/s.width,r.height/s.height).translate(r.x,r.y),this.transformAABB(n,t),t.ceil(i),this.transformAABB(n.invert(),t)}}}Xr.extension={type:M.RendererSystem,name:"filter"},U.add(Xr);class la{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ht.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Rc=new $;class Vr{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new ws(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new $,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let i=this.renderer.context.extensions.drawBuffers,s=this.renderer.context.extensions.depthTexture;P.PREFER_ENV===et.WEBGL_LEGACY&&(i=null,s=null),i?t.drawBuffers=r=>i.drawBuffersWEBGL(r):(this.hasMRT=!1,t.drawBuffers=()=>{}),s||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,i,s=0){const{gl:r}=this;if(t){const n=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,r.bindFramebuffer(r.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==s&&(t.dirtyId++,t.dirtyFormat++,n.mipLevel=s),n.dirtyId!==t.dirtyId&&(n.dirtyId=t.dirtyId,n.dirtyFormat!==t.dirtyFormat?(n.dirtyFormat=t.dirtyFormat,n.dirtySize=t.dirtySize,this.updateFramebuffer(t,s)):n.dirtySize!==t.dirtySize&&(n.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let o=0;o<t.colorTextures.length;o++){const a=t.colorTextures[o];this.renderer.texture.unbind(a.parentTextureArray||a)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),i){const o=i.width>>s,a=i.height>>s,h=o/i.width;this.setViewport(i.x*h,i.y*h,o,a)}else{const o=t.width>>s,a=t.height>>s;this.setViewport(0,0,o,a)}}else this.current&&(this.current=null,r.bindFramebuffer(r.FRAMEBUFFER,null)),i?this.setViewport(i.x,i.y,i.width,i.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,i,s,r){const n=this.viewport;t=Math.round(t),i=Math.round(i),s=Math.round(s),r=Math.round(r),(n.width!==s||n.height!==r||n.x!==t||n.y!==i)&&(n.x=t,n.y=i,n.width=s,n.height=r,this.gl.viewport(t,i,s,r))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,i,s,r,n=Rt.COLOR|Rt.DEPTH){const{gl:o}=this;o.clearColor(t,i,s,r),o.clear(n)}initFramebuffer(t){const{gl:i}=this,s=new la(i.createFramebuffer());return s.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=s,this.managedFramebuffers.push(t),t.disposeRunner.add(this),s}resizeFramebuffer(t){const{gl:i}=this,s=t.glFramebuffers[this.CONTEXT_UID];s.stencil&&(i.bindRenderbuffer(i.RENDERBUFFER,s.stencil),s.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,i.DEPTH24_STENCIL8,t.width,t.height):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,t.width,t.height));const r=t.colorTextures;let n=r.length;i.drawBuffers||(n=Math.min(n,1));for(let o=0;o<n;o++){const a=r[o],h=a.parentTextureArray||a;this.renderer.texture.bind(h,0),o===0&&s.msaaBuffer&&(i.bindRenderbuffer(i.RENDERBUFFER,s.msaaBuffer),i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,h._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height))}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)}updateFramebuffer(t,i){const{gl:s}=this,r=t.glFramebuffers[this.CONTEXT_UID],n=t.colorTextures;let o=n.length;s.drawBuffers||(o=Math.min(o,1)),r.multisample>1&&this.canMultisampleFramebuffer(t)?r.msaaBuffer=r.msaaBuffer||s.createRenderbuffer():r.msaaBuffer&&(s.deleteRenderbuffer(r.msaaBuffer),r.msaaBuffer=null,r.blitFramebuffer&&(r.blitFramebuffer.dispose(),r.blitFramebuffer=null));const a=[];for(let h=0;h<o;h++){const l=n[h],c=l.parentTextureArray||l;this.renderer.texture.bind(c,0),h===0&&r.msaaBuffer?(s.bindRenderbuffer(s.RENDERBUFFER,r.msaaBuffer),s.renderbufferStorageMultisample(s.RENDERBUFFER,r.multisample,c._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,r.msaaBuffer)):(s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+h,l.target,c._glTextures[this.CONTEXT_UID].texture,i),a.push(s.COLOR_ATTACHMENT0+h))}if(a.length>1&&s.drawBuffers(a),t.depthTexture&&this.writeDepthTexture){const l=t.depthTexture;this.renderer.texture.bind(l,0),s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,l._glTextures[this.CONTEXT_UID].texture,i)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(r.stencil=r.stencil||s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,r.stencil),r.msaaBuffer?s.renderbufferStorageMultisample(s.RENDERBUFFER,r.multisample,s.DEPTH24_STENCIL8,t.width,t.height):s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_STENCIL,t.width,t.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,r.stencil)):r.stencil&&(s.deleteRenderbuffer(r.stencil),r.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:i}=this;let s=ht.NONE;if(t<=1||i===null)return s;for(let r=0;r<i.length;r++)if(i[r]<=t){s=i[r];break}return s===1&&(s=ht.NONE),s}blit(t,i,s){const{current:r,renderer:n,gl:o,CONTEXT_UID:a}=this;if(n.context.webGLVersion!==2||!r)return;const h=r.glFramebuffers[a];if(!h)return;if(!t){if(!h.msaaBuffer)return;const c=r.colorTextures[0];if(!c)return;h.blitFramebuffer||(h.blitFramebuffer=new ws(r.width,r.height),h.blitFramebuffer.addColorTexture(0,c)),t=h.blitFramebuffer,t.colorTextures[0]!==c&&(t.colorTextures[0]=c,t.dirtyId++,t.dirtyFormat++),(t.width!==r.width||t.height!==r.height)&&(t.width=r.width,t.height=r.height,t.dirtyId++,t.dirtySize++)}i||(i=Rc,i.width=r.width,i.height=r.height),s||(s=i);const l=i.width===s.width&&i.height===s.height;this.bind(t),o.bindFramebuffer(o.READ_FRAMEBUFFER,h.framebuffer),o.blitFramebuffer(i.left,i.top,i.right,i.bottom,s.left,s.top,s.right,s.bottom,o.COLOR_BUFFER_BIT,l?o.NEAREST:o.LINEAR),o.bindFramebuffer(o.READ_FRAMEBUFFER,t.glFramebuffers[this.CONTEXT_UID].framebuffer)}disposeFramebuffer(t,i){const s=t.glFramebuffers[this.CONTEXT_UID],r=this.gl;if(!s)return;delete t.glFramebuffers[this.CONTEXT_UID];const n=this.managedFramebuffers.indexOf(t);n>=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),i||(r.deleteFramebuffer(s.framebuffer),s.msaaBuffer&&r.deleteRenderbuffer(s.msaaBuffer),s.stencil&&r.deleteRenderbuffer(s.stencil)),s.blitFramebuffer&&this.disposeFramebuffer(s.blitFramebuffer,i)}disposeAll(t){const i=this.managedFramebuffers;this.managedFramebuffers=[];for(let s=0;s<i.length;s++)this.disposeFramebuffer(i[s],t)}forceStencil(){const t=this.current;if(!t)return;const i=t.glFramebuffers[this.CONTEXT_UID];if(!i||i.stencil)return;t.stencil=!0;const s=t.width,r=t.height,n=this.gl,o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,s,r):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,s,r),i.stencil=o,n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,o)}reset(){this.current=this.unknownFramebuffer,this.viewport=new $}destroy(){this.renderer=null}}Vr.extension={type:M.RendererSystem,name:"framebuffer"},U.add(Vr);const zr={5126:4,5123:2,5121:1};class Wr{constructor(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl,i=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,i.webGLVersion!==2){let s=this.renderer.context.extensions.vertexArrayObject;P.PREFER_ENV===et.WEBGL_LEGACY&&(s=null),s?(t.createVertexArray=()=>s.createVertexArrayOES(),t.bindVertexArray=r=>s.bindVertexArrayOES(r),t.deleteVertexArray=r=>s.deleteVertexArrayOES(r)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(i.webGLVersion!==2){const s=t.getExtension("ANGLE_instanced_arrays");s?(t.vertexAttribDivisor=(r,n)=>s.vertexAttribDivisorANGLE(r,n),t.drawElementsInstanced=(r,n,o,a,h)=>s.drawElementsInstancedANGLE(r,n,o,a,h),t.drawArraysInstanced=(r,n,o,a)=>s.drawArraysInstancedANGLE(r,n,o,a)):this.hasInstance=!1}this.canUseUInt32ElementIndex=i.webGLVersion===2||!!i.extensions.uint32ElementIndex}bind(t,i){i=i||this.renderer.shader.shader;const{gl:s}=this;let r=t.glVertexArrayObjects[this.CONTEXT_UID],n=!1;r||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=r={},n=!0);const o=r[i.program.id]||this.initGeometryVao(t,i,n);this._activeGeometry=t,this._activeVao!==o&&(this._activeVao=o,this.hasVao?s.bindVertexArray(o):this.activateVao(t,i.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,i=this.renderer.buffer;for(let s=0;s<t.buffers.length;s++){const r=t.buffers[s];i.update(r)}}checkCompatibility(t,i){const s=t.attributes,r=i.attributeData;for(const n in r)if(!s[n])throw new Error(`shader and geometry incompatible, geometry missing the "${n}" attribute`)}getSignature(t,i){const s=t.attributes,r=i.attributeData,n=["g",t.id];for(const o in s)r[o]&&n.push(o,r[o].location);return n.join("-")}initGeometryVao(t,i,s=!0){const r=this.gl,n=this.CONTEXT_UID,o=this.renderer.buffer,a=i.program;a.glPrograms[n]||this.renderer.shader.generateProgram(i),this.checkCompatibility(t,a);const h=this.getSignature(t,a),l=t.glVertexArrayObjects[this.CONTEXT_UID];let c=l[h];if(c)return l[a.id]=c,c;const u=t.buffers,d=t.attributes,f={},p={};for(const _ in u)f[_]=0,p[_]=0;for(const _ in d)!d[_].size&&a.attributeData[_]?d[_].size=a.attributeData[_].size:d[_].size||console.warn(`PIXI Geometry attribute \'${_}\' size cannot be determined (likely the bound shader does not have the attribute)`),f[d[_].buffer]+=d[_].size*zr[d[_].type];for(const _ in d){const g=d[_],v=g.size;g.stride===void 0&&(f[g.buffer]===v*zr[g.type]?g.stride=0:g.stride=f[g.buffer]),g.start===void 0&&(g.start=p[g.buffer],p[g.buffer]+=v*zr[g.type])}c=r.createVertexArray(),r.bindVertexArray(c);for(let _=0;_<u.length;_++){const g=u[_];o.bind(g),s&&g._glBuffers[n].refCount++}return this.activateVao(t,a),l[a.id]=c,l[h]=c,r.bindVertexArray(null),o.unbind(jt.ARRAY_BUFFER),c}disposeGeometry(t,i){var a;if(!this.managedGeometries[t.id])return;delete this.managedGeometries[t.id];const s=t.glVertexArrayObjects[this.CONTEXT_UID],r=this.gl,n=t.buffers,o=(a=this.renderer)==null?void 0:a.buffer;if(t.disposeRunner.remove(this),!!s){if(o)for(let h=0;h<n.length;h++){const l=n[h]._glBuffers[this.CONTEXT_UID];l&&(l.refCount--,l.refCount===0&&!i&&o.dispose(n[h],i))}if(!i){for(const h in s)if(h[0]==="g"){const l=s[h];this._activeVao===l&&this.unbind(),r.deleteVertexArray(l)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(t){const i=Object.keys(this.managedGeometries);for(let s=0;s<i.length;s++)this.disposeGeometry(this.managedGeometries[i[s]],t)}activateVao(t,i){const s=this.gl,r=this.CONTEXT_UID,n=this.renderer.buffer,o=t.buffers,a=t.attributes;t.indexBuffer&&n.bind(t.indexBuffer);let h=null;for(const l in a){const c=a[l],u=o[c.buffer],d=u._glBuffers[r];if(i.attributeData[l]){h!==d&&(n.bind(u),h=d);const f=i.attributeData[l].location;if(s.enableVertexAttribArray(f),s.vertexAttribPointer(f,c.size,c.type||s.FLOAT,c.normalized,c.stride,c.start),c.instance)if(this.hasInstance)s.vertexAttribDivisor(f,c.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,i,s,r){const{gl:n}=this,o=this._activeGeometry;if(o.indexBuffer){const a=o.indexBuffer.data.BYTES_PER_ELEMENT,h=a===2?n.UNSIGNED_SHORT:n.UNSIGNED_INT;a===2||a===4&&this.canUseUInt32ElementIndex?o.instanced?n.drawElementsInstanced(t,i||o.indexBuffer.data.length,h,(s||0)*a,r||1):n.drawElements(t,i||o.indexBuffer.data.length,h,(s||0)*a):console.warn("unsupported index buffer type: uint32")}else o.instanced?n.drawArraysInstanced(t,s,i||o.getSize(),r||1):n.drawArrays(t,s,i||o.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}Wr.extension={type:M.RendererSystem,name:"geometry"},U.add(Wr);const ca=new tt;class Rs{constructor(t,i){this._texture=t,this.mapCoord=new tt,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof i=="undefined"?.5:i,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,i){i===void 0&&(i=t);const s=this.mapCoord;for(let r=0;r<t.length;r+=2){const n=t[r],o=t[r+1];i[r]=n*s.a+o*s.c+s.tx,i[r+1]=n*s.b+o*s.d+s.ty}return i}update(t){const i=this._texture;if(!i||!i.valid||!t&&this._textureID===i._updateID)return!1;this._textureID=i._updateID,this._updateID++;const s=i._uvs;this.mapCoord.set(s.x1-s.x0,s.y1-s.y0,s.x3-s.x0,s.y3-s.y0,s.x0,s.y0);const r=i.orig,n=i.trim;n&&(ca.set(r.width/n.width,0,0,r.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(ca));const o=i.baseTexture,a=this.uClampFrame,h=this.clampMargin/o.resolution,l=this.clampOffset;return a[0]=(i._frame.x+h+l)/o.width,a[1]=(i._frame.y+h+l)/o.height,a[2]=(i._frame.x+i._frame.width-h+l)/o.width,a[3]=(i._frame.y+i._frame.height-h+l)/o.height,this.uClampOffset[0]=l/o.realWidth,this.uClampOffset[1]=l/o.realHeight,this.isSimple=i._frame.width===o.width&&i._frame.height===o.height&&i.rotate===0,!0}}var Cc=`varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n    float clip = step(3.5,\n        step(maskClamp.x, vMaskCoord.x) +\n        step(maskClamp.y, vMaskCoord.y) +\n        step(vMaskCoord.x, maskClamp.z) +\n        step(vMaskCoord.y, maskClamp.w));\n\n    vec4 original = texture2D(uSampler, vTextureCoord);\n    vec4 masky = texture2D(mask, vMaskCoord);\n    float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n    original *= (alphaMul * masky.r * alpha * clip);\n\n    gl_FragColor = original;\n}\n`,Ic=`attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n`;class ua extends gt{constructor(t,i,s){let r=null;typeof t!="string"&&i===void 0&&s===void 0&&(r=t,t=void 0,i=void 0,s=void 0),super(t||Ic,i||Cc,s),this.maskSprite=r,this.maskMatrix=new tt}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,i,s,r){const n=this._maskSprite,o=n._texture;!o.valid||(o.uvMatrix||(o.uvMatrix=new Rs(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,t.applyFilter(this,i,s,r))}}class da{constructor(t=null){this.type=ct.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=gt.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=ct.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class $r{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,i){let s=i;if(!s.isMaskData){const n=this.maskDataPool.pop()||new da;n.pooled=!0,n.maskObject=i,s=n}const r=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(s.copyCountersOrReset(r),s._colorMask=r?r._colorMask:15,s.autoDetect&&this.detect(s),s._target=t,s.type!==ct.SPRITE&&this.maskStack.push(s),s.enabled)switch(s.type){case ct.SCISSOR:this.renderer.scissor.push(s);break;case ct.STENCIL:this.renderer.stencil.push(s);break;case ct.SPRITE:s.copyCountersOrReset(null),this.pushSpriteMask(s);break;case ct.COLOR:this.pushColorMask(s);break;default:break}s.type===ct.SPRITE&&this.maskStack.push(s)}pop(t){const i=this.maskStack.pop();if(!(!i||i._target!==t)){if(i.enabled)switch(i.type){case ct.SCISSOR:this.renderer.scissor.pop(i);break;case ct.STENCIL:this.renderer.stencil.pop(i.maskObject);break;case ct.SPRITE:this.popSpriteMask(i);break;case ct.COLOR:this.popColorMask(i);break;default:break}if(i.reset(),i.pooled&&this.maskDataPool.push(i),this.maskStack.length!==0){const s=this.maskStack[this.maskStack.length-1];s.type===ct.SPRITE&&s._filters&&(s._filters[0].maskSprite=s.maskObject)}}}detect(t){const i=t.maskObject;i?i.isSprite?t.type=ct.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=ct.SCISSOR:t.type=ct.STENCIL:t.type=ct.COLOR}pushSpriteMask(t){var c,u;const{maskObject:i}=t,s=t._target;let r=t._filters;r||(r=this.alphaMaskPool[this.alphaMaskIndex],r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new ua]));const n=this.renderer,o=n.renderTexture;let a,h;if(o.current){const d=o.current;a=t.resolution||d.resolution,h=(c=t.multisample)!=null?c:d.multisample}else a=t.resolution||n.resolution,h=(u=t.multisample)!=null?u:n.multisample;r[0].resolution=a,r[0].multisample=h,r[0].maskSprite=i;const l=s.filterArea;s.filterArea=i.getBounds(!0),n.filter.push(s,r),s.filterArea=l,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const i=t._colorMask,s=t._colorMask=i&t.colorMask;s!==i&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}popColorMask(t){const i=t._colorMask,s=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;s!==i&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}destroy(){this.renderer=null}}$r.extension={type:M.RendererSystem,name:"mask"},U.add($r);class fa{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:i}=this.renderer,s=this.getStackLength();this.maskStack=t;const r=this.getStackLength();r!==s&&(r===0?i.disable(this.glConst):(i.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const pa=new tt,ma=[],Cs=class extends fa{constructor(e){super(e),this.glConst=P.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){var o;if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:i}=e,{renderer:s}=this,r=s.renderTexture,n=i.getBounds(!0,(o=ma.pop())!=null?o:new $);this.roundFrameToPixels(n,r.current?r.current.resolution:s.resolution,r.sourceFrame,r.destinationFrame,s.projection.transform),t&&n.fit(t),e._scissorRectLocal=n}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:i,c:s,d:r}=e;return(Math.abs(i)>1e-4||Math.abs(s)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(r)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||Cs.isMatrixRotated(t.worldTransform)||Cs.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const i=e._scissorRectLocal;return i.width>0&&i.height>0}roundFrameToPixels(e,t,i,s,r){Cs.isMatrixRotated(r)||(r=r?pa.copyFrom(r):pa.identity(),r.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.renderer.filter.transformAABB(r,e),e.fit(s),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&ma.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let jr=Cs;jr.extension={type:M.RendererSystem,name:"scissor"},U.add(jr);class Yr extends fa{constructor(t){super(t),this.glConst=P.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const i=t.maskObject,{gl:s}=this.renderer,r=t._stencilCounter;r===0&&(this.renderer.framebuffer.forceStencil(),s.clearStencil(0),s.clear(s.STENCIL_BUFFER_BIT),s.enable(s.STENCIL_TEST)),t._stencilCounter++;const n=t._colorMask;n!==0&&(t._colorMask=0,s.colorMask(!1,!1,!1,!1)),s.stencilFunc(s.EQUAL,r,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.INCR),i.renderable=!0,i.render(this.renderer),this.renderer.batch.flush(),i.renderable=!1,n!==0&&(t._colorMask=n,s.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}pop(t){const i=this.renderer.gl;if(this.getStackLength()===0)i.disable(i.STENCIL_TEST);else{const s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,r=s?s._colorMask:15;r!==0&&(s._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilOp(i.KEEP,i.KEEP,i.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,r!==0&&(s._colorMask=r,i.colorMask((r&1)!==0,(r&2)!==0,(r&4)!==0,(r&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Yr.extension={type:M.RendererSystem,name:"stencil"},U.add(Yr);class qr{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return z("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return z("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return z("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const i in t)this.plugins[i]=new t[i](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}qr.extension={type:[M.RendererSystem,M.CanvasRendererSystem],name:"_plugin"},U.add(qr);class Kr{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new tt,this.transform=null}update(t,i,s,r){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=i||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,s,r),this.transform&&this.projectionMatrix.append(this.transform);const n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)}calculateProjection(t,i,s,r){const n=this.projectionMatrix,o=r?-1:1;n.identity(),n.a=1/i.width*2,n.d=o*(1/i.height*2),n.tx=-1-i.x*n.a,n.ty=-o-i.y*n.d}setTransform(t){}destroy(){this.renderer=null}}Kr.extension={type:M.RendererSystem,name:"projection"},U.add(Kr);const Pc=new vi;class Zr{constructor(t){this.renderer=t,this._tempMatrix=new tt}generateTexture(t,i){const h=i||{},{region:s}=h,r=zn(h,["region"]),n=s||t.getLocalBounds(null,!0);n.width===0&&(n.width=1),n.height===0&&(n.height=1);const o=be.create(bt({width:n.width,height:n.height},r));this._tempMatrix.tx=-n.x,this._tempMatrix.ty=-n.y;const a=t.transform;return t.transform=Pc,this.renderer.render(t,{renderTexture:o,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=a,o}destroy(){}}Zr.extension={type:[M.RendererSystem,M.CanvasRendererSystem],name:"textureGenerator"},U.add(Zr);const Le=new $,Si=new $;class Jr{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new $,this.destinationFrame=new $,this.viewportFrame=new $}contextChange(){var i;const t=(i=this.renderer)==null?void 0:i.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(t&&t.alpha&&t.premultipliedAlpha)}bind(t=null,i,s){const r=this.renderer;this.current=t;let n,o,a;t?(n=t.baseTexture,a=n.resolution,i||(Le.width=t.frame.width,Le.height=t.frame.height,i=Le),s||(Si.x=t.frame.x,Si.y=t.frame.y,Si.width=i.width,Si.height=i.height,s=Si),o=n.framebuffer):(a=r.resolution,i||(Le.width=r._view.screen.width,Le.height=r._view.screen.height,i=Le),s||(s=Le,s.width=i.width,s.height=i.height));const h=this.viewportFrame;h.x=s.x*a,h.y=s.y*a,h.width=s.width*a,h.height=s.height*a,t||(h.y=r.view.height-(h.y+h.height)),h.ceil(),this.renderer.framebuffer.bind(o,h),this.renderer.projection.update(s,i,a,!o),t?this.renderer.mask.setMaskStack(n.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(i),this.destinationFrame.copyFrom(s)}clear(t,i){const s=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,r=j.shared.setValue(t||s);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&r.premultiply(r.alpha);const n=this.destinationFrame,o=this.current?this.current.baseTexture:this.renderer._view.screen,a=n.width!==o.width||n.height!==o.height;if(a){let{x:h,y:l,width:c,height:u}=this.viewportFrame;h=Math.round(h),l=Math.round(l),c=Math.round(c),u=Math.round(u),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(h,l,c,u)}this.renderer.framebuffer.clear(r.red,r.green,r.blue,r.alpha,i),a&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Jr.extension={type:M.RendererSystem,name:"renderTexture"},U.add(Jr);class Mc{}class _a{constructor(t,i){this.program=t,this.uniformData=i,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Bc(e,t){const i={},s=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r<s;r++){const n=t.getActiveAttrib(e,r);if(n.name.startsWith("gl_"))continue;const o=ea(t,n.type),a={type:o,name:n.name,size:Qo(o),location:t.getAttribLocation(e,n.name)};i[n.name]=a}return i}function Dc(e,t){const i={},s=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let r=0;r<s;r++){const n=t.getActiveUniform(e,r),o=n.name.replace(/\\[.*?\\]$/,""),a=!!n.name.match(/\\[.*?\\]$/),h=ea(t,n.type);i[o]={name:o,index:r,type:h,size:n.size,isArray:a,value:qo(h,n.size)}}return i}function ga(e,t){var h;const i=Yo(e,e.VERTEX_SHADER,t.vertexSrc),s=Yo(e,e.FRAGMENT_SHADER,t.fragmentSrc),r=e.createProgram();e.attachShader(r,i),e.attachShader(r,s);const n=(h=t.extra)==null?void 0:h.transformFeedbackVaryings;if(n&&(typeof e.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):e.transformFeedbackVaryings(r,n.names,n.bufferMode==="separate"?e.SEPARATE_ATTRIBS:e.INTERLEAVED_ATTRIBS)),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)||_c(e,r,i,s),t.attributeData=Bc(r,e),t.uniformData=Dc(r,e),!/^[ \\t]*#[ \\t]*version[ \\t]+300[ \\t]+es[ \\t]*$/m.test(t.vertexSrc)){const l=Object.keys(t.attributeData);l.sort((c,u)=>c>u?1:-1);for(let c=0;c<l.length;c++)t.attributeData[l[c]].location=c,e.bindAttribLocation(r,c,l[c]);e.linkProgram(r)}e.deleteShader(i),e.deleteShader(s);const o={};for(const l in t.uniformData){const c=t.uniformData[l];o[l]={location:e.getUniformLocation(r,l),value:qo(c.type,c.size)}}return new _a(r,o)}function Fc(e,t,i,s,r){i.buffer.update(r)}const Nc={float:`\n        data[offset] = v;\n    `,vec2:`\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n    `,vec3:`\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n        data[offset+2] = v[2];\n\n    `,vec4:`\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n        data[offset+2] = v[2];\n        data[offset+3] = v[3];\n    `,mat2:`\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n\n        data[offset+4] = v[2];\n        data[offset+5] = v[3];\n    `,mat3:`\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n        data[offset+2] = v[2];\n\n        data[offset + 4] = v[3];\n        data[offset + 5] = v[4];\n        data[offset + 6] = v[5];\n\n        data[offset + 8] = v[6];\n        data[offset + 9] = v[7];\n        data[offset + 10] = v[8];\n    `,mat4:`\n        for(var i = 0; i < 16; i++)\n        {\n            data[offset + i] = v[i];\n        }\n    `},ya={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function va(e){const t=e.map(n=>({data:n,offset:0,dataLen:0,dirty:0}));let i=0,s=0,r=0;for(let n=0;n<t.length;n++){const o=t[n];if(i=ya[o.data.type],o.data.size>1&&(i=Math.max(i,16)*o.data.size),o.dataLen=i,s%i!==0&&s<16){const a=s%i%16;s+=a,r+=a}s+i>16?(r=Math.ceil(r/16)*16,o.offset=r,r+=i,s=i):(o.offset=r,s+=i,r+=i)}return r=Math.ceil(r/16)*16,{uboElements:t,size:r}}function xa(e,t){const i=[];for(const s in e)t[s]&&i.push(t[s]);return i.sort((s,r)=>s.index-r.index),i}function ba(e,t){if(!e.autoManage)return{size:0,syncFunc:Fc};const i=xa(e.uniforms,t),{uboElements:s,size:r}=va(i),n=[`\n    var v = null;\n    var v2 = null;\n    var cv = null;\n    var t = 0;\n    var gl = renderer.gl\n    var index = 0;\n    var data = buffer.data;\n    `];for(let o=0;o<s.length;o++){const a=s[o],h=e.uniforms[a.data.name],l=a.data.name;let c=!1;for(let u=0;u<Ne.length;u++){const d=Ne[u];if(d.codeUbo&&d.test(a.data,h)){n.push(`offset = ${a.offset/4};`,Ne[u].codeUbo(a.data.name,h)),c=!0;break}}if(!c)if(a.data.size>1){const u=Qo(a.data.type),d=Math.max(ya[a.data.type]/16,1),f=u/d,p=(4-f%4)%4;n.push(`\n                cv = ud.${l}.value;\n                v = uv.${l};\n                offset = ${a.offset/4};\n\n                t = 0;\n\n                for(var i=0; i < ${a.data.size*d}; i++)\n                {\n                    for(var j = 0; j < ${f}; j++)\n                    {\n                        data[offset++] = v[t++];\n                    }\n                    offset += ${p};\n                }\n\n                `)}else{const u=Nc[a.data.type];n.push(`\n                cv = ud.${l}.value;\n                v = uv.${l};\n                offset = ${a.offset/4};\n                ${u};\n                `)}}return n.push(`\n       renderer.buffer.update(buffer);\n    `),{size:r,syncFunc:new Function("ud","uv","renderer","syncData","buffer",n.join(`\n`))}}let Lc=0;const Is={textureCount:0,uboCount:0};class Qr{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Lc++}systemCheck(){if(!sa())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,i){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const s=t.program,r=s.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==s&&(this.program=s,this.gl.useProgram(r.program)),i||(Is.textureCount=0,Is.uboCount=0,this.syncUniformGroup(t.uniformGroup,Is)),r}setUniforms(t){const i=this.shader.program,s=i.glPrograms[this.renderer.CONTEXT_UID];i.syncUniforms(s.uniformData,t,this.renderer)}syncUniformGroup(t,i){const s=this.getGlProgram();(!t.static||t.dirtyId!==s.uniformDirtyGroups[t.id])&&(s.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,s,i))}syncUniforms(t,i,s){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(i.uniformData,t.uniforms,this.renderer,s)}createSyncGroups(t){const i=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[i]||(this.cache[i]=pc(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[i],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,i){const s=this.getGlProgram();if(!t.static||t.dirtyId!==0||!s.uniformGroups[t.id]){t.dirtyId=0;const r=s.uniformGroups[t.id]||this.createSyncBufferGroup(t,s,i);t.buffer.update(),r(s.uniformData,t.uniforms,this.renderer,Is,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,s.uniformBufferBindings[i])}createSyncBufferGroup(t,i,s){const{gl:r}=this.renderer;this.renderer.buffer.bind(t.buffer);const n=this.gl.getUniformBlockIndex(i.program,s);i.uniformBufferBindings[s]=this.shader.uniformBindCount,r.uniformBlockBinding(i.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;const o=this.getSignature(t,this.shader.program.uniformData,"ubo");let a=this._uboCache[o];if(a||(a=this._uboCache[o]=ba(t,this.shader.program.uniformData)),t.autoManage){const h=new Float32Array(a.size/4);t.buffer.update(h)}return i.uniformGroups[t.id]=a.syncFunc,i.uniformGroups[t.id]}getSignature(t,i,s){const r=t.uniforms,n=[`${s}-`];for(const o in r)n.push(o),i[o]&&n.push(i[o].type);return n.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const i=this.gl,s=t.program,r=ga(i,s);return s.glPrograms[this.renderer.CONTEXT_UID]=r,r}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Qr.extension={type:M.RendererSystem,name:"shader"},U.add(Qr);class Ai{constructor(t){this.renderer=t}run(t){const{renderer:i}=this;i.runners.init.emit(i.options),t.hello&&console.log(`PixiJS 7.2.4 - ${i.rendererLogId} - https://pixijs.com`),i.resize(i.screen.width,i.screen.height)}destroy(){}}Ai.defaultOptions={hello:!1},Ai.extension={type:[M.RendererSystem,M.CanvasRendererSystem],name:"startup"},U.add(Ai);function Oc(e,t=[]){return t[G.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.ADD]=[e.ONE,e.ONE],t[G.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.NONE]=[0,0],t[G.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[G.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[G.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[G.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[G.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[G.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[G.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[G.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[G.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[G.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[G.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const Uc=0,kc=1,Gc=2,Hc=3,Xc=4,Vc=5,tn=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=G.NONE,this._blendEq=!1,this.map=[],this.map[Uc]=this.setBlend,this.map[kc]=this.setOffset,this.map[Gc]=this.setCullFace,this.map[Hc]=this.setDepthTest,this.map[Xc]=this.setFrontFace,this.map[Vc]=this.setDepthMask,this.checks=[],this.defaultState=new ne,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=Oc(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,i=0;for(;t;)t&1&&this.map[i].call(this,!!(e.data&1<<i)),t=t>>1,i++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(tn.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(tn.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],i=this.gl;t.length===2?i.blendFunc(t[0],t[1]):i.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,i.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,i.blendEquationSeparate(i.FUNC_ADD,i.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const i=this.checks.indexOf(e);t&&i===-1?this.checks.push(e):!t&&i!==-1&&this.checks.splice(i,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let en=tn;en.extension={type:M.RendererSystem,name:"state"},U.add(en);class Ta extends Ve{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){var r;this.addRunners(...t.runners);const i=((r=t.priority)!=null?r:[]).filter(n=>t.systems[n]),s=[...i,...Object.keys(t.systems).filter(n=>!i.includes(n))];for(const n of s)this.addSystem(t.systems[n],n)}addRunners(...t){t.forEach(i=>{this.runners[i]=new Bt(i)})}addSystem(t,i){const s=new t(this);if(this[i])throw new Error(`Whoops! The name "${i}" is already in use`);this[i]=s,this._systemsHash[i]=s;for(const r in this.runners)this.runners[r].add(s);return this}emitWithCustomOptions(t,i){const s=Object.keys(this._systemsHash);t.items.forEach(r=>{const n=s.find(o=>this._systemsHash[o]===r);r[t.name](i[n])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const Ps=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Ps.defaultMaxIdle,this.checkCountMax=Ps.defaultCheckCountMax,this.mode=Ps.defaultMode}postrender(){!this.renderer.objectRenderer.renderingToScreen||(this.count++,this.mode!==es.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let i=!1;for(let s=0;s<t.length;s++){const r=t[s];!r.framebuffer&&this.count-r.touched>this.maxIdle&&(e.destroyTexture(r,!0),t[s]=null,i=!0)}if(i){let s=0;for(let r=0;r<t.length;r++)t[r]!==null&&(t[s++]=t[r]);t.length=s}}unload(e){const t=this.renderer.texture,i=e._texture;i&&!i.framebuffer&&t.destroyTexture(i);for(let s=e.children.length-1;s>=0;s--)this.unload(e.children[s])}destroy(){this.renderer=null}};let Ht=Ps;Ht.defaultMode=es.AUTO,Ht.defaultMaxIdle=3600,Ht.defaultCheckCountMax=600,Ht.extension={type:M.RendererSystem,name:"textureGC"},U.add(Ht);class Ms{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=k.UNSIGNED_BYTE,this.internalFormat=C.RGBA,this.samplerType=0}}function zc(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[k.UNSIGNED_BYTE]:{[C.RGBA]:e.RGBA8,[C.RGB]:e.RGB8,[C.RG]:e.RG8,[C.RED]:e.R8,[C.RGBA_INTEGER]:e.RGBA8UI,[C.RGB_INTEGER]:e.RGB8UI,[C.RG_INTEGER]:e.RG8UI,[C.RED_INTEGER]:e.R8UI,[C.ALPHA]:e.ALPHA,[C.LUMINANCE]:e.LUMINANCE,[C.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[k.BYTE]:{[C.RGBA]:e.RGBA8_SNORM,[C.RGB]:e.RGB8_SNORM,[C.RG]:e.RG8_SNORM,[C.RED]:e.R8_SNORM,[C.RGBA_INTEGER]:e.RGBA8I,[C.RGB_INTEGER]:e.RGB8I,[C.RG_INTEGER]:e.RG8I,[C.RED_INTEGER]:e.R8I},[k.UNSIGNED_SHORT]:{[C.RGBA_INTEGER]:e.RGBA16UI,[C.RGB_INTEGER]:e.RGB16UI,[C.RG_INTEGER]:e.RG16UI,[C.RED_INTEGER]:e.R16UI,[C.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[k.SHORT]:{[C.RGBA_INTEGER]:e.RGBA16I,[C.RGB_INTEGER]:e.RGB16I,[C.RG_INTEGER]:e.RG16I,[C.RED_INTEGER]:e.R16I},[k.UNSIGNED_INT]:{[C.RGBA_INTEGER]:e.RGBA32UI,[C.RGB_INTEGER]:e.RGB32UI,[C.RG_INTEGER]:e.RG32UI,[C.RED_INTEGER]:e.R32UI,[C.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[k.INT]:{[C.RGBA_INTEGER]:e.RGBA32I,[C.RGB_INTEGER]:e.RGB32I,[C.RG_INTEGER]:e.RG32I,[C.RED_INTEGER]:e.R32I},[k.FLOAT]:{[C.RGBA]:e.RGBA32F,[C.RGB]:e.RGB32F,[C.RG]:e.RG32F,[C.RED]:e.R32F,[C.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[k.HALF_FLOAT]:{[C.RGBA]:e.RGBA16F,[C.RGB]:e.RGB16F,[C.RG]:e.RG16F,[C.RED]:e.R16F},[k.UNSIGNED_SHORT_5_6_5]:{[C.RGB]:e.RGB565},[k.UNSIGNED_SHORT_4_4_4_4]:{[C.RGBA]:e.RGBA4},[k.UNSIGNED_SHORT_5_5_5_1]:{[C.RGBA]:e.RGB5_A1},[k.UNSIGNED_INT_2_10_10_10_REV]:{[C.RGBA]:e.RGB10_A2,[C.RGBA_INTEGER]:e.RGB10_A2UI},[k.UNSIGNED_INT_10F_11F_11F_REV]:{[C.RGB]:e.R11F_G11F_B10F},[k.UNSIGNED_INT_5_9_9_9_REV]:{[C.RGB]:e.RGB9_E5},[k.UNSIGNED_INT_24_8]:{[C.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[k.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[C.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[k.UNSIGNED_BYTE]:{[C.RGBA]:e.RGBA,[C.RGB]:e.RGB,[C.ALPHA]:e.ALPHA,[C.LUMINANCE]:e.LUMINANCE,[C.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[k.UNSIGNED_SHORT_5_6_5]:{[C.RGB]:e.RGB},[k.UNSIGNED_SHORT_4_4_4_4]:{[C.RGBA]:e.RGBA},[k.UNSIGNED_SHORT_5_5_5_1]:{[C.RGBA]:e.RGBA}},t}class sn{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new V,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=zc(t);const i=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=i;for(let r=0;r<i;r++)this.boundTextures[r]=null;this.emptyTextures={};const s=new Ms(t.createTexture());t.bindTexture(t.TEXTURE_2D,s.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=s,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new Ms(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let r=0;r<6;r++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let r=0;r<this.boundTextures.length;r++)this.bind(null,r)}bind(t,i=0){const{gl:s}=this;if(t=t==null?void 0:t.castToBaseTexture(),(t==null?void 0:t.valid)&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const r=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[i]!==t&&(this.currentLocation!==i&&(this.currentLocation=i,s.activeTexture(s.TEXTURE0+i)),s.bindTexture(t.target,r.texture)),r.dirtyId!==t.dirtyId?(this.currentLocation!==i&&(this.currentLocation=i,s.activeTexture(s.TEXTURE0+i)),this.updateTexture(t)):r.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[i]=t}else this.currentLocation!==i&&(this.currentLocation=i,s.activeTexture(s.TEXTURE0+i)),s.bindTexture(s.TEXTURE_2D,this.emptyTextures[s.TEXTURE_2D].texture),this.boundTextures[i]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:i,boundTextures:s}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let r=0;r<s.length;r++)s[r]===this.unknownTexture&&this.bind(null,r)}for(let r=0;r<s.length;r++)s[r]===t&&(this.currentLocation!==r&&(i.activeTexture(i.TEXTURE0+r),this.currentLocation=r),i.bindTexture(t.target,this.emptyTextures[t.target].texture),s[r]=null)}ensureSamplerType(t){const{boundTextures:i,hasIntegerTextures:s,CONTEXT_UID:r}=this;if(!!s)for(let n=t-1;n>=0;--n){const o=i[n];o&&o._glTextures[r].samplerType!==ts.FLOAT&&this.renderer.texture.unbind(o)}}initTexture(t){const i=new Ms(this.gl.createTexture());return i.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=i,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),i}initTextureType(t,i){var s,r;i.internalFormat=(r=(s=this.internalFormats[t.type])==null?void 0:s[t.format])!=null?r:t.format,this.webGLVersion===2&&t.type===k.HALF_FLOAT?i.type=this.gl.HALF_FLOAT:i.type=t.type}updateTexture(t){var r;const i=t._glTextures[this.CONTEXT_UID];if(!i)return;const s=this.renderer;if(this.initTextureType(t,i),(r=t.resource)!=null&&r.upload(s,t,i))i.samplerType!==ts.FLOAT&&(this.hasIntegerTextures=!0);else{const n=t.realWidth,o=t.realHeight,a=s.gl;(i.width!==n||i.height!==o||i.dirtyId<0)&&(i.width=n,i.height=o,a.texImage2D(t.target,0,i.internalFormat,n,o,0,t.format,i.type,null))}t.dirtyStyleId!==i.dirtyStyleId&&this.updateTextureStyle(t),i.dirtyId=t.dirtyId}destroyTexture(t,i){const{gl:s}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),s.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!i)){const r=this.managedTextures.indexOf(t);r!==-1&&Ie(this.managedTextures,r,1)}}updateTextureStyle(t){var s;const i=t._glTextures[this.CONTEXT_UID];!i||((t.mipmap===Wt.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?i.mipmap=!1:i.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?i.wrapMode=ie.CLAMP:i.wrapMode=t.wrapMode,(s=t.resource)!=null&&s.style(this.renderer,t,i)||this.setStyle(t,i),i.dirtyStyleId=t.dirtyStyleId)}setStyle(t,i){const s=this.gl;if(i.mipmap&&t.mipmap!==Wt.ON_MANUAL&&s.generateMipmap(t.target),s.texParameteri(t.target,s.TEXTURE_WRAP_S,i.wrapMode),s.texParameteri(t.target,s.TEXTURE_WRAP_T,i.wrapMode),i.mipmap){s.texParameteri(t.target,s.TEXTURE_MIN_FILTER,t.scaleMode===ee.LINEAR?s.LINEAR_MIPMAP_LINEAR:s.NEAREST_MIPMAP_NEAREST);const r=this.renderer.context.extensions.anisotropicFiltering;if(r&&t.anisotropicLevel>0&&t.scaleMode===ee.LINEAR){const n=Math.min(t.anisotropicLevel,s.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));s.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else s.texParameteri(t.target,s.TEXTURE_MIN_FILTER,t.scaleMode===ee.LINEAR?s.LINEAR:s.NEAREST);s.texParameteri(t.target,s.TEXTURE_MAG_FILTER,t.scaleMode===ee.LINEAR?s.LINEAR:s.NEAREST)}destroy(){this.renderer=null}}sn.extension={type:M.RendererSystem,name:"texture"},U.add(sn);class rn{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:i,CONTEXT_UID:s}=this,r=t._glTransformFeedbacks[s]||this.createGLTransformFeedback(t);i.bindTransformFeedback(i.TRANSFORM_FEEDBACK,r)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,i){const{gl:s,renderer:r}=this;i&&r.shader.bind(i),s.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:i,renderer:s,CONTEXT_UID:r}=this,n=i.createTransformFeedback();t._glTransformFeedbacks[r]=n,i.bindTransformFeedback(i.TRANSFORM_FEEDBACK,n);for(let o=0;o<t.buffers.length;o++){const a=t.buffers[o];!a||(s.buffer.update(a),a._glBuffers[r].refCount++,i.bindBufferBase(i.TRANSFORM_FEEDBACK_BUFFER,o,a._glBuffers[r].buffer||null))}return i.bindTransformFeedback(i.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),n}disposeTransformFeedback(t,i){const s=t._glTransformFeedbacks[this.CONTEXT_UID],r=this.gl;t.disposeRunner.remove(this);const n=this.renderer.buffer;if(n)for(let o=0;o<t.buffers.length;o++){const a=t.buffers[o];if(!a)continue;const h=a._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!i&&n.dispose(a,i))}!s||(i||r.deleteTransformFeedback(s),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}rn.extension={type:M.RendererSystem,name:"transformFeedback"},U.add(rn);class Ri{constructor(t){this.renderer=t}init(t){this.screen=new $(0,0,t.width,t.height),this.element=t.view||P.ADAPTER.createCanvas(),this.resolution=t.resolution||P.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,i){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(i*this.resolution);const s=this.element.width/this.resolution,r=this.element.height/this.resolution;this.screen.width=s,this.screen.height=r,this.autoDensity&&(this.element.style.width=`${s}px`,this.element.style.height=`${r}px`),this.renderer.emit("resize",s,r),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var i;t&&((i=this.element.parentNode)==null||i.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Ri.defaultOptions={width:800,height:600,resolution:P.RESOLUTION,autoDensity:!1},Ri.extension={type:[M.RendererSystem,M.CanvasRendererSystem],name:"_view"},U.add(Ri),P.PREFER_ENV=et.WEBGL2,P.STRICT_TEXTURE_CACHE=!1,P.RENDER_OPTIONS=bt(bt(bt(bt({},wi.defaultOptions),Ei.defaultOptions),Ri.defaultOptions),Ai.defaultOptions),Object.defineProperties(P,{WRAP_MODE:{get(){return V.defaultOptions.wrapMode},set(e){z("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),V.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return V.defaultOptions.scaleMode},set(e){z("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),V.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return V.defaultOptions.mipmap},set(e){z("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),V.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return V.defaultOptions.anisotropicLevel},set(e){z("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),V.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return z("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),gt.defaultResolution},set(e){gt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return z("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),gt.defaultMultisample},set(e){gt.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return Gt.defaultMaxTextures},set(e){z("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),Gt.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return Gt.defaultBatchSize},set(e){z("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),Gt.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return Gt.canUploadSameBuffer},set(e){z("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),Gt.canUploadSameBuffer=e}},GC_MODE:{get(){return Ht.defaultMode},set(e){z("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Ht.defaultMode=e}},GC_MAX_IDLE:{get(){return Ht.defaultMaxIdle},set(e){z("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Ht.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return Ht.defaultCheckCountMax},set(e){z("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Ht.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Ut.defaultVertexPrecision},set(e){z("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Ut.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Ut.defaultFragmentPrecision},set(e){z("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Ut.defaultFragmentPrecision=e}}});var ge=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(ge||{});class nn{constructor(t,i=null,s=0,r=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=i,this.priority=s,this.once=r}match(t,i=null){return this.fn===t&&this.context===i}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const i=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),i}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const i=this.next;return this.next=t?null:i,this.previous=null,i}}const Dt=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new nn(null,null,1/0),this.deltaMS=1/Dt.targetFPMS,this.elapsedMS=1/Dt.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,i=ge.NORMAL){return this._addListener(new nn(e,t,i))}addOnce(e,t,i=ge.NORMAL){return this._addListener(new nn(e,t,i,!0))}_addListener(e){let t=this._head.next,i=this._head;if(!t)e.connect(i);else{for(;t;){if(e.priority>t.priority){e.connect(i);break}i=t,t=t.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,t){let i=this._head.next;for(;i;)i.match(e,t)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const r=e-this._lastFrame|0;if(r<this._minElapsedMS)return;this._lastFrame=e-r%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Dt.targetFPMS;const i=this._head;let s=i.next;for(;s;)s=s.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),i=Math.min(Math.max(0,t)/1e3,Dt.targetFPMS);this._maxElapsedMS=1/i}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Dt._shared){const e=Dt._shared=new Dt;e.autoStart=!0,e._protected=!0}return Dt._shared}static get system(){if(!Dt._system){const e=Dt._system=new Dt;e.autoStart=!0,e._protected=!0}return Dt._system}};let lt=Dt;lt.targetFPMS=.06,Object.defineProperties(P,{TARGET_FPMS:{get(){return lt.targetFPMS},set(e){z("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),lt.targetFPMS=e}}});class on{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(i){this._ticker&&this._ticker.remove(this.render,this),this._ticker=i,i&&i.add(this.render,this,ge.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?lt.shared:new lt,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}on.extension=M.Application,U.add(on);const Ea=[];U.handleByList(M.Renderer,Ea);function wa(e){for(const t of Ea)if(t.test(e))return new t(e);throw new Error("Unable to auto-detect a suitable renderer.")}var Wc=`attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}`,$c=`attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n`;const Sa=Wc,an=$c;class hn{constructor(t){this.renderer=t}contextChange(t){let i;if(this.renderer.context.webGLVersion===1){const s=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),i=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,s)}else{const s=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),i=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,s)}i>=ht.HIGH?this.multisample=ht.HIGH:i>=ht.MEDIUM?this.multisample=ht.MEDIUM:i>=ht.LOW?this.multisample=ht.LOW:this.multisample=ht.NONE}destroy(){}}hn.extension={type:M.RendererSystem,name:"_multisample"},U.add(hn);class jc{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class ln{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:i,CONTEXT_UID:s}=this,r=t._glBuffers[s]||this.createGLBuffer(t);i.bindBuffer(t.type,r.buffer)}unbind(t){const{gl:i}=this;i.bindBuffer(t,null)}bindBufferBase(t,i){const{gl:s,CONTEXT_UID:r}=this;if(this.boundBufferBases[i]!==t){const n=t._glBuffers[r]||this.createGLBuffer(t);this.boundBufferBases[i]=t,s.bindBufferBase(s.UNIFORM_BUFFER,i,n.buffer)}}bindBufferRange(t,i,s){const{gl:r,CONTEXT_UID:n}=this;s=s||0;const o=t._glBuffers[n]||this.createGLBuffer(t);r.bindBufferRange(r.UNIFORM_BUFFER,i||0,o.buffer,s*256,256)}update(t){const{gl:i,CONTEXT_UID:s}=this,r=t._glBuffers[s]||this.createGLBuffer(t);if(t._updateID!==r.updateID)if(r.updateID=t._updateID,i.bindBuffer(t.type,r.buffer),r.byteLength>=t.data.byteLength)i.bufferSubData(t.type,0,t.data);else{const n=t.static?i.STATIC_DRAW:i.DYNAMIC_DRAW;r.byteLength=t.data.byteLength,i.bufferData(t.type,t.data,n)}}dispose(t,i){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const s=t._glBuffers[this.CONTEXT_UID],r=this.gl;t.disposeRunner.remove(this),s&&(i||r.deleteBuffer(s.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const i=Object.keys(this.managedBuffers);for(let s=0;s<i.length;s++)this.dispose(this.managedBuffers[i[s]],t)}createGLBuffer(t){const{CONTEXT_UID:i,gl:s}=this;return t._glBuffers[i]=new jc(s.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[i]}}ln.extension={type:M.RendererSystem,name:"buffer"},U.add(ln);class cn{constructor(t){this.renderer=t}render(t,i){const s=this.renderer;let r,n,o,a;if(i&&(r=i.renderTexture,n=i.clear,o=i.transform,a=i.skipUpdateTransform),this.renderingToScreen=!r,s.runners.prerender.emit(),s.emit("prerender"),s.projection.transform=o,!s.context.isLost){if(r||(this.lastObjectRendered=t),!a){const h=t.enableTempParent();t.updateTransform(),t.disableTempParent(h)}s.renderTexture.bind(r),s.batch.currentRenderer.start(),(n!=null?n:s.background.clearBeforeRender)&&s.renderTexture.clear(),t.render(s),s.batch.currentRenderer.flush(),r&&(i.blit&&s.framebuffer.blit(),r.baseTexture.update()),s.runners.postrender.emit(),s.projection.transform=null,s.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}cn.extension={type:M.RendererSystem,name:"objectRenderer"},U.add(cn);const un=class extends Ta{constructor(e){super(),this.type=pt.WEBGL,e=Object.assign({},P.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new kt({projectionMatrix:new tt},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:un.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(z("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=un.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:yo()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return z("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return z("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return z("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return z("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){z("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return z("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){z("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return z("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let Oe=un;Oe.extension={type:M.Renderer,priority:1},Oe.__plugins={},Oe.__systems={},U.handleByMap(M.RendererPlugin,Oe.__plugins),U.handleByMap(M.RendererSystem,Oe.__systems),U.add(Oe);class dn extends je{constructor(t,i){const{width:s,height:r}=i||{};super(s,r),this.items=[],this.itemDirtyIds=[];for(let n=0;n<t;n++){const o=new V;this.items.push(o),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,i){for(let s=0;s<this.length;s++)!t[s]||(t[s].castToBaseTexture?this.addBaseTextureAt(t[s].castToBaseTexture(),s):t[s]instanceof je?this.addResourceAt(t[s],s):this.addResourceAt(Mr(t[s],i),s))}dispose(){for(let t=0,i=this.length;t<i;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,i){if(!this.items[i])throw new Error(`Index ${i} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[i].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let i=0;i<this.length;i++)this.items[i].parentTextureArray=t,this.items[i].on("update",t.update,t)}unbind(t){super.unbind(t);for(let i=0;i<this.length;i++)this.items[i].parentTextureArray=null,this.items[i].off("update",t.update,t)}load(){if(this._load)return this._load;const i=this.items.map(s=>s.resource).filter(s=>s).map(s=>s.load());return this._load=Promise.all(i).then(()=>{const{realWidth:s,realHeight:r}=this.items[0];return this.resize(s,r),Promise.resolve(this)}),this._load}}class Aa extends dn{constructor(t,i){const{width:s,height:r}=i||{};let n,o;Array.isArray(t)?(n=t,o=t.length):o=t,super(o,{width:s,height:r}),n&&this.initFromArray(n,i)}addBaseTextureAt(t,i){if(t.resource)this.addResourceAt(t.resource,i);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=Re.TEXTURE_2D_ARRAY}upload(t,i,s){const{length:r,itemDirtyIds:n,items:o}=this,{gl:a}=t;s.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,s.internalFormat,this._width,this._height,r,0,i.format,s.type,null);for(let h=0;h<r;h++){const l=o[h];n[h]<l.dirtyId&&(n[h]=l.dirtyId,l.valid&&a.texSubImage3D(a.TEXTURE_2D_ARRAY,0,0,0,h,l.resource.width,l.resource.height,1,i.format,s.type,l.resource.source))}return!0}}class Ra extends _e{constructor(t){super(t)}static test(t){const{OffscreenCanvas:i}=globalThis;return i&&t instanceof i?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const Ci=class extends dn{constructor(e,t){const{width:i,height:s,autoLoad:r,linkBaseTexture:n}=t||{};if(e&&e.length!==Ci.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:i,height:s});for(let o=0;o<Ci.SIDES;o++)this.items[o].target=Re.TEXTURE_CUBE_MAP_POSITIVE_X+o;this.linkBaseTexture=n!==!1,e&&this.initFromArray(e,t),r!==!1&&this.load()}bind(e){super.bind(e),e.target=Re.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,i){if(i===void 0&&(i=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=Re.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,i){const s=this.itemDirtyIds;for(let r=0;r<Ci.SIDES;r++){const n=this.items[r];(s[r]<n.dirtyId||i.dirtyId<t.dirtyId)&&(n.valid&&n.resource?(n.resource.upload(e,n,i),s[r]=n.dirtyId):s[r]<-1&&(e.gl.texImage2D(n.target,0,i.internalFormat,t.realWidth,t.realHeight,0,t.format,i.type,null),s[r]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===Ci.SIDES}};let fn=Ci;fn.SIDES=6;class Ue extends _e{constructor(t,i){var n;i=i||{};let s,r;typeof t=="string"?(s=Ue.EMPTY,r=t):(s=t,r=null),super(s),this.url=r,this.crossOrigin=(n=i.crossOrigin)!=null?n:!0,this.alphaMode=typeof i.alphaMode=="number"?i.alphaMode:null,this._load=null,i.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(t,i)=>{if(this.url===null){t(this);return}try{const s=await P.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const r=await s.blob();if(this.destroyed)return;const n=await createImageBitmap(r,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Nt.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=n,this.update(),t(this)}catch(s){if(this.destroyed)return;i(s),this.onError.emit(s)}}),this._load)}upload(t,i,s){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(i.alphaMode=this.alphaMode),super.upload(t,i,s)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap!="undefined"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){var t;return Ue._EMPTY=(t=Ue._EMPTY)!=null?t:P.ADAPTER.createCanvas(0,0),Ue._EMPTY}}const Bs=class extends _e{constructor(e,t){t=t||{},super(P.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},Bs.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn\'t support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;_e.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{!this._resolve||(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,i=e.height;if(!t||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let s=t*this.scale,r=i*this.scale;(this._overrideWidth||this._overrideHeight)&&(s=this._overrideWidth||this._overrideHeight/i*t,r=this._overrideHeight||this._overrideWidth/t*i),s=Math.round(s),r=Math.round(r);const n=this.source;n.width=s,n.height=r,n._pixiId=`canvas_${xe()}`,n.getContext("2d").drawImage(e,0,0,t,i,0,0,s,r),this._resolve(),this._resolve=null}}static getSize(e){const t=Bs.SVG_SIZE.exec(e),i={};return t&&(i[t[1]]=Math.round(parseFloat(t[3])),i[t[5]]=Math.round(parseFloat(t[7]))),i}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&Bs.SVG_XML.test(e)}};let Je=Bs;Je.SVG_XML=/^(<\\?xml[^?]+\\?>)?\\s*(<!--[^(-->)]*-->)?\\s*\\<svg/m,Je.SVG_SIZE=/<svg[^>]*(?:\\s(width|height)=(\'|")(\\d*(?:\\.\\d+)?)(?:px)?(\'|"))[^>]*(?:\\s(width|height)=(\'|")(\\d*(?:\\.\\d+)?)(?:px)?(\'|"))[^>]*>/i;const pn=class extends _e{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const i=document.createElement("video");i.setAttribute("preload","auto"),i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const s=e[0].src||e[0];_e.crossOrigin(i,s,t.crossorigin);for(let r=0;r<e.length;++r){const n=document.createElement("source");let{src:o,mime:a}=e[r];o=o||e[r];const h=o.split("?").shift().toLowerCase(),l=h.slice(h.lastIndexOf(".")+1);a=a||pn.MIME_TYPES[l]||`video/${l}`,n.src=o,n.type=a,i.appendChild(n)}e=i}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=lt.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(lt.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(lt.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(lt.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(lt.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(lt.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||pn.TYPES.includes(t)}};let Ds=pn;Ds.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],Ds.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},fs.push(Ue,Or,Ra,Ds,Je,Ye,fn,Aa);class Yc{constructor(){this._glTransformFeedbacks={},this.buffers=[],this.disposeRunner=new Bt("disposeTransformFeedback")}bindBuffer(t,i){this.buffers[t]=i}destroy(){this.disposeRunner.emit(this,!1)}}const qc="7.2.4";class Ii{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?$.EMPTY:(t=t||new $(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,i){const{a:s,b:r,c:n,d:o,tx:a,ty:h}=t,l=s*i.x+n*i.y+a,c=r*i.x+o*i.y+h;this.minX=Math.min(this.minX,l),this.maxX=Math.max(this.maxX,l),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)}addQuad(t){let i=this.minX,s=this.minY,r=this.maxX,n=this.maxY,o=t[0],a=t[1];i=o<i?o:i,s=a<s?a:s,r=o>r?o:r,n=a>n?a:n,o=t[2],a=t[3],i=o<i?o:i,s=a<s?a:s,r=o>r?o:r,n=a>n?a:n,o=t[4],a=t[5],i=o<i?o:i,s=a<s?a:s,r=o>r?o:r,n=a>n?a:n,o=t[6],a=t[7],i=o<i?o:i,s=a<s?a:s,r=o>r?o:r,n=a>n?a:n,this.minX=i,this.minY=s,this.maxX=r,this.maxY=n}addFrame(t,i,s,r,n){this.addFrameMatrix(t.worldTransform,i,s,r,n)}addFrameMatrix(t,i,s,r,n){const o=t.a,a=t.b,h=t.c,l=t.d,c=t.tx,u=t.ty;let d=this.minX,f=this.minY,p=this.maxX,_=this.maxY,g=o*i+h*s+c,v=a*i+l*s+u;d=g<d?g:d,f=v<f?v:f,p=g>p?g:p,_=v>_?v:_,g=o*r+h*s+c,v=a*r+l*s+u,d=g<d?g:d,f=v<f?v:f,p=g>p?g:p,_=v>_?v:_,g=o*i+h*n+c,v=a*i+l*n+u,d=g<d?g:d,f=v<f?v:f,p=g>p?g:p,_=v>_?v:_,g=o*r+h*n+c,v=a*r+l*n+u,d=g<d?g:d,f=v<f?v:f,p=g>p?g:p,_=v>_?v:_,this.minX=d,this.minY=f,this.maxX=p,this.maxY=_}addVertexData(t,i,s){let r=this.minX,n=this.minY,o=this.maxX,a=this.maxY;for(let h=i;h<s;h+=2){const l=t[h],c=t[h+1];r=l<r?l:r,n=c<n?c:n,o=l>o?l:o,a=c>a?c:a}this.minX=r,this.minY=n,this.maxX=o,this.maxY=a}addVertices(t,i,s,r){this.addVerticesMatrix(t.worldTransform,i,s,r)}addVerticesMatrix(t,i,s,r,n=0,o=n){const a=t.a,h=t.b,l=t.c,c=t.d,u=t.tx,d=t.ty;let f=this.minX,p=this.minY,_=this.maxX,g=this.maxY;for(let v=s;v<r;v+=2){const b=i[v],y=i[v+1],x=a*b+l*y+u,A=c*y+h*b+d;f=Math.min(f,x-n),_=Math.max(_,x+n),p=Math.min(p,A-o),g=Math.max(g,A+o)}this.minX=f,this.minY=p,this.maxX=_,this.maxY=g}addBounds(t){const i=this.minX,s=this.minY,r=this.maxX,n=this.maxY;this.minX=t.minX<i?t.minX:i,this.minY=t.minY<s?t.minY:s,this.maxX=t.maxX>r?t.maxX:r,this.maxY=t.maxY>n?t.maxY:n}addBoundsMask(t,i){const s=t.minX>i.minX?t.minX:i.minX,r=t.minY>i.minY?t.minY:i.minY,n=t.maxX<i.maxX?t.maxX:i.maxX,o=t.maxY<i.maxY?t.maxY:i.maxY;if(s<=n&&r<=o){const a=this.minX,h=this.minY,l=this.maxX,c=this.maxY;this.minX=s<a?s:a,this.minY=r<h?r:h,this.maxX=n>l?n:l,this.maxY=o>c?o:c}}addBoundsMatrix(t,i){this.addFrameMatrix(i,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,i){const s=t.minX>i.x?t.minX:i.x,r=t.minY>i.y?t.minY:i.y,n=t.maxX<i.x+i.width?t.maxX:i.x+i.width,o=t.maxY<i.y+i.height?t.maxY:i.y+i.height;if(s<=n&&r<=o){const a=this.minX,h=this.minY,l=this.maxX,c=this.maxY;this.minX=s<a?s:a,this.minY=r<h?r:h,this.maxX=n>l?n:l,this.maxY=o>c?o:c}}pad(t=0,i=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=i,this.maxY+=i)}addFramePad(t,i,s,r,n,o){t-=n,i-=o,s+=n,r+=o,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>s?this.maxX:s,this.minY=this.minY<i?this.minY:i,this.maxY=this.maxY>r?this.maxY:r}}class st extends Ve{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new vi,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ii,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const i=Object.keys(t);for(let s=0;s<i.length;++s){const r=i[s];Object.defineProperty(st.prototype,r,Object.getOwnPropertyDescriptor(t,r))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(t,i){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),i||(this._boundsRect||(this._boundsRect=new $),i=this._boundsRect),this._bounds.getRectangle(i)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new $),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Ii);const i=this.transform,s=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const r=this._bounds,n=this._boundsID;this._bounds=this._localBounds;const o=this.getBounds(!1,t);return this.parent=s,this.transform=i,this._bounds=r,this._bounds.updateID+=this._boundsID-n,o}toGlobal(t,i,s=!1){return s||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,i)}toLocal(t,i,s,r){return i&&(t=i.toGlobal(t,s,r)),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,s)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,i=0,s=1,r=1,n=0,o=0,a=0,h=0,l=0){return this.position.x=t,this.position.y=i,this.scale.x=s||1,this.scale.y=r||1,this.rotation=n,this.skew.x=o,this.skew.y=a,this.pivot.x=h,this.pivot.y=l,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new Ca),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*zo}set angle(t){this.transform.rotation=t*Wo}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){if(this._mask){const i=this._mask.isMaskData?this._mask.maskObject:this._mask;i&&(i._maskRefCount--,i._maskRefCount===0&&(i.renderable=!0,i.isMask=!1))}if(this._mask=t,this._mask){const i=this._mask.isMaskData?this._mask.maskObject:this._mask;i&&(i._maskRefCount===0&&(i.renderable=!1,i.isMask=!0),i._maskRefCount++)}}}}class Ca extends st{constructor(){super(...arguments),this.sortDirty=null}}st.prototype.displayObjectUpdateTransform=st.prototype.updateTransform;const Kc=new tt;function Zc(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const mn=class extends st{constructor(){super(),this.children=[],this.sortableChildren=mn.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const i=this.getChildIndex(e),s=this.getChildIndex(t);this.children[i]=t,this.children[s]=e,this.onChildrenChange(i<s?i:s)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const i=this.getChildIndex(e);Ie(this.children,i,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],i=this.children.indexOf(t);if(i===-1)return null;t.parent=null,t.transform._parentID=-1,Ie(this.children,i,1),this._boundsID++,this.onChildrenChange(i),t.emit("removed",this),this.emit("childRemoved",t,this,i)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,Ie(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const i=e,s=t,r=s-i;let n;if(r>0&&r<=s){n=this.children.splice(i,r);for(let o=0;o<n.length;++o)n[o].parent=null,n[o].transform&&(n[o].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let o=0;o<n.length;++o)n[o].emit("removed",this),this.emit("childRemoved",n[o],this,o);return n}else if(r===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,i=this.children.length;t<i;++t){const s=this.children[t];s._lastSortedIndex=t,!e&&s.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(Zc),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const i=this.children[e];i.visible&&i.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const i=t._mask.isMaskData?t._mask.maskObject:t._mask;i?(i.calculateBounds(),this._bounds.addBoundsMask(t._bounds,i._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const i=super.getLocalBounds(e);if(!t)for(let s=0,r=this.children.length;s<r;++s){const n=this.children[s];n.visible&&n.updateTransform()}return i}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let i,s;this.cullArea?(i=this.cullArea,s=this.worldTransform):this._render!==mn.prototype._render&&(i=this.getBounds(!0));const r=e.projection.transform;if(r&&(s?(s=Kc.copyFrom(s),s.prepend(r)):s=r),i&&t.intersects(i,s))this._render(e);else if(this.cullArea)return;for(let n=0,o=this.children.length;n<o;++n){const a=this.children[n],h=a.cullable;a.cullable=h||!this.cullArea,a.render(e),a.cullable=h}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||((t=this.filters)==null?void 0:t.length))this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let i=0,s=this.children.length;i<s;++i)this.children[i].render(e)}}renderAdvanced(e){var r,n,o;const t=this.filters,i=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let a=0;a<t.length;a++)t[a].enabled&&this._enabledFilters.push(t[a])}const s=t&&((r=this._enabledFilters)==null?void 0:r.length)||i&&(!i.isMaskData||i.enabled&&(i.autoDetect||i.type!==ct.NONE));if(s&&e.batch.flush(),t&&((n=this._enabledFilters)==null?void 0:n.length)&&e.filter.push(this,this._enabledFilters),i&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let a=0,h=this.children.length;a<h;++a)this.children[a].render(e)}s&&e.batch.flush(),i&&e.mask.pop(this),t&&((o=this._enabledFilters)==null?void 0:o.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,i=this.removeChildren(0,this.children.length);if(t)for(let s=0;s<i.length;++s)i[s].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let Ct=mn;Ct.defaultSortableChildren=!1,Ct.prototype.containerUpdateTransform=Ct.prototype.updateTransform,Object.defineProperties(P,{SORTABLE_CHILDREN:{get(){return Ct.defaultSortableChildren},set(e){z("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Ct.defaultSortableChildren=e}}});const Pi=new Y,Jc=new Uint16Array([0,1,2,0,2,3]);class ye extends Ct{constructor(t){super(),this._anchor=new me(this._onAnchorUpdate,this,t?t.defaultAnchor.x:0,t?t.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new j(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=G.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=t||B.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=Jc,this.pluginName="batch",this.isSprite=!0,this._roundPixels=P.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=de(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=de(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){const t=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===t._updateID)return;this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;const i=this.transform.worldTransform,s=i.a,r=i.b,n=i.c,o=i.d,a=i.tx,h=i.ty,l=this.vertexData,c=t.trim,u=t.orig,d=this._anchor;let f=0,p=0,_=0,g=0;if(c?(p=c.x-d._x*u.width,f=p+c.width,g=c.y-d._y*u.height,_=g+c.height):(p=-d._x*u.width,f=p+u.width,g=-d._y*u.height,_=g+u.height),l[0]=s*p+n*g+a,l[1]=o*g+r*p+h,l[2]=s*f+n*g+a,l[3]=o*g+r*f+h,l[4]=s*f+n*_+a,l[5]=o*_+r*f+h,l[6]=s*p+n*_+a,l[7]=o*_+r*p+h,this._roundPixels){const v=P.RESOLUTION;for(let b=0;b<l.length;++b)l[b]=Math.round(l[b]*v)/v}}calculateTrimmedVertices(){if(!this.vertexTrimmedData)this.vertexTrimmedData=new Float32Array(8);else if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return;this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;const t=this._texture,i=this.vertexTrimmedData,s=t.orig,r=this._anchor,n=this.transform.worldTransform,o=n.a,a=n.b,h=n.c,l=n.d,c=n.tx,u=n.ty,d=-r._x*s.width,f=d+s.width,p=-r._y*s.height,_=p+s.height;i[0]=o*d+h*p+c,i[1]=l*p+a*d+u,i[2]=o*f+h*p+c,i[3]=l*p+a*f+u,i[4]=o*f+h*_+c,i[5]=l*_+a*f+u,i[6]=o*d+h*_+c,i[7]=l*_+a*d+u}_render(t){this.calculateVertices(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)}_calculateBounds(){const t=this._texture.trim,i=this._texture.orig;!t||t.width===i.width&&t.height===i.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))}getLocalBounds(t){return this.children.length===0?(this._localBounds||(this._localBounds=new Ii),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),t||(this._localBoundsRect||(this._localBoundsRect=new $),t=this._localBoundsRect),this._localBounds.getRectangle(t)):super.getLocalBounds.call(this,t)}containsPoint(t){this.worldTransform.applyInverse(t,Pi);const i=this._texture.orig.width,s=this._texture.orig.height,r=-i*this.anchor.x;let n=0;return Pi.x>=r&&Pi.x<r+i&&(n=-s*this.anchor.y,Pi.y>=n&&Pi.y<n+s)}destroy(t){if(super.destroy(t),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,typeof t=="boolean"?t:t==null?void 0:t.texture){const s=typeof t=="boolean"?t:t==null?void 0:t.baseTexture;this._texture.destroy(!!s)}this._texture=null}static from(t,i){const s=t instanceof B?t:B.from(t,i);return new ye(s)}set roundPixels(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t}get roundPixels(){return this._roundPixels}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){const i=de(this.scale.x)||1;this.scale.x=i*t/this._texture.orig.width,this._width=t}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){const i=de(this.scale.y)||1;this.scale.y=i*t/this._texture.orig.height,this._height=t}get anchor(){return this._anchor}set anchor(t){this._anchor.copyFrom(t)}get tint(){return this._tintColor.value}set tint(t){this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber()}get tintValue(){return this._tintColor.toNumber()}get texture(){return this._texture}set texture(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||B.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}const Ia=new tt;st.prototype._cacheAsBitmap=!1,st.prototype._cacheData=null,st.prototype._cacheAsBitmapResolution=null,st.prototype._cacheAsBitmapMultisample=null;class Qc{constructor(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}}Object.defineProperties(st.prototype,{cacheAsBitmapResolution:{get(){return this._cacheAsBitmapResolution},set(e){e!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=e,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get(){return this._cacheAsBitmapMultisample},set(e){e!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=e,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get(){return this._cacheAsBitmap},set(e){if(this._cacheAsBitmap===e)return;this._cacheAsBitmap=e;let t;e?(this._cacheData||(this._cacheData=new Qc),t=this._cacheData,t.originalRender=this.render,t.originalRenderCanvas=this.renderCanvas,t.originalUpdateTransform=this.updateTransform,t.originalCalculateBounds=this.calculateBounds,t.originalGetLocalBounds=this.getLocalBounds,t.originalDestroy=this.destroy,t.originalContainsPoint=this.containsPoint,t.originalMask=this._mask,t.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(t=this._cacheData,t.sprite&&this._destroyCachedDisplayObject(),this.render=t.originalRender,this.renderCanvas=t.originalRenderCanvas,this.calculateBounds=t.originalCalculateBounds,this.getLocalBounds=t.originalGetLocalBounds,this.destroy=t.originalDestroy,this.updateTransform=t.originalUpdateTransform,this.containsPoint=t.originalContainsPoint,this._mask=t.originalMask,this.filterArea=t.originalFilterArea)}}}),st.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},st.prototype._initCachedDisplayObject=function(t){var d,f,p;if((d=this._cacheData)!=null&&d.sprite)return;const i=this.alpha;this.alpha=1,t.batch.flush();const s=this.getLocalBounds(null,!0).clone();if((f=this.filters)!=null&&f.length){const _=this.filters[0].padding;s.pad(_)}s.ceil(P.RESOLUTION);const r=t.renderTexture.current,n=t.renderTexture.sourceFrame.clone(),o=t.renderTexture.destinationFrame.clone(),a=t.projection.transform,h=be.create({width:s.width,height:s.height,resolution:this.cacheAsBitmapResolution||t.resolution,multisample:(p=this.cacheAsBitmapMultisample)!=null?p:t.multisample}),l=`cacheAsBitmap_${xe()}`;this._cacheData.textureCacheId=l,V.addToCache(h.baseTexture,l),B.addToCache(h,l);const c=this.transform.localTransform.copyTo(Ia).invert().translate(-s.x,-s.y);this.render=this._cacheData.originalRender,t.render(this,{renderTexture:h,clear:!0,transform:c,skipUpdateTransform:!1}),t.framebuffer.blit(),t.projection.transform=a,t.renderTexture.bind(r,n,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=i;const u=new ye(h);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-(s.x/s.width),u.anchor.y=-(s.y/s.height),u.alpha=i,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=u.containsPoint.bind(u)},st.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},st.prototype._initCachedDisplayObjectCanvas=function(t){var c;if((c=this._cacheData)!=null&&c.sprite)return;const i=this.getLocalBounds(null,!0),s=this.alpha;this.alpha=1;const r=t.canvasContext.activeContext,n=t._projTransform;i.ceil(P.RESOLUTION);const o=be.create({width:i.width,height:i.height}),a=`cacheAsBitmap_${xe()}`;this._cacheData.textureCacheId=a,V.addToCache(o.baseTexture,a),B.addToCache(o,a);const h=Ia;this.transform.localTransform.copyTo(h),h.invert(),h.tx-=i.x,h.ty-=i.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,{renderTexture:o,clear:!0,transform:h,skipUpdateTransform:!1}),t.canvasContext.activeContext=r,t._projTransform=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=s;const l=new ye(o);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-(i.x/i.width),l.anchor.y=-(i.y/i.height),l.alpha=s,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)},st.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},st.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},st.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,V.removeFromCache(this._cacheData.textureCacheId),B.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},st.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},st.prototype.name=null,Ct.prototype.getChildByName=function(t,i){for(let s=0,r=this.children.length;s<r;s++)if(this.children[s].name===t)return this.children[s];if(i)for(let s=0,r=this.children.length;s<r;s++){const n=this.children[s];if(!n.getChildByName)continue;const o=n.getChildByName(t,!0);if(o)return o}return null},st.prototype.getGlobalPosition=function(t=new Y,i=!1){return this.parent?this.parent.toGlobal(this.position,t,i):(t.x=this.position.x,t.y=this.position.y),t};var tu=`varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n`;class Pa extends gt{constructor(t=1){super(Sa,tu,{uAlpha:1}),this.alpha=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}const eu={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},iu=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","    gl_FragColor = vec4(0.0);","    %blur%","}"].join(`\n`);function su(e){const t=eu[e],i=t.length;let s=iu,r="";const n="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let o;for(let a=0;a<e;a++){let h=n.replace("%index%",a.toString());o=a,a>=i&&(o=e-a-1),h=h.replace("%value%",t[o].toString()),r+=h,r+=`\n`}return s=s.replace("%blur%",r),s=s.replace("%size%",e.toString()),s}const ru=`\n    attribute vec2 aVertexPosition;\n\n    uniform mat3 projectionMatrix;\n\n    uniform float strength;\n\n    varying vec2 vBlurTexCoords[%size%];\n\n    uniform vec4 inputSize;\n    uniform vec4 outputFrame;\n\n    vec4 filterVertexPosition( void )\n    {\n        vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n        return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n    }\n\n    vec2 filterTextureCoord( void )\n    {\n        return aVertexPosition * (outputFrame.zw * inputSize.zw);\n    }\n\n    void main(void)\n    {\n        gl_Position = filterVertexPosition();\n\n        vec2 textureCoord = filterTextureCoord();\n        %blur%\n    }`;function nu(e,t){const i=Math.ceil(e/2);let s=ru,r="",n;t?n="vBlurTexCoords[%index%] =  textureCoord + vec2(%sampleIndex% * strength, 0.0);":n="vBlurTexCoords[%index%] =  textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let o=0;o<e;o++){let a=n.replace("%index%",o.toString());a=a.replace("%sampleIndex%",`${o-(i-1)}.0`),r+=a,r+=`\n`}return s=s.replace("%blur%",r),s=s.replace("%size%",e.toString()),s}class Fs extends gt{constructor(t,i=8,s=4,r=gt.defaultResolution,n=5){const o=nu(n,t),a=su(n);super(o,a),this.horizontal=t,this.resolution=r,this._quality=0,this.quality=s,this.blur=i}apply(t,i,s,r){if(s?this.horizontal?this.uniforms.strength=1/s.width*(s.width/i.width):this.uniforms.strength=1/s.height*(s.height/i.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/i.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/i.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)t.applyFilter(this,i,s,r);else{const n=t.getFilterTexture(),o=t.renderer;let a=i,h=n;this.state.blend=!1,t.applyFilter(this,a,h,$t.CLEAR);for(let l=1;l<this.passes-1;l++){t.bindAndClear(a,$t.BLIT),this.uniforms.uSampler=h;const c=h;h=a,a=c,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,t.applyFilter(this,h,s,r),t.returnFilterTexture(n)}}get blur(){return this.strength}set blur(t){this.padding=1+Math.abs(t)*2,this.strength=t}get quality(){return this._quality}set quality(t){this._quality=t,this.passes=t}}class Ma extends gt{constructor(t=8,i=4,s=gt.defaultResolution,r=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new Fs(!0,t,i,s,r),this.blurYFilter=new Fs(!1,t,i,s,r),this.resolution=s,this.quality=i,this.blur=t,this.repeatEdgePixels=!1}apply(t,i,s,r){const n=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(n&&o){const a=t.getFilterTexture();this.blurXFilter.apply(t,i,a,$t.CLEAR),this.blurYFilter.apply(t,a,s,r),t.returnFilterTexture(a)}else o?this.blurYFilter.apply(t,i,s,r):this.blurXFilter.apply(t,i,s,r)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(t){this.blurXFilter.quality=this.blurYFilter.quality=t}get blurX(){return this.blurXFilter.blur}set blurX(t){this.blurXFilter.blur=t,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(t){this.blurYFilter.blur=t,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(t){this.blurYFilter.blendMode=t}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(t){this._repeatEdgePixels=t,this.updatePadding()}}var ou=`varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    if (uAlpha == 0.0) {\n        gl_FragColor = c;\n        return;\n    }\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (c.a > 0.0) {\n      c.rgb /= c.a;\n    }\n\n    vec4 result;\n\n    result.r = (m[0] * c.r);\n        result.r += (m[1] * c.g);\n        result.r += (m[2] * c.b);\n        result.r += (m[3] * c.a);\n        result.r += m[4];\n\n    result.g = (m[5] * c.r);\n        result.g += (m[6] * c.g);\n        result.g += (m[7] * c.b);\n        result.g += (m[8] * c.a);\n        result.g += m[9];\n\n    result.b = (m[10] * c.r);\n       result.b += (m[11] * c.g);\n       result.b += (m[12] * c.b);\n       result.b += (m[13] * c.a);\n       result.b += m[14];\n\n    result.a = (m[15] * c.r);\n       result.a += (m[16] * c.g);\n       result.a += (m[17] * c.b);\n       result.a += (m[18] * c.a);\n       result.a += m[19];\n\n    vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n    // Premultiply alpha again.\n    rgb *= result.a;\n\n    gl_FragColor = vec4(rgb, result.a);\n}\n`;class Ns extends gt{constructor(){const t={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(an,ou,t),this.alpha=1}_loadMatrix(t,i=!1){let s=t;i&&(this._multiply(s,this.uniforms.m,t),s=this._colorMatrix(s)),this.uniforms.m=s}_multiply(t,i,s){return t[0]=i[0]*s[0]+i[1]*s[5]+i[2]*s[10]+i[3]*s[15],t[1]=i[0]*s[1]+i[1]*s[6]+i[2]*s[11]+i[3]*s[16],t[2]=i[0]*s[2]+i[1]*s[7]+i[2]*s[12]+i[3]*s[17],t[3]=i[0]*s[3]+i[1]*s[8]+i[2]*s[13]+i[3]*s[18],t[4]=i[0]*s[4]+i[1]*s[9]+i[2]*s[14]+i[3]*s[19]+i[4],t[5]=i[5]*s[0]+i[6]*s[5]+i[7]*s[10]+i[8]*s[15],t[6]=i[5]*s[1]+i[6]*s[6]+i[7]*s[11]+i[8]*s[16],t[7]=i[5]*s[2]+i[6]*s[7]+i[7]*s[12]+i[8]*s[17],t[8]=i[5]*s[3]+i[6]*s[8]+i[7]*s[13]+i[8]*s[18],t[9]=i[5]*s[4]+i[6]*s[9]+i[7]*s[14]+i[8]*s[19]+i[9],t[10]=i[10]*s[0]+i[11]*s[5]+i[12]*s[10]+i[13]*s[15],t[11]=i[10]*s[1]+i[11]*s[6]+i[12]*s[11]+i[13]*s[16],t[12]=i[10]*s[2]+i[11]*s[7]+i[12]*s[12]+i[13]*s[17],t[13]=i[10]*s[3]+i[11]*s[8]+i[12]*s[13]+i[13]*s[18],t[14]=i[10]*s[4]+i[11]*s[9]+i[12]*s[14]+i[13]*s[19]+i[14],t[15]=i[15]*s[0]+i[16]*s[5]+i[17]*s[10]+i[18]*s[15],t[16]=i[15]*s[1]+i[16]*s[6]+i[17]*s[11]+i[18]*s[16],t[17]=i[15]*s[2]+i[16]*s[7]+i[17]*s[12]+i[18]*s[17],t[18]=i[15]*s[3]+i[16]*s[8]+i[17]*s[13]+i[18]*s[18],t[19]=i[15]*s[4]+i[16]*s[9]+i[17]*s[14]+i[18]*s[19]+i[19],t}_colorMatrix(t){const i=new Float32Array(t);return i[4]/=255,i[9]/=255,i[14]/=255,i[19]/=255,i}brightness(t,i){const s=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(s,i)}tint(t,i){const[s,r,n]=j.shared.setValue(t).toArray(),o=[s,0,0,0,0,0,r,0,0,0,0,0,n,0,0,0,0,0,1,0];this._loadMatrix(o,i)}greyscale(t,i){const s=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(s,i)}blackAndWhite(t){const i=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(i,t)}hue(t,i){t=(t||0)/180*Math.PI;const s=Math.cos(t),r=Math.sin(t),n=Math.sqrt,o=1/3,a=n(o),h=s+(1-s)*o,l=o*(1-s)-a*r,c=o*(1-s)+a*r,u=o*(1-s)+a*r,d=s+o*(1-s),f=o*(1-s)-a*r,p=o*(1-s)-a*r,_=o*(1-s)+a*r,g=s+o*(1-s),v=[h,l,c,0,0,u,d,f,0,0,p,_,g,0,0,0,0,0,1,0];this._loadMatrix(v,i)}contrast(t,i){const s=(t||0)+1,r=-.5*(s-1),n=[s,0,0,0,r,0,s,0,0,r,0,0,s,0,r,0,0,0,1,0];this._loadMatrix(n,i)}saturate(t=0,i){const s=t*2/3+1,r=(s-1)*-.5,n=[s,r,r,0,0,r,s,r,0,0,r,r,s,0,0,0,0,0,1,0];this._loadMatrix(n,i)}desaturate(){this.saturate(-1)}negative(t){const i=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(i,t)}sepia(t){const i=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(i,t)}technicolor(t){const i=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(i,t)}polaroid(t){const i=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(i,t)}toBGR(t){const i=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(i,t)}kodachrome(t){const i=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(i,t)}browni(t){const i=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(i,t)}vintage(t){const i=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(i,t)}colorTone(t,i,s,r,n){t=t||.2,i=i||.15,s=s||16770432,r=r||3375104;const o=j.shared,[a,h,l]=o.setValue(s).toArray(),[c,u,d]=o.setValue(r).toArray(),f=[.3,.59,.11,0,0,a,h,l,t,0,c,u,d,i,0,a-c,h-u,l-d,0,0];this._loadMatrix(f,n)}night(t,i){t=t||.1;const s=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,t*2,0,0,0,0,0,1,0];this._loadMatrix(s,i)}predator(t,i){const s=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(s,i)}lsd(t){const i=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(i,t)}reset(){const t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)}get matrix(){return this.uniforms.m}set matrix(t){this.uniforms.m=t}get alpha(){return this.uniforms.uAlpha}set alpha(t){this.uniforms.uAlpha=t}}Ns.prototype.grayscale=Ns.prototype.greyscale;var au=`varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n  vec4 map =  texture2D(mapSampler, vFilterCoord);\n\n  map -= 0.5;\n  map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n  gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n`,hu=`attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n	gl_Position = filterVertexPosition();\n	vTextureCoord = filterTextureCoord();\n	vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0)  ).xy;\n}\n`;class Ba extends gt{constructor(t,i){const s=new tt;t.renderable=!1,super(hu,au,{mapSampler:t._texture,filterMatrix:s,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=t,this.maskMatrix=s,i==null&&(i=20),this.scale=new Y(i,i)}apply(t,i,s,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const n=this.maskSprite.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),a=Math.sqrt(n.c*n.c+n.d*n.d);o!==0&&a!==0&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/a,this.uniforms.rotation[3]=n.d/a),t.applyFilter(this,i,s,r)}get map(){return this.uniforms.mapSampler}set map(t){this.uniforms.mapSampler=t}}var lu=`varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputSize;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN   (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL   (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX     8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n          vec2 v_rgbNW, vec2 v_rgbNE,\n          vec2 v_rgbSW, vec2 v_rgbSE,\n          vec2 v_rgbM) {\n    vec4 color;\n    vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n    vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n    vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n    vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n    vec4 texColor = texture2D(tex, v_rgbM);\n    vec3 rgbM  = texColor.xyz;\n    vec3 luma = vec3(0.299, 0.587, 0.114);\n    float lumaNW = dot(rgbNW, luma);\n    float lumaNE = dot(rgbNE, luma);\n    float lumaSW = dot(rgbSW, luma);\n    float lumaSE = dot(rgbSE, luma);\n    float lumaM  = dot(rgbM,  luma);\n    float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n    float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n    mediump vec2 dir;\n    dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n    dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n    float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n                          (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n    float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n    dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n              max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n                  dir * rcpDirMin)) * inverseVP;\n\n    vec3 rgbA = 0.5 * (\n                       texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n                       texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n    vec3 rgbB = rgbA * 0.5 + 0.25 * (\n                                     texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n                                     texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n    float lumaB = dot(rgbB, luma);\n    if ((lumaB < lumaMin) || (lumaB > lumaMax))\n        color = vec4(rgbA, texColor.a);\n    else\n        color = vec4(rgbB, texColor.a);\n    return color;\n}\n\nvoid main() {\n\n      vec4 color;\n\n      color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n      gl_FragColor = color;\n}\n`,cu=`\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n               out vec2 v_rgbNW, out vec2 v_rgbNE,\n               out vec2 v_rgbSW, out vec2 v_rgbSE,\n               out vec2 v_rgbM) {\n    v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n    v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n    v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n    v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n    v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n   gl_Position = filterVertexPosition();\n\n   vFragCoord = aVertexPosition * outputFrame.zw;\n\n   texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n`;class Da extends gt{constructor(){super(cu,lu)}}var uu=`precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n    return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n    vec4 color = texture2D(uSampler, vTextureCoord);\n    float randomValue = rand(gl_FragCoord.xy * uSeed);\n    float diff = (randomValue - 0.5) * uNoise;\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (color.a > 0.0) {\n        color.rgb /= color.a;\n    }\n\n    color.r += diff;\n    color.g += diff;\n    color.b += diff;\n\n    // Premultiply alpha again.\n    color.rgb *= color.a;\n\n    gl_FragColor = color;\n}\n`;class Fa extends gt{constructor(t=.5,i=Math.random()){super(an,uu,{uNoise:0,uSeed:0}),this.noise=t,this.seed=i}get noise(){return this.uniforms.uNoise}set noise(t){this.uniforms.uNoise=t}get seed(){return this.uniforms.uSeed}set seed(t){this.uniforms.uSeed=t}}const _n={AlphaFilter:Pa,BlurFilter:Ma,BlurFilterPass:Fs,ColorMatrixFilter:Ns,DisplacementFilter:Ba,FXAAFilter:Da,NoiseFilter:Fa};Object.entries(_n).forEach(([e,t])=>{Object.defineProperty(_n,e,{get(){return t}})});class du{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this.tickerAdded||!this.domElement||(lt.system.add(this.tickerUpdate,this,ge.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){!this.tickerAdded||(lt.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const t=this.events.rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY}))}tickerUpdate(t){this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const Te=new du;class Qe{constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Qe.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Y,this.page=new Y,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(t,i,s){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(t,i,s,r,n){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}class Mi extends Qe{constructor(){super(...arguments),this.client=new Y,this.movement=new Y,this.offset=new Y,this.global=new Y,this.screen=new Y}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(t,i,s){return t.worldTransform.applyInverse(s||this.global,i)}getModifierState(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}initMouseEvent(t,i,s,r,n,o,a,h,l,c,u,d,f,p,_){throw new Error("Method not implemented.")}}class Xt extends Mi{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class ke extends Mi{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}ke.DOM_DELTA_PIXEL=0,ke.DOM_DELTA_LINE=1,ke.DOM_DELTA_PAGE=2;const fu=2048,pu=new Y,gn=new Y;class Na{constructor(t){this.dispatch=new Ve,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=t,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(t,i){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:i,priority:0}),this.mappingTable[t].sort((s,r)=>s.priority-r.priority)}dispatchEvent(t,i){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,i),this.dispatch.emit(i||t.type,t)}mapEvent(t){if(!this.rootTarget)return;const i=this.mappingTable[t.type];if(i)for(let s=0,r=i.length;s<r;s++)i[s].fn(t);else console.warn(`[EventBoundary]: Event mapping not defined for ${t.type}`)}hitTest(t,i){Te.pauseUpdate=!0;const r=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",n=this[r](this.rootTarget,this.rootTarget.eventMode,pu.set(t,i),this.hitTestFn,this.hitPruneFn);return n&&n[0]}propagate(t,i){if(!t.target)return;const s=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(let r=0,n=s.length-1;r<n;r++)if(t.currentTarget=s[r],this.notifyTarget(t,i),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,i),!(t.propagationStopped||t.propagationImmediatelyStopped)){t.eventPhase=t.BUBBLING_PHASE;for(let r=s.length-2;r>=0;r--)if(t.currentTarget=s[r],this.notifyTarget(t,i),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,i,s=this._allInteractiveElements){if(s.length===0)return;t.eventPhase=t.BUBBLING_PHASE;const r=Array.isArray(i)?i:[i];for(let n=s.length-1;n>=0;n--)r.forEach(o=>{t.currentTarget=s[n],this.notifyTarget(t,o)})}propagationPath(t){const i=[t];for(let s=0;s<fu&&t!==this.rootTarget;s++){if(!t.parent)throw new Error("Cannot find propagation path to disconnected target");i.push(t.parent),t=t.parent}return i.reverse(),i}hitTestMoveRecursive(t,i,s,r,n,o=!1){let a=!1;if(this._interactivePrune(t))return null;if((t.eventMode==="dynamic"||i==="dynamic")&&(Te.pauseUpdate=!1),t.interactiveChildren&&t.children){const c=t.children;for(let u=c.length-1;u>=0;u--){const d=c[u],f=this.hitTestMoveRecursive(d,this._isInteractive(i)?i:d.eventMode,s,r,n,o||n(t,s));if(f){if(f.length>0&&!f[f.length-1].parent)continue;const p=t.isInteractive();(f.length>0||p)&&(p&&this._allInteractiveElements.push(t),f.push(t)),this._hitElements.length===0&&(this._hitElements=f),a=!0}}}const h=this._isInteractive(i),l=t.isInteractive();return l&&l&&this._allInteractiveElements.push(t),o||this._hitElements.length>0?null:a?this._hitElements:h&&!n(t,s)&&r(t,s)?l?[t]:[]:null}hitTestRecursive(t,i,s,r,n){if(this._interactivePrune(t)||n(t,s))return null;if((t.eventMode==="dynamic"||i==="dynamic")&&(Te.pauseUpdate=!1),t.interactiveChildren&&t.children){const h=t.children;for(let l=h.length-1;l>=0;l--){const c=h[l],u=this.hitTestRecursive(c,this._isInteractive(i)?i:c.eventMode,s,r,n);if(u){if(u.length>0&&!u[u.length-1].parent)continue;const d=t.isInteractive();return(u.length>0||d)&&u.push(t),u}}}const o=this._isInteractive(i),a=t.isInteractive();return o&&r(t,s)?a?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!!(!t||t.isMask||!t.visible||!t.renderable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren||t.isMask)}hitPruneFn(t,i){var s;if(t.hitArea&&(t.worldTransform.applyInverse(i,gn),!t.hitArea.contains(gn.x,gn.y)))return!0;if(t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;if(r&&!((s=r.containsPoint)!=null&&s.call(r,i)))return!0}return!1}hitTestFn(t,i){return t.eventMode==="passive"?!1:t.hitArea?!0:t.containsPoint?t.containsPoint(i):!1}notifyTarget(t,i){var n,o;i=i!=null?i:t.type;const s=`on${i}`;(o=(n=t.currentTarget)[s])==null||o.call(n,t);const r=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?`${i}capture`:i;this.notifyListeners(t,r),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,i)}mapPointerDown(t){if(!(t instanceof Xt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const i=this.createPointerEvent(t);if(this.dispatchEvent(i,"pointerdown"),i.pointerType==="touch")this.dispatchEvent(i,"touchstart");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const r=i.button===2;this.dispatchEvent(i,r?"rightdown":"mousedown")}const s=this.trackingData(t.pointerId);s.pressTargetsByButton[t.button]=i.composedPath(),this.freeEvent(i)}mapPointerMove(t){var h,l,c;if(!(t instanceof Xt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const i=this.createPointerEvent(t);this._isPointerMoveEvent=!1;const s=i.pointerType==="mouse"||i.pointerType==="pen",r=this.trackingData(t.pointerId),n=this.findMountedTarget(r.overTargets);if(((h=r.overTargets)==null?void 0:h.length)>0&&n!==i.target){const u=t.type==="mousemove"?"mouseout":"pointerout",d=this.createPointerEvent(t,u,n);if(this.dispatchEvent(d,"pointerout"),s&&this.dispatchEvent(d,"mouseout"),!i.composedPath().includes(n)){const f=this.createPointerEvent(t,"pointerleave",n);for(f.eventPhase=f.AT_TARGET;f.target&&!i.composedPath().includes(f.target);)f.currentTarget=f.target,this.notifyTarget(f),s&&this.notifyTarget(f,"mouseleave"),f.target=f.target.parent;this.freeEvent(f)}this.freeEvent(d)}if(n!==i.target){const u=t.type==="mousemove"?"mouseover":"pointerover",d=this.clonePointerEvent(i,u);this.dispatchEvent(d,"pointerover"),s&&this.dispatchEvent(d,"mouseover");let f=n==null?void 0:n.parent;for(;f&&f!==this.rootTarget.parent&&f!==i.target;)f=f.parent;if(!f||f===this.rootTarget.parent){const _=this.clonePointerEvent(i,"pointerenter");for(_.eventPhase=_.AT_TARGET;_.target&&_.target!==n&&_.target!==this.rootTarget.parent;)_.currentTarget=_.target,this.notifyTarget(_),s&&this.notifyTarget(_,"mouseenter"),_.target=_.target.parent;this.freeEvent(_)}this.freeEvent(d)}const o=[],a=(l=this.enableGlobalMoveEvents)!=null?l:!0;this.moveOnAll?o.push("pointermove"):this.dispatchEvent(i,"pointermove"),a&&o.push("globalpointermove"),i.pointerType==="touch"&&(this.moveOnAll?o.splice(1,0,"touchmove"):this.dispatchEvent(i,"touchmove"),a&&o.push("globaltouchmove")),s&&(this.moveOnAll?o.splice(1,0,"mousemove"):this.dispatchEvent(i,"mousemove"),a&&o.push("globalmousemove"),this.cursor=(c=i.target)==null?void 0:c.cursor),o.length>0&&this.all(i,o),this._allInteractiveElements.length=0,this._hitElements.length=0,r.overTargets=i.composedPath(),this.freeEvent(i)}mapPointerOver(t){var o;if(!(t instanceof Xt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const i=this.trackingData(t.pointerId),s=this.createPointerEvent(t),r=s.pointerType==="mouse"||s.pointerType==="pen";this.dispatchEvent(s,"pointerover"),r&&this.dispatchEvent(s,"mouseover"),s.pointerType==="mouse"&&(this.cursor=(o=s.target)==null?void 0:o.cursor);const n=this.clonePointerEvent(s,"pointerenter");for(n.eventPhase=n.AT_TARGET;n.target&&n.target!==this.rootTarget.parent;)n.currentTarget=n.target,this.notifyTarget(n),r&&this.notifyTarget(n,"mouseenter"),n.target=n.target.parent;i.overTargets=s.composedPath(),this.freeEvent(s),this.freeEvent(n)}mapPointerOut(t){if(!(t instanceof Xt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const i=this.trackingData(t.pointerId);if(i.overTargets){const s=t.pointerType==="mouse"||t.pointerType==="pen",r=this.findMountedTarget(i.overTargets),n=this.createPointerEvent(t,"pointerout",r);this.dispatchEvent(n),s&&this.dispatchEvent(n,"mouseout");const o=this.createPointerEvent(t,"pointerleave",r);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),s&&this.notifyTarget(o,"mouseleave"),o.target=o.target.parent;i.overTargets=null,this.freeEvent(n),this.freeEvent(o)}this.cursor=null}mapPointerUp(t){if(!(t instanceof Xt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const i=performance.now(),s=this.createPointerEvent(t);if(this.dispatchEvent(s,"pointerup"),s.pointerType==="touch")this.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){const a=s.button===2;this.dispatchEvent(s,a?"rightup":"mouseup")}const r=this.trackingData(t.pointerId),n=this.findMountedTarget(r.pressTargetsByButton[t.button]);let o=n;if(n&&!s.composedPath().includes(n)){let a=n;for(;a&&!s.composedPath().includes(a);){if(s.currentTarget=a,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")this.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){const h=s.button===2;this.notifyTarget(s,h?"rightupoutside":"mouseupoutside")}a=a.parent}delete r.pressTargetsByButton[t.button],o=a}if(o){const a=this.clonePointerEvent(s,"click");a.target=o,a.path=null,r.clicksByButton[t.button]||(r.clicksByButton[t.button]={clickCount:0,target:a.target,timeStamp:i});const h=r.clicksByButton[t.button];if(h.target===a.target&&i-h.timeStamp<200?++h.clickCount:h.clickCount=1,h.target=a.target,h.timeStamp=i,a.detail=h.clickCount,a.pointerType==="mouse"){const l=a.button===2;this.dispatchEvent(a,l?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(s)}mapPointerUpOutside(t){if(!(t instanceof Xt)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}const i=this.trackingData(t.pointerId),s=this.findMountedTarget(i.pressTargetsByButton[t.button]),r=this.createPointerEvent(t);if(s){let n=s;for(;n;)r.currentTarget=n,this.notifyTarget(r,"pointerupoutside"),r.pointerType==="touch"?this.notifyTarget(r,"touchendoutside"):(r.pointerType==="mouse"||r.pointerType==="pen")&&this.notifyTarget(r,r.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete i.pressTargetsByButton[t.button]}this.freeEvent(r)}mapWheel(t){if(!(t instanceof ke)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}const i=this.createWheelEvent(t);this.dispatchEvent(i),this.freeEvent(i)}findMountedTarget(t){if(!t)return null;let i=t[0];for(let s=1;s<t.length&&t[s].parent===i;s++)i=t[s];return i}createPointerEvent(t,i,s){var n;const r=this.allocateEvent(Xt);return this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,r.originalEvent=t,r.target=(n=s!=null?s:this.hitTest(r.global.x,r.global.y))!=null?n:this._hitElements[0],typeof i=="string"&&(r.type=i),r}createWheelEvent(t){const i=this.allocateEvent(ke);return this.copyWheelData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t,i.target=this.hitTest(i.global.x,i.global.y),i}clonePointerEvent(t,i){const s=this.allocateEvent(Xt);return s.nativeEvent=t.nativeEvent,s.originalEvent=t.originalEvent,this.copyPointerData(t,s),this.copyMouseData(t,s),this.copyData(t,s),s.target=t.target,s.path=t.composedPath().slice(),s.type=i!=null?i:s.type,s}copyWheelData(t,i){i.deltaMode=t.deltaMode,i.deltaX=t.deltaX,i.deltaY=t.deltaY,i.deltaZ=t.deltaZ}copyPointerData(t,i){t instanceof Xt&&i instanceof Xt&&(i.pointerId=t.pointerId,i.width=t.width,i.height=t.height,i.isPrimary=t.isPrimary,i.pointerType=t.pointerType,i.pressure=t.pressure,i.tangentialPressure=t.tangentialPressure,i.tiltX=t.tiltX,i.tiltY=t.tiltY,i.twist=t.twist)}copyMouseData(t,i){t instanceof Mi&&i instanceof Mi&&(i.altKey=t.altKey,i.button=t.button,i.buttons=t.buttons,i.client.copyFrom(t.client),i.ctrlKey=t.ctrlKey,i.metaKey=t.metaKey,i.movement.copyFrom(t.movement),i.screen.copyFrom(t.screen),i.shiftKey=t.shiftKey,i.global.copyFrom(t.global))}copyData(t,i){i.isTrusted=t.isTrusted,i.srcElement=t.srcElement,i.timeStamp=performance.now(),i.type=t.type,i.detail=t.detail,i.view=t.view,i.which=t.which,i.layer.copyFrom(t.layer),i.page.copyFrom(t.page)}trackingData(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]}allocateEvent(t){this.eventPool.has(t)||this.eventPool.set(t,[]);const i=this.eventPool.get(t).pop()||new t(this);return i.eventPhase=i.NONE,i.currentTarget=null,i.path=null,i.target=null,i}freeEvent(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");const i=t.constructor;this.eventPool.has(i)||this.eventPool.set(i,[]),this.eventPool.get(i).push(t)}notifyListeners(t,i){const s=t.currentTarget._events[i];if(!!s&&!!t.currentTarget.isInteractive())if("fn"in s)s.once&&t.currentTarget.removeListener(i,s.fn,void 0,!0),s.fn.call(s.context,t);else for(let r=0,n=s.length;r<n&&!t.propagationImmediatelyStopped;r++)s[r].once&&t.currentTarget.removeListener(i,s[r].fn,void 0,!0),s[r].fn.call(s[r].context,t)}}const mu=1,_u={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},yn=class{constructor(e){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=e,this.rootBoundary=new Na(null),Te.init(this),this.autoPreventDefault=!0,this.eventsAdded=!1,this.rootPointerEvent=new Xt(null),this.rootWheelEvent=new ke(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy(bt({},yn.defaultEventFeatures),{set:(t,i,s)=>(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=s),t[i]=s,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){var s,r;const{view:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,yn._defaultEventMode=(s=e.eventMode)!=null?s:"auto",Object.assign(this.features,(r=e.eventFeatures)!=null?r:{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this.currentCursor===e)return;this.currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this.rootPointerEvent}onPointerDown(e){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&e.pointerType==="touch"))return;const t=this.normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,s=t.length;i<s;i++){const r=t[i],n=this.bootstrapEvent(this.rootPointerEvent,r);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}onPointerMove(e){if(!this.features.move||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&e.pointerType==="touch"))return;Te.pointerMoved();const t=this.normalizeToPointerData(e);for(let i=0,s=t.length;i<s;i++){const r=this.bootstrapEvent(this.rootPointerEvent,t[i]);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}onPointerUp(e){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&e.pointerType==="touch"))return;let t=e.target;e.composedPath&&e.composedPath().length>0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",s=this.normalizeToPointerData(e);for(let r=0,n=s.length;r<n;r++){const o=this.bootstrapEvent(this.rootPointerEvent,s[r]);o.type+=i,this.rootBoundary.mapEvent(o)}this.setCursor(this.rootBoundary.cursor)}onPointerOverOut(e){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&e.pointerType==="touch"))return;const t=this.normalizeToPointerData(e);for(let i=0,s=t.length;i<s;i++){const r=this.bootstrapEvent(this.rootPointerEvent,t[i]);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;const t=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(t)}setTargetElement(e){this.removeEvents(),this.domElement=e,Te.domElement=e,this.addEvents()}addEvents(){if(this.eventsAdded||!this.domElement)return;Te.addTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,!0),this.domElement.addEventListener("pointerdown",this.onPointerDown,!0),this.domElement.addEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this.onPointerOverOut,!0),globalThis.addEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,!0),this.domElement.addEventListener("mousedown",this.onPointerDown,!0),this.domElement.addEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this.onPointerOverOut,!0),globalThis.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this.onPointerDown,!0),this.domElement.addEventListener("touchend",this.onPointerUp,!0),this.domElement.addEventListener("touchmove",this.onPointerMove,!0)),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this.eventsAdded=!0}removeEvents(){if(!this.eventsAdded||!this.domElement)return;Te.removeTickerListener();const e=this.domElement.style;globalThis.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this.onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,!0),this.domElement.removeEventListener("mousedown",this.onPointerDown,!0),this.domElement.removeEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this.onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this.onPointerDown,!0),this.domElement.removeEventListener("touchend",this.onPointerUp,!0),this.domElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this.eventsAdded=!1}mapPositionToPoint(e,t,i){let s;this.domElement.parentElement?s=this.domElement.getBoundingClientRect():s={x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0};const r=1/this.resolution;e.x=(t-s.left)*(this.domElement.width/s.width)*r,e.y=(i-s.top)*(this.domElement.height/s.height)*r}normalizeToPointerData(e){const t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let i=0,s=e.changedTouches.length;i<s;i++){const r=e.changedTouches[i];typeof r.button=="undefined"&&(r.button=0),typeof r.buttons=="undefined"&&(r.buttons=1),typeof r.isPrimary=="undefined"&&(r.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof r.width=="undefined"&&(r.width=r.radiusX||1),typeof r.height=="undefined"&&(r.height=r.radiusY||1),typeof r.tiltX=="undefined"&&(r.tiltX=0),typeof r.tiltY=="undefined"&&(r.tiltY=0),typeof r.pointerType=="undefined"&&(r.pointerType="touch"),typeof r.pointerId=="undefined"&&(r.pointerId=r.identifier||0),typeof r.pressure=="undefined"&&(r.pressure=r.force||.5),typeof r.twist=="undefined"&&(r.twist=0),typeof r.tangentialPressure=="undefined"&&(r.tangentialPressure=0),typeof r.layerX=="undefined"&&(r.layerX=r.offsetX=r.clientX),typeof r.layerY=="undefined"&&(r.layerY=r.offsetY=r.clientY),r.isNormalized=!0,r.type=e.type,t.push(r)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary=="undefined"&&(i.isPrimary=!0),typeof i.width=="undefined"&&(i.width=1),typeof i.height=="undefined"&&(i.height=1),typeof i.tiltX=="undefined"&&(i.tiltX=0),typeof i.tiltY=="undefined"&&(i.tiltY=0),typeof i.pointerType=="undefined"&&(i.pointerType="mouse"),typeof i.pointerId=="undefined"&&(i.pointerId=mu),typeof i.pressure=="undefined"&&(i.pressure=.5),typeof i.twist=="undefined"&&(i.twist=0),typeof i.tangentialPressure=="undefined"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this.rootWheelEvent;return this.transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=_u[e.type]||e.type),e}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};let ti=yn;ti.extension={name:"events",type:[M.RendererSystem,M.CanvasRendererSystem]},ti.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0},U.add(ti);function La(e){return e==="dynamic"||e==="static"}const Oa={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){var e;return(e=this._internalInteractive)!=null?e:La(ti.defaultEventMode)},set interactive(e){z("7.2.0","Setting interactive is deprecated, use eventMode = \'none\'/\'passive\'/\'auto\'/\'static\'/\'dynamic\' instead."),this._internalInteractive=e,this.eventMode=e?"static":"auto"},_internalEventMode:void 0,get eventMode(){var e;return(e=this._internalEventMode)!=null?e:ti.defaultEventMode},set eventMode(e){this._internalInteractive=La(e),this._internalEventMode=e},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(e,t,i){const s=typeof i=="boolean"&&i||typeof i=="object"&&i.capture,r=typeof t=="function"?void 0:t;e=s?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.on(e,t,r)},removeEventListener(e,t,i){const s=typeof i=="boolean"&&i||typeof i=="object"&&i.capture,r=typeof t=="function"?void 0:t;e=s?`${e}capture`:e,t=typeof t=="function"?t:t.handleEvent,this.off(e,t,r)},dispatchEvent(e){if(!(e instanceof Qe))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}};st.mixin(Oa);const Ua={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};st.mixin(Ua);const gu=9,Ls=100,yu=0,vu=0,ka=2,Ga=1,xu=-1e3,bu=-1e3,Tu=2;class vn{constructor(t){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(Yt.tablet||Yt.phone)&&this.createTouchHook();const i=document.createElement("div");i.style.width=`${Ls}px`,i.style.height=`${Ls}px`,i.style.position="absolute",i.style.top=`${yu}px`,i.style.left=`${vu}px`,i.style.zIndex=ka.toString(),this.div=i,this.renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){const t=document.createElement("button");t.style.width=`${Ga}px`,t.style.height=`${Ga}px`,t.style.position="absolute",t.style.top=`${xu}px`,t.style.left=`${bu}px`,t.style.zIndex=Tu.toString(),t.style.backgroundColor="#FF0000",t.title="select to enable accessibility for this content",t.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(t),this._hookDiv=t}destroyTouchHook(){!this._hookDiv||(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){var t;this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),(t=this.renderer.view.parentNode)==null||t.appendChild(this.div))}deactivate(){var t;!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),(t=this.div.parentNode)==null||t.removeChild(this.div))}updateAccessibleObjects(t){if(!t.visible||!t.accessibleChildren)return;t.accessible&&t.isInteractive()&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);const i=t.children;if(i)for(let s=0;s<i.length;s++)this.updateAccessibleObjects(i[s])}update(){const t=performance.now();if(Yt.android.device&&t<this.androidUpdateCount||(this.androidUpdateCount=t+this.androidUpdateFrequency,!this.renderer.renderingToScreen))return;this.renderer.lastObjectRendered&&this.updateAccessibleObjects(this.renderer.lastObjectRendered);const{x:i,y:s,width:r,height:n}=this.renderer.view.getBoundingClientRect(),{width:o,height:a,resolution:h}=this.renderer,l=r/o*h,c=n/a*h;let u=this.div;u.style.left=`${i}px`,u.style.top=`${s}px`,u.style.width=`${o}px`,u.style.height=`${a}px`;for(let d=0;d<this.children.length;d++){const f=this.children[d];if(f.renderId!==this.renderId)f._accessibleActive=!1,Ie(this.children,d,1),this.div.removeChild(f._accessibleDiv),this.pool.push(f._accessibleDiv),f._accessibleDiv=null,d--;else{u=f._accessibleDiv;let p=f.hitArea;const _=f.worldTransform;f.hitArea?(u.style.left=`${(_.tx+p.x*_.a)*l}px`,u.style.top=`${(_.ty+p.y*_.d)*c}px`,u.style.width=`${p.width*_.a*l}px`,u.style.height=`${p.height*_.d*c}px`):(p=f.getBounds(),this.capHitArea(p),u.style.left=`${p.x*l}px`,u.style.top=`${p.y*c}px`,u.style.width=`${p.width*l}px`,u.style.height=`${p.height*c}px`,u.title!==f.accessibleTitle&&f.accessibleTitle!==null&&(u.title=f.accessibleTitle),u.getAttribute("aria-label")!==f.accessibleHint&&f.accessibleHint!==null&&u.setAttribute("aria-label",f.accessibleHint)),(f.accessibleTitle!==u.title||f.tabIndex!==u.tabIndex)&&(u.title=f.accessibleTitle,u.tabIndex=f.tabIndex,this.debug&&this.updateDebugHTML(u))}}this.renderId++}updateDebugHTML(t){t.innerHTML=`type: ${t.type}</br> title : ${t.title}</br> tabIndex: ${t.tabIndex}`}capHitArea(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);const{width:i,height:s}=this.renderer;t.x+t.width>i&&(t.width=i-t.x),t.y+t.height>s&&(t.height=s-t.y)}addChild(t){let i=this.pool.pop();i||(i=document.createElement("button"),i.style.width=`${Ls}px`,i.style.height=`${Ls}px`,i.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",i.style.position="absolute",i.style.zIndex=ka.toString(),i.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?i.setAttribute("aria-live","off"):i.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\\//)?i.setAttribute("aria-relevant","additions"):i.setAttribute("aria-relevant","text"),i.addEventListener("click",this._onClick.bind(this)),i.addEventListener("focus",this._onFocus.bind(this)),i.addEventListener("focusout",this._onFocusOut.bind(this))),i.style.pointerEvents=t.accessiblePointerEvents,i.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?i.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(i.title=`displayObject ${t.tabIndex}`),t.accessibleHint&&t.accessibleHint!==null&&i.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(i),t._accessibleActive=!0,t._accessibleDiv=i,i.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex}_dispatchEvent(t,i){const{displayObject:s}=t.target,r=this.renderer.events.rootBoundary,n=Object.assign(new Qe(r),{target:s});r.rootTarget=this.renderer.lastObjectRendered,i.forEach(o=>r.dispatchEvent(n,o))}_onClick(t){this._dispatchEvent(t,["click","pointertap","tap"])}_onFocus(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive"),this._dispatchEvent(t,["mouseover"])}_onFocusOut(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite"),this._dispatchEvent(t,["mouseout"])}_onKeyDown(t){t.keyCode===gu&&this.activate()}_onMouseMove(t){t.movementX===0&&t.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}vn.extension={name:"accessibility",type:[M.RendererPlugin,M.CanvasRendererPlugin]},U.add(vn);const xn=class{constructor(e){this.stage=new Ct,e=Object.assign({forceCanvas:!1},e),this.renderer=wa(e),xn._plugins.forEach(t=>{t.init.call(this,e)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer.view}get screen(){return this.renderer.screen}destroy(e,t){const i=xn._plugins.slice(0);i.reverse(),i.forEach(s=>{s.destroy.call(this)}),this.stage.destroy(t),this.stage=null,this.renderer.destroy(e),this.renderer=null}};let bn=xn;bn._plugins=[],U.handleByList(M.Application,bn._plugins);class Tn{static init(t){Object.defineProperty(this,"resizeTo",{set(i){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=i,i&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{!this._resizeTo||(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let i,s;if(this._resizeTo===globalThis.window)i=globalThis.innerWidth,s=globalThis.innerHeight;else{const{clientWidth:r,clientHeight:n}=this._resizeTo;i=r,s=n}this.renderer.resize(i,s),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}Tn.extension=M.Application,U.add(Tn);const Ha={loader:M.LoadParser,resolver:M.ResolveParser,cache:M.CacheParser,detection:M.DetectionParser};U.handle(M.Asset,e=>{const t=e.ref;Object.entries(Ha).filter(([i])=>!!t[i]).forEach(([i,s])=>{var r;return U.add(Object.assign(t[i],{extension:(r=t[i].extension)!=null?r:s}))})},e=>{const t=e.ref;Object.keys(Ha).filter(i=>!!t[i]).forEach(i=>U.remove(t[i]))});class Eu{constructor(t,i=!1){this._loader=t,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=i}add(t){t.forEach(i=>{this._assetList.push(i)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const t=[],i=Math.min(this._assetList.length,this._maxConcurrent);for(let s=0;s<i;s++)t.push(this._assetList.pop());await this._loader.load(t),this._isLoading=!1,this._next()}}get active(){return this._isActive}set active(t){this._isActive!==t&&(this._isActive=t,t&&!this._isLoading&&this._next())}}function ei(e,t){if(Array.isArray(t)){for(const i of t)if(e.startsWith(`data:${i}`))return!0;return!1}return e.startsWith(`data:${t}`)}function Ee(e,t){const i=e.split("?")[0],s=Tt.extname(i).toLowerCase();return Array.isArray(t)?t.includes(s):s===t}const oe=(e,t)=>(Array.isArray(e)||(e=[e]),t?e.map(i=>typeof i=="string"?t(i):i):e),Os=(e,t)=>{const i=t.split("?")[1];return i&&(e+=`?${i}`),e};function Xa(e,t,i,s,r){const n=t[i];for(let o=0;o<n.length;o++){const a=n[o];i<t.length-1?Xa(e.replace(s[i],a),t,i+1,s,r):r.push(e.replace(s[i],a))}}function Va(e){const t=/\\{(.*?)\\}/g,i=e.match(t),s=[];if(i){const r=[];i.forEach(n=>{const o=n.substring(1,n.length-1).split(",");r.push(o)}),Xa(e,r,0,i,s)}else s.push(e);return s}const Bi=e=>!Array.isArray(e);class wu{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){const i=this._cache.get(t);return i||console.warn(`[Assets] Asset id ${t} was not found in the Cache`),i}set(t,i){const s=oe(t);let r;for(let a=0;a<this.parsers.length;a++){const h=this.parsers[a];if(h.test(i)){r=h.getCacheableAssets(s,i);break}}r||(r={},s.forEach(a=>{r[a]=i}));const n=Object.keys(r),o={cacheKeys:n,keys:s};if(s.forEach(a=>{this._cacheMap.set(a,o)}),n.forEach(a=>{this._cache.has(a)&&this._cache.get(a)!==i&&console.warn("[Cache] already has key:",a),this._cache.set(a,r[a])}),i instanceof B){const a=i;s.forEach(h=>{a.baseTexture!==B.EMPTY.baseTexture&&V.addToCache(a.baseTexture,h),B.addToCache(a,h)})}}remove(t){if(this._cacheMap.get(t),!this._cacheMap.has(t)){console.warn(`[Assets] Asset id ${t} was not found in the Cache`);return}const i=this._cacheMap.get(t);i.cacheKeys.forEach(r=>{this._cache.delete(r)}),i.keys.forEach(r=>{this._cacheMap.delete(r)})}get parsers(){return this._parsers}}const ii=new wu;class Su{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(t,i,s)=>(this._parsersValidated=!1,t[i]=s,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(t,i){const s={promise:null,parser:null};return s.promise=(async()=>{var o,a;let r=null,n=null;if(i.loadParser&&(n=this._parserHash[i.loadParser],n||console.warn(`[Assets] specified load parser "${i.loadParser}" not found while loading ${t}`)),!n){for(let h=0;h<this.parsers.length;h++){const l=this.parsers[h];if(l.load&&((o=l.test)==null?void 0:o.call(l,t,i,this))){n=l;break}}if(!n)return console.warn(`[Assets] ${t} could not be loaded as we don\'t know how to parse it, ensure the correct parser has been added`),null}r=await n.load(t,i,this),s.parser=n;for(let h=0;h<this.parsers.length;h++){const l=this.parsers[h];l.parse&&l.parse&&await((a=l.testParse)==null?void 0:a.call(l,r,i,this))&&(r=await l.parse(r,i,this)||r,s.parser=l)}return r})(),s}async load(t,i){this._parsersValidated||this._validateParsers();let s=0;const r={},n=Bi(t),o=oe(t,l=>({src:l})),a=o.length,h=o.map(async l=>{const c=Tt.toAbsolute(l.src);if(!r[l.src])try{this.promiseCache[c]||(this.promiseCache[c]=this._getLoadPromiseAndParser(c,l)),r[l.src]=await this.promiseCache[c].promise,i&&i(++s/a)}catch(u){throw delete this.promiseCache[c],delete r[l.src],new Error(`[Loader.load] Failed to load ${c}.\n${u}`)}});return await Promise.all(h),n?r[o[0].src]:r}async unload(t){const s=oe(t,r=>({src:r})).map(async r=>{var a,h;const n=Tt.toAbsolute(r.src),o=this.promiseCache[n];if(o){const l=await o.promise;(h=(a=o.parser)==null?void 0:a.unload)==null||h.call(a,l,r,this),delete this.promiseCache[n]}});await Promise.all(s)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(t=>t.name).reduce((t,i)=>(t[i.name]&&console.warn(`[Assets] loadParser name conflict "${i.name}"`),Qi(bt({},t),{[i.name]:i})),{})}}var Jt=(e=>(e[e.Low=0]="Low",e[e.Normal=1]="Normal",e[e.High=2]="High",e))(Jt||{});const Au=".json",Ru="application/json",za={extension:{type:M.LoadParser,priority:Jt.Low},name:"loadJson",test(e){return ei(e,Ru)||Ee(e,Au)},async load(e){return await(await P.ADAPTER.fetch(e)).json()}};U.add(za);const Cu=".txt",Iu="text/plain",Wa={name:"loadTxt",extension:{type:M.LoadParser,priority:Jt.Low},test(e){return ei(e,Iu)||Ee(e,Cu)},async load(e){return await(await P.ADAPTER.fetch(e)).text()}};U.add(Wa);const Pu=["normal","bold","100","200","300","400","500","600","700","800","900"],Mu=[".ttf",".otf",".woff",".woff2"],Bu=["font/ttf","font/otf","font/woff","font/woff2"],Du=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function $a(e){const t=Tt.extname(e),r=Tt.basename(e,t).replace(/(-|_)/g," ").toLowerCase().split(" ").map(a=>a.charAt(0).toUpperCase()+a.slice(1));let n=r.length>0;for(const a of r)if(!a.match(Du)){n=!1;break}let o=r.join(" ");return n||(o=`"${o.replace(/[\\\\"]/g,"\\\\$&")}"`),o}const ja={extension:{type:M.LoadParser,priority:Jt.Low},name:"loadWebFont",test(e){return ei(e,Bu)||Ee(e,Mu)},async load(e,t){var s,r,n,o,a,h;const i=P.ADAPTER.getFontFaceSet();if(i){const l=[],c=(r=(s=t.data)==null?void 0:s.family)!=null?r:$a(e),u=(a=(o=(n=t.data)==null?void 0:n.weights)==null?void 0:o.filter(f=>Pu.includes(f)))!=null?a:["normal"],d=(h=t.data)!=null?h:{};for(let f=0;f<u.length;f++){const p=u[f],_=new FontFace(c,`url(${encodeURI(e)})`,Qi(bt({},d),{weight:p}));await _.load(),i.add(_),l.push(_)}return l.length===1?l[0]:l}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(e){(Array.isArray(e)?e:[e]).forEach(t=>P.ADAPTER.getFontFaceSet().delete(t))}};U.add(ja);let Ya=0,En;const Fu={id:"checkImageBitmap",code:`\n    async function checkImageBitmap()\n    {\n        try\n        {\n            if (typeof createImageBitmap !== \'function\') return false;\n\n            const response = await fetch(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=\');\n            const imageBlob =  await response.blob();\n            const imageBitmap = await createImageBitmap(imageBlob);\n\n            return imageBitmap.width === 1 && imageBitmap.height === 1;\n        }\n        catch (e)\n        {\n            return false;\n        }\n    }\n    checkImageBitmap().then((result) => { self.postMessage(result); });\n    `},Nu={id:"loadImageBitmap",code:`\n    async function loadImageBitmap(url)\n    {\n        const response = await fetch(url);\n\n        if (!response.ok)\n        {\n            throw new Error(\\`[WorkerManager.loadImageBitmap] Failed to fetch \\${url}: \\`\n                + \\`\\${response.status} \\${response.statusText}\\`);\n        }\n\n        const imageBlob =  await response.blob();\n        const imageBitmap = await createImageBitmap(imageBlob);\n\n        return imageBitmap;\n    }\n    self.onmessage = async (event) =>\n    {\n        try\n        {\n            const imageBitmap = await loadImageBitmap(event.data.data[0]);\n\n            self.postMessage({\n                data: imageBitmap,\n                uuid: event.data.uuid,\n                id: event.data.id,\n            }, [imageBitmap]);\n        }\n        catch(e)\n        {\n            self.postMessage({\n                error: e,\n                uuid: event.data.uuid,\n                id: event.data.id,\n            });\n        }\n    };`};let wn;class Lu{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(t=>{const i=URL.createObjectURL(new Blob([Fu.code],{type:"application/javascript"})),s=new Worker(i);s.addEventListener("message",r=>{s.terminate(),URL.revokeObjectURL(i),t(r.data)})}),this._isImageBitmapSupported)}loadImageBitmap(t){return this._run("loadImageBitmap",[t])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){En===void 0&&(En=navigator.hardwareConcurrency||4);let t=this.workerPool.pop();return!t&&this._createdWorkers<En&&(wn||(wn=URL.createObjectURL(new Blob([Nu.code],{type:"application/javascript"}))),this._createdWorkers++,t=new Worker(wn),t.addEventListener("message",i=>{this.complete(i.data),this.returnWorker(i.target),this.next()})),t}returnWorker(t){this.workerPool.push(t)}complete(t){t.error!==void 0?this.resolveHash[t.uuid].reject(t.error):this.resolveHash[t.uuid].resolve(t.data),this.resolveHash[t.uuid]=null}async _run(t,i){await this._initWorkers();const s=new Promise((r,n)=>{this.queue.push({id:t,arguments:i,resolve:r,reject:n})});return this.next(),s}next(){if(!this.queue.length)return;const t=this.getWorker();if(!t)return;const i=this.queue.pop(),s=i.id;this.resolveHash[Ya]={resolve:i.resolve,reject:i.reject},t.postMessage({data:i.arguments,uuid:Ya++,id:s})}}const qa=new Lu;function Di(e,t,i){const s=new B(e);return s.baseTexture.on("dispose",()=>{delete t.promiseCache[i]}),s}const Ou=[".jpeg",".jpg",".png",".webp",".avif"],Uu=["image/jpeg","image/png","image/webp","image/avif"];async function Ka(e){const t=await P.ADAPTER.fetch(e);if(!t.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${e}: ${t.status} ${t.statusText}`);const i=await t.blob();return await createImageBitmap(i)}const Fi={name:"loadTextures",extension:{type:M.LoadParser,priority:Jt.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(e){return ei(e,Uu)||Ee(e,Ou)},async load(e,t,i){let s=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await qa.isImageBitmapSupported()?s=await qa.loadImageBitmap(e):s=await Ka(e):s=await new Promise(n=>{s=new Image,s.crossOrigin=this.config.crossOrigin,s.src=e,s.complete?n(s):s.onload=()=>{n(s)}});const r=new V(s,bt({resolution:fe(e)},t.data));return r.resource.src=e,Di(r,i,e)},unload(e){e.destroy(!0)}};U.add(Fi);const ku=".svg",Gu="image/svg+xml",Za={extension:{type:M.LoadParser,priority:Jt.High},name:"loadSVG",test(e){return ei(e,Gu)||Ee(e,ku)},async testParse(e){return Je.test(e)},async parse(e,t,i){var o;const s=new Je(e,(o=t==null?void 0:t.data)==null?void 0:o.resourceOptions);await s.load();const r=new V(s,bt({resolution:fe(e)},t==null?void 0:t.data));return r.resource.src=e,Di(r,i,e)},async load(e,t){return(await P.ADAPTER.fetch(e)).text()},unload:Fi.unload};U.add(Za);class Hu{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,i)=>`${t}${this._bundleIdConnector}${i}`,extractAssetIdFromBundle:(t,i)=>i.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){var i,s,r;if(this._bundleIdConnector=(i=t.connector)!=null?i:this._bundleIdConnector,this._createBundleAssetId=(s=t.createBundleAssetId)!=null?s:this._createBundleAssetId,this._extractAssetIdFromBundle=(r=t.extractAssetIdFromBundle)!=null?r:this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(i=>{this._preferredOrder.push(i),i.priority||(i.priority=Object.keys(i.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const i=t;this._defaultSearchParams=Object.keys(i).map(s=>`${encodeURIComponent(s)}=${encodeURIComponent(i[s])}`).join("&")}}addManifest(t){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(i=>{this.addBundle(i.name,i.assets)})}addBundle(t,i){const s=[];Array.isArray(i)?i.forEach(r=>{if(typeof r.name=="string"){const n=this._createBundleAssetId(t,r.name);s.push(n),this.add([r.name,n],r.srcs,r.data)}else{const n=r.name.map(o=>this._createBundleAssetId(t,o));n.forEach(o=>{s.push(o)}),this.add([...r.name,...n],r.srcs)}}):Object.keys(i).forEach(r=>{s.push(this._createBundleAssetId(t,r)),this.add([r,this._createBundleAssetId(t,r)],i[r])}),this._bundles[t]=s}add(t,i,s){const r=oe(t);r.forEach(o=>{this.hasKey(o)&&console.warn(`[Resolver] already has key: ${o} overwriting`)}),Array.isArray(i)||(typeof i=="string"?i=Va(i):i=[i]);const n=i.map(o=>{var h;let a=o;if(typeof o=="string"){let l=!1;for(let c=0;c<this._parsers.length;c++){const u=this._parsers[c];if(u.test(o)){a=u.parse(o),l=!0;break}}l||(a={src:o})}return a.format||(a.format=a.src.split(".").pop()),a.alias||(a.alias=r),(this._basePath||this._rootPath)&&(a.src=Tt.toAbsolute(a.src,this._basePath,this._rootPath)),a.src=this._appendDefaultSearchParams(a.src),a.data=(h=a.data)!=null?h:s,a});r.forEach(o=>{this._assetMap[o]=n})}resolveBundle(t){const i=Bi(t);t=oe(t);const s={};return t.forEach(r=>{const n=this._bundles[r];if(n){const o=this.resolve(n),a={};for(const h in o){const l=o[h];a[this._extractAssetIdFromBundle(r,h)]=l}s[r]=a}}),i?s[t[0]]:s}resolveUrl(t){const i=this.resolve(t);if(typeof t!="string"){const s={};for(const r in i)s[r]=i[r].src;return s}return i.src}resolve(t){const i=Bi(t);t=oe(t);const s={};return t.forEach(r=>{var n;if(!this._resolverHash[r])if(this._assetMap[r]){let o=this._assetMap[r];const a=this._getPreferredOrder(o),h=o[0];a==null||a.priority.forEach(l=>{a.params[l].forEach(c=>{const u=o.filter(d=>d[l]?d[l]===c:!1);u.length&&(o=u)})}),this._resolverHash[r]=(n=o[0])!=null?n:h}else{let o=r;(this._basePath||this._rootPath)&&(o=Tt.toAbsolute(o,this._basePath,this._rootPath)),o=this._appendDefaultSearchParams(o),this._resolverHash[r]={src:o}}s[r]=this._resolverHash[r]}),i?s[t[0]]:s}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let i=0;i<t.length;i++){const s=t[0],r=this._preferredOrder.find(n=>n.params.format.includes(s.format));if(r)return r}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const i=/\\?/.test(t)?"&":"?";return`${t}${i}${this._defaultSearchParams}`}}class Ja{constructor(){this._detections=[],this._initialized=!1,this.resolver=new Hu,this.loader=new Su,this.cache=ii,this._backgroundLoader=new Eu(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(t={}){var n,o,a,h;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,t.defaultSearchParams&&this.resolver.setDefaultSearchParams(t.defaultSearchParams),t.basePath&&(this.resolver.basePath=t.basePath),t.bundleIdentifier&&this.resolver.setBundleIdentifier(t.bundleIdentifier),t.manifest){let l=t.manifest;typeof l=="string"&&(l=await this.load(l)),this.resolver.addManifest(l)}const i=(o=(n=t.texturePreference)==null?void 0:n.resolution)!=null?o:1,s=typeof i=="number"?[i]:i;let r=[];if((a=t.texturePreference)!=null&&a.format){const l=(h=t.texturePreference)==null?void 0:h.format;r=typeof l=="string"?[l]:l;for(const c of this._detections)await c.test()||(r=await c.remove(r))}else for(const l of this._detections)await l.test()&&(r=await l.add(r));this.resolver.prefer({params:{format:r,resolution:s}}),t.preferences&&this.setPreferences(t.preferences)}add(t,i,s){this.resolver.add(t,i,s)}async load(t,i){this._initialized||await this.init();const s=Bi(t),r=oe(t).map(a=>typeof a!="string"?(this.resolver.add(a.src,a),a.src):(this.resolver.hasKey(a)||this.resolver.add(a,a),a)),n=this.resolver.resolve(r),o=await this._mapLoadToResolve(n,i);return s?o[r[0]]:o}addBundle(t,i){this.resolver.addBundle(t,i)}async loadBundle(t,i){this._initialized||await this.init();let s=!1;typeof t=="string"&&(s=!0,t=[t]);const r=this.resolver.resolveBundle(t),n={},o=Object.keys(r);let a=0,h=0;const l=()=>{i==null||i(++a/h)},c=o.map(u=>{const d=r[u];return h+=Object.keys(d).length,this._mapLoadToResolve(d,l).then(f=>{n[u]=f})});return await Promise.all(c),s?n[t[0]]:n}async backgroundLoad(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const i=this.resolver.resolve(t);this._backgroundLoader.add(Object.values(i))}async backgroundLoadBundle(t){this._initialized||await this.init(),typeof t=="string"&&(t=[t]);const i=this.resolver.resolveBundle(t);Object.values(i).forEach(s=>{this._backgroundLoader.add(Object.values(s))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(t){if(typeof t=="string")return ii.get(t);const i={};for(let s=0;s<t.length;s++)i[s]=ii.get(t[s]);return i}async _mapLoadToResolve(t,i){const s=Object.values(t),r=Object.keys(t);this._backgroundLoader.active=!1;const n=await this.loader.load(s,i);this._backgroundLoader.active=!0;const o={};return s.forEach((a,h)=>{const l=n[a.src],c=[a.src];a.alias&&c.push(...a.alias),o[r[h]]=l,ii.set(c,l)}),o}async unload(t){this._initialized||await this.init();const i=oe(t).map(r=>typeof r!="string"?r.src:r),s=this.resolver.resolve(i);await this._unloadFromResolved(s)}async unloadBundle(t){this._initialized||await this.init(),t=oe(t);const i=this.resolver.resolveBundle(t),s=Object.keys(i).map(r=>this._unloadFromResolved(i[r]));await Promise.all(s)}async _unloadFromResolved(t){const i=Object.values(t);i.forEach(s=>{ii.remove(s.src)}),await this.loader.unload(i)}get detections(){return this._detections}get preferWorkers(){return Fi.config.preferWorkers}set preferWorkers(t){z("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:t})}setPreferences(t){this.loader.parsers.forEach(i=>{!i.config||Object.keys(i.config).filter(s=>s in t).forEach(s=>{i.config[s]=t[s]})})}}const Ni=new Ja;U.handleByList(M.LoadParser,Ni.loader.parsers).handleByList(M.ResolveParser,Ni.resolver.parsers).handleByList(M.CacheParser,Ni.cache.parsers).handleByList(M.DetectionParser,Ni.detections);const Qa={extension:M.CacheParser,test:e=>Array.isArray(e)&&e.every(t=>t instanceof B),getCacheableAssets:(e,t)=>{const i={};return e.forEach(s=>{t.forEach((r,n)=>{i[s+(n===0?"":n+1)]=r})}),i}};U.add(Qa);const th={extension:{type:M.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=",t=await P.ADAPTER.fetch(e).then(i=>i.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"avif"],remove:async e=>e.filter(t=>t!=="avif")};U.add(th);const eh={extension:{type:M.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;const e="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",t=await P.ADAPTER.fetch(e).then(i=>i.blob());return createImageBitmap(t).then(()=>!0,()=>!1)},add:async e=>[...e,"webp"],remove:async e=>e.filter(t=>t!=="webp")};U.add(eh);const ih=["png","jpg","jpeg"],sh={extension:{type:M.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async e=>[...e,...ih],remove:async e=>e.filter(t=>!ih.includes(t))};U.add(sh);const rh={extension:M.ResolveParser,test:Fi.test,parse:e=>{var t,i;return{resolution:parseFloat((i=(t=P.RETINA_PREFIX.exec(e))==null?void 0:t[1])!=null?i:"1"),format:e.split(".").pop(),src:e}}};U.add(rh);var It=(e=>(e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",e[e.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",e[e.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",e[e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",e[e.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",e[e.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",e[e.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",e[e.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",e))(It||{});const Li={[33776]:.5,[33777]:.5,[33778]:1,[33779]:1,[35916]:.5,[35917]:.5,[35918]:1,[35919]:1,[37488]:.5,[37489]:.5,[37490]:1,[37491]:1,[37492]:.5,[37496]:1,[37493]:.5,[37497]:1,[37494]:.5,[37495]:.5,[35840]:.5,[35842]:.5,[35841]:.25,[35843]:.25,[36196]:.5,[35986]:.5,[35986]:1,[34798]:1,[37808]:1};let ve,si;function nh(){si={s3tc:ve.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:ve.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:ve.getExtension("WEBGL_compressed_texture_etc"),etc1:ve.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:ve.getExtension("WEBGL_compressed_texture_pvrtc")||ve.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:ve.getExtension("WEBGL_compressed_texture_atc"),astc:ve.getExtension("WEBGL_compressed_texture_astc")}}const oh={extension:{type:M.DetectionParser,priority:2},test:async()=>{const t=P.ADAPTER.createCanvas().getContext("webgl");return t?(ve=t,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async e=>{si||nh();const t=[];for(const i in si)!si[i]||t.push(i);return[...t,...e]},remove:async e=>(si||nh(),e.filter(t=>!(t in si)))};U.add(oh);class ah extends Ye{constructor(t,i={width:1,height:1,autoLoad:!0}){let s,r;typeof t=="string"?(s=t,r=new Uint8Array):(s=null,r=t),super(r,i),this.origin=s,this.buffer=r?new ds(r):null,this._load=null,this.loaded=!1,this.origin!==null&&i.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(t){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(t=>t.blob()).then(t=>t.arrayBuffer()).then(t=>(this.data=new Uint32Array(t),this.buffer=new ds(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),this)),this._load)}}class we extends ah{constructor(t,i){super(t,i),this.format=i.format,this.levels=i.levels||1,this._width=i.width,this._height=i.height,this._extension=we._formatToExtension(this.format),(i.levelBuffers||this.buffer)&&(this._levelBuffers=i.levelBuffers||we._createLevelBuffers(t instanceof Uint8Array?t:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(t,i,s){const r=t.gl;if(!t.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let o=0,a=this.levels;o<a;o++){const{levelID:h,levelWidth:l,levelHeight:c,levelBuffer:u}=this._levelBuffers[o];r.compressedTexImage2D(r.TEXTURE_2D,h,this.format,l,c,0,u)}return!0}onBlobLoaded(){this._levelBuffers=we._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)}static _formatToExtension(t){if(t>=33776&&t<=33779)return"s3tc";if(t>=37488&&t<=37497)return"etc";if(t>=35840&&t<=35843)return"pvrtc";if(t>=36196)return"etc1";if(t>=35986&&t<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(t,i,s,r,n,o,a){const h=new Array(s);let l=t.byteOffset,c=o,u=a,d=c+r-1&~(r-1),f=u+n-1&~(n-1),p=d*f*Li[i];for(let _=0;_<s;_++)h[_]={levelID:_,levelWidth:s>1?c:d,levelHeight:s>1?u:f,levelBuffer:new Uint8Array(t.buffer,l,p)},l+=p,c=c>>1||1,u=u>>1||1,d=c+r-1&~(r-1),f=u+n-1&~(n-1),p=d*f*Li[i];return h}}const Sn=4,Us=124,Xu=32,hh=20,Vu=542327876,ks={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},zu={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},Gs={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4};var Wu=(e=>(e[e.DXGI_FORMAT_UNKNOWN=0]="DXGI_FORMAT_UNKNOWN",e[e.DXGI_FORMAT_R32G32B32A32_TYPELESS=1]="DXGI_FORMAT_R32G32B32A32_TYPELESS",e[e.DXGI_FORMAT_R32G32B32A32_FLOAT=2]="DXGI_FORMAT_R32G32B32A32_FLOAT",e[e.DXGI_FORMAT_R32G32B32A32_UINT=3]="DXGI_FORMAT_R32G32B32A32_UINT",e[e.DXGI_FORMAT_R32G32B32A32_SINT=4]="DXGI_FORMAT_R32G32B32A32_SINT",e[e.DXGI_FORMAT_R32G32B32_TYPELESS=5]="DXGI_FORMAT_R32G32B32_TYPELESS",e[e.DXGI_FORMAT_R32G32B32_FLOAT=6]="DXGI_FORMAT_R32G32B32_FLOAT",e[e.DXGI_FORMAT_R32G32B32_UINT=7]="DXGI_FORMAT_R32G32B32_UINT",e[e.DXGI_FORMAT_R32G32B32_SINT=8]="DXGI_FORMAT_R32G32B32_SINT",e[e.DXGI_FORMAT_R16G16B16A16_TYPELESS=9]="DXGI_FORMAT_R16G16B16A16_TYPELESS",e[e.DXGI_FORMAT_R16G16B16A16_FLOAT=10]="DXGI_FORMAT_R16G16B16A16_FLOAT",e[e.DXGI_FORMAT_R16G16B16A16_UNORM=11]="DXGI_FORMAT_R16G16B16A16_UNORM",e[e.DXGI_FORMAT_R16G16B16A16_UINT=12]="DXGI_FORMAT_R16G16B16A16_UINT",e[e.DXGI_FORMAT_R16G16B16A16_SNORM=13]="DXGI_FORMAT_R16G16B16A16_SNORM",e[e.DXGI_FORMAT_R16G16B16A16_SINT=14]="DXGI_FORMAT_R16G16B16A16_SINT",e[e.DXGI_FORMAT_R32G32_TYPELESS=15]="DXGI_FORMAT_R32G32_TYPELESS",e[e.DXGI_FORMAT_R32G32_FLOAT=16]="DXGI_FORMAT_R32G32_FLOAT",e[e.DXGI_FORMAT_R32G32_UINT=17]="DXGI_FORMAT_R32G32_UINT",e[e.DXGI_FORMAT_R32G32_SINT=18]="DXGI_FORMAT_R32G32_SINT",e[e.DXGI_FORMAT_R32G8X24_TYPELESS=19]="DXGI_FORMAT_R32G8X24_TYPELESS",e[e.DXGI_FORMAT_D32_FLOAT_S8X24_UINT=20]="DXGI_FORMAT_D32_FLOAT_S8X24_UINT",e[e.DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS=21]="DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS",e[e.DXGI_FORMAT_X32_TYPELESS_G8X24_UINT=22]="DXGI_FORMAT_X32_TYPELESS_G8X24_UINT",e[e.DXGI_FORMAT_R10G10B10A2_TYPELESS=23]="DXGI_FORMAT_R10G10B10A2_TYPELESS",e[e.DXGI_FORMAT_R10G10B10A2_UNORM=24]="DXGI_FORMAT_R10G10B10A2_UNORM",e[e.DXGI_FORMAT_R10G10B10A2_UINT=25]="DXGI_FORMAT_R10G10B10A2_UINT",e[e.DXGI_FORMAT_R11G11B10_FLOAT=26]="DXGI_FORMAT_R11G11B10_FLOAT",e[e.DXGI_FORMAT_R8G8B8A8_TYPELESS=27]="DXGI_FORMAT_R8G8B8A8_TYPELESS",e[e.DXGI_FORMAT_R8G8B8A8_UNORM=28]="DXGI_FORMAT_R8G8B8A8_UNORM",e[e.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB=29]="DXGI_FORMAT_R8G8B8A8_UNORM_SRGB",e[e.DXGI_FORMAT_R8G8B8A8_UINT=30]="DXGI_FORMAT_R8G8B8A8_UINT",e[e.DXGI_FORMAT_R8G8B8A8_SNORM=31]="DXGI_FORMAT_R8G8B8A8_SNORM",e[e.DXGI_FORMAT_R8G8B8A8_SINT=32]="DXGI_FORMAT_R8G8B8A8_SINT",e[e.DXGI_FORMAT_R16G16_TYPELESS=33]="DXGI_FORMAT_R16G16_TYPELESS",e[e.DXGI_FORMAT_R16G16_FLOAT=34]="DXGI_FORMAT_R16G16_FLOAT",e[e.DXGI_FORMAT_R16G16_UNORM=35]="DXGI_FORMAT_R16G16_UNORM",e[e.DXGI_FORMAT_R16G16_UINT=36]="DXGI_FORMAT_R16G16_UINT",e[e.DXGI_FORMAT_R16G16_SNORM=37]="DXGI_FORMAT_R16G16_SNORM",e[e.DXGI_FORMAT_R16G16_SINT=38]="DXGI_FORMAT_R16G16_SINT",e[e.DXGI_FORMAT_R32_TYPELESS=39]="DXGI_FORMAT_R32_TYPELESS",e[e.DXGI_FORMAT_D32_FLOAT=40]="DXGI_FORMAT_D32_FLOAT",e[e.DXGI_FORMAT_R32_FLOAT=41]="DXGI_FORMAT_R32_FLOAT",e[e.DXGI_FORMAT_R32_UINT=42]="DXGI_FORMAT_R32_UINT",e[e.DXGI_FORMAT_R32_SINT=43]="DXGI_FORMAT_R32_SINT",e[e.DXGI_FORMAT_R24G8_TYPELESS=44]="DXGI_FORMAT_R24G8_TYPELESS",e[e.DXGI_FORMAT_D24_UNORM_S8_UINT=45]="DXGI_FORMAT_D24_UNORM_S8_UINT",e[e.DXGI_FORMAT_R24_UNORM_X8_TYPELESS=46]="DXGI_FORMAT_R24_UNORM_X8_TYPELESS",e[e.DXGI_FORMAT_X24_TYPELESS_G8_UINT=47]="DXGI_FORMAT_X24_TYPELESS_G8_UINT",e[e.DXGI_FORMAT_R8G8_TYPELESS=48]="DXGI_FORMAT_R8G8_TYPELESS",e[e.DXGI_FORMAT_R8G8_UNORM=49]="DXGI_FORMAT_R8G8_UNORM",e[e.DXGI_FORMAT_R8G8_UINT=50]="DXGI_FORMAT_R8G8_UINT",e[e.DXGI_FORMAT_R8G8_SNORM=51]="DXGI_FORMAT_R8G8_SNORM",e[e.DXGI_FORMAT_R8G8_SINT=52]="DXGI_FORMAT_R8G8_SINT",e[e.DXGI_FORMAT_R16_TYPELESS=53]="DXGI_FORMAT_R16_TYPELESS",e[e.DXGI_FORMAT_R16_FLOAT=54]="DXGI_FORMAT_R16_FLOAT",e[e.DXGI_FORMAT_D16_UNORM=55]="DXGI_FORMAT_D16_UNORM",e[e.DXGI_FORMAT_R16_UNORM=56]="DXGI_FORMAT_R16_UNORM",e[e.DXGI_FORMAT_R16_UINT=57]="DXGI_FORMAT_R16_UINT",e[e.DXGI_FORMAT_R16_SNORM=58]="DXGI_FORMAT_R16_SNORM",e[e.DXGI_FORMAT_R16_SINT=59]="DXGI_FORMAT_R16_SINT",e[e.DXGI_FORMAT_R8_TYPELESS=60]="DXGI_FORMAT_R8_TYPELESS",e[e.DXGI_FORMAT_R8_UNORM=61]="DXGI_FORMAT_R8_UNORM",e[e.DXGI_FORMAT_R8_UINT=62]="DXGI_FORMAT_R8_UINT",e[e.DXGI_FORMAT_R8_SNORM=63]="DXGI_FORMAT_R8_SNORM",e[e.DXGI_FORMAT_R8_SINT=64]="DXGI_FORMAT_R8_SINT",e[e.DXGI_FORMAT_A8_UNORM=65]="DXGI_FORMAT_A8_UNORM",e[e.DXGI_FORMAT_R1_UNORM=66]="DXGI_FORMAT_R1_UNORM",e[e.DXGI_FORMAT_R9G9B9E5_SHAREDEXP=67]="DXGI_FORMAT_R9G9B9E5_SHAREDEXP",e[e.DXGI_FORMAT_R8G8_B8G8_UNORM=68]="DXGI_FORMAT_R8G8_B8G8_UNORM",e[e.DXGI_FORMAT_G8R8_G8B8_UNORM=69]="DXGI_FORMAT_G8R8_G8B8_UNORM",e[e.DXGI_FORMAT_BC1_TYPELESS=70]="DXGI_FORMAT_BC1_TYPELESS",e[e.DXGI_FORMAT_BC1_UNORM=71]="DXGI_FORMAT_BC1_UNORM",e[e.DXGI_FORMAT_BC1_UNORM_SRGB=72]="DXGI_FORMAT_BC1_UNORM_SRGB",e[e.DXGI_FORMAT_BC2_TYPELESS=73]="DXGI_FORMAT_BC2_TYPELESS",e[e.DXGI_FORMAT_BC2_UNORM=74]="DXGI_FORMAT_BC2_UNORM",e[e.DXGI_FORMAT_BC2_UNORM_SRGB=75]="DXGI_FORMAT_BC2_UNORM_SRGB",e[e.DXGI_FORMAT_BC3_TYPELESS=76]="DXGI_FORMAT_BC3_TYPELESS",e[e.DXGI_FORMAT_BC3_UNORM=77]="DXGI_FORMAT_BC3_UNORM",e[e.DXGI_FORMAT_BC3_UNORM_SRGB=78]="DXGI_FORMAT_BC3_UNORM_SRGB",e[e.DXGI_FORMAT_BC4_TYPELESS=79]="DXGI_FORMAT_BC4_TYPELESS",e[e.DXGI_FORMAT_BC4_UNORM=80]="DXGI_FORMAT_BC4_UNORM",e[e.DXGI_FORMAT_BC4_SNORM=81]="DXGI_FORMAT_BC4_SNORM",e[e.DXGI_FORMAT_BC5_TYPELESS=82]="DXGI_FORMAT_BC5_TYPELESS",e[e.DXGI_FORMAT_BC5_UNORM=83]="DXGI_FORMAT_BC5_UNORM",e[e.DXGI_FORMAT_BC5_SNORM=84]="DXGI_FORMAT_BC5_SNORM",e[e.DXGI_FORMAT_B5G6R5_UNORM=85]="DXGI_FORMAT_B5G6R5_UNORM",e[e.DXGI_FORMAT_B5G5R5A1_UNORM=86]="DXGI_FORMAT_B5G5R5A1_UNORM",e[e.DXGI_FORMAT_B8G8R8A8_UNORM=87]="DXGI_FORMAT_B8G8R8A8_UNORM",e[e.DXGI_FORMAT_B8G8R8X8_UNORM=88]="DXGI_FORMAT_B8G8R8X8_UNORM",e[e.DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM=89]="DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM",e[e.DXGI_FORMAT_B8G8R8A8_TYPELESS=90]="DXGI_FORMAT_B8G8R8A8_TYPELESS",e[e.DXGI_FORMAT_B8G8R8A8_UNORM_SRGB=91]="DXGI_FORMAT_B8G8R8A8_UNORM_SRGB",e[e.DXGI_FORMAT_B8G8R8X8_TYPELESS=92]="DXGI_FORMAT_B8G8R8X8_TYPELESS",e[e.DXGI_FORMAT_B8G8R8X8_UNORM_SRGB=93]="DXGI_FORMAT_B8G8R8X8_UNORM_SRGB",e[e.DXGI_FORMAT_BC6H_TYPELESS=94]="DXGI_FORMAT_BC6H_TYPELESS",e[e.DXGI_FORMAT_BC6H_UF16=95]="DXGI_FORMAT_BC6H_UF16",e[e.DXGI_FORMAT_BC6H_SF16=96]="DXGI_FORMAT_BC6H_SF16",e[e.DXGI_FORMAT_BC7_TYPELESS=97]="DXGI_FORMAT_BC7_TYPELESS",e[e.DXGI_FORMAT_BC7_UNORM=98]="DXGI_FORMAT_BC7_UNORM",e[e.DXGI_FORMAT_BC7_UNORM_SRGB=99]="DXGI_FORMAT_BC7_UNORM_SRGB",e[e.DXGI_FORMAT_AYUV=100]="DXGI_FORMAT_AYUV",e[e.DXGI_FORMAT_Y410=101]="DXGI_FORMAT_Y410",e[e.DXGI_FORMAT_Y416=102]="DXGI_FORMAT_Y416",e[e.DXGI_FORMAT_NV12=103]="DXGI_FORMAT_NV12",e[e.DXGI_FORMAT_P010=104]="DXGI_FORMAT_P010",e[e.DXGI_FORMAT_P016=105]="DXGI_FORMAT_P016",e[e.DXGI_FORMAT_420_OPAQUE=106]="DXGI_FORMAT_420_OPAQUE",e[e.DXGI_FORMAT_YUY2=107]="DXGI_FORMAT_YUY2",e[e.DXGI_FORMAT_Y210=108]="DXGI_FORMAT_Y210",e[e.DXGI_FORMAT_Y216=109]="DXGI_FORMAT_Y216",e[e.DXGI_FORMAT_NV11=110]="DXGI_FORMAT_NV11",e[e.DXGI_FORMAT_AI44=111]="DXGI_FORMAT_AI44",e[e.DXGI_FORMAT_IA44=112]="DXGI_FORMAT_IA44",e[e.DXGI_FORMAT_P8=113]="DXGI_FORMAT_P8",e[e.DXGI_FORMAT_A8P8=114]="DXGI_FORMAT_A8P8",e[e.DXGI_FORMAT_B4G4R4A4_UNORM=115]="DXGI_FORMAT_B4G4R4A4_UNORM",e[e.DXGI_FORMAT_P208=116]="DXGI_FORMAT_P208",e[e.DXGI_FORMAT_V208=117]="DXGI_FORMAT_V208",e[e.DXGI_FORMAT_V408=118]="DXGI_FORMAT_V408",e[e.DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE=119]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE",e[e.DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE=120]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE",e[e.DXGI_FORMAT_FORCE_UINT=121]="DXGI_FORMAT_FORCE_UINT",e))(Wu||{}),$u=(e=>(e[e.DDS_DIMENSION_TEXTURE1D=2]="DDS_DIMENSION_TEXTURE1D",e[e.DDS_DIMENSION_TEXTURE2D=3]="DDS_DIMENSION_TEXTURE2D",e[e.DDS_DIMENSION_TEXTURE3D=6]="DDS_DIMENSION_TEXTURE3D",e))($u||{});const ju=1,Yu=2,qu=4,Ku=64,Zu=512,Ju=131072,Qu=827611204,td=861165636,ed=894720068,id=808540228,sd=4,rd={[Qu]:It.COMPRESSED_RGBA_S3TC_DXT1_EXT,[td]:It.COMPRESSED_RGBA_S3TC_DXT3_EXT,[ed]:It.COMPRESSED_RGBA_S3TC_DXT5_EXT},nd={[70]:It.COMPRESSED_RGBA_S3TC_DXT1_EXT,[71]:It.COMPRESSED_RGBA_S3TC_DXT1_EXT,[73]:It.COMPRESSED_RGBA_S3TC_DXT3_EXT,[74]:It.COMPRESSED_RGBA_S3TC_DXT3_EXT,[76]:It.COMPRESSED_RGBA_S3TC_DXT5_EXT,[77]:It.COMPRESSED_RGBA_S3TC_DXT5_EXT,[72]:It.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,[75]:It.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,[78]:It.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function lh(e){const t=new Uint32Array(e);if(t[0]!==Vu)throw new Error("Invalid DDS file magic word");const s=new Uint32Array(e,0,Us/Uint32Array.BYTES_PER_ELEMENT),r=s[ks.HEIGHT],n=s[ks.WIDTH],o=s[ks.MIPMAP_COUNT],a=new Uint32Array(e,ks.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,Xu/Uint32Array.BYTES_PER_ELEMENT),h=a[ju];if(h&qu){const l=a[zu.FOURCC];if(l!==id){const y=rd[l],x=Sn+Us,A=new Uint8Array(e,x);return[new we(A,{format:y,width:n,height:r,levels:o})]}const c=Sn+Us,u=new Uint32Array(t.buffer,c,hh/Uint32Array.BYTES_PER_ELEMENT),d=u[Gs.DXGI_FORMAT],f=u[Gs.RESOURCE_DIMENSION],p=u[Gs.MISC_FLAG],_=u[Gs.ARRAY_SIZE],g=nd[d];if(g===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${d}`);if(p===sd)throw new Error("DDSParser does not support cubemap textures");if(f===6)throw new Error("DDSParser does not supported 3D texture data");const v=new Array,b=Sn+Us+hh;if(_===1)v.push(new Uint8Array(e,b));else{const y=Li[g];let x=0,A=n,D=r;for(let E=0;E<o;E++){const O=Math.max(1,A+3&-4),H=Math.max(1,D+3&-4);x+=O*H*y,A=A>>>1,D=D>>>1}let R=b;for(let E=0;E<_;E++)v.push(new Uint8Array(e,R,x)),R+=x}return v.map(y=>new we(y,{format:g,width:n,height:r,levels:o}))}throw h&Ku?new Error("DDSParser does not support uncompressed texture data."):h&Zu?new Error("DDSParser does not supported YUV uncompressed texture data."):h&Ju?new Error("DDSParser does not support single-channel (lumninance) texture data!"):h&Yu?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}const ch=[171,75,84,88,32,49,49,187,13,10,26,10],od=67305985,Qt={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},An=64,Rn={[k.UNSIGNED_BYTE]:1,[k.UNSIGNED_SHORT]:2,[k.INT]:4,[k.UNSIGNED_INT]:4,[k.FLOAT]:4,[k.HALF_FLOAT]:8},uh={[C.RGBA]:4,[C.RGB]:3,[C.RG]:2,[C.RED]:1,[C.LUMINANCE]:1,[C.LUMINANCE_ALPHA]:2,[C.ALPHA]:1},dh={[k.UNSIGNED_SHORT_4_4_4_4]:2,[k.UNSIGNED_SHORT_5_5_5_1]:2,[k.UNSIGNED_SHORT_5_6_5]:2};function fh(e,t,i=!1){const s=new DataView(t);if(!ad(e,s))return null;const r=s.getUint32(Qt.ENDIANNESS,!0)===od,n=s.getUint32(Qt.GL_TYPE,r),o=s.getUint32(Qt.GL_FORMAT,r),a=s.getUint32(Qt.GL_INTERNAL_FORMAT,r),h=s.getUint32(Qt.PIXEL_WIDTH,r),l=s.getUint32(Qt.PIXEL_HEIGHT,r)||1,c=s.getUint32(Qt.PIXEL_DEPTH,r)||1,u=s.getUint32(Qt.NUMBER_OF_ARRAY_ELEMENTS,r)||1,d=s.getUint32(Qt.NUMBER_OF_FACES,r),f=s.getUint32(Qt.NUMBER_OF_MIPMAP_LEVELS,r),p=s.getUint32(Qt.BYTES_OF_KEY_VALUE_DATA,r);if(l===0||c!==1)throw new Error("Only 2D textures are supported");if(d!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(u!==1)throw new Error("WebGL does not support array textures");const _=4,g=4,v=h+3&-4,b=l+3&-4,y=new Array(u);let x=h*l;n===0&&(x=v*b);let A;if(n!==0?Rn[n]?A=Rn[n]*uh[o]:A=dh[n]:A=Li[a],A===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");const D=i?ld(s,p,r):null;let E=x*A,O=h,H=l,I=v,N=b,w=An+p;for(let T=0;T<f;T++){const W=s.getUint32(w,r);let q=w+4;for(let F=0;F<u;F++){let Z=y[F];Z||(Z=y[F]=new Array(f)),Z[T]={levelID:T,levelWidth:f>1||n!==0?O:I,levelHeight:f>1||n!==0?H:N,levelBuffer:new Uint8Array(t,q,E)},q+=E}w+=W+4,w=w%4!==0?w+4-w%4:w,O=O>>1||1,H=H>>1||1,I=O+_-1&~(_-1),N=H+g-1&~(g-1),E=I*N*A}return n!==0?{uncompressed:y.map(T=>{let W=T[0].levelBuffer,q=!1;return n===k.FLOAT?W=new Float32Array(T[0].levelBuffer.buffer,T[0].levelBuffer.byteOffset,T[0].levelBuffer.byteLength/4):n===k.UNSIGNED_INT?(q=!0,W=new Uint32Array(T[0].levelBuffer.buffer,T[0].levelBuffer.byteOffset,T[0].levelBuffer.byteLength/4)):n===k.INT&&(q=!0,W=new Int32Array(T[0].levelBuffer.buffer,T[0].levelBuffer.byteOffset,T[0].levelBuffer.byteLength/4)),{resource:new Ye(W,{width:T[0].levelWidth,height:T[0].levelHeight}),type:n,format:q?hd(o):o}}),kvData:D}:{compressed:y.map(T=>new we(null,{format:a,width:h,height:l,levels:f,levelBuffers:T})),kvData:D}}function ad(e,t){for(let i=0;i<ch.length;i++)if(t.getUint8(i)!==ch[i])return console.error(`${e} is not a valid *.ktx file!`),!1;return!0}function hd(e){switch(e){case C.RGBA:return C.RGBA_INTEGER;case C.RGB:return C.RGB_INTEGER;case C.RG:return C.RG_INTEGER;case C.RED:return C.RED_INTEGER;default:return e}}function ld(e,t,i){const s=new Map;let r=0;for(;r<t;){const n=e.getUint32(An+r,i),o=An+r+4,a=3-(n+3)%4;if(n===0||n>t-r){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let h=0;for(;h<n&&e.getUint8(o+h)!==0;h++);if(h===-1){console.error("KTXLoader: Failed to find null byte terminating kvData key");break}const l=new TextDecoder().decode(new Uint8Array(e.buffer,o,h)),c=new DataView(e.buffer,o+h+1,n-h-1);s.set(l,c),r+=4+n+a}return s}const ph={extension:{type:M.LoadParser,priority:Jt.High},name:"loadDDS",test(e){return Ee(e,".dds")},async load(e,t,i){const r=await(await P.ADAPTER.fetch(e)).arrayBuffer(),o=lh(r).map(a=>{const h=new V(a,bt({mipmap:Wt.OFF,alphaMode:Nt.NO_PREMULTIPLIED_ALPHA,resolution:fe(e)},t.data));return Di(h,i,e)});return o.length===1?o[0]:o},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};U.add(ph);const mh={extension:{type:M.LoadParser,priority:Jt.High},name:"loadKTX",test(e){return Ee(e,".ktx")},async load(e,t,i){const r=await(await P.ADAPTER.fetch(e)).arrayBuffer(),{compressed:n,uncompressed:o,kvData:a}=fh(e,r),h=n!=null?n:o,l=bt({mipmap:Wt.OFF,alphaMode:Nt.NO_PREMULTIPLIED_ALPHA,resolution:fe(e)},t.data),c=h.map(u=>{h===o&&Object.assign(l,{type:u.type,format:u.format});const d=new V(u,l);return d.ktxKeyValueData=a,Di(d,i,e)});return c.length===1?c[0]:c},unload(e){Array.isArray(e)?e.forEach(t=>t.destroy(!0)):e.destroy(!0)}};U.add(mh);const _h={extension:M.ResolveParser,test:e=>{const i=e.split("?")[0].split(".").pop();return["basis","ktx","dds"].includes(i)},parse:e=>{var s,r,n,o;if(e.split("?")[0].split(".").pop()==="ktx"){const a=[".s3tc.ktx",".s3tc_sRGB.ktx",".etc.ktx",".etc1.ktx",".pvrt.ktx",".atc.ktx",".astc.ktx"];if(a.some(h=>e.endsWith(h)))return{resolution:parseFloat((r=(s=P.RETINA_PREFIX.exec(e))==null?void 0:s[1])!=null?r:"1"),format:a.find(h=>e.endsWith(h)),src:e}}return{resolution:parseFloat((o=(n=P.RETINA_PREFIX.exec(e))==null?void 0:n[1])!=null?o:"1"),format:e.split(".").pop(),src:e}}};U.add(_h);const cd=new $,ud=4,Oi=class{constructor(e){this.renderer=e}async image(e,t,i){const s=new Image;return s.src=await this.base64(e,t,i),s}async base64(e,t,i){const s=this.canvas(e);if(s.toBlob!==void 0)return new Promise((r,n)=>{s.toBlob(o=>{if(!o){n(new Error("ICanvas.toBlob failed!"));return}const a=new FileReader;a.onload=()=>r(a.result),a.onerror=n,a.readAsDataURL(o)},t,i)});if(s.toDataURL!==void 0)return s.toDataURL(t,i);if(s.convertToBlob!==void 0){const r=await s.convertToBlob({type:t,quality:i});return new Promise((n,o)=>{const a=new FileReader;a.onload=()=>n(a.result),a.onerror=o,a.readAsDataURL(r)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e,t){const{pixels:i,width:s,height:r,flipY:n}=this._rawPixels(e,t);n&&Oi._flipY(i,s,r),Oi._unpremultiplyAlpha(i);const o=new No(s,r,1),a=new ImageData(new Uint8ClampedArray(i.buffer),s,r);return o.context.putImageData(a,0,0),o.canvas}pixels(e,t){const{pixels:i,width:s,height:r,flipY:n}=this._rawPixels(e,t);return n&&Oi._flipY(i,s,r),Oi._unpremultiplyAlpha(i),i}_rawPixels(e,t){const i=this.renderer;if(!i)throw new Error("The Extract has already been destroyed");let s,r=!1,n,o=!1;if(e&&(e instanceof be?n=e:(n=i.generateTexture(e,{resolution:i.resolution,multisample:i.multisample}),o=!0)),n){if(s=n.baseTexture.resolution,t=t!=null?t:n.frame,r=!1,!o){i.renderTexture.bind(n);const u=n.framebuffer.glFramebuffers[i.CONTEXT_UID];u.blitFramebuffer&&i.framebuffer.bind(u.blitFramebuffer)}}else s=i.resolution,t||(t=cd,t.width=i.width/s,t.height=i.height/s),r=!0,i.renderTexture.bind();const a=Math.round(t.width*s),h=Math.round(t.height*s),l=new Uint8Array(ud*a*h),c=i.gl;return c.readPixels(Math.round(t.x*s),Math.round(t.y*s),a,h,c.RGBA,c.UNSIGNED_BYTE,l),o&&(n==null||n.destroy(!0)),{pixels:l,width:a,height:h,flipY:r}}destroy(){this.renderer=null}static _flipY(e,t,i){const s=t<<2,r=i>>1,n=new Uint8Array(s);for(let o=0;o<r;o++){const a=o*s,h=(i-o-1)*s;n.set(e.subarray(a,a+s)),e.copyWithin(a,h,h+s),e.set(n,h)}}static _unpremultiplyAlpha(e){e instanceof Uint8ClampedArray&&(e=new Uint8Array(e.buffer));const t=e.length;for(let i=0;i<t;i+=4){const s=e[i+3];if(s!==0){const r=255.001/s;e[i]=e[i]*r+.5,e[i+1]=e[i+1]*r+.5,e[i+2]=e[i+2]*r+.5}}}};let Cn=Oi;Cn.extension={name:"extract",type:M.RendererSystem},U.add(Cn);const Ui={build(e){const t=e.points;let i,s,r,n,o,a;if(e.type===_t.CIRC){const p=e.shape;i=p.x,s=p.y,o=a=p.radius,r=n=0}else if(e.type===_t.ELIP){const p=e.shape;i=p.x,s=p.y,o=p.width,a=p.height,r=n=0}else{const p=e.shape,_=p.width/2,g=p.height/2;i=p.x+_,s=p.y+g,o=a=Math.max(0,Math.min(p.radius,Math.min(_,g))),r=_-o,n=g-a}if(!(o>=0&&a>=0&&r>=0&&n>=0)){t.length=0;return}const h=Math.ceil(2.3*Math.sqrt(o+a)),l=h*8+(r?4:0)+(n?4:0);if(t.length=l,l===0)return;if(h===0){t.length=8,t[0]=t[6]=i+r,t[1]=t[3]=s+n,t[2]=t[4]=i-r,t[5]=t[7]=s-n;return}let c=0,u=h*4+(r?2:0)+2,d=u,f=l;{const p=r+o,_=n,g=i+p,v=i-p,b=s+_;if(t[c++]=g,t[c++]=b,t[--u]=b,t[--u]=v,n){const y=s-_;t[d++]=v,t[d++]=y,t[--f]=y,t[--f]=g}}for(let p=1;p<h;p++){const _=Math.PI/2*(p/h),g=r+Math.cos(_)*o,v=n+Math.sin(_)*a,b=i+g,y=i-g,x=s+v,A=s-v;t[c++]=b,t[c++]=x,t[--u]=x,t[--u]=y,t[d++]=y,t[d++]=A,t[--f]=A,t[--f]=b}{const p=r,_=n+a,g=i+p,v=i-p,b=s+_,y=s-_;t[c++]=g,t[c++]=b,t[--f]=y,t[--f]=g,r&&(t[c++]=v,t[c++]=b,t[--f]=y,t[--f]=v)}},triangulate(e,t){const i=e.points,s=t.points,r=t.indices;if(i.length===0)return;let n=s.length/2;const o=n;let a,h;if(e.type!==_t.RREC){const c=e.shape;a=c.x,h=c.y}else{const c=e.shape;a=c.x+c.width/2,h=c.y+c.height/2}const l=e.matrix;s.push(e.matrix?l.a*a+l.c*h+l.tx:a,e.matrix?l.b*a+l.d*h+l.ty:h),n++,s.push(i[0],i[1]);for(let c=2;c<i.length;c+=2)s.push(i[c],i[c+1]),r.push(n++,o,n);r.push(o+1,o,n)}};function gh(e,t=!1){const i=e.length;if(i<6)return;let s=0;for(let r=0,n=e[i-2],o=e[i-1];r<i;r+=2){const a=e[r],h=e[r+1];s+=(a-n)*(h+o),n=a,o=h}if(!t&&s>0||t&&s<=0){const r=i/2;for(let n=r+r%2;n<i;n+=2){const o=i-n-2,a=i-n-1,h=n,l=n+1;[e[o],e[h]]=[e[h],e[o]],[e[a],e[l]]=[e[l],e[a]]}}}const In={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let i=e.points;const s=e.holes,r=t.points,n=t.indices;if(i.length>=6){gh(i,!1);const o=[];for(let l=0;l<s.length;l++){const c=s[l];gh(c.points,!0),o.push(i.length/2),i=i.concat(c.points)}const a=ar(i,o,2);if(!a)return;const h=r.length/2;for(let l=0;l<a.length;l+=3)n.push(a[l]+h),n.push(a[l+1]+h),n.push(a[l+2]+h);for(let l=0;l<i.length;l++)r.push(i[l])}}},yh={build(e){const t=e.shape,i=t.x,s=t.y,r=t.width,n=t.height,o=e.points;o.length=0,r>=0&&n>=0&&o.push(i,s,i+r,s,i+r,s+n,i,s+n)},triangulate(e,t){const i=e.points,s=t.points;if(i.length===0)return;const r=s.length/2;s.push(i[0],i[1],i[2],i[3],i[6],i[7],i[4],i[5]),t.indices.push(r,r+1,r+2,r+1,r+2,r+3)}},vh={build(e){Ui.build(e)},triangulate(e,t){Ui.triangulate(e,t)}};var Vt=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Vt||{}),Se=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Se||{});const Ae={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let i=Math.ceil(e/this.maxLength);return i<this.minSegments?i=this.minSegments:i>this.maxSegments&&(i=this.maxSegments),i}},dd=Ae;class Pn{static curveTo(t,i,s,r,n,o){const a=o[o.length-2],l=o[o.length-1]-i,c=a-t,u=r-i,d=s-t,f=Math.abs(l*d-c*u);if(f<1e-8||n===0)return(o[o.length-2]!==t||o[o.length-1]!==i)&&o.push(t,i),null;const p=l*l+c*c,_=u*u+d*d,g=l*u+c*d,v=n*Math.sqrt(p)/f,b=n*Math.sqrt(_)/f,y=v*g/p,x=b*g/_,A=v*d+b*c,D=v*u+b*l,R=c*(b+y),E=l*(b+y),O=d*(v+x),H=u*(v+x),I=Math.atan2(E-D,R-A),N=Math.atan2(H-D,O-A);return{cx:A+t,cy:D+i,radius:n,startAngle:I,endAngle:N,anticlockwise:c*u>d*l}}static arc(t,i,s,r,n,o,a,h,l){const c=a-o,u=Ae._segmentsCount(Math.abs(c)*n,Math.ceil(Math.abs(c)/yi)*40),d=c/(u*2),f=d*2,p=Math.cos(d),_=Math.sin(d),g=u-1,v=g%1/g;for(let b=0;b<=g;++b){const y=b+v*b,x=d+o+f*y,A=Math.cos(x),D=-Math.sin(x);l.push((p*A+_*D)*n+s,(p*-D+_*A)*n+r)}}}class xh{constructor(){this.reset()}begin(t,i,s){this.reset(),this.style=t,this.start=i,this.attribStart=s}end(t,i){this.attribSize=i-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Hs{static curveLength(t,i,s,r,n,o,a,h){let c=0,u=0,d=0,f=0,p=0,_=0,g=0,v=0,b=0,y=0,x=0,A=t,D=i;for(let R=1;R<=10;++R)u=R/10,d=u*u,f=d*u,p=1-u,_=p*p,g=_*p,v=g*t+3*_*u*s+3*p*d*n+f*a,b=g*i+3*_*u*r+3*p*d*o+f*h,y=A-v,x=D-b,A=v,D=b,c+=Math.sqrt(y*y+x*x);return c}static curveTo(t,i,s,r,n,o,a){const h=a[a.length-2],l=a[a.length-1];a.length-=2;const c=Ae._segmentsCount(Hs.curveLength(h,l,t,i,s,r,n,o));let u=0,d=0,f=0,p=0,_=0;a.push(h,l);for(let g=1,v=0;g<=c;++g)v=g/c,u=1-v,d=u*u,f=d*u,p=v*v,_=p*v,a.push(f*h+3*d*v*t+3*u*p*s+_*n,f*l+3*d*v*i+3*u*p*r+_*o)}}function bh(e,t,i,s,r,n,o,a){const h=e-i*r,l=t-s*r,c=e+i*n,u=t+s*n;let d,f;o?(d=s,f=-i):(d=-s,f=i);const p=h+d,_=l+f,g=c+d,v=u+f;return a.push(p,_,g,v),2}function Ge(e,t,i,s,r,n,o,a){const h=i-e,l=s-t;let c=Math.atan2(h,l),u=Math.atan2(r-e,n-t);a&&c<u?c+=Math.PI*2:!a&&c>u&&(u+=Math.PI*2);let d=c;const f=u-c,p=Math.abs(f),_=Math.sqrt(h*h+l*l),g=(15*p*Math.sqrt(_)/Math.PI>>0)+1,v=f/g;if(d+=v,a){o.push(e,t,i,s);for(let b=1,y=d;b<g;b++,y+=v)o.push(e,t,e+Math.sin(y)*_,t+Math.cos(y)*_);o.push(e,t,r,n)}else{o.push(i,s,e,t);for(let b=1,y=d;b<g;b++,y+=v)o.push(e+Math.sin(y)*_,t+Math.cos(y)*_,e,t);o.push(r,n,e,t)}return g*2}function fd(e,t){const i=e.shape;let s=e.points||i.points.slice();const r=t.closePointEps;if(s.length===0)return;const n=e.lineStyle,o=new Y(s[0],s[1]),a=new Y(s[s.length-2],s[s.length-1]),h=i.type!==_t.POLY||i.closeStroke,l=Math.abs(o.x-a.x)<r&&Math.abs(o.y-a.y)<r;if(h){s=s.slice(),l&&(s.pop(),s.pop(),a.set(s[s.length-2],s[s.length-1]));const F=(o.x+a.x)*.5,Z=(a.y+o.y)*.5;s.unshift(F,Z),s.push(F,Z)}const c=t.points,u=s.length/2;let d=s.length;const f=c.length/2,p=n.width/2,_=p*p,g=n.miterLimit*n.miterLimit;let v=s[0],b=s[1],y=s[2],x=s[3],A=0,D=0,R=-(b-x),E=v-y,O=0,H=0,I=Math.sqrt(R*R+E*E);R/=I,E/=I,R*=p,E*=p;const N=n.alignment,w=(1-N)*2,T=N*2;h||(n.cap===Se.ROUND?d+=Ge(v-R*(w-T)*.5,b-E*(w-T)*.5,v-R*w,b-E*w,v+R*T,b+E*T,c,!0)+2:n.cap===Se.SQUARE&&(d+=bh(v,b,R,E,w,T,!0,c))),c.push(v-R*w,b-E*w,v+R*T,b+E*T);for(let F=1;F<u-1;++F){v=s[(F-1)*2],b=s[(F-1)*2+1],y=s[F*2],x=s[F*2+1],A=s[(F+1)*2],D=s[(F+1)*2+1],R=-(b-x),E=v-y,I=Math.sqrt(R*R+E*E),R/=I,E/=I,R*=p,E*=p,O=-(x-D),H=y-A,I=Math.sqrt(O*O+H*H),O/=I,H/=I,O*=p,H*=p;const Z=y-v,at=b-x,S=y-A,X=D-x,K=Z*S+at*X,J=at*S-X*Z,Q=J<0;if(Math.abs(J)<.001*Math.abs(K)){c.push(y-R*w,x-E*w,y+R*T,x+E*T),K>=0&&(n.join===Vt.ROUND?d+=Ge(y,x,y-R*w,x-E*w,y-O*w,x-H*w,c,!1)+4:d+=2,c.push(y-O*T,x-H*T,y+O*w,x+H*w));continue}const vt=(-R+v)*(-E+x)-(-R+y)*(-E+b),ut=(-O+A)*(-H+x)-(-O+y)*(-H+D),xt=(Z*ut-S*vt)/J,wt=(X*vt-at*ut)/J,Ft=(xt-y)*(xt-y)+(wt-x)*(wt-x),Et=y+(xt-y)*w,rt=x+(wt-x)*w,dt=y-(xt-y)*T,ft=x-(wt-x)*T,he=Math.min(Z*Z+at*at,S*S+X*X),le=Q?w:T,Ji=he+le*le*_,Yd=Ft<=Ji;let er=n.join;if(er===Vt.MITER&&Ft/_>g&&(er=Vt.BEVEL),Yd)switch(er){case Vt.MITER:{c.push(Et,rt,dt,ft);break}case Vt.BEVEL:{Q?c.push(Et,rt,y+R*T,x+E*T,Et,rt,y+O*T,x+H*T):c.push(y-R*w,x-E*w,dt,ft,y-O*w,x-H*w,dt,ft),d+=2;break}case Vt.ROUND:{Q?(c.push(Et,rt,y+R*T,x+E*T),d+=Ge(y,x,y+R*T,x+E*T,y+O*T,x+H*T,c,!0)+4,c.push(Et,rt,y+O*T,x+H*T)):(c.push(y-R*w,x-E*w,dt,ft),d+=Ge(y,x,y-R*w,x-E*w,y-O*w,x-H*w,c,!1)+4,c.push(y-O*w,x-H*w,dt,ft));break}}else{switch(c.push(y-R*w,x-E*w,y+R*T,x+E*T),er){case Vt.MITER:{Q?c.push(dt,ft,dt,ft):c.push(Et,rt,Et,rt),d+=2;break}case Vt.ROUND:{Q?d+=Ge(y,x,y+R*T,x+E*T,y+O*T,x+H*T,c,!0)+2:d+=Ge(y,x,y-R*w,x-E*w,y-O*w,x-H*w,c,!1)+2;break}}c.push(y-O*w,x-H*w,y+O*T,x+H*T),d+=2}}v=s[(u-2)*2],b=s[(u-2)*2+1],y=s[(u-1)*2],x=s[(u-1)*2+1],R=-(b-x),E=v-y,I=Math.sqrt(R*R+E*E),R/=I,E/=I,R*=p,E*=p,c.push(y-R*w,x-E*w,y+R*T,x+E*T),h||(n.cap===Se.ROUND?d+=Ge(y-R*(w-T)*.5,x-E*(w-T)*.5,y-R*w,x-E*w,y+R*T,x+E*T,c,!1)+2:n.cap===Se.SQUARE&&(d+=bh(y,x,R,E,w,T,!1,c)));const W=t.indices,q=Ae.epsilon*Ae.epsilon;for(let F=f;F<d+f-2;++F)v=c[F*2],b=c[F*2+1],y=c[(F+1)*2],x=c[(F+1)*2+1],A=c[(F+2)*2],D=c[(F+2)*2+1],!(Math.abs(v*(x-D)+y*(D-b)+A*(b-x))<q)&&W.push(F,F+1,F+2)}function pd(e,t){let i=0;const s=e.shape,r=e.points||s.points,n=s.type!==_t.POLY||s.closeStroke;if(r.length===0)return;const o=t.points,a=t.indices,h=r.length/2,l=o.length/2;let c=l;for(o.push(r[0],r[1]),i=1;i<h;i++)o.push(r[i*2],r[i*2+1]),a.push(c,c+1),c++;n&&a.push(c,l)}function Mn(e,t){e.lineStyle.native?pd(e,t):fd(e,t)}class Xs{static curveLength(t,i,s,r,n,o){const a=t-2*s+n,h=i-2*r+o,l=2*s-2*t,c=2*r-2*i,u=4*(a*a+h*h),d=4*(a*l+h*c),f=l*l+c*c,p=2*Math.sqrt(u+d+f),_=Math.sqrt(u),g=2*u*_,v=2*Math.sqrt(f),b=d/_;return(g*p+_*d*(p-v)+(4*f*u-d*d)*Math.log((2*_+b+p)/(b+v)))/(4*g)}static curveTo(t,i,s,r,n){const o=n[n.length-2],a=n[n.length-1],h=Ae._segmentsCount(Xs.curveLength(o,a,t,i,s,r));let l=0,c=0;for(let u=1;u<=h;++u){const d=u/h;l=o+(t-o)*d,c=a+(i-a)*d,n.push(l+(t+(s-t)*d-l)*d,c+(i+(r-i)*d-c)*d)}}}const Vs={[_t.POLY]:In,[_t.CIRC]:Ui,[_t.ELIP]:Ui,[_t.RECT]:yh,[_t.RREC]:vh},Bn=[],ki=[];class Gi{constructor(t,i=null,s=null,r=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=s,this.fillStyle=i,this.matrix=r,this.type=t.type}clone(){return new Gi(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const ri=new Y,Th=class extends Br{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Ii,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),ki.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),Bn.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,i=null,s=null){const r=new Gi(e,t,i,s);return this.graphicsData.push(r),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const i=new Gi(e,null,null,t),s=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=s.lineStyle,s.holes.push(i),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let i=0;i<t.length;++i){const s=t[i];if(!!s.fillStyle.visible&&s.shape&&(s.matrix?s.matrix.applyInverse(e,ri):ri.copyFrom(e),s.shape.contains(ri.x,ri.y))){let r=!1;if(s.holes){for(let n=0;n<s.holes.length;n++)if(s.holes[n].shape.contains(ri.x,ri.y)){r=!0;break}}if(!r)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let i=null,s=null;this.batches.length>0&&(i=this.batches[this.batches.length-1],s=i.style);for(let a=this.shapeIndex;a<t.length;a++){this.shapeIndex++;const h=t[a],l=h.fillStyle,c=h.lineStyle;Vs[h.type].build(h),h.matrix&&this.transformPoints(h.points,h.matrix),(l.visible||c.visible)&&this.processHoles(h.holes);for(let d=0;d<2;d++){const f=d===0?l:c;if(!f.visible)continue;const p=f.texture.baseTexture,_=this.indices.length,g=this.points.length/2;p.wrapMode=ie.REPEAT,d===0?this.processFill(h):this.processLine(h);const v=this.points.length/2-g;v!==0&&(i&&!this._compareStyles(s,f)&&(i.end(_,g),i=null),i||(i=Bn.pop()||new xh,i.begin(f,_,g),this.batches.push(i),s=f),this.addUvs(this.points,e,f.texture,g,v,f.matrix))}}const r=this.indices.length,n=this.points.length/2;if(i&&i.end(r,n),this.batches.length===0){this.batchable=!0;return}const o=n>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&o===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=o?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const i=this.graphicsData[e],s=i.fillStyle,r=i.lineStyle;if(s&&!s.texture.baseTexture.valid||r&&!r.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,i=e.length;t<i;t++){const s=e[t];for(let r=0;r<s.size;r++){const n=s.start+r;this.indicesUint16[n]=this.indicesUint16[n]-s.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<Th.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++V._globalBatch;for(let c=0;c<this.drawCalls.length;c++)this.drawCalls[c].texArray.clear(),ki.push(this.drawCalls[c]);this.drawCalls.length=0;const t=this.colors,i=this.textureIds;let s=ki.pop();s||(s=new ps,s.texArray=new Es),s.texArray.count=0,s.start=0,s.size=0,s.type=zt.TRIANGLES;let r=0,n=null,o=0,a=!1,h=zt.TRIANGLES,l=0;this.drawCalls.push(s);for(let c=0;c<this.batches.length;c++){const u=this.batches[c],d=8,f=u.style,p=f.texture.baseTexture;a!==!!f.native&&(a=!!f.native,h=a?zt.LINES:zt.TRIANGLES,n=null,r=d,e++),n!==p&&(n=p,p._batchEnabled!==e&&(r===d&&(e++,r=0,s.size>0&&(s=ki.pop(),s||(s=new ps,s.texArray=new Es),this.drawCalls.push(s)),s.start=l,s.size=0,s.texArray.count=0,s.type=h),p.touched=1,p._batchEnabled=e,p._batchLocation=r,p.wrapMode=ie.REPEAT,s.texArray.elements[s.texArray.count++]=p,r++)),s.size+=u.size,l+=u.size,o=p._batchLocation,this.addColors(t,f.color,f.alpha,u.attribSize,u.attribStart),this.addTextureIds(i,o,u.attribSize,u.attribStart)}V._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,i=this.colors,s=this.textureIds,r=new ArrayBuffer(e.length*3*4),n=new Float32Array(r),o=new Uint32Array(r);let a=0;for(let h=0;h<e.length/2;h++)n[a++]=e[h*2],n[a++]=e[h*2+1],n[a++]=t[h*2],n[a++]=t[h*2+1],o[a++]=i[h],n[a++]=s[h];this._buffer.update(r),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?In.triangulate(e,this):Vs[e.type].triangulate(e,this)}processLine(e){Mn(e,this);for(let t=0;t<e.holes.length;t++)Mn(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const i=e[t];Vs[i.type].build(i),i.matrix&&this.transformPoints(i.points,i.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let i=0;i<e.length/2;i++){const s=e[i*2],r=e[i*2+1];e[i*2]=t.a*s+t.c*r+t.tx,e[i*2+1]=t.b*s+t.d*r+t.ty}}addColors(e,t,i,s,r=0){const n=j.shared.setValue(t).toLittleEndianNumber(),o=j.shared.setValue(n).toPremultiplied(i);e.length=Math.max(e.length,r+s);for(let a=0;a<s;a++)e[r+a]=o}addTextureIds(e,t,i,s=0){e.length=Math.max(e.length,s+i);for(let r=0;r<i;r++)e[s+r]=t}addUvs(e,t,i,s,r,n=null){let o=0;const a=t.length,h=i.frame;for(;o<r;){let c=e[(s+o)*2],u=e[(s+o)*2+1];if(n){const d=n.a*c+n.c*u+n.tx;u=n.b*c+n.d*u+n.ty,c=d}o++,t.push(c/h.width,u/h.height)}const l=i.baseTexture;(h.width<l.width||h.height<l.height)&&this.adjustUvs(t,i,a,r)}adjustUvs(e,t,i,s){const r=t.baseTexture,n=1e-6,o=i+s*2,a=t.frame,h=a.width/r.width,l=a.height/r.height;let c=a.x/a.width,u=a.y/a.height,d=Math.floor(e[i]+n),f=Math.floor(e[i+1]+n);for(let p=i+2;p<o;p+=2)d=Math.min(d,Math.floor(e[p]+n)),f=Math.min(f,Math.floor(e[p+1]+n));c-=d,u-=f;for(let p=i;p<o;p+=2)e[p]=(e[p]+c)*h,e[p+1]=(e[p+1]+u)*l}};let Dn=Th;Dn.BATCHABLE_SIZE=100;class Hi{constructor(){this.color=16777215,this.alpha=1,this.texture=B.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Hi;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=B.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class zs extends Hi{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Se.BUTT,this.join=Vt.MITER,this.miterLimit=10}clone(){const t=new zs;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Fn={},Ws=class extends Ct{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Hi,this._lineStyle=new zs,this._matrix=null,this._holeMode=!1,this.state=ne.for2d(),this._geometry=e||new Dn,this._geometry.refCount++,this._transformID=-1,this._tintColor=new j(16777215),this.blendMode=G.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Ws(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,i,s=.5,r=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:i,alignment:s,native:r}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:B.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Se.BUTT,join:Vt.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const i=e.width>0&&e.alpha>0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:i},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new Pe,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new Pe,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const i=this.currentPath.points,s=i[i.length-2],r=i[i.length-1];return(s!==e||r!==t)&&i.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,i,s){this._initCurve();const r=this.currentPath.points;return r.length===0&&this.moveTo(0,0),Xs.curveTo(e,t,i,s,r),this}bezierCurveTo(e,t,i,s,r,n){return this._initCurve(),Hs.curveTo(e,t,i,s,r,n,this.currentPath.points),this}arcTo(e,t,i,s,r){this._initCurve(e,t);const n=this.currentPath.points,o=Pn.curveTo(e,t,i,s,r,n);if(o){const{cx:a,cy:h,radius:l,startAngle:c,endAngle:u,anticlockwise:d}=o;this.arc(a,h,l,c,u,d)}return this}arc(e,t,i,s,r,n=!1){if(s===r)return this;if(!n&&r<=s?r+=yi:n&&s<=r&&(s+=yi),r-s===0)return this;const a=e+Math.cos(s)*i,h=t+Math.sin(s)*i,l=this._geometry.closePointEps;let c=this.currentPath?this.currentPath.points:null;if(c){const u=Math.abs(c[c.length-2]-a),d=Math.abs(c[c.length-1]-h);u<l&&d<l||c.push(a,h)}else this.moveTo(a,h),c=this.currentPath.points;return Pn.arc(a,h,e,t,i,s,r,n,c),this}beginFill(e=0,t){return this.beginTextureFill({texture:B.WHITE,color:e,alpha:t})}normalizeColor(e){var i,s;const t=j.shared.setValue((i=e.color)!=null?i:0);e.color=t.toNumber(),(s=e.alpha)!=null||(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:B.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const i=e.alpha>0;return i?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:i},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,i,s){return this.drawShape(new $(e,t,i,s))}drawRoundedRect(e,t,i,s,r){return this.drawShape(new ys(e,t,i,s,r))}drawCircle(e,t,i){return this.drawShape(new _s(e,t,i))}drawEllipse(e,t,i,s){return this.drawShape(new gs(e,t,i,s))}drawPolygon(...e){let t,i=!0;const s=e[0];s.points?(i=s.closeStroke,t=s.points):Array.isArray(e[0])?t=e[0]:t=e;const r=new Pe(t);return r.closeStroke=i,this.drawShape(r),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===_t.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,i=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=i,this.vertexData=new Float32Array(e.points);for(let s=0;s<i;s++){const r=e.batches[s],n=r.style.color,o=new Float32Array(this.vertexData.buffer,r.attribStart*4*2,r.attribSize*2),a=new Float32Array(e.uvsFloat32.buffer,r.attribStart*4*2,r.attribSize*2),h=new Uint16Array(e.indicesUint16.buffer,r.start*2,r.size),l={vertexData:o,blendMode:t,indices:h,uvs:a,_batchRGB:j.shared.setValue(n).toRgbArray(),_tintRGB:n,_texture:r.style.texture,alpha:r.style.alpha,worldAlpha:1};this.batches[s]=l}}_renderBatched(e){if(!!this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,i=this.batches.length;t<i;t++){const s=this.batches[t];s.worldAlpha=this.worldAlpha*s.alpha,e.plugins[this.pluginName].render(s)}}}_renderDirect(e){const t=this._resolveDirectShader(e),i=this._geometry,s=this.worldAlpha,r=t.uniforms,n=i.drawCalls;r.translationMatrix=this.transform.worldTransform,j.shared.setValue(this._tintColor).premultiply(s).toArray(r.tint),e.shader.bind(t),e.geometry.bind(i,t),e.state.set(this.state);for(let o=0,a=n.length;o<a;o++)this._renderDrawCallDirect(e,i.drawCalls[o])}_renderDrawCallDirect(e,t){const{texArray:i,type:s,size:r,start:n}=t,o=i.count;for(let a=0;a<o;a++)e.texture.bind(i.elements[a],a);e.geometry.draw(s,r,n)}_resolveDirectShader(e){let t=this.shader;const i=this.pluginName;if(!t){if(!Fn[i]){const{maxTextures:s}=e.plugins[i],r=new Int32Array(s);for(let a=0;a<s;a++)r[a]=a;const n={tint:new Float32Array([1,1,1,1]),translationMatrix:new tt,default:kt.from({uSamplers:r},!0)},o=e.plugins[i]._shader.program;Fn[i]=new Kt(o,n)}t=Fn[i]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:i,maxX:s,maxY:r}=e.bounds;this._bounds.addFrame(this.transform,t,i,s,r)}containsPoint(e){return this.worldTransform.applyInverse(e,Ws._TEMP_POINT),this._geometry.containsPoint(Ws._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=j.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,i=t.a,s=t.b,r=t.c,n=t.d,o=t.tx,a=t.ty,h=this._geometry.points,l=this.vertexData;let c=0;for(let u=0;u<h.length;u+=2){const d=h[u],f=h[u+1];l[c++]=i*d+r*f+o,l[c++]=n*f+s*d+a}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};let Xi=Ws;Xi.curves=Ae,Xi._TEMP_POINT=new Y;const md={buildPoly:In,buildCircle:Ui,buildRectangle:yh,buildRoundedRectangle:vh,buildLine:Mn,ArcUtils:Pn,BezierUtils:Hs,QuadraticUtils:Xs,BatchPart:xh,FILL_COMMANDS:Vs,BATCH_POOL:Bn,DRAW_CALL_POOL:ki};class Eh{constructor(t,i){this.uvBuffer=t,this.uvMatrix=i,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}update(t){if(!t&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)return;this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;const i=this.uvBuffer.data;(!this.data||this.data.length!==i.length)&&(this.data=new Float32Array(i.length)),this.uvMatrix.multiplyUvs(i,this.data),this._updateID++}}const Nn=new Y,wh=new Pe,Sh=class extends Ct{constructor(e,t,i,s=zt.TRIANGLES){super(),this.geometry=e,this.shader=t,this.state=i||ne.for2d(),this.drawMode=s,this.start=0,this.size=0,this.uvs=null,this.indices=null,this.vertexData=new Float32Array(1),this.vertexDirty=-1,this._transformID=-1,this._roundPixels=P.ROUND_PIXELS,this.batchUvs=null}get geometry(){return this._geometry}set geometry(e){this._geometry!==e&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=e,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)}get uvBuffer(){return this.geometry.buffers[1]}get verticesBuffer(){return this.geometry.buffers[0]}set material(e){this.shader=e}get material(){return this.shader}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}set roundPixels(e){this._roundPixels!==e&&(this._transformID=-1),this._roundPixels=e}get roundPixels(){return this._roundPixels}get tint(){return"tint"in this.shader?this.shader.tint:null}set tint(e){this.shader.tint=e}get tintValue(){return this.shader.tintValue}get texture(){return"texture"in this.shader?this.shader.texture:null}set texture(e){this.shader.texture=e}_render(e){const t=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===zt.TRIANGLES&&t.length<Sh.BATCHABLE_SIZE*2?this._renderToBatch(e):this._renderDefault(e)}_renderDefault(e){const t=this.shader;t.alpha=this.worldAlpha,t.update&&t.update(),e.batch.flush(),t.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),e.shader.bind(t),e.state.set(this.state),e.geometry.bind(this.geometry,t),e.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)}_renderToBatch(e){const t=this.geometry,i=this.shader;i.uvMatrix&&(i.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=t.indexBuffer.data,this._tintRGB=i._tintRGB,this._texture=i.texture;const s=this.material.pluginName;e.batch.setObjectRenderer(e.plugins[s]),e.plugins[s].render(this)}calculateVertices(){const t=this.geometry.buffers[0],i=t.data,s=t._updateID;if(s===this.vertexDirty&&this._transformID===this.transform._worldID)return;this._transformID=this.transform._worldID,this.vertexData.length!==i.length&&(this.vertexData=new Float32Array(i.length));const r=this.transform.worldTransform,n=r.a,o=r.b,a=r.c,h=r.d,l=r.tx,c=r.ty,u=this.vertexData;for(let d=0;d<u.length/2;d++){const f=i[d*2],p=i[d*2+1];u[d*2]=n*f+a*p+l,u[d*2+1]=o*f+h*p+c}if(this._roundPixels){const d=P.RESOLUTION;for(let f=0;f<u.length;++f)u[f]=Math.round(u[f]*d)/d}this.vertexDirty=s}calculateUvs(){const e=this.geometry.buffers[1],t=this.shader;t.uvMatrix.isSimple?this.uvs=e.data:(this.batchUvs||(this.batchUvs=new Eh(e,t.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)}_calculateBounds(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)}containsPoint(e){if(!this.getBounds().contains(e.x,e.y))return!1;this.worldTransform.applyInverse(e,Nn);const t=this.geometry.getBuffer("aVertexPosition").data,i=wh.points,s=this.geometry.getIndex().data,r=s.length,n=this.drawMode===4?3:1;for(let o=0;o+2<r;o+=n){const a=s[o]*2,h=s[o+1]*2,l=s[o+2]*2;if(i[0]=t[a],i[1]=t[a+1],i[2]=t[h],i[3]=t[h+1],i[4]=t[l],i[5]=t[l+1],wh.contains(Nn.x,Nn.y))return!0}return!1}destroy(e){super.destroy(e),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null}};let He=Sh;He.BATCHABLE_SIZE=100;class Vi extends pe{constructor(t,i,s){super();const r=new ot(t),n=new ot(i,!0),o=new ot(s,!0,!0);this.addAttribute("aVertexPosition",r,2,!1,k.FLOAT).addAttribute("aTextureCoord",n,2,!1,k.FLOAT).addIndex(o),this._updateId=-1}get vertexDirtyId(){return this.buffers[0]._updateID}}var _d=`varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n    gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n`,gd=`attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n`;class ni extends Kt{constructor(t,i){const s={uSampler:t,alpha:1,uTextureMatrix:tt.IDENTITY,uColor:new Float32Array([1,1,1,1])};i=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},i),i.uniforms&&Object.assign(s,i.uniforms),super(i.program||Ut.from(gd,_d),s),this._colorDirty=!1,this.uvMatrix=new Rs(t),this.batchable=i.program===void 0,this.pluginName=i.pluginName,this._tintColor=new j(i.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=i.alpha}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const i=this.texture.baseTexture.alphaMode;j.shared.setValue(this._tintColor).premultiply(this._alpha,i).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class Ah extends Vi{constructor(t=100,i=100,s=10,r=10){super(),this.segWidth=s,this.segHeight=r,this.width=t,this.height=i,this.build()}build(){const t=this.segWidth*this.segHeight,i=[],s=[],r=[],n=this.segWidth-1,o=this.segHeight-1,a=this.width/n,h=this.height/o;for(let c=0;c<t;c++){const u=c%this.segWidth,d=c/this.segWidth|0;i.push(u*a,d*h),s.push(u/n,d/o)}const l=n*o;for(let c=0;c<l;c++){const u=c%n,d=c/n|0,f=d*this.segWidth+u,p=d*this.segWidth+u+1,_=(d+1)*this.segWidth+u,g=(d+1)*this.segWidth+u+1;r.push(f,p,_,p,g,_)}this.buffers[0].data=new Float32Array(i),this.buffers[1].data=new Float32Array(s),this.indexBuffer.data=new Uint16Array(r),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}}class Rh extends Vi{constructor(t=200,i,s=0){super(new Float32Array(i.length*4),new Float32Array(i.length*4),new Uint16Array((i.length-1)*6)),this.points=i,this._width=t,this.textureScale=s,this.build()}get width(){return this._width}build(){const t=this.points;if(!t)return;const i=this.getBuffer("aVertexPosition"),s=this.getBuffer("aTextureCoord"),r=this.getIndex();if(t.length<1)return;i.data.length/4!==t.length&&(i.data=new Float32Array(t.length*4),s.data=new Float32Array(t.length*4),r.data=new Uint16Array((t.length-1)*6));const n=s.data,o=r.data;n[0]=0,n[1]=0,n[2]=0,n[3]=1;let a=0,h=t[0];const l=this._width*this.textureScale,c=t.length;for(let d=0;d<c;d++){const f=d*4;if(this.textureScale>0){const p=h.x-t[d].x,_=h.y-t[d].y,g=Math.sqrt(p*p+_*_);h=t[d],a+=g/l}else a=d/(c-1);n[f]=a,n[f+1]=0,n[f+2]=a,n[f+3]=1}let u=0;for(let d=0;d<c-1;d++){const f=d*2;o[u++]=f,o[u++]=f+1,o[u++]=f+2,o[u++]=f+2,o[u++]=f+1,o[u++]=f+3}s.update(),r.update(),this.updateVertices()}updateVertices(){const t=this.points;if(t.length<1)return;let i=t[0],s,r=0,n=0;const o=this.buffers[0].data,a=t.length,h=this.textureScale>0?this.textureScale*this._width/2:this._width/2;for(let l=0;l<a;l++){const c=t[l],u=l*4;l<t.length-1?s=t[l+1]:s=c,n=-(s.x-i.x),r=s.y-i.y;let d=(1-l/(a-1))*10;d>1&&(d=1);const f=Math.sqrt(r*r+n*n);f<1e-6?(r=0,n=0):(r/=f,n/=f,r*=h,n*=h),o[u]=c.x+r,o[u+1]=c.y+n,o[u+2]=c.x-r,o[u+3]=c.y-n,i=c}this.buffers[0].update()}update(){this.textureScale>0?this.build():this.updateVertices()}}class Ch extends He{constructor(t,i,s){const r=new Ah(t.width,t.height,i,s),n=new ni(B.WHITE);super(r,n),this.texture=t,this.autoResize=!0}textureUpdated(){this._textureID=this.shader.texture._updateID;const t=this.geometry,{width:i,height:s}=this.shader.texture;this.autoResize&&(t.width!==i||t.height!==s)&&(t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build())}set texture(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))}get texture(){return this.shader.texture}_render(t){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),super._render(t)}destroy(t){this.shader.texture.off("update",this.textureUpdated,this),super.destroy(t)}}const $s=10;class yd extends Ch{constructor(t,i,s,r,n){var o,a,h,l,c,u,d,f;super(B.WHITE,4,4),this._origWidth=t.orig.width,this._origHeight=t.orig.height,this._width=this._origWidth,this._height=this._origHeight,this._leftWidth=(a=i!=null?i:(o=t.defaultBorders)==null?void 0:o.left)!=null?a:$s,this._rightWidth=(l=r!=null?r:(h=t.defaultBorders)==null?void 0:h.right)!=null?l:$s,this._topHeight=(u=s!=null?s:(c=t.defaultBorders)==null?void 0:c.top)!=null?u:$s,this._bottomHeight=(f=n!=null?n:(d=t.defaultBorders)==null?void 0:d.bottom)!=null?f:$s,this.texture=t}textureUpdated(){this._textureID=this.shader.texture._updateID,this._refresh()}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(t){this.geometry.getBuffer("aVertexPosition").data=t}updateHorizontalVertices(){const t=this.vertices,i=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*i,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*i,t[25]=t[27]=t[29]=t[31]=this._height}updateVerticalVertices(){const t=this.vertices,i=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*i,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*i,t[6]=t[14]=t[22]=t[30]=this._width}_getMinScale(){const t=this._leftWidth+this._rightWidth,i=this._width>t?1:this._width/t,s=this._topHeight+this._bottomHeight,r=this._height>s?1:this._height/s;return Math.min(i,r)}get width(){return this._width}set width(t){this._width=t,this._refresh()}get height(){return this._height}set height(t){this._height=t,this._refresh()}get leftWidth(){return this._leftWidth}set leftWidth(t){this._leftWidth=t,this._refresh()}get rightWidth(){return this._rightWidth}set rightWidth(t){this._rightWidth=t,this._refresh()}get topHeight(){return this._topHeight}set topHeight(t){this._topHeight=t,this._refresh()}get bottomHeight(){return this._bottomHeight}set bottomHeight(t){this._bottomHeight=t,this._refresh()}_refresh(){const t=this.texture,i=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;const s=1/this._origWidth,r=1/this._origHeight;i[0]=i[8]=i[16]=i[24]=0,i[1]=i[3]=i[5]=i[7]=0,i[6]=i[14]=i[22]=i[30]=1,i[25]=i[27]=i[29]=i[31]=1,i[2]=i[10]=i[18]=i[26]=s*this._leftWidth,i[4]=i[12]=i[20]=i[28]=1-s*this._rightWidth,i[9]=i[11]=i[13]=i[15]=r*this._topHeight,i[17]=i[19]=i[21]=i[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}class vd extends He{constructor(t=B.EMPTY,i,s,r,n){const o=new Vi(i,s,r);o.getBuffer("aVertexPosition").static=!1;const a=new ni(t);super(o,a,null,n),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(t){this.geometry.getBuffer("aVertexPosition").data=t}_render(t){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(t)}}class xd extends He{constructor(t,i,s=0){const r=new Rh(t.height,i,s),n=new ni(t);s>0&&(t.baseTexture.wrapMode=ie.REPEAT),super(r,n),this.autoUpdate=!0}_render(t){const i=this.geometry;(this.autoUpdate||i._width!==this.shader.texture.height)&&(i._width=this.shader.texture.height,i.update()),super._render(t)}}class bd extends Ct{constructor(t=1500,i,s=16384,r=!1){super();const n=16384;s>n&&(s=n),this._properties=[!1,!0,!1,!1,!1],this._maxSize=t,this._batchSize=s,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=G.NORMAL,this.autoResize=r,this.roundPixels=!0,this.baseTexture=null,this.setProperties(i),this._tintColor=new j(0),this.tintRgb=new Float32Array(3),this.tint=16777215}setProperties(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])}updateTransform(){this.displayObjectUpdateTransform()}get tint(){return this._tintColor.value}set tint(t){this._tintColor.setValue(t),this._tintColor.toRgbArray(this.tintRgb)}render(t){!this.visible||this.worldAlpha<=0||!this.children.length||!this.renderable||(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",()=>this.onChildrenChange(0))),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))}onChildrenChange(t){const i=Math.floor(t/this._batchSize);for(;this._bufferUpdateIDs.length<i;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[i]=++this._updateID}dispose(){if(this._buffers){for(let t=0;t<this._buffers.length;++t)this._buffers[t].destroy();this._buffers=null}}destroy(t){super.destroy(t),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null}}class Ih{constructor(t,i,s){this.geometry=new pe,this.indexBuffer=null,this.size=s,this.dynamicProperties=[],this.staticProperties=[];for(let r=0;r<t.length;++r){let n=t[r];n={attributeName:n.attributeName,size:n.size,uploadFunction:n.uploadFunction,type:n.type||k.FLOAT,offset:n.offset},i[r]?this.dynamicProperties.push(n):this.staticProperties.push(n)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const t=this.geometry;let i=0;this.indexBuffer=new ot(Do(this.size),!0,!0),t.addIndex(this.indexBuffer),this.dynamicStride=0;for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];a.offset=i,i+=a.size,this.dynamicStride+=a.size}const s=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(s),this.dynamicDataUint32=new Uint32Array(s),this.dynamicBuffer=new ot(this.dynamicData,!1,!1);let r=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];a.offset=r,r+=a.size,this.staticStride+=a.size}const n=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(n),this.staticDataUint32=new Uint32Array(n),this.staticBuffer=new ot(this.staticData,!0,!1);for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];t.addAttribute(a.attributeName,this.dynamicBuffer,0,a.type===k.UNSIGNED_BYTE,a.type,this.dynamicStride*4,a.offset*4)}for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];t.addAttribute(a.attributeName,this.staticBuffer,0,a.type===k.UNSIGNED_BYTE,a.type,this.staticStride*4,a.offset*4)}}uploadDynamic(t,i,s){for(let r=0;r<this.dynamicProperties.length;r++){const n=this.dynamicProperties[r];n.uploadFunction(t,i,s,n.type===k.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer._updateID++}uploadStatic(t,i,s){for(let r=0;r<this.staticProperties.length;r++){const n=this.staticProperties[r];n.uploadFunction(t,i,s,n.type===k.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var Td=`varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n    vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n    gl_FragColor = color;\n}`,Ed=`attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n    float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n    float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n    vec2 v = vec2(x, y);\n    v = v + aPositionCoord;\n\n    gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vColor = aColor * uColor;\n}\n`;class Ln extends bi{constructor(t){super(t),this.shader=null,this.properties=null,this.tempMatrix=new tt,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:k.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=Kt.from(Ed,Td,{}),this.state=ne.for2d()}render(t){const i=t.children,s=t._maxSize,r=t._batchSize,n=this.renderer;let o=i.length;if(o===0)return;o>s&&!t.autoResize&&(o=s);let a=t._buffers;a||(a=t._buffers=this.generateBuffers(t));const h=i[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=xr(t.blendMode,l),n.state.set(this.state);const c=n.gl,u=t.worldTransform.copyTo(this.tempMatrix);u.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=j.shared.setValue(t.tintRgb).premultiply(t.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let d=!1;for(let f=0,p=0;f<o;f+=r,p+=1){let _=o-f;_>r&&(_=r),p>=a.length&&a.push(this._generateOneMoreBuffer(t));const g=a[p];g.uploadDynamic(i,f,_);const v=t._bufferUpdateIDs[p]||0;d=d||g._updateID<v,d&&(g._updateID=t._updateID,g.uploadStatic(i,f,_)),n.geometry.bind(g.geometry),c.drawElements(c.TRIANGLES,_*6,c.UNSIGNED_SHORT,0)}}generateBuffers(t){const i=[],s=t._maxSize,r=t._batchSize,n=t._properties;for(let o=0;o<s;o+=r)i.push(new Ih(this.properties,n,r));return i}_generateOneMoreBuffer(t){const i=t._batchSize,s=t._properties;return new Ih(this.properties,s,i)}uploadVertices(t,i,s,r,n,o){let a=0,h=0,l=0,c=0;for(let u=0;u<s;++u){const d=t[i+u],f=d._texture,p=d.scale.x,_=d.scale.y,g=f.trim,v=f.orig;g?(h=g.x-d.anchor.x*v.width,a=h+g.width,c=g.y-d.anchor.y*v.height,l=c+g.height):(a=v.width*(1-d.anchor.x),h=v.width*-d.anchor.x,l=v.height*(1-d.anchor.y),c=v.height*-d.anchor.y),r[o]=h*p,r[o+1]=c*_,r[o+n]=a*p,r[o+n+1]=c*_,r[o+n*2]=a*p,r[o+n*2+1]=l*_,r[o+n*3]=h*p,r[o+n*3+1]=l*_,o+=n*4}}uploadPosition(t,i,s,r,n,o){for(let a=0;a<s;a++){const h=t[i+a].position;r[o]=h.x,r[o+1]=h.y,r[o+n]=h.x,r[o+n+1]=h.y,r[o+n*2]=h.x,r[o+n*2+1]=h.y,r[o+n*3]=h.x,r[o+n*3+1]=h.y,o+=n*4}}uploadRotation(t,i,s,r,n,o){for(let a=0;a<s;a++){const h=t[i+a].rotation;r[o]=h,r[o+n]=h,r[o+n*2]=h,r[o+n*3]=h,o+=n*4}}uploadUvs(t,i,s,r,n,o){for(let a=0;a<s;++a){const h=t[i+a]._texture._uvs;h?(r[o]=h.x0,r[o+1]=h.y0,r[o+n]=h.x1,r[o+n+1]=h.y1,r[o+n*2]=h.x2,r[o+n*2+1]=h.y2,r[o+n*3]=h.x3,r[o+n*3+1]=h.y3,o+=n*4):(r[o]=0,r[o+1]=0,r[o+n]=0,r[o+n+1]=0,r[o+n*2]=0,r[o+n*2+1]=0,r[o+n*3]=0,r[o+n*3+1]=0,o+=n*4)}}uploadTint(t,i,s,r,n,o){for(let a=0;a<s;++a){const h=t[i+a],l=j.shared.setValue(h._tintRGB).toPremultiplied(h.alpha,h.texture.baseTexture.alphaMode>0);r[o]=l,r[o+n]=l,r[o+n*2]=l,r[o+n*3]=l,o+=n*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Ln.extension={name:"particle",type:M.RendererPlugin},U.add(Ln);var zi=(e=>(e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",e))(zi||{});const js={willReadFrequently:!0},L=class{static get experimentalLetterSpacingSupported(){let e=L._experimentalLetterSpacingSupported;if(e!==void 0){const t=P.ADAPTER.getCanvasRenderingContext2D().prototype;e=L._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,i,s,r,n,o,a,h){this.text=e,this.style=t,this.width=i,this.height=s,this.lines=r,this.lineWidths=n,this.lineHeight=o,this.maxLineWidth=a,this.fontProperties=h}static measureText(e,t,i,s=L._canvas){i=i==null?t.wordWrap:i;const r=t.toFontString(),n=L.measureFont(r);n.fontSize===0&&(n.fontSize=t.fontSize,n.ascent=t.fontSize);const o=s.getContext("2d",js);o.font=r;const h=(i?L.wordWrap(e,t,s):e).split(/(?:\\r\\n|\\r|\\n)/),l=new Array(h.length);let c=0;for(let p=0;p<h.length;p++){const _=L._measureText(h[p],t.letterSpacing,o);l[p]=_,c=Math.max(c,_)}let u=c+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const d=t.lineHeight||n.fontSize+t.strokeThickness;let f=Math.max(d,n.fontSize+t.strokeThickness*2)+(h.length-1)*(d+t.leading);return t.dropShadow&&(f+=t.dropShadowDistance),new L(e,t,u,f,h,l,d+t.leading,c,n)}static _measureText(e,t,i){let s=!1;L.experimentalLetterSpacingSupported&&(L.experimentalLetterSpacing?(i.letterSpacing=`${t}px`,i.textLetterSpacing=`${t}px`,s=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let r=i.measureText(e).width;return r>0&&(s?r-=t:r+=(L.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,i=L._canvas){const s=i.getContext("2d",js);let r=0,n="",o="";const a=Object.create(null),{letterSpacing:h,whiteSpace:l}=t,c=L.collapseSpaces(l),u=L.collapseNewlines(l);let d=!c;const f=t.wordWrapWidth+h,p=L.tokenize(e);for(let _=0;_<p.length;_++){let g=p[_];if(L.isNewline(g)){if(!u){o+=L.addLine(n),d=!c,n="",r=0;continue}g=" "}if(c){const b=L.isBreakingSpace(g),y=L.isBreakingSpace(n[n.length-1]);if(b&&y)continue}const v=L.getFromCache(g,h,a,s);if(v>f)if(n!==""&&(o+=L.addLine(n),n="",r=0),L.canBreakWords(g,t.breakWords)){const b=L.wordWrapSplit(g);for(let y=0;y<b.length;y++){let x=b[y],A=x,D=1;for(;b[y+D];){const E=b[y+D];if(!L.canBreakChars(A,E,g,y,t.breakWords))x+=E;else break;A=E,D++}y+=D-1;const R=L.getFromCache(x,h,a,s);R+r>f&&(o+=L.addLine(n),d=!1,n="",r=0),n+=x,r+=R}}else{n.length>0&&(o+=L.addLine(n),n="",r=0);const b=_===p.length-1;o+=L.addLine(g,!b),d=!1,n="",r=0}else v+r>f&&(d=!1,o+=L.addLine(n),n="",r=0),(n.length>0||!L.isBreakingSpace(g)||d)&&(n+=g,r+=v)}return o+=L.addLine(n,!1),o}static addLine(e,t=!0){return e=L.trimRight(e),e=t?`${e}\n`:e,e}static getFromCache(e,t,i,s){let r=i[e];return typeof r!="number"&&(r=L._measureText(e,t,s)+t,i[e]=r),r}static collapseSpaces(e){return e==="normal"||e==="pre-line"}static collapseNewlines(e){return e==="normal"}static trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const i=e[t];if(!L.isBreakingSpace(i))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:L._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:L._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let i="";if(typeof e!="string")return t;for(let s=0;s<e.length;s++){const r=e[s],n=e[s+1];if(L.isBreakingSpace(r,n)||L.isNewline(r)){i!==""&&(t.push(i),i=""),t.push(r);continue}i+=r}return i!==""&&t.push(i),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,i,s,r){return!0}static wordWrapSplit(e){return L.graphemeSegmenter(e)}static measureFont(e){if(L._fonts[e])return L._fonts[e];const t={ascent:0,descent:0,fontSize:0},i=L._canvas,s=L._context;s.font=e;const r=L.METRICS_STRING+L.BASELINE_SYMBOL,n=Math.ceil(s.measureText(r).width);let o=Math.ceil(s.measureText(L.BASELINE_SYMBOL).width);const a=Math.ceil(L.HEIGHT_MULTIPLIER*o);if(o=o*L.BASELINE_MULTIPLIER|0,n===0||a===0)return L._fonts[e]=t,t;i.width=n,i.height=a,s.fillStyle="#f00",s.fillRect(0,0,n,a),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(r,0,o);const h=s.getImageData(0,0,n,a).data,l=h.length,c=n*4;let u=0,d=0,f=!1;for(u=0;u<o;++u){for(let p=0;p<c;p+=4)if(h[d+p]!==255){f=!0;break}if(!f)d+=c;else break}for(t.ascent=o-u,d=l-c,f=!1,u=a;u>o;--u){for(let p=0;p<c;p+=4)if(h[d+p]!==255){f=!0;break}if(!f)d-=c;else break}return t.descent=u-o,t.fontSize=t.ascent+t.descent,L._fonts[e]=t,t}static clearMetrics(e=""){e?delete L._fonts[e]:L._fonts={}}static get _canvas(){if(!L.__canvas){let e;try{const t=new OffscreenCanvas(0,0),i=t.getContext("2d",js);if(i!=null&&i.measureText)return L.__canvas=t,t;e=P.ADAPTER.createCanvas()}catch(t){e=P.ADAPTER.createCanvas()}e.width=e.height=10,L.__canvas=e}return L.__canvas}static get _context(){return L.__context||(L.__context=L._canvas.getContext("2d",js)),L.__context}};let yt=L;yt.METRICS_STRING="|\\xC9q\\xC5",yt.BASELINE_SYMBOL="M",yt.BASELINE_MULTIPLIER=1.4,yt.HEIGHT_MULTIPLIER=2,yt.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const e=new Intl.Segmenter;return t=>[...e.segment(t)].map(i=>i.segment)}return e=>[...e]})(),yt.experimentalLetterSpacing=!1,yt._fonts={},yt._newlines=[10,13],yt._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];const wd=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Wi=class{constructor(e){this.styleID=0,this.reset(),Un(this,e,e)}clone(){const e={};return Un(e,this,Wi.defaultStyle),new Wi(e)}reset(){Un(this,Wi.defaultStyle,Wi.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=On(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=On(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){Sd(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.styleID++)}get leading(){return this._leading}set leading(e){this._leading!==e&&(this._leading=e,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(e){this._lineJoin!==e&&(this._lineJoin=e,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(e){this._miterLimit!==e&&(this._miterLimit=e,this.styleID++)}get padding(){return this._padding}set padding(e){this._padding!==e&&(this._padding=e,this.styleID++)}get stroke(){return this._stroke}set stroke(e){const t=On(e);this._stroke!==t&&(this._stroke=t,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(e){this._strokeThickness!==e&&(this._strokeThickness=e,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline!==e&&(this._textBaseline=e,this.styleID++)}get trim(){return this._trim}set trim(e){this._trim!==e&&(this._trim=e,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace!==e&&(this._whiteSpace=e,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap!==e&&(this._wordWrap=e,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth!==e&&(this._wordWrapWidth=e,this.styleID++)}toFontString(){const e=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize;let t=this.fontFamily;Array.isArray(this.fontFamily)||(t=this.fontFamily.split(","));for(let i=t.length-1;i>=0;i--){let s=t[i].trim();!/([\\"\\\'])[^\\\'\\"]+\\1/.test(s)&&!wd.includes(s)&&(s=`"${s}"`),t[i]=s}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${e} ${t.join(",")}`}};let ae=Wi;ae.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:zi.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};function On(e){const t=j.shared;return Array.isArray(e)?e.map(i=>t.setValue(i).toHex()):t.setValue(e).toHex()}function Sd(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}function Un(e,t,i){for(const s in i)Array.isArray(t[s])?e[s]=t[s].slice():e[s]=t[s]}const Ad={texture:!0,children:!1,baseTexture:!0},kn=class extends ye{constructor(e,t,i){var n;let s=!1;i||(i=P.ADAPTER.createCanvas(),s=!0),i.width=3,i.height=3;const r=B.from(i);r.orig=new $,r.trim=new $,super(r),this._ownCanvas=s,this.canvas=i,this.context=i.getContext("2d",{willReadFrequently:!0}),this._resolution=(n=kn.defaultResolution)!=null?n:P.RESOLUTION,this._autoResolution=kn.defaultAutoResolution,this._text=null,this._style=null,this._styleListener=null,this._font="",this.text=e,this.style=t,this.localStyleID=-1}static get experimentalLetterSpacing(){return yt.experimentalLetterSpacing}static set experimentalLetterSpacing(e){z("7.1.0","Text.experimentalLetterSpacing is deprecated, use TextMetrics.experimentalLetterSpacing"),yt.experimentalLetterSpacing=e}updateText(e){const t=this._style;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;this._font=this._style.toFontString();const i=this.context,s=yt.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),r=s.width,n=s.height,o=s.lines,a=s.lineHeight,h=s.lineWidths,l=s.maxLineWidth,c=s.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,r)+t.padding*2)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,n)+t.padding*2)*this._resolution),i.scale(this._resolution,this._resolution),i.clearRect(0,0,this.canvas.width,this.canvas.height),i.font=this._font,i.lineWidth=t.strokeThickness,i.textBaseline=t.textBaseline,i.lineJoin=t.lineJoin,i.miterLimit=t.miterLimit;let u,d;const f=t.dropShadow?2:1;for(let p=0;p<f;++p){const _=t.dropShadow&&p===0,g=_?Math.ceil(Math.max(1,n)+t.padding*2):0,v=g*this._resolution;if(_){i.fillStyle="black",i.strokeStyle="black";const y=t.dropShadowColor,x=t.dropShadowBlur*this._resolution,A=t.dropShadowDistance*this._resolution;i.shadowColor=j.shared.setValue(y).setAlpha(t.dropShadowAlpha).toRgbaString(),i.shadowBlur=x,i.shadowOffsetX=Math.cos(t.dropShadowAngle)*A,i.shadowOffsetY=Math.sin(t.dropShadowAngle)*A+v}else i.fillStyle=this._generateFillStyle(t,o,s),i.strokeStyle=t.stroke,i.shadowColor="black",i.shadowBlur=0,i.shadowOffsetX=0,i.shadowOffsetY=0;let b=(a-c.fontSize)/2;a-c.fontSize<0&&(b=0);for(let y=0;y<o.length;y++)u=t.strokeThickness/2,d=t.strokeThickness/2+y*a+c.ascent+b,t.align==="right"?u+=l-h[y]:t.align==="center"&&(u+=(l-h[y])/2),t.stroke&&t.strokeThickness&&this.drawLetterSpacing(o[y],u+t.padding,d+t.padding-g,!0),t.fill&&this.drawLetterSpacing(o[y],u+t.padding,d+t.padding-g)}this.updateTexture()}drawLetterSpacing(e,t,i,s=!1){const n=this._style.letterSpacing;let o=!1;if(yt.experimentalLetterSpacingSupported&&(yt.experimentalLetterSpacing?(this.context.letterSpacing=`${n}px`,this.context.textLetterSpacing=`${n}px`,o=!0):(this.context.letterSpacing="0px",this.context.textLetterSpacing="0px")),n===0||o){s?this.context.strokeText(e,t,i):this.context.fillText(e,t,i);return}let a=t;const h=yt.graphemeSegmenter(e);let l=this.context.measureText(e).width,c=0;for(let u=0;u<h.length;++u){const d=h[u];s?this.context.strokeText(d,a,i):this.context.fillText(d,a,i);let f="";for(let p=u+1;p<h.length;++p)f+=h[p];c=this.context.measureText(f).width,a+=l-c+n,l=c}}updateTexture(){const e=this.canvas;if(this._style.trim){const n=ko(e);n.data&&(e.width=n.width,e.height=n.height,this.context.putImageData(n.data,0,0))}const t=this._texture,i=this._style,s=i.trim?0:i.padding,r=t.baseTexture;t.trim.width=t._frame.width=e.width/this._resolution,t.trim.height=t._frame.height=e.height/this._resolution,t.trim.x=-s,t.trim.y=-s,t.orig.width=t._frame.width-s*2,t.orig.height=t._frame.height-s*2,this._onTextureUpdate(),r.setRealSize(e.width,e.height,this._resolution),t.updateUvs(),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}updateTransform(){this.updateText(!0),super.updateTransform()}getBounds(e,t){return this.updateText(!0),this._textureID===-1&&(e=!1),super.getBounds(e,t)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds.call(this,e)}_calculateBounds(){this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_generateFillStyle(e,t,i){const s=e.fill;if(Array.isArray(s)){if(s.length===1)return s[0]}else return s;let r;const n=e.dropShadow?e.dropShadowDistance:0,o=e.padding||0,a=this.canvas.width/this._resolution-n-o*2,h=this.canvas.height/this._resolution-n-o*2,l=s.slice(),c=e.fillGradientStops.slice();if(!c.length){const u=l.length+1;for(let d=1;d<u;++d)c.push(d/u)}if(l.unshift(s[0]),c.unshift(0),l.push(s[s.length-1]),c.push(1),e.fillGradientType===zi.LINEAR_VERTICAL){r=this.context.createLinearGradient(a/2,o,a/2,h+o);const u=i.fontProperties.fontSize+e.strokeThickness;for(let d=0;d<t.length;d++){const f=i.lineHeight*(d-1)+u,p=i.lineHeight*d;let _=p;d>0&&f>p&&(_=(p+f)/2);const g=p+u,v=i.lineHeight*(d+1);let b=g;d+1<t.length&&v<g&&(b=(g+v)/2);const y=(b-_)/h;for(let x=0;x<l.length;x++){let A=0;typeof c[x]=="number"?A=c[x]:A=x/l.length;let D=Math.min(1,Math.max(0,_/h+A*y));D=Number(D.toFixed(5)),r.addColorStop(D,l[x])}}}else{r=this.context.createLinearGradient(o,h/2,a+o,h/2);const u=l.length+1;let d=1;for(let f=0;f<l.length;f++){let p;typeof c[f]=="number"?p=c[f]:p=d/u,r.addColorStop(p,l[f]),d++}}return r}destroy(e){typeof e=="boolean"&&(e={children:e}),e=Object.assign({},Ad,e),super.destroy(e),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this.updateText(!0);const t=de(this.scale.x)||1;this.scale.x=t*e/this._texture.orig.width,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this.updateText(!0);const t=de(this.scale.y)||1;this.scale.y=t*e/this._texture.orig.height,this._height=e}get style(){return this._style}set style(e){e=e||{},e instanceof ae?this._style=e:this._style=new ae(e),this.localStyleID=-1,this.dirty=!0}get text(){return this._text}set text(e){e=String(e==null?"":e),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}};let Ys=kn;Ys.defaultAutoResolution=!0;class Ph{constructor(t){this.maxItemsPerFrame=t,this.itemsLeft=0}beginFrame(){this.itemsLeft=this.maxItemsPerFrame}allowedToUpload(){return this.itemsLeft-- >0}}function Rd(e,t){var s;let i=!1;if((s=e==null?void 0:e._textures)!=null&&s.length){for(let r=0;r<e._textures.length;r++)if(e._textures[r]instanceof B){const n=e._textures[r].baseTexture;t.includes(n)||(t.push(n),i=!0)}}return i}function Cd(e,t){if(e.baseTexture instanceof V){const i=e.baseTexture;return t.includes(i)||t.push(i),!0}return!1}function Id(e,t){if(e._texture&&e._texture instanceof B){const i=e._texture.baseTexture;return t.includes(i)||t.push(i),!0}return!1}function Pd(e,t){return t instanceof Ys?(t.updateText(!0),!0):!1}function Md(e,t){if(t instanceof ae){const i=t.toFontString();return yt.measureFont(i),!0}return!1}function Bd(e,t){if(e instanceof Ys){t.includes(e.style)||t.push(e.style),t.includes(e)||t.push(e);const i=e._texture.baseTexture;return t.includes(i)||t.push(i),!0}return!1}function Dd(e,t){return e instanceof ae?(t.includes(e)||t.push(e),!0):!1}const Mh=class{constructor(e){this.limiter=new Ph(Mh.uploadsPerFrame),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=()=>{!this.queue||this.prepareItems()},this.registerFindHook(Bd),this.registerFindHook(Dd),this.registerFindHook(Rd),this.registerFindHook(Cd),this.registerFindHook(Id),this.registerUploadHook(Pd),this.registerUploadHook(Md)}upload(e){return new Promise(t=>{e&&this.add(e),this.queue.length?(this.completes.push(t),this.ticking||(this.ticking=!0,lt.system.addOnce(this.tick,this,ge.UTILITY))):t()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){const e=this.queue[0];let t=!1;if(e&&!e._destroyed){for(let i=0,s=this.uploadHooks.length;i<s;i++)if(this.uploadHooks[i](this.uploadHookHelper,e)){this.queue.shift(),t=!0;break}}t||this.queue.shift()}if(this.queue.length)lt.system.addOnce(this.tick,this,ge.UTILITY);else{this.ticking=!1;const e=this.completes.slice(0);this.completes.length=0;for(let t=0,i=e.length;t<i;t++)e[t]()}}registerFindHook(e){return e&&this.addHooks.push(e),this}registerUploadHook(e){return e&&this.uploadHooks.push(e),this}add(e){for(let t=0,i=this.addHooks.length;t<i&&!this.addHooks[t](e,this.queue);t++);if(e instanceof Ct)for(let t=e.children.length-1;t>=0;t--)this.add(e.children[t]);return this}destroy(){this.ticking&&lt.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}};let $i=Mh;$i.uploadsPerFrame=4,Object.defineProperties(P,{UPLOADS_PER_FRAME:{get(){return $i.uploadsPerFrame},set(e){z("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),$i.uploadsPerFrame=e}}});function Bh(e,t){return t instanceof V?(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0):!1}function Fd(e,t){if(!(t instanceof Xi))return!1;const{geometry:i}=t;t.finishPoly(),i.updateBatches();const{batches:s}=i;for(let r=0;r<s.length;r++){const{texture:n}=s[r].style;n&&Bh(e,n.baseTexture)}return i.batchable||e.geometry.bind(i,t._resolveDirectShader(e)),!0}function Nd(e,t){return e instanceof Xi?(t.push(e),!0):!1}class Gn extends $i{constructor(t){super(t),this.uploadHookHelper=this.renderer,this.registerFindHook(Nd),this.registerUploadHook(Bh),this.registerUploadHook(Fd)}}Gn.extension={name:"prepare",type:M.RendererSystem},U.add(Gn);class Ld{constructor(t){this.maxMilliseconds=t,this.frameStart=0}beginFrame(){this.frameStart=Date.now()}allowedToUpload(){return Date.now()-this.frameStart<this.maxMilliseconds}}class qs extends ye{constructor(t,i=!0){super(t[0]instanceof B?t[0]:t[0].texture),this._textures=null,this._durations=null,this._autoUpdate=i,this._isConnectedToTicker=!1,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this._playing=!1,this._previousFrame=null,this.textures=t}stop(){!this._playing||(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(lt.shared.remove(this.update,this),this._isConnectedToTicker=!1))}play(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(lt.shared.add(this.update,this,ge.HIGH),this._isConnectedToTicker=!0))}gotoAndStop(t){this.stop(),this.currentFrame=t}gotoAndPlay(t){this.currentFrame=t,this.play()}update(t){if(!this._playing)return;const i=this.animationSpeed*t,s=this.currentFrame;if(this._durations!==null){let r=this._currentTime%1*this._durations[this.currentFrame];for(r+=i/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];const n=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=i;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):s!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<s||this.animationSpeed<0&&this.currentFrame>s)&&this.onLoop(),this.updateTexture())}updateTexture(){const t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))}destroy(t){this.stop(),super.destroy(t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null}static fromFrames(t){const i=[];for(let s=0;s<t.length;++s)i.push(B.from(t[s]));return new qs(i)}static fromImages(t){const i=[];for(let s=0;s<t.length;++s)i.push(B.from(t[s]));return new qs(i)}get totalFrames(){return this._textures.length}get textures(){return this._textures}set textures(t){if(t[0]instanceof B)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(let i=0;i<t.length;i++)this._textures.push(t[i].texture),this._durations.push(t[i].time)}this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()}get currentFrame(){let t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}set currentFrame(t){if(t<0||t>this.totalFrames-1)throw new Error(`[AnimatedSprite]: Invalid frame index value ${t}, expected to be between 0 and totalFrames ${this.totalFrames}.`);const i=this.currentFrame;this._currentTime=t,i!==this.currentFrame&&this.updateTexture()}get playing(){return this._playing}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(lt.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(lt.shared.add(this.update,this),this._isConnectedToTicker=!0))}}const ji=new Y;class Hn extends ye{constructor(t,i=100,s=100){super(t),this.tileTransform=new vi,this._width=i,this._height=s,this.uvMatrix=this.texture.uvMatrix||new Rs(t),this.pluginName="tilingSprite",this.uvRespectAnchor=!1}get clampMargin(){return this.uvMatrix.clampMargin}set clampMargin(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)}get tileScale(){return this.tileTransform.scale}set tileScale(t){this.tileTransform.scale.copyFrom(t)}get tilePosition(){return this.tileTransform.position}set tilePosition(t){this.tileTransform.position.copyFrom(t)}_onTextureUpdate(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215}_render(t){const i=this._texture;!i||!i.valid||(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))}_calculateBounds(){const t=this._width*-this._anchor._x,i=this._height*-this._anchor._y,s=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,i,s,r)}getLocalBounds(t){return this.children.length===0?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),t||(this._localBoundsRect||(this._localBoundsRect=new $),t=this._localBoundsRect),this._bounds.getRectangle(t)):super.getLocalBounds.call(this,t)}containsPoint(t){this.worldTransform.applyInverse(t,ji);const i=this._width,s=this._height,r=-i*this.anchor._x;if(ji.x>=r&&ji.x<r+i){const n=-s*this.anchor._y;if(ji.y>=n&&ji.y<n+s)return!0}return!1}destroy(t){super.destroy(t),this.tileTransform=null,this.uvMatrix=null}static from(t,i){const s=t instanceof B?t:B.from(t,i);return new Hn(s,i.width,i.height)}get width(){return this._width}set width(t){this._width=t}get height(){return this._height}set height(t){this._height=t}}var Od=`#version 300 es\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nin vec2 vTextureCoord;\n\nout vec4 fragmentColor;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    vec2 unclamped = coord;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    vec4 texSample = texture(uSampler, coord, unclamped == coord ? 0.0f : -32.0f);// lod-bias very negative to force lod 0\n\n    fragmentColor = texSample * uColor;\n}\n`,Ud=`#version 300 es\n#define SHADER_NAME Tiling-Sprite-300\n\nprecision lowp float;\n\nin vec2 aVertexPosition;\nin vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nout vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n`,kd=`#version 100\n#ifdef GL_EXT_shader_texture_lod\n    #extension GL_EXT_shader_texture_lod : enable\n#endif\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    vec2 unclamped = coord;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    #ifdef GL_EXT_shader_texture_lod\n        vec4 texSample = unclamped == coord\n            ? texture2D(uSampler, coord) \n            : texture2DLodEXT(uSampler, coord, 0);\n    #else\n        vec4 texSample = texture2D(uSampler, coord);\n    #endif\n\n    gl_FragColor = texSample * uColor;\n}\n`,Dh=`#version 100\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n`,Gd=`#version 100\n#define SHADER_NAME Tiling-Sprite-Simple-100\n\nprecision lowp float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n    vec4 texSample = texture2D(uSampler, vTextureCoord);\n    gl_FragColor = texSample * uColor;\n}\n`;const Ks=new tt;class Xn extends bi{constructor(t){super(t),t.runners.contextChange.add(this),this.quad=new Gr,this.state=ne.for2d()}contextChange(){const t=this.renderer,i={globals:t.globalUniforms};this.simpleShader=Kt.from(Dh,Gd,i),this.shader=t.context.webGLVersion>1?Kt.from(Ud,Od,i):Kt.from(Dh,kd,i)}render(t){const i=this.renderer,s=this.quad;let r=s.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y);const n=t.uvRespectAnchor?t.anchor.x:0,o=t.uvRespectAnchor?t.anchor.y:0;r=s.uvs,r[0]=r[6]=-n,r[1]=r[3]=-o,r[2]=r[4]=1-n,r[5]=r[7]=1-o,s.invalidate();const a=t._texture,h=a.baseTexture,l=h.alphaMode>0,c=t.tileTransform.localTransform,u=t.uvMatrix;let d=h.isPowerOfTwo&&a.frame.width===h.width&&a.frame.height===h.height;d&&(h._glTextures[i.CONTEXT_UID]?d=h.wrapMode!==ie.CLAMP:h.wrapMode===ie.CLAMP&&(h.wrapMode=ie.REPEAT));const f=d?this.simpleShader:this.shader,p=a.width,_=a.height,g=t._width,v=t._height;Ks.set(c.a*p/g,c.b*p/v,c.c*_/g,c.d*_/v,c.tx/g,c.ty/v),Ks.invert(),d?Ks.prepend(u.mapCoord):(f.uniforms.uMapCoord=u.mapCoord.toArray(!0),f.uniforms.uClampFrame=u.uClampFrame,f.uniforms.uClampOffset=u.uClampOffset),f.uniforms.uTransform=Ks.toArray(!0),f.uniforms.uColor=j.shared.setValue(t.tint).premultiply(t.worldAlpha,l).toArray(f.uniforms.uColor),f.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),f.uniforms.uSampler=a,i.shader.bind(f),i.geometry.bind(s),this.state.blendMode=xr(t.blendMode,l),i.state.set(this.state),i.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}Xn.extension={name:"tilingSprite",type:M.RendererPlugin},U.add(Xn);const Yi=class{constructor(e,t,i=null){this.linkedSheets=[],this._texture=e instanceof B?e:null,this.baseTexture=e instanceof V?e:this._texture.baseTexture,this.textures={},this.animations={},this.data=t;const s=this.baseTexture.resource;this.resolution=this._updateResolution(i||(s?s.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let i=fe(e,null);return i===null&&(i=parseFloat(t!=null?t:"1")),i!==1&&this.baseTexture.setResolution(i),i}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=Yi.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const i=Yi.BATCH_SIZE;for(;t-e<i&&t<this._frameKeys.length;){const s=this._frameKeys[t],r=this._frames[s],n=r.frame;if(n){let o=null,a=null;const h=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,l=new $(0,0,Math.floor(h.w)/this.resolution,Math.floor(h.h)/this.resolution);r.rotated?o=new $(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.h)/this.resolution,Math.floor(n.w)/this.resolution):o=new $(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution),r.trimmed!==!1&&r.spriteSourceSize&&(a=new $(Math.floor(r.spriteSourceSize.x)/this.resolution,Math.floor(r.spriteSourceSize.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution)),this.textures[s]=new B(this.baseTexture,o,l,a,r.rotated?2:0,r.anchor,r.borders),B.addToCache(this.textures[s],s)}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let i=0;i<e[t].length;i++){const s=e[t][i];this.animations[t].push(this.textures[s])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Yi.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Yi.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((t=this._texture)==null||t.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};let Zs=Yi;Zs.BATCH_SIZE=1e3;const Hd=["jpg","png","jpeg","avif","webp"];function Fh(e,t,i){const s={};if(e.forEach(r=>{s[r]=t}),Object.keys(t.textures).forEach(r=>{s[r]=t.textures[r]}),!i){const r=Tt.dirname(e[0]);t.linkedSheets.forEach((n,o)=>{const a=Fh([`${r}/${t.data.meta.related_multi_packs[o]}`],n,!0);Object.assign(s,a)})}return s}const Nh={extension:M.Asset,cache:{test:e=>e instanceof Zs,getCacheableAssets:(e,t)=>Fh(e,t,!1)},resolver:{test:e=>{const i=e.split("?")[0].split("."),s=i.pop(),r=i.pop();return s==="json"&&Hd.includes(r)},parse:e=>{var i,s;const t=e.split(".");return{resolution:parseFloat((s=(i=P.RETINA_PREFIX.exec(e))==null?void 0:i[1])!=null?s:"1"),format:t[t.length-2],src:e}}},loader:{name:"spritesheetLoader",extension:{type:M.LoadParser,priority:Jt.Normal},async testParse(e,t){return Tt.extname(t.src).toLowerCase()===".json"&&!!e.frames},async parse(e,t,i){var l,c;let s=Tt.dirname(t.src);s&&s.lastIndexOf("/")!==s.length-1&&(s+="/");let r=s+e.meta.image;r=Os(r,t.src);const o=(await i.load([r]))[r],a=new Zs(o.baseTexture,e,t.src);await a.parse();const h=(l=e==null?void 0:e.meta)==null?void 0:l.related_multi_packs;if(Array.isArray(h)){const u=[];for(const f of h){if(typeof f!="string")continue;let p=s+f;(c=t.data)!=null&&c.ignoreMultiPack||(p=Os(p,t.src),u.push(i.load({src:p,data:{ignoreMultiPack:!0}})))}const d=await Promise.all(u);a.linkedSheets=d,d.forEach(f=>{f.linkedSheets=[a].concat(a.linkedSheets.filter(p=>p!==f))})}return a},unload(e){e.destroy(!0)}}};U.add(Nh);class qi{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}}class Ki{static test(t){return typeof t=="string"&&t.startsWith("info face=")}static parse(t){const i=t.match(/^[a-z]+\\s+.+$/gm),s={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(const n in i){const o=i[n].match(/^[a-z]+/gm)[0],a=i[n].match(/[a-zA-Z]+=([^\\s"\']+|"([^"]*)")/gm),h={};for(const l in a){const c=a[l].split("="),u=c[0],d=c[1].replace(/"/gm,""),f=parseFloat(d),p=isNaN(f)?d:f;h[u]=p}s[o].push(h)}const r=new qi;return s.info.forEach(n=>r.info.push({face:n.face,size:parseInt(n.size,10)})),s.common.forEach(n=>r.common.push({lineHeight:parseInt(n.lineHeight,10)})),s.page.forEach(n=>r.page.push({id:parseInt(n.id,10),file:n.file})),s.char.forEach(n=>r.char.push({id:parseInt(n.id,10),page:parseInt(n.page,10),x:parseInt(n.x,10),y:parseInt(n.y,10),width:parseInt(n.width,10),height:parseInt(n.height,10),xoffset:parseInt(n.xoffset,10),yoffset:parseInt(n.yoffset,10),xadvance:parseInt(n.xadvance,10)})),s.kerning.forEach(n=>r.kerning.push({first:parseInt(n.first,10),second:parseInt(n.second,10),amount:parseInt(n.amount,10)})),s.distanceField.forEach(n=>r.distanceField.push({distanceRange:parseInt(n.distanceRange,10),fieldType:n.fieldType})),r}}class Js{static test(t){const i=t;return"getElementsByTagName"in i&&i.getElementsByTagName("page").length&&i.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(t){const i=new qi,s=t.getElementsByTagName("info"),r=t.getElementsByTagName("common"),n=t.getElementsByTagName("page"),o=t.getElementsByTagName("char"),a=t.getElementsByTagName("kerning"),h=t.getElementsByTagName("distanceField");for(let l=0;l<s.length;l++)i.info.push({face:s[l].getAttribute("face"),size:parseInt(s[l].getAttribute("size"),10)});for(let l=0;l<r.length;l++)i.common.push({lineHeight:parseInt(r[l].getAttribute("lineHeight"),10)});for(let l=0;l<n.length;l++)i.page.push({id:parseInt(n[l].getAttribute("id"),10)||0,file:n[l].getAttribute("file")});for(let l=0;l<o.length;l++){const c=o[l];i.char.push({id:parseInt(c.getAttribute("id"),10),page:parseInt(c.getAttribute("page"),10)||0,x:parseInt(c.getAttribute("x"),10),y:parseInt(c.getAttribute("y"),10),width:parseInt(c.getAttribute("width"),10),height:parseInt(c.getAttribute("height"),10),xoffset:parseInt(c.getAttribute("xoffset"),10),yoffset:parseInt(c.getAttribute("yoffset"),10),xadvance:parseInt(c.getAttribute("xadvance"),10)})}for(let l=0;l<a.length;l++)i.kerning.push({first:parseInt(a[l].getAttribute("first"),10),second:parseInt(a[l].getAttribute("second"),10),amount:parseInt(a[l].getAttribute("amount"),10)});for(let l=0;l<h.length;l++)i.distanceField.push({fieldType:h[l].getAttribute("fieldType"),distanceRange:parseInt(h[l].getAttribute("distanceRange"),10)});return i}}class Qs{static test(t){return typeof t=="string"&&t.includes("<font>")?Js.test(P.ADAPTER.parseXML(t)):!1}static parse(t){return Js.parse(P.ADAPTER.parseXML(t))}}const Vn=[Ki,Js,Qs];function Lh(e){for(let t=0;t<Vn.length;t++)if(Vn[t].test(e))return Vn[t];return null}function Xd(e,t,i,s,r,n){const o=i.fill;if(Array.isArray(o)){if(o.length===1)return o[0]}else return o;let a;const h=i.dropShadow?i.dropShadowDistance:0,l=i.padding||0,c=e.width/s-h-l*2,u=e.height/s-h-l*2,d=o.slice(),f=i.fillGradientStops.slice();if(!f.length){const p=d.length+1;for(let _=1;_<p;++_)f.push(_/p)}if(d.unshift(o[0]),f.unshift(0),d.push(o[o.length-1]),f.push(1),i.fillGradientType===zi.LINEAR_VERTICAL){a=t.createLinearGradient(c/2,l,c/2,u+l);let p=0;const g=(n.fontProperties.fontSize+i.strokeThickness)/u;for(let v=0;v<r.length;v++){const b=n.lineHeight*v;for(let y=0;y<d.length;y++){let x=0;typeof f[y]=="number"?x=f[y]:x=y/d.length;const A=b/u+x*g;let D=Math.max(p,A);D=Math.min(D,1),a.addColorStop(D,d[y]),p=D}}}else{a=t.createLinearGradient(l,u/2,c+l,u/2);const p=d.length+1;let _=1;for(let g=0;g<d.length;g++){let v;typeof f[g]=="number"?v=f[g]:v=_/p,a.addColorStop(v,d[g]),_++}}return a}function Vd(e,t,i,s,r,n,o){const a=i.text,h=i.fontProperties;t.translate(s,r),t.scale(n,n);const l=o.strokeThickness/2,c=-(o.strokeThickness/2);if(t.font=o.toFontString(),t.lineWidth=o.strokeThickness,t.textBaseline=o.textBaseline,t.lineJoin=o.lineJoin,t.miterLimit=o.miterLimit,t.fillStyle=Xd(e,t,o,n,[a],i),t.strokeStyle=o.stroke,o.dropShadow){const u=o.dropShadowColor,d=o.dropShadowBlur*n,f=o.dropShadowDistance*n;t.shadowColor=j.shared.setValue(u).setAlpha(o.dropShadowAlpha).toRgbaString(),t.shadowBlur=d,t.shadowOffsetX=Math.cos(o.dropShadowAngle)*f,t.shadowOffsetY=Math.sin(o.dropShadowAngle)*f}else t.shadowColor="black",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0;o.stroke&&o.strokeThickness&&t.strokeText(a,l,c+i.lineHeight-h.descent),o.fill&&t.fillText(a,l,c+i.lineHeight-h.descent),t.setTransform(1,0,0,1,0,0),t.fillStyle="rgba(0, 0, 0, 0)"}function tr(e){return e.codePointAt?e.codePointAt(0):e.charCodeAt(0)}function Oh(e){return Array.from?Array.from(e):e.split("")}function zd(e){typeof e=="string"&&(e=[e]);const t=[];for(let i=0,s=e.length;i<s;i++){const r=e[i];if(Array.isArray(r)){if(r.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${r.length}.`);const n=r[0].charCodeAt(0),o=r[1].charCodeAt(0);if(o<n)throw new Error("[BitmapFont]: Invalid character range.");for(let a=n,h=o;a<=h;a++)t.push(String.fromCharCode(a))}else t.push(...Oh(r))}if(t.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return t}const te=class{constructor(e,t,i){var l,c;const[s]=e.info,[r]=e.common,[n]=e.page,[o]=e.distanceField,a=fe(n.file),h={};this._ownsTextures=i,this.font=s.face,this.size=s.size,this.lineHeight=r.lineHeight/a,this.chars={},this.pageTextures=h;for(let u=0;u<e.page.length;u++){const{id:d,file:f}=e.page[u];h[d]=t instanceof Array?t[u]:t[f],(o==null?void 0:o.fieldType)&&o.fieldType!=="none"&&(h[d].baseTexture.alphaMode=Nt.NO_PREMULTIPLIED_ALPHA,h[d].baseTexture.mipmap=Wt.OFF)}for(let u=0;u<e.char.length;u++){const{id:d,page:f}=e.char[u];let{x:p,y:_,width:g,height:v,xoffset:b,yoffset:y,xadvance:x}=e.char[u];p/=a,_/=a,g/=a,v/=a,b/=a,y/=a,x/=a;const A=new $(p+h[f].frame.x/a,_+h[f].frame.y/a,g,v);this.chars[d]={xOffset:b,yOffset:y,xAdvance:x,kerning:{},texture:new B(h[f].baseTexture,A),page:f}}for(let u=0;u<e.kerning.length;u++){let{first:d,second:f,amount:p}=e.kerning[u];d/=a,f/=a,p/=a,this.chars[f]&&(this.chars[f].kerning[d]=p)}this.distanceFieldRange=o==null?void 0:o.distanceRange,this.distanceFieldType=(c=(l=o==null?void 0:o.fieldType)==null?void 0:l.toLowerCase())!=null?c:"none"}destroy(){for(const e in this.chars)this.chars[e].texture.destroy(),this.chars[e].texture=null;for(const e in this.pageTextures)this._ownsTextures&&this.pageTextures[e].destroy(!0),this.pageTextures[e]=null;this.chars=null,this.pageTextures=null}static install(e,t,i){let s;if(e instanceof qi)s=e;else{const n=Lh(e);if(!n)throw new Error("Unrecognized data format for font.");s=n.parse(e)}t instanceof B&&(t=[t]);const r=new te(s,t,i);return te.available[r.font]=r,r}static uninstall(e){const t=te.available[e];if(!t)throw new Error(`No font found named \'${e}\'`);t.destroy(),delete te.available[e]}static from(e,t,i){if(!e)throw new Error("[BitmapFont] Property `name` is required.");const D=Object.assign({},te.defaultOptions,i),{chars:s,padding:r,resolution:n,textureWidth:o,textureHeight:a}=D,h=zn(D,["chars","padding","resolution","textureWidth","textureHeight"]),l=zd(s),c=t instanceof ae?t:new ae(t),u=o,d=new qi;d.info[0]={face:c.fontFamily,size:c.fontSize},d.common[0]={lineHeight:c.fontSize};let f=0,p=0,_,g,v,b=0;const y=[],x=[];for(let R=0;R<l.length;R++){_||(_=P.ADAPTER.createCanvas(),_.width=o,_.height=a,g=_.getContext("2d"),v=new V(_,bt({resolution:n},h)),y.push(v),x.push(new B(v)),d.page.push({id:x.length-1,file:""}));const E=l[R],O=yt.measureText(E,c,!1,_),H=O.width,I=Math.ceil(O.height),N=Math.ceil((c.fontStyle==="italic"?2:1)*H);if(p>=a-I*n){if(p===0)throw new Error(`[BitmapFont] textureHeight ${a}px is too small (fontFamily: \'${c.fontFamily}\', fontSize: ${c.fontSize}px, char: \'${E}\')`);--R,_=null,g=null,v=null,p=0,f=0,b=0;continue}if(b=Math.max(I+O.fontProperties.descent,b),N*n+f>=u){if(f===0)throw new Error(`[BitmapFont] textureWidth ${o}px is too small (fontFamily: \'${c.fontFamily}\', fontSize: ${c.fontSize}px, char: \'${E}\')`);--R,p+=b*n,p=Math.ceil(p),f=0,b=0;continue}Vd(_,g,O,f,p,n,c);const w=tr(O.text);d.char.push({id:w,page:x.length-1,x:f/n,y:p/n,width:N,height:I,xoffset:0,yoffset:0,xadvance:H-(c.dropShadow?c.dropShadowDistance:0)-(c.stroke?c.strokeThickness:0)}),f+=(N+2*r)*n,f=Math.ceil(f)}for(let R=0,E=l.length;R<E;R++){const O=l[R];for(let H=0;H<E;H++){const I=l[H],N=g.measureText(O).width,w=g.measureText(I).width,W=g.measureText(O+I).width-(N+w);W&&d.kerning.push({first:tr(O),second:tr(I),amount:W})}}const A=new te(d,x,!0);return te.available[e]!==void 0&&te.uninstall(e),te.available[e]=A,A}};let At=te;At.ALPHA=[["a","z"],["A","Z"]," "],At.NUMERIC=[["0","9"]],At.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],At.ASCII=[[" ","~"]],At.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:te.ALPHANUMERIC},At.available={};var Wd=`// Pixi texture info\\r\nvarying vec2 vTextureCoord;\\r\nuniform sampler2D uSampler;\\r\n\\r\n// Tint\\r\nuniform vec4 uColor;\\r\n\\r\n// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\\r\nuniform float uFWidth;\\r\n\\r\nvoid main(void) {\\r\n\\r\n  // To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\\r\n  vec4 texColor = texture2D(uSampler, vTextureCoord);\\r\n\\r\n  // MSDF\\r\n  float median = texColor.r + texColor.g + texColor.b -\\r\n                  min(texColor.r, min(texColor.g, texColor.b)) -\\r\n                  max(texColor.r, max(texColor.g, texColor.b));\\r\n  // SDF\\r\n  median = min(median, texColor.a);\\r\n\\r\n  float screenPxDistance = uFWidth * (median - 0.5);\\r\n  float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\\r\n  if (median < 0.01) {\\r\n    alpha = 0.0;\\r\n  } else if (median > 0.99) {\\r\n    alpha = 1.0;\\r\n  }\\r\n\\r\n  // Gamma correction for coverage-like alpha\\r\n  float luma = dot(uColor.rgb, vec3(0.299, 0.587, 0.114));\\r\n  float gamma = mix(1.0, 1.0 / 2.2, luma);\\r\n  float coverage = pow(uColor.a * alpha, gamma);  \\r\n\\r\n  // NPM Textures, NPM outputs\\r\n  gl_FragColor = vec4(uColor.rgb, coverage);\\r\n}\\r\n`,$d=`// Mesh material default fragment\\r\nattribute vec2 aVertexPosition;\\r\nattribute vec2 aTextureCoord;\\r\n\\r\nuniform mat3 projectionMatrix;\\r\nuniform mat3 translationMatrix;\\r\nuniform mat3 uTextureMatrix;\\r\n\\r\nvarying vec2 vTextureCoord;\\r\n\\r\nvoid main(void)\\r\n{\\r\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\\r\n\\r\n    vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\\r\n}\\r\n`;const Uh=[],kh=[],Gh=[],Hh=class extends Ct{constructor(e,t={}){super();const{align:i,tint:s,maxWidth:r,letterSpacing:n,fontName:o,fontSize:a}=Object.assign({},Hh.styleDefaults,t);if(!At.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=i,this._tintColor=new j(s),this._font=void 0,this._fontName=o,this._fontSize=a,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=n,this._anchor=new me(()=>{this.dirty=!0},this,0,0),this._roundPixels=P.ROUND_PIXELS,this.dirty=!0,this._resolution=P.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var H;const e=At.available[this._fontName],t=this.fontSize,i=t/e.size,s=new Y,r=[],n=[],o=[],a=this._text.replace(/(?:\\r\\n|\\r)/g,`\n`)||" ",h=Oh(a),l=this._maxWidth*e.size/t,c=e.distanceFieldType==="none"?Uh:kh;let u=null,d=0,f=0,p=0,_=-1,g=0,v=0,b=0,y=0;for(let I=0;I<h.length;I++){const N=h[I],w=tr(N);if(/(?:\\s)/.test(N)&&(_=I,g=d,y++),N==="\\r"||N===`\n`){n.push(d),o.push(-1),f=Math.max(f,d),++p,++v,s.x=0,s.y+=e.lineHeight,u=null,y=0;continue}const T=e.chars[w];if(!T)continue;u&&T.kerning[u]&&(s.x+=T.kerning[u]);const W=Gh.pop()||{texture:B.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Y};W.texture=T.texture,W.line=p,W.charCode=w,W.position.x=Math.round(s.x+T.xOffset+this._letterSpacing/2),W.position.y=Math.round(s.y+T.yOffset),W.prevSpaces=y,r.push(W),d=W.position.x+Math.max(T.xAdvance-T.xOffset,T.texture.orig.width),s.x+=T.xAdvance+this._letterSpacing,b=Math.max(b,T.yOffset+T.texture.height),u=w,_!==-1&&l>0&&s.x>l&&(++v,Ie(r,1+_-v,1+I-_),I=_,_=-1,n.push(g),o.push(r.length>0?r[r.length-1].prevSpaces:0),f=Math.max(f,g),p++,s.x=0,s.y+=e.lineHeight,u=null,y=0)}const x=h[h.length-1];x!=="\\r"&&x!==`\n`&&(/(?:\\s)/.test(x)&&(d=g),n.push(d),f=Math.max(f,d),o.push(-1));const A=[];for(let I=0;I<=p;I++){let N=0;this._align==="right"?N=f-n[I]:this._align==="center"?N=(f-n[I])/2:this._align==="justify"&&(N=o[I]<0?0:(f-n[I])/o[I]),A.push(N)}const D=r.length,R={},E=[],O=this._activePagesMeshData;c.push(...O);for(let I=0;I<D;I++){const N=r[I].texture,w=N.baseTexture.uid;if(!R[w]){let T=c.pop();if(!T){const q=new Vi;let F,Z;e.distanceFieldType==="none"?(F=new ni(B.EMPTY),Z=G.NORMAL):(F=new ni(B.EMPTY,{program:Ut.from($d,Wd),uniforms:{uFWidth:0}}),Z=G.NORMAL_NPM);const at=new He(q,F);at.blendMode=Z,T={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:at,vertices:null,uvs:null,indices:null}}T.index=0,T.indexCount=0,T.vertexCount=0,T.uvsCount=0,T.total=0;const{_textureCache:W}=this;W[w]=W[w]||new B(N.baseTexture),T.mesh.texture=W[w],T.mesh.tint=this._tintColor.value,E.push(T),R[w]=T}R[w].total++}for(let I=0;I<O.length;I++)E.includes(O[I])||this.removeChild(O[I].mesh);for(let I=0;I<E.length;I++)E[I].mesh.parent!==this&&this.addChild(E[I].mesh);this._activePagesMeshData=E;for(const I in R){const N=R[I],w=N.total;if(!(((H=N.indices)==null?void 0:H.length)>6*w)||N.vertices.length<He.BATCHABLE_SIZE*2)N.vertices=new Float32Array(4*2*w),N.uvs=new Float32Array(4*2*w),N.indices=new Uint16Array(6*w);else{const T=N.total,W=N.vertices;for(let q=T*4*2;q<W.length;q++)W[q]=0}N.mesh.size=6*w}for(let I=0;I<D;I++){const N=r[I];let w=N.position.x+A[N.line]*(this._align==="justify"?N.prevSpaces:1);this._roundPixels&&(w=Math.round(w));const T=w*i,W=N.position.y*i,q=N.texture,F=R[q.baseTexture.uid],Z=q.frame,at=q._uvs,S=F.index++;F.indices[S*6+0]=0+S*4,F.indices[S*6+1]=1+S*4,F.indices[S*6+2]=2+S*4,F.indices[S*6+3]=0+S*4,F.indices[S*6+4]=2+S*4,F.indices[S*6+5]=3+S*4,F.vertices[S*8+0]=T,F.vertices[S*8+1]=W,F.vertices[S*8+2]=T+Z.width*i,F.vertices[S*8+3]=W,F.vertices[S*8+4]=T+Z.width*i,F.vertices[S*8+5]=W+Z.height*i,F.vertices[S*8+6]=T,F.vertices[S*8+7]=W+Z.height*i,F.uvs[S*8+0]=at.x0,F.uvs[S*8+1]=at.y0,F.uvs[S*8+2]=at.x1,F.uvs[S*8+3]=at.y1,F.uvs[S*8+4]=at.x2,F.uvs[S*8+5]=at.y2,F.uvs[S*8+6]=at.x3,F.uvs[S*8+7]=at.y3}this._textWidth=f*i,this._textHeight=(s.y+e.lineHeight)*i;for(const I in R){const N=R[I];if(this.anchor.x!==0||this.anchor.y!==0){let q=0;const F=this._textWidth*this.anchor.x,Z=this._textHeight*this.anchor.y;for(let at=0;at<N.total;at++)N.vertices[q++]-=F,N.vertices[q++]-=Z,N.vertices[q++]-=F,N.vertices[q++]-=Z,N.vertices[q++]-=F,N.vertices[q++]-=Z,N.vertices[q++]-=F,N.vertices[q++]-=Z}this._maxLineHeight=b*i;const w=N.mesh.geometry.getBuffer("aVertexPosition"),T=N.mesh.geometry.getBuffer("aTextureCoord"),W=N.mesh.geometry.getIndex();w.data=N.vertices,T.data=N.uvs,W.data=N.indices,w.update(),T.update(),W.update()}for(let I=0;I<r.length;I++)Gh.push(r[I]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:t,distanceFieldType:i,size:s}=At.available[this._fontName];if(i!=="none"){const{a:r,b:n,c:o,d:a}=this.worldTransform,h=Math.sqrt(r*r+n*n),l=Math.sqrt(o*o+a*a),c=(Math.abs(h)+Math.abs(l))/2,u=this.fontSize/s,d=e._view.resolution;for(const f of this._activePagesMeshData)f.mesh.shader.uniforms.uFWidth=c*t*u*d}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=At.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let t=0;t<this._activePagesMeshData.length;t++)this._activePagesMeshData[t].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!At.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){var e;return(e=this._fontSize)!=null?e:At.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e==null?"":e),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}destroy(e){const{_textureCache:t}=this,s=At.available[this._fontName].distanceFieldType==="none"?Uh:kh;s.push(...this._activePagesMeshData);for(const r of this._activePagesMeshData)this.removeChild(r.mesh);this._activePagesMeshData=[],s.filter(r=>t[r.mesh.texture.baseTexture.uid]).forEach(r=>{r.mesh.texture=B.EMPTY});for(const r in t)t[r].destroy(),delete t[r];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(e)}};let Xh=Hh;Xh.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};const jd=[".xml",".fnt"],Vh={extension:{type:M.LoadParser,priority:Jt.Normal},name:"loadBitmapFont",test(e){return jd.includes(Tt.extname(e).toLowerCase())},async testParse(e){return Ki.test(e)||Qs.test(e)},async parse(e,t,i){const s=Ki.test(e)?Ki.parse(e):Qs.parse(e),{src:r}=t,{page:n}=s,o=[];for(let l=0;l<n.length;++l){const c=n[l].file;let u=Tt.join(Tt.dirname(r),c);u=Os(u,r),o.push(u)}const a=await i.load(o),h=o.map(l=>a[l]);return At.install(s,h,!0)},async load(e,t){return(await P.ADAPTER.fetch(e)).text()},unload(e){e.destroy()}};U.add(Vh);const oi=class extends ae{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(e){return new oi(Object.keys(oi.defaultOptions).reduce((t,i)=>Qi(bt({},t),{[i]:e[i]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(e=>{URL.revokeObjectURL(e.src),e.refs--,e.refs===0&&(e.fontFace&&document.fonts.delete(e.fontFace),delete oi.availableFonts[e.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(e,t={}){const{availableFonts:i}=oi;if(i[e]){const s=i[e];return this._fonts.push(s),s.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return P.ADAPTER.fetch(e).then(s=>s.blob()).then(async s=>new Promise((r,n)=>{const o=URL.createObjectURL(s),a=new FileReader;a.onload=()=>r([o,a.result]),a.onerror=n,a.readAsDataURL(s)})).then(async([s,r])=>{const n=Object.assign({family:Tt.basename(e,Tt.extname(e)),weight:"normal",style:"normal",src:s,dataSrc:r,refs:1,originalUrl:e,fontFace:null},t);i[e]=n,this._fonts.push(n),this.styleID++;const o=new FontFace(n.family,`url(${n.src})`,{weight:n.weight,style:n.style});n.fontFace=o,await o.load(),document.fonts.add(o),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...e){const t=e.filter(i=>!this._overrides.includes(i));t.length>0&&(this._overrides.push(...t),this.styleID++)}removeOverride(...e){const t=e.filter(i=>this._overrides.includes(i));t.length>0&&(this._overrides=this._overrides.filter(i=>!t.includes(i)),this.styleID++)}toCSS(e){return[`transform: scale(${e})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((e,t)=>`${e}\n            @font-face {\n                font-family: "${t.family}";\n                src: url(\'${t.dataSrc}\');\n                font-weight: ${t.weight};\n                font-style: ${t.style}; \n            }`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=Mo(e)),typeof e=="number"?Po(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,i=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),s=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${i}px ${s}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,oi.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=P.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};let ai=oi;ai.availableFonts={},ai.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};const hi=class extends ye{constructor(e="",t={}){var c;super(B.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this._loading=!1,this.localStyleID=-1,this.dirty=!1,this.ownsStyle=!1;const i=new Image,s=B.from(i,{scaleMode:P.SCALE_MODE,resourceOptions:{autoLoad:!1}});s.orig=new $,s.trim=new $,this.texture=s;const r="http://www.w3.org/2000/svg",n="http://www.w3.org/1999/xhtml",o=document.createElementNS(r,"svg"),a=document.createElementNS(r,"foreignObject"),h=document.createElementNS(n,"div"),l=document.createElementNS(n,"style");a.setAttribute("width","10000"),a.setAttribute("height","10000"),a.style.overflow="hidden",o.appendChild(a),this.maxWidth=hi.defaultMaxWidth,this.maxHeight=hi.defaultMaxHeight,this._domElement=h,this._styleElement=l,this._svgRoot=o,this._foreignObject=a,this._foreignObject.appendChild(l),this._foreignObject.appendChild(h),this._image=i,this._loadImage=new Image,this._autoResolution=hi.defaultAutoResolution,this._resolution=(c=hi.defaultResolution)!=null?c:P.RESOLUTION,this.text=e,this.style=t}measureText(e){var a,h;const{text:t,style:i,resolution:s}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:i.toCSS(s)}),this._styleElement.textContent=i.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const n=Math.min(this.maxWidth,Math.ceil(r.width)),o=Math.min(this.maxHeight,Math.ceil(r.height));return this._svgRoot.setAttribute("width",n.toString()),this._svgRoot.setAttribute("height",o.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),i!==this._style&&(Object.assign(this._domElement,{style:(a=this._style)==null?void 0:a.toCSS(s)}),this._styleElement.textContent=(h=this._style)==null?void 0:h.toGlobalCSS()),{width:n+i.padding*2,height:o+i.padding*2}}async updateText(e=!0){const{style:t,_image:i,_loadImage:s}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:n}=this.measureText();i.width=s.width=Math.ceil(Math.max(1,r)),i.height=s.height=Math.ceil(Math.max(1,n)),this._loading||(this._loading=!0,await new Promise(o=>{s.onload=async()=>{await t.onBeforeDraw(),this._loading=!1,i.src=s.src,s.onload=null,s.src="",this.updateTexture(),o()};const a=new XMLSerializer().serializeToString(this._svgRoot);s.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(a)}`}))}get source(){return this._image}updateTexture(){const{style:e,texture:t,_image:i,resolution:s}=this,{padding:r}=e,{baseTexture:n}=t;t.trim.width=t._frame.width=i.width/s,t.trim.height=t._frame.height=i.height/s,t.trim.x=-r,t.trim.y=-r,t.orig.width=t._frame.width-r*2,t.orig.height=t._frame.height-r*2,this._onTextureUpdate(),n.setRealSize(i.width,i.height,s),this.dirty=!1}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._render(e)}_renderCanvas(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(e)}getLocalBounds(e){return this.updateText(!0),super.getLocalBounds(e)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(e){var i,s,r,n,o;typeof e=="boolean"&&(e={children:e}),e=Object.assign({},hi.defaultDestroyOptions,e),super.destroy(e);const t=null;this.ownsStyle&&((i=this._style)==null||i.cleanFonts()),this._style=t,(s=this._svgRoot)==null||s.remove(),this._svgRoot=t,(r=this._domElement)==null||r.remove(),this._domElement=t,(n=this._foreignObject)==null||n.remove(),this._foreignObject=t,(o=this._styleElement)==null||o.remove(),this._styleElement=t,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=t,this._image.src="",this._image=t}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(e){this.updateText(!0);const t=de(this.scale.x)||1;this.scale.x=t*e/this._image.width/this.resolution,this._width=e}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(e){this.updateText(!0);const t=de(this.scale.y)||1;this.scale.y=t*e/this._image.height/this.resolution,this._height=e}get style(){return this._style}set style(e){this._style!==e&&(e=e||{},e instanceof ai?(this.ownsStyle=!1,this._style=e):e instanceof ae?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=ai.from(e)):(this.ownsStyle=!0,this._style=new ai(e)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(e){e=String(e===""||e===null||e===void 0?" ":e),e=this.sanitiseText(e),this._text!==e&&(this._text=e,this.dirty=!0)}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._resolution!==e&&(this._resolution=e,this.dirty=!0)}sanitiseText(e){return e.replace(/<br>/gi,"<br/>").replace(/<hr>/gi,"<hr/>").replace(/&nbsp;/gi,"&#160;")}};let Zi=hi;return Zi.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0},Zi.defaultMaxWidth=2024,Zi.defaultMaxHeight=2024,Zi.defaultAutoResolution=!0,m.ALPHA_MODES=Nt,m.AbstractMultiResource=dn,m.AccessibilityManager=vn,m.AlphaFilter=Pa,m.AnimatedSprite=qs,m.Application=bn,m.ArrayResource=Aa,m.Assets=Ni,m.AssetsClass=Ja,m.Attribute=gi,m.BLEND_MODES=G,m.BUFFER_BITS=Rt,m.BUFFER_TYPE=jt,m.BackgroundSystem=Ei,m.BaseImageResource=_e,m.BasePrepare=$i,m.BaseRenderTexture=Lr,m.BaseTexture=V,m.BatchDrawCall=ps,m.BatchGeometry=Br,m.BatchRenderer=Gt,m.BatchShaderGenerator=ra,m.BatchSystem=Nr,m.BatchTextureArray=Es,m.BitmapFont=At,m.BitmapFontData=qi,m.BitmapText=Xh,m.BlobResource=ah,m.BlurFilter=Ma,m.BlurFilterPass=Fs,m.Bounds=Ii,m.BrowserAdapter=$n,m.Buffer=ot,m.BufferResource=Ye,m.BufferSystem=ln,m.CLEAR_MODES=$t,m.COLOR_MASK_BITS=Wn,m.Cache=ii,m.CanvasResource=Ra,m.Circle=_s,m.Color=j,m.ColorMatrixFilter=Ns,m.CompressedTextureResource=we,m.Container=Ct,m.ContextSystem=wi,m.CountLimiter=Ph,m.CubeResource=fn,m.DEG_TO_RAD=Wo,m.DRAW_MODES=zt,m.DisplacementFilter=Ba,m.DisplayObject=st,m.ENV=et,m.Ellipse=gs,m.EventBoundary=Na,m.EventSystem=ti,m.ExtensionType=M,m.Extract=Cn,m.FORMATS=C,m.FORMATS_TO_COMPONENTS=uh,m.FXAAFilter=Da,m.FederatedDisplayObject=Oa,m.FederatedEvent=Qe,m.FederatedMouseEvent=Mi,m.FederatedPointerEvent=Xt,m.FederatedWheelEvent=ke,m.FillStyle=Hi,m.Filter=gt,m.FilterState=ha,m.FilterSystem=Xr,m.Framebuffer=ws,m.FramebufferSystem=Vr,m.GC_MODES=es,m.GLFramebuffer=la,m.GLProgram=_a,m.GLTexture=Ms,m.GRAPHICS_CURVES=dd,m.GenerateTextureSystem=Zr,m.Geometry=pe,m.GeometrySystem=Wr,m.Graphics=Xi,m.GraphicsData=Gi,m.GraphicsGeometry=Dn,m.HTMLText=Zi,m.HTMLTextStyle=ai,m.IGLUniformData=Mc,m.INSTALLED=fs,m.INTERNAL_FORMATS=It,m.INTERNAL_FORMAT_TO_BYTES_PER_PIXEL=Li,m.ImageBitmapResource=Ue,m.ImageResource=Or,m.LINE_CAP=Se,m.LINE_JOIN=Vt,m.LineStyle=zs,m.LoaderParserPriority=Jt,m.MASK_TYPES=ct,m.MIPMAP_MODES=Wt,m.MSAA_QUALITY=ht,m.MaskData=da,m.MaskSystem=$r,m.Matrix=tt,m.Mesh=He,m.MeshBatchUvs=Eh,m.MeshGeometry=Vi,m.MeshMaterial=ni,m.MultisampleSystem=hn,m.NineSlicePlane=yd,m.NoiseFilter=Fa,m.ObjectRenderer=bi,m.ObjectRendererSystem=cn,m.ObservablePoint=me,m.PI_2=yi,m.PRECISION=Pt,m.ParticleContainer=bd,m.ParticleRenderer=Ln,m.PlaneGeometry=Ah,m.PluginSystem=qr,m.Point=Y,m.Polygon=Pe,m.Prepare=Gn,m.Program=Ut,m.ProjectionSystem=Kr,m.Quad=aa,m.QuadUv=Gr,m.RAD_TO_DEG=zo,m.RENDERER_TYPE=pt,m.Rectangle=$,m.RenderTexture=be,m.RenderTexturePool=kr,m.RenderTextureSystem=Jr,m.Renderer=Oe,m.ResizePlugin=Tn,m.Resource=je,m.RopeGeometry=Rh,m.RoundedRectangle=ys,m.Runner=Bt,m.SAMPLER_TYPES=ts,m.SCALE_MODES=ee,m.SHAPES=_t,m.SVGResource=Je,m.ScissorSystem=jr,m.Shader=Kt,m.ShaderSystem=Qr,m.SimpleMesh=vd,m.SimplePlane=Ch,m.SimpleRope=xd,m.Sprite=ye,m.SpriteMaskFilter=ua,m.Spritesheet=Zs,m.StartupSystem=Ai,m.State=ne,m.StateSystem=en,m.StencilSystem=Yr,m.SystemManager=Ta,m.TARGETS=Re,m.TEXT_GRADIENT=zi,m.TYPES=k,m.TYPES_TO_BYTES_PER_COMPONENT=Rn,m.TYPES_TO_BYTES_PER_PIXEL=dh,m.TemporaryDisplayObject=Ca,m.Text=Ys,m.TextFormat=Ki,m.TextMetrics=yt,m.TextStyle=ae,m.Texture=B,m.TextureGCSystem=Ht,m.TextureMatrix=Rs,m.TextureSystem=sn,m.TextureUvs=Ur,m.Ticker=lt,m.TickerPlugin=on,m.TilingSprite=Hn,m.TilingSpriteRenderer=Xn,m.TimeLimiter=Ld,m.Transform=vi,m.TransformFeedback=Yc,m.TransformFeedbackSystem=rn,m.UPDATE_PRIORITY=ge,m.UniformGroup=kt,m.VERSION=qc,m.VideoResource=Ds,m.ViewSystem=Ri,m.ViewableBuffer=ds,m.WRAP_MODES=ie,m.XMLFormat=Js,m.XMLStringFormat=Qs,m.accessibleTarget=Ua,m.autoDetectFormat=Lh,m.autoDetectRenderer=wa,m.autoDetectResource=Mr,m.cacheTextureArray=Qa,m.checkDataUrl=ei,m.checkExtension=Ee,m.checkMaxIfStatementsInShader=Xo,m.convertToList=oe,m.copySearchParams=Os,m.createStringVariations=Va,m.createTexture=Di,m.createUBOElements=va,m.curves=Ae,m.defaultFilterVertex=an,m.defaultVertex=Sa,m.detectAvif=th,m.detectCompressedTextures=oh,m.detectDefaults=sh,m.detectWebp=eh,m.extensions=U,m.filters=_n,m.generateProgram=ga,m.generateUniformBufferSync=ba,m.getFontFamilyName=$a,m.getTestContext=Zo,m.getUBOData=xa,m.graphicsUtils=md,m.groupD8=it,m.isMobile=Yt,m.isSingleItem=Bi,m.loadBitmapFont=Vh,m.loadDDS=ph,m.loadImageBitmap=Ka,m.loadJson=za,m.loadKTX=mh,m.loadSVG=Za,m.loadTextures=Fi,m.loadTxt=Wa,m.loadWebFont=ja,m.parseDDS=lh,m.parseKTX=fh,m.resolveCompressedTextureUrl=_h,m.resolveTextureUrl=rh,m.settings=P,m.spritesheetAsset=Nh,m.uniformParsers=Ne,m.unsafeEvalSupported=sa,m.utils=tc,Object.defineProperty(m,"__esModule",{value:!0}),m}({});\n//# sourceMappingURL=pixi.min.js.map\n';

// assets/minisearch.txt.js
var minisearch_txt_default = `/**
 * Minified by jsDelivr using Terser v5.19.2.
 * Original file: /npm/minisearch@6.3.0/dist/umd/index.js
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).MiniSearch=e()}(this,(function(){"use strict";var t=function(){return t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},t.apply(this,arguments)};function e(t,e,r,n){return new(r||(r=Promise))((function(i,o){function u(t){try{s(n.next(t))}catch(t){o(t)}}function a(t){try{s(n.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(u,a)}s((n=n.apply(t,e||[])).next())}))}function r(t,e){var r,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(u=0)),u;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){u.label=a[1];break}if(6===a[0]&&u.label<i[1]){u.label=i[1],i=a;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(a);break}i[2]&&u.ops.pop(),u.trys.pop();continue}a=e.call(t,u)}catch(t){a=[6,t],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function n(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var o,u="KEYS",a="VALUES",s="",l=function(){function t(t,e){var r=t._tree,n=Array.from(r.keys());this.set=t,this._type=e,this._path=n.length>0?[{node:r,keys:n}]:[]}return t.prototype.next=function(){var t=this.dive();return this.backtrack(),t},t.prototype.dive=function(){if(0===this._path.length)return{done:!0,value:void 0};var t=c(this._path),e=t.node,r=t.keys;if(c(r)===s)return{done:!1,value:this.result()};var n=e.get(c(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()},t.prototype.backtrack=function(){if(0!==this._path.length){var t=c(this._path).keys;t.pop(),t.length>0||(this._path.pop(),this.backtrack())}},t.prototype.key=function(){return this.set._prefix+this._path.map((function(t){var e=t.keys;return c(e)})).filter((function(t){return t!==s})).join("")},t.prototype.value=function(){return c(this._path).node.get(s)},t.prototype.result=function(){switch(this._type){case a:return this.value();case u:return this.key();default:return[this.key(),this.value()]}},t.prototype[Symbol.iterator]=function(){return this},t}(),c=function(t){return t[t.length-1]},h=function(t,e,r,i,o,u,a,l){var c,d,f=u*a;try{t:for(var y=n(t.keys()),v=y.next();!v.done;v=y.next()){var p=v.value;if(p===s){var m=o[f-1];m<=r&&i.set(l,[t.get(p),m])}else{for(var _=u,g=0;g<p.length;++g,++_){for(var F=p[g],x=a*_,w=x-a,b=o[x],A=Math.max(0,_-r-1),C=Math.min(a-1,_+r),E=A;E<C;++E){var z=F!==e[E],S=o[w+E]+ +z,D=o[w+E+1]+1,I=o[x+E]+1,k=o[x+E+1]=Math.min(S,D,I);k<b&&(b=k)}if(b>r)continue t}h(t.get(p),e,r,i,o,_,a,l+p)}}}catch(t){c={error:t}}finally{try{v&&!v.done&&(d=y.return)&&d.call(y)}finally{if(c)throw c.error}}},d=function(){function t(t,e){void 0===t&&(t=new Map),void 0===e&&(e=""),this._size=void 0,this._tree=t,this._prefix=e}return t.prototype.atPrefix=function(e){var r,o;if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");var u=i(f(this._tree,e.slice(this._prefix.length)),2),a=u[0],l=u[1];if(void 0===a){var c=i(g(l),2),h=c[0],d=c[1];try{for(var y=n(h.keys()),v=y.next();!v.done;v=y.next()){var p=v.value;if(p!==s&&p.startsWith(d)){var m=new Map;return m.set(p.slice(d.length),h.get(p)),new t(m,e)}}}catch(t){r={error:t}}finally{try{v&&!v.done&&(o=y.return)&&o.call(y)}finally{if(r)throw r.error}}}return new t(a,e)},t.prototype.clear=function(){this._size=void 0,this._tree.clear()},t.prototype.delete=function(t){return this._size=void 0,p(this._tree,t)},t.prototype.entries=function(){return new l(this,"ENTRIES")},t.prototype.forEach=function(t){var e,r;try{for(var o=n(this),u=o.next();!u.done;u=o.next()){var a=i(u.value,2);t(a[0],a[1],this)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},t.prototype.fuzzyGet=function(t,e){return function(t,e,r){var n=new Map;if(void 0===e)return n;for(var i=e.length+1,o=i+r,u=new Uint8Array(o*i).fill(r+1),a=0;a<i;++a)u[a]=a;for(var s=1;s<o;++s)u[s*i]=s;return h(t,e,r,n,u,1,i,""),n}(this._tree,t,e)},t.prototype.get=function(t){var e=y(this._tree,t);return void 0!==e?e.get(s):void 0},t.prototype.has=function(t){var e=y(this._tree,t);return void 0!==e&&e.has(s)},t.prototype.keys=function(){return new l(this,u)},t.prototype.set=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");return this._size=void 0,v(this._tree,t).set(s,e),this},Object.defineProperty(t.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var t=this.entries();!t.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),t.prototype.update=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");this._size=void 0;var r=v(this._tree,t);return r.set(s,e(r.get(s))),this},t.prototype.fetch=function(t,e){if("string"!=typeof t)throw new Error("key must be a string");this._size=void 0;var r=v(this._tree,t),n=r.get(s);return void 0===n&&r.set(s,n=e()),n},t.prototype.values=function(){return new l(this,a)},t.prototype[Symbol.iterator]=function(){return this.entries()},t.from=function(e){var r,o,u=new t;try{for(var a=n(e),s=a.next();!s.done;s=a.next()){var l=i(s.value,2),c=l[0],h=l[1];u.set(c,h)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return u},t.fromObject=function(e){return t.from(Object.entries(e))},t}(),f=function(t,e,r){var i,o;if(void 0===r&&(r=[]),0===e.length||null==t)return[t,r];try{for(var u=n(t.keys()),a=u.next();!a.done;a=u.next()){var l=a.value;if(l!==s&&e.startsWith(l))return r.push([t,l]),f(t.get(l),e.slice(l.length),r)}}catch(t){i={error:t}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return r.push([t,e]),f(void 0,"",r)},y=function(t,e){var r,i;if(0===e.length||null==t)return t;try{for(var o=n(t.keys()),u=o.next();!u.done;u=o.next()){var a=u.value;if(a!==s&&e.startsWith(a))return y(t.get(a),e.slice(a.length))}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},v=function(t,e){var r,i,o=e.length;t:for(var u=0;t&&u<o;){try{for(var a=(r=void 0,n(t.keys())),l=a.next();!l.done;l=a.next()){var c=l.value;if(c!==s&&e[u]===c[0]){for(var h=Math.min(o-u,c.length),d=1;d<h&&e[u+d]===c[d];)++d;var f=t.get(c);if(d===c.length)t=f;else{var y=new Map;y.set(c.slice(d),f),t.set(e.slice(u,u+d),y),t.delete(c),t=y}u+=d;continue t}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var v=new Map;return t.set(e.slice(u),v),v}return t},p=function(t,e){var r=i(f(t,e),2),n=r[0],o=r[1];if(void 0!==n)if(n.delete(s),0===n.size)m(o);else if(1===n.size){var u=i(n.entries().next().value,2),a=u[0],l=u[1];_(o,a,l)}},m=function(t){if(0!==t.length){var e=i(g(t),2),r=e[0],n=e[1];if(r.delete(n),0===r.size)m(t.slice(0,-1));else if(1===r.size){var o=i(r.entries().next().value,2),u=o[0],a=o[1];u!==s&&_(t.slice(0,-1),u,a)}}},_=function(t,e,r){if(0!==t.length){var n=i(g(t),2),o=n[0],u=n[1];o.set(u+e,r),o.delete(u)}},g=function(t){return t[t.length-1]},F="or",x=function(){function o(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');var r=null==e.autoVacuum||!0===e.autoVacuum?k:e.autoVacuum;this._options=t(t(t({},E),e),{autoVacuum:r,searchOptions:t(t({},z),e.searchOptions||{}),autoSuggestOptions:t(t({},S),e.autoSuggestOptions||{})}),this._index=new d,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=I,this.addFields(this._options.fields)}return o.prototype.add=function(t){var e,r,i,o,u,a,s=this._options,l=s.extractField,c=s.tokenize,h=s.processTerm,d=s.fields,f=s.idField,y=l(t,f);if(null==y)throw new Error('MiniSearch: document does not have ID field "'.concat(f,'"'));if(this._idToShortId.has(y))throw new Error("MiniSearch: duplicate ID ".concat(y));var v=this.addDocumentId(y);this.saveStoredFields(v,t);try{for(var p=n(d),m=p.next();!m.done;m=p.next()){var _=m.value,g=l(t,_);if(null!=g){var F=c(g.toString(),_),x=this._fieldIds[_],w=new Set(F).size;this.addFieldLength(v,x,this._documentCount-1,w);try{for(var b=(i=void 0,n(F)),A=b.next();!A.done;A=b.next()){var C=h(A.value,_);if(Array.isArray(C))try{for(var E=(u=void 0,n(C)),z=E.next();!z.done;z=E.next()){var S=z.value;this.addTerm(x,v,S)}}catch(t){u={error:t}}finally{try{z&&!z.done&&(a=E.return)&&a.call(E)}finally{if(u)throw u.error}}else C&&this.addTerm(x,v,C)}}catch(t){i={error:t}}finally{try{A&&!A.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}}}}catch(t){e={error:t}}finally{try{m&&!m.done&&(r=p.return)&&r.call(p)}finally{if(e)throw e.error}}},o.prototype.addAll=function(t){var e,r;try{for(var i=n(t),o=i.next();!o.done;o=i.next()){var u=o.value;this.add(u)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},o.prototype.addAllAsync=function(t,e){var r=this;void 0===e&&(e={});var n=e.chunkSize,i=void 0===n?10:n,o={chunk:[],promise:Promise.resolve()},u=t.reduce((function(t,e,n){var o=t.chunk,u=t.promise;return o.push(e),(n+1)%i==0?{chunk:[],promise:u.then((function(){return new Promise((function(t){return setTimeout(t,0)}))})).then((function(){return r.addAll(o)}))}:{chunk:o,promise:u}}),o),a=u.chunk;return u.promise.then((function(){return r.addAll(a)}))},o.prototype.remove=function(t){var e,r,i,o,u,a,s=this._options,l=s.tokenize,c=s.processTerm,h=s.extractField,d=s.fields,f=s.idField,y=h(t,f);if(null==y)throw new Error('MiniSearch: document does not have ID field "'.concat(f,'"'));var v=this._idToShortId.get(y);if(null==v)throw new Error("MiniSearch: cannot remove document with ID ".concat(y,": it is not in the index"));try{for(var p=n(d),m=p.next();!m.done;m=p.next()){var _=m.value,g=h(t,_);if(null!=g){var F=l(g.toString(),_),x=this._fieldIds[_],w=new Set(F).size;this.removeFieldLength(v,x,this._documentCount,w);try{for(var b=(i=void 0,n(F)),A=b.next();!A.done;A=b.next()){var C=c(A.value,_);if(Array.isArray(C))try{for(var E=(u=void 0,n(C)),z=E.next();!z.done;z=E.next()){var S=z.value;this.removeTerm(x,v,S)}}catch(t){u={error:t}}finally{try{z&&!z.done&&(a=E.return)&&a.call(E)}finally{if(u)throw u.error}}else C&&this.removeTerm(x,v,C)}}catch(t){i={error:t}}finally{try{A&&!A.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}}}}catch(t){e={error:t}}finally{try{m&&!m.done&&(r=p.return)&&r.call(p)}finally{if(e)throw e.error}}this._storedFields.delete(v),this._documentIds.delete(v),this._idToShortId.delete(y),this._fieldLength.delete(v),this._documentCount-=1},o.prototype.removeAll=function(t){var e,r;if(t)try{for(var i=n(t),o=i.next();!o.done;o=i.next()){var u=o.value;this.remove(u)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new d,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},o.prototype.discard=function(t){var e=this,r=this._idToShortId.get(t);if(null==r)throw new Error("MiniSearch: cannot discard document with ID ".concat(t,": it is not in the index"));this._idToShortId.delete(t),this._documentIds.delete(r),this._storedFields.delete(r),(this._fieldLength.get(r)||[]).forEach((function(t,n){e.removeFieldLength(r,n,e._documentCount,t)})),this._fieldLength.delete(r),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()},o.prototype.maybeAutoVacuum=function(){if(!1!==this._options.autoVacuum){var t=this._options.autoVacuum,e=t.minDirtFactor,r=t.minDirtCount,n=t.batchSize,i=t.batchWait;this.conditionalVacuum({batchSize:n,batchWait:i},{minDirtCount:r,minDirtFactor:e})}},o.prototype.discardAll=function(t){var e,r,i=this._options.autoVacuum;try{this._options.autoVacuum=!1;try{for(var o=n(t),u=o.next();!u.done;u=o.next()){var a=u.value;this.discard(a)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}finally{this._options.autoVacuum=i}this.maybeAutoVacuum()},o.prototype.replace=function(t){var e=this._options,r=e.idField,n=(0,e.extractField)(t,r);this.discard(n),this.add(t)},o.prototype.vacuum=function(t){return void 0===t&&(t={}),this.conditionalVacuum(t)},o.prototype.conditionalVacuum=function(t,e){var r=this;return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&e,null!=this._enqueuedVacuum||(this._enqueuedVacuum=this._currentVacuum.then((function(){var e=r._enqueuedVacuumConditions;return r._enqueuedVacuumConditions=I,r.performVacuuming(t,e)}))),this._enqueuedVacuum):!1===this.vacuumConditionsMet(e)?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)},o.prototype.performVacuuming=function(t,o){return e(this,void 0,void 0,(function(){var e,u,a,s,l,c,h,d,f,y,v,p,m,_,g,F,x,w,b,A,C,E,z,S,I;return r(this,(function(r){switch(r.label){case 0:if(e=this._dirtCount,!this.vacuumConditionsMet(o))return[3,10];u=t.batchSize||D.batchSize,a=t.batchWait||D.batchWait,s=1,r.label=1;case 1:r.trys.push([1,7,8,9]),l=n(this._index),c=l.next(),r.label=2;case 2:if(c.done)return[3,6];h=i(c.value,2),d=h[0],f=h[1];try{for(E=void 0,y=n(f),v=y.next();!v.done;v=y.next()){p=i(v.value,2),m=p[0],_=p[1];try{for(S=void 0,g=n(_),F=g.next();!F.done;F=g.next())x=i(F.value,1),w=x[0],this._documentIds.has(w)||(_.size<=1?f.delete(m):_.delete(w))}catch(t){S={error:t}}finally{try{F&&!F.done&&(I=g.return)&&I.call(g)}finally{if(S)throw S.error}}}}catch(t){E={error:t}}finally{try{v&&!v.done&&(z=y.return)&&z.call(y)}finally{if(E)throw E.error}}return 0===this._index.get(d).size&&this._index.delete(d),s%u!=0?[3,4]:[4,new Promise((function(t){return setTimeout(t,a)}))];case 3:r.sent(),r.label=4;case 4:s+=1,r.label=5;case 5:return c=l.next(),[3,2];case 6:return[3,9];case 7:return b=r.sent(),A={error:b},[3,9];case 8:try{c&&!c.done&&(C=l.return)&&C.call(l)}finally{if(A)throw A.error}return[7];case 9:this._dirtCount-=e,r.label=10;case 10:return[4,null];case 11:return r.sent(),this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null,[2]}}))}))},o.prototype.vacuumConditionsMet=function(t){if(null==t)return!0;var e=t.minDirtCount,r=t.minDirtFactor;return e=e||k.minDirtCount,r=r||k.minDirtFactor,this.dirtCount>=e&&this.dirtFactor>=r},Object.defineProperty(o.prototype,"isVacuuming",{get:function(){return null!=this._currentVacuum},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"dirtCount",{get:function(){return this._dirtCount},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"dirtFactor",{get:function(){return this._dirtCount/(1+this._documentCount+this._dirtCount)},enumerable:!1,configurable:!0}),o.prototype.has=function(t){return this._idToShortId.has(t)},o.prototype.getStoredFields=function(t){var e=this._idToShortId.get(t);if(null!=e)return this._storedFields.get(e)},o.prototype.search=function(t,e){var r,u;void 0===e&&(e={});var a=this.executeQuery(t,e),s=[];try{for(var l=n(a),c=l.next();!c.done;c=l.next()){var h=i(c.value,2),d=h[0],f=h[1],y=f.score,v=f.terms,p=f.match,m=v.length||1,_={id:this._documentIds.get(d),score:y*m,terms:Object.keys(p),queryTerms:v,match:p};Object.assign(_,this._storedFields.get(d)),(null==e.filter||e.filter(_))&&s.push(_)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(r)throw r.error}}return t===o.wildcard&&null==e.boostDocument&&null==this._options.searchOptions.boostDocument||s.sort(V),s},o.prototype.autoSuggest=function(e,r){var o,u,a,s;void 0===r&&(r={}),r=t(t({},this._options.autoSuggestOptions),r);var l=new Map;try{for(var c=n(this.search(e,r)),h=c.next();!h.done;h=c.next()){var d=h.value,f=d.score,y=(x=d.terms).join(" ");null!=(g=l.get(y))?(g.score+=f,g.count+=1):l.set(y,{score:f,terms:x,count:1})}}catch(t){o={error:t}}finally{try{h&&!h.done&&(u=c.return)&&u.call(c)}finally{if(o)throw o.error}}var v=[];try{for(var p=n(l),m=p.next();!m.done;m=p.next()){var _=i(m.value,2),g=_[0],F=_[1],x=(f=F.score,F.terms),w=F.count;v.push({suggestion:g,terms:x,score:f/w})}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}return v.sort(V),v},Object.defineProperty(o.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"termCount",{get:function(){return this._index.size},enumerable:!1,configurable:!0}),o.loadJSON=function(t,e){if(null==e)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),e)},o.getDefault=function(t){if(E.hasOwnProperty(t))return w(E,t);throw new Error('MiniSearch: unknown option "'.concat(t,'"'))},o.loadJS=function(t,e){var r,u,a,s,l,c,h=t.index,f=t.documentCount,y=t.nextId,v=t.documentIds,p=t.fieldIds,m=t.fieldLength,_=t.averageFieldLength,g=t.storedFields,F=t.dirtCount,x=t.serializationVersion;if(1!==x&&2!==x)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var w=new o(e);w._documentCount=f,w._nextId=y,w._documentIds=L(v),w._idToShortId=new Map,w._fieldIds=p,w._fieldLength=L(m),w._avgFieldLength=_,w._storedFields=L(g),w._dirtCount=F||0,w._index=new d;try{for(var b=n(w._documentIds),A=b.next();!A.done;A=b.next()){var C=i(A.value,2),E=C[0],z=C[1];w._idToShortId.set(z,E)}}catch(t){r={error:t}}finally{try{A&&!A.done&&(u=b.return)&&u.call(b)}finally{if(r)throw r.error}}try{for(var S=n(h),D=S.next();!D.done;D=S.next()){var I=i(D.value,2),k=I[0],M=I[1],O=new Map;try{for(var V=(l=void 0,n(Object.keys(M))),T=V.next();!T.done;T=V.next()){var j=T.value,B=M[j];1===x&&(B=B.ds),O.set(parseInt(j,10),L(B))}}catch(t){l={error:t}}finally{try{T&&!T.done&&(c=V.return)&&c.call(V)}finally{if(l)throw l.error}}w._index.set(k,O)}}catch(t){a={error:t}}finally{try{D&&!D.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}return w},o.prototype.executeQuery=function(e,r){var n=this;if(void 0===r&&(r={}),e===o.wildcard)return this.executeWildcardQuery(r);if("string"!=typeof e){var i=t(t(t({},r),e),{queries:void 0}),u=e.queries.map((function(t){return n.executeQuery(t,i)}));return this.combineResults(u,i.combineWith)}var a=this._options,s=a.tokenize,l=a.processTerm,c=a.searchOptions,h=t(t({tokenize:s,processTerm:l},c),r),d=h.tokenize,f=h.processTerm,y=d(e).flatMap((function(t){return f(t)})).filter((function(t){return!!t})).map(C(h)).map((function(t){return n.executeQuerySpec(t,h)}));return this.combineResults(y,h.combineWith)},o.prototype.executeQuerySpec=function(e,r){var o,u,a,s,l,c,h=t(t({},this._options.searchOptions),r),d=(h.fields||this._options.fields).reduce((function(e,r){var n;return t(t({},e),((n={})[r]=w(h.boost,r)||1,n))}),{}),f=h.boostDocument,y=h.weights,v=h.maxFuzzy,p=h.bm25,m=t(t({},z.weights),y),_=m.fuzzy,g=m.prefix,F=this._index.get(e.term),x=this.termResults(e.term,e.term,1,F,d,f,p);if(e.prefix&&(l=this._index.atPrefix(e.term)),e.fuzzy){var b=!0===e.fuzzy?.2:e.fuzzy,A=b<1?Math.min(v,Math.round(e.term.length*b)):b;A&&(c=this._index.fuzzyGet(e.term,A))}if(l)try{for(var C=n(l),E=C.next();!E.done;E=C.next()){var S=i(E.value,2),D=S[0],I=S[1];if(V=D.length-e.term.length){null==c||c.delete(D);var k=g*D.length/(D.length+.3*V);this.termResults(e.term,D,k,I,d,f,p,x)}}}catch(t){o={error:t}}finally{try{E&&!E.done&&(u=C.return)&&u.call(C)}finally{if(o)throw o.error}}if(c)try{for(var M=n(c.keys()),O=M.next();!O.done;O=M.next()){D=O.value;var V,T=i(c.get(D),2),L=T[0];if(V=T[1]){k=_*D.length/(D.length+V);this.termResults(e.term,D,k,L,d,f,p,x)}}}catch(t){a={error:t}}finally{try{O&&!O.done&&(s=M.return)&&s.call(M)}finally{if(a)throw a.error}}return x},o.prototype.executeWildcardQuery=function(e){var r,o,u=new Map,a=t(t({},this._options.searchOptions),e);try{for(var s=n(this._documentIds),l=s.next();!l.done;l=s.next()){var c=i(l.value,2),h=c[0],d=c[1],f=a.boostDocument?a.boostDocument(d,"",this._storedFields.get(h)):1;u.set(h,{score:f,terms:[],match:{}})}}catch(t){r={error:t}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return u},o.prototype.combineResults=function(t,e){if(void 0===e&&(e=F),0===t.length)return new Map;var r=e.toLowerCase();return t.reduce(b[r])||new Map},o.prototype.toJSON=function(){var t,e,r,o,u=[];try{for(var a=n(this._index),s=a.next();!s.done;s=a.next()){var l=i(s.value,2),c=l[0],h=l[1],d={};try{for(var f=(r=void 0,n(h)),y=f.next();!y.done;y=f.next()){var v=i(y.value,2),p=v[0],m=v[1];d[p]=Object.fromEntries(m)}}catch(t){r={error:t}}finally{try{y&&!y.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}u.push([c,d])}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:u,serializationVersion:2}},o.prototype.termResults=function(t,e,r,i,o,u,a,s){var l,c,h,d,f;if(void 0===s&&(s=new Map),null==i)return s;try{for(var y=n(Object.keys(o)),v=y.next();!v.done;v=y.next()){var p=v.value,m=o[p],_=this._fieldIds[p],g=i.get(_);if(null!=g){var F=g.size,x=this._avgFieldLength[_];try{for(var b=(h=void 0,n(g.keys())),C=b.next();!C.done;C=b.next()){var E=C.value;if(this._documentIds.has(E)){var z=u?u(this._documentIds.get(E),e,this._storedFields.get(E)):1;if(z){var S=g.get(E),D=this._fieldLength.get(E)[_],I=r*m*z*A(S,F,this._documentCount,D,x,a),k=s.get(E);if(k){k.score+=I,M(k.terms,t);var O=w(k.match,e);O?O.push(p):k.match[e]=[p]}else s.set(E,{score:I,terms:[t],match:(f={},f[e]=[p],f)})}}else this.removeTerm(_,E,e),F-=1}}catch(t){h={error:t}}finally{try{C&&!C.done&&(d=b.return)&&d.call(b)}finally{if(h)throw h.error}}}}}catch(t){l={error:t}}finally{try{v&&!v.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}return s},o.prototype.addTerm=function(t,e,r){var n=this._index.fetch(r,T),i=n.get(t);if(null==i)(i=new Map).set(e,1),n.set(t,i);else{var o=i.get(e);i.set(e,(o||0)+1)}},o.prototype.removeTerm=function(t,e,r){if(this._index.has(r)){var n=this._index.fetch(r,T),i=n.get(t);null==i||null==i.get(e)?this.warnDocumentChanged(e,t,r):i.get(e)<=1?i.size<=1?n.delete(t):i.delete(e):i.set(e,i.get(e)-1),0===this._index.get(r).size&&this._index.delete(r)}else this.warnDocumentChanged(e,t,r)},o.prototype.warnDocumentChanged=function(t,e,r){var i,o;try{for(var u=n(Object.keys(this._fieldIds)),a=u.next();!a.done;a=u.next()){var s=a.value;if(this._fieldIds[s]===e)return void this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(t),' has changed before removal: term "').concat(r,'" was not present in field "').concat(s,'". Removing a document after it has changed can corrupt the index!'),"version_conflict")}}catch(t){i={error:t}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}},o.prototype.addDocumentId=function(t){var e=this._nextId;return this._idToShortId.set(t,e),this._documentIds.set(e,t),this._documentCount+=1,this._nextId+=1,e},o.prototype.addFields=function(t){for(var e=0;e<t.length;e++)this._fieldIds[t[e]]=e},o.prototype.addFieldLength=function(t,e,r,n){var i=this._fieldLength.get(t);null==i&&this._fieldLength.set(t,i=[]),i[e]=n;var o=(this._avgFieldLength[e]||0)*r+n;this._avgFieldLength[e]=o/(r+1)},o.prototype.removeFieldLength=function(t,e,r,n){if(1!==r){var i=this._avgFieldLength[e]*r-n;this._avgFieldLength[e]=i/(r-1)}else this._avgFieldLength[e]=0},o.prototype.saveStoredFields=function(t,e){var r,i,o=this._options,u=o.storeFields,a=o.extractField;if(null!=u&&0!==u.length){var s=this._storedFields.get(t);null==s&&this._storedFields.set(t,s={});try{for(var l=n(u),c=l.next();!c.done;c=l.next()){var h=c.value,d=a(e,h);void 0!==d&&(s[h]=d)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}},o.wildcard=Symbol("*"),o}(),w=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0},b=((o={})[F]=function(t,e){var r,i;try{for(var o=n(e.keys()),u=o.next();!u.done;u=o.next()){var a=u.value,s=t.get(a);if(null==s)t.set(a,e.get(a));else{var l=e.get(a),c=l.score,h=l.terms,d=l.match;s.score=s.score+c,s.match=Object.assign(s.match,d),O(s.terms,h)}}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return t},o.and=function(t,e){var r,i,o=new Map;try{for(var u=n(e.keys()),a=u.next();!a.done;a=u.next()){var s=a.value,l=t.get(s);if(null!=l){var c=e.get(s),h=c.score,d=c.terms,f=c.match;O(l.terms,d),o.set(s,{score:l.score+h,terms:l.terms,match:Object.assign(l.match,f)})}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return o},o.and_not=function(t,e){var r,i;try{for(var o=n(e.keys()),u=o.next();!u.done;u=o.next()){var a=u.value;t.delete(a)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return t},o),A=function(t,e,r,n,i,o){var u=o.k,a=o.b,s=o.d;return Math.log(1+(r-e+.5)/(e+.5))*(s+t*(u+1)/(t+u*(1-a+a*n/i)))},C=function(t){return function(e,r,n){return{term:e,fuzzy:"function"==typeof t.fuzzy?t.fuzzy(e,r,n):t.fuzzy||!1,prefix:"function"==typeof t.prefix?t.prefix(e,r,n):!0===t.prefix}}},E={idField:"id",extractField:function(t,e){return t[e]},tokenize:function(t){return t.split(j)},processTerm:function(t){return t.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[],logger:function(t,e){"function"==typeof(null===console||void 0===console?void 0:console[t])&&console[t](e)},autoVacuum:!0},z={combineWith:F,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:{k:1.2,b:.7,d:.5}},S={combineWith:"and",prefix:function(t,e,r){return e===r.length-1}},D={batchSize:1e3,batchWait:10},I={minDirtFactor:.1,minDirtCount:20},k=t(t({},D),I),M=function(t,e){t.includes(e)||t.push(e)},O=function(t,e){var r,i;try{for(var o=n(e),u=o.next();!u.done;u=o.next()){var a=u.value;t.includes(a)||t.push(a)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},V=function(t,e){var r=t.score;return e.score-r},T=function(){return new Map},L=function(t){var e,r,i=new Map;try{for(var o=n(Object.keys(t)),u=o.next();!u.done;u=o.next()){var a=u.value;i.set(parseInt(a,10),t[a])}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return i},j=/[\\n\\r -#%-*,-/:;?@[-\\]_{}\\u00A0\\u00A1\\u00A7\\u00AB\\u00B6\\u00B7\\u00BB\\u00BF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u1680\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2000-\\u200A\\u2010-\\u2029\\u202F-\\u2043\\u2045-\\u2051\\u2053-\\u205F\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u3000-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]+/u;return x}));
`;

// scripts/utils/path.ts
var import_fs = require("fs");
var import_obsidian10 = require("obsidian");

// scripts/utils/utils.ts
var import_obsidian9 = require("obsidian");

// scripts/settings/settings.ts
var import_obsidian7 = require("obsidian");

// assets/third-party-styles-blacklist.txt
var third_party_styles_blacklist_default = "advanced-pdf-export\ncustom-classes\nfile-tree-alternative\nhomepage\nOA-file-hider\nobsidian-asciimath\nobsidian-discordrpc\nobsidian-dynamic-background\nobsidian-dynamic-toc\nobsidian-excel-to-markdown-table\nobsidian-full-calendar\nobsidian-graphviz\nobsidian-latex\nobsidian-latex-suite\nobsidian-minimal-settings\nobsidian-plantuml\nobsidian-prozen\nobsidian-statusbar-pomo\nobsidian-style-settings\nobsidian-underline\nsettings-search\nsurfing\ntable-editor-obsidian\ntext-snippets-obsidian\nwebpage-html-export\nlapel\nobsidian-regex-replace\ntemplater-obsidian\nediting-toolbar\nobsidian-admonition\nobsidian-banners\nobsidian-charts\nobsidian-excalidraw-plugin\nobsidian42-brat\nobsidian-icon-folder\nvscode-editor\n";

// scripts/settings/flow-list.ts
var FlowList = class {
  constructor(containerEl) {
    this.checkedList = [];
    this.containerEl = containerEl;
    this.flowListEl = this.containerEl.createDiv({ cls: "flow-list" });
  }
  addItem(name, key, value, onChange) {
    let item = this.flowListEl.createDiv({ cls: "flow-item" });
    let checkbox = item.createEl("input", { type: "checkbox" });
    checkbox.checked = value;
    if (checkbox.checked)
      this.checkedList.push(key);
    item.addEventListener("click", (evt) => {
      if (!checkbox.checked) {
        checkbox.checked = true;
        if (!this.checkedList.includes(key))
          this.checkedList.push(key);
      } else {
        checkbox.checked = false;
        if (this.checkedList.includes(key))
          this.checkedList.remove(key);
      }
      onChange(checkbox.checked);
    });
    checkbox.onclick = (evt) => {
      checkbox.checked = !checkbox.checked;
    };
    let label = item.createDiv({ cls: "flow-label" });
    label.setText(name);
    return item;
  }
};

// scripts/settings/export-modal.ts
var import_obsidian5 = require("obsidian");

// scripts/objects/file-picker.ts
var import_obsidian4 = require("obsidian");

// scripts/objects/file-tree.ts
var import_obsidian3 = require("obsidian");

// scripts/objects/tree.ts
var Tree = class {
  constructor() {
    this.children = [];
    this.minCollapsableDepth = 1;
    this.title = "Tree";
    this.class = "mod-tree-none";
    this.showNestingIndicator = true;
    this.minDepth = 1;
    this.generateWithItemsClosed = false;
    this.makeLinksWebStyle = false;
    this.renderMarkdownTitles = true;
    this.container = void 0;
  }
  async buildTreeRecursive(tree, container, minDepth = 1, closeAllItems = false) {
    tree.minCollapsableDepth = this.minCollapsableDepth;
    let treeItem = await tree.generateItemHTML(container, closeAllItems);
    if (!tree.childContainer)
      return;
    for (let item of tree.children) {
      if (item.depth < minDepth)
        continue;
      await this.buildTreeRecursive(item, tree.childContainer, minDepth, closeAllItems);
    }
  }
  async generateTree(container) {
    for (let item of this.children) {
      await this.buildTreeRecursive(item, container, this.minDepth, this.generateWithItemsClosed);
    }
    this.forAllChildren((child) => {
      if (child.isCollapsed)
        child.setCollapse(true, false);
    });
  }
  async generateTreeWithContainer(container) {
    this.container = container;
    let treeContainerEl = container.createDiv();
    let treeHeaderEl = container.createDiv();
    let sectionHeaderEl = container.createEl("span");
    let collapseAllEl = container.createEl("button");
    let treeScrollAreaEl = container.createDiv();
    treeContainerEl.classList.add("tree-container", "mod-root", "nav-folder", "tree-item", this.class);
    treeHeaderEl.classList.add("tree-header");
    sectionHeaderEl.classList.add("sidebar-section-header");
    collapseAllEl.classList.add("clickable-icon", "collapse-tree-button");
    collapseAllEl.setAttribute("aria-label", "Collapse All");
    collapseAllEl.innerHTML = "<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'></svg>";
    treeScrollAreaEl.classList.add("tree-scroll-area", "tree-item-children", "nav-folder-children");
    let invisFirst = treeScrollAreaEl.createDiv("tree-item mod-tree-folder nav-folder mod-collapsible is-collapsed");
    invisFirst.style.display = "none";
    if (this.generateWithItemsClosed)
      collapseAllEl.classList.add("is-collapsed");
    if (this.showNestingIndicator)
      treeContainerEl.classList.add("mod-nav-indicator");
    treeContainerEl.setAttribute("data-depth", "0");
    sectionHeaderEl.innerText = this.title;
    treeContainerEl.appendChild(treeHeaderEl);
    treeContainerEl.appendChild(treeScrollAreaEl);
    treeHeaderEl.appendChild(sectionHeaderEl);
    treeHeaderEl.appendChild(collapseAllEl);
    await this.generateTree(treeScrollAreaEl);
  }
  sortAlphabetically(reverse = false) {
    this.children.sort((a, b) => reverse ? b.title.localeCompare(a.title, void 0, { numeric: true }) : a.title.localeCompare(b.title, void 0, { numeric: true }));
    for (let child of this.children) {
      child.sortAlphabetically();
    }
  }
  forAllChildren(func, recursive = true) {
    for (let child of this.children) {
      func(child);
      if (recursive)
        child.forAllChildren(func);
    }
  }
};
var TreeItem = class {
  constructor(tree, parent, depth) {
    this.children = [];
    this.depth = 0;
    this.itemClass = "";
    this.title = "";
    this.icon = "";
    this.href = void 0;
    this.minCollapsableDepth = 1;
    this.isCollapsed = false;
    this.childContainer = void 0;
    this.itemEl = void 0;
    this.tree = tree;
    this.parent = parent;
    this.depth = depth;
  }
  async generateItemHTML(container, startClosed = true) {
    if (startClosed)
      this.isCollapsed = true;
    this.itemEl = this.createItemWrapper(container);
    await this.createItemLink(this.itemEl);
    this.createItemChildren(this.itemEl);
    return this.itemEl;
  }
  forAllChildren(func, recursive = true) {
    for (let child of this.children) {
      func(child);
      if (recursive)
        child.forAllChildren(func);
    }
  }
  async setCollapse(collapsed, animate = true) {
    if (!this.isCollapsible())
      return;
    if (!this.itemEl || !this.itemEl.classList.contains("mod-collapsible"))
      return;
    let children = this.itemEl.querySelector(".tree-item-children");
    if (children == null)
      return;
    if (collapsed) {
      this.itemEl.classList.add("is-collapsed");
      if (animate)
        this.slideUp(children, 100);
      else
        children.style.display = "none";
    } else {
      this.itemEl.classList.remove("is-collapsed");
      if (animate)
        this.slideDown(children, 100);
      else
        children.style.removeProperty("display");
    }
    this.isCollapsed = collapsed;
  }
  toggleCollapse() {
    if (!this.itemEl)
      return;
    this.setCollapse(!this.itemEl.classList.contains("is-collapsed"));
  }
  sortAlphabetically(reverse = false) {
    this.children.sort((a, b) => reverse ? b.title.localeCompare(a.title, void 0, { numeric: true }) : a.title.localeCompare(b.title, void 0, { numeric: true }));
    for (let child of this.children) {
      child.sortAlphabetically();
    }
  }
  isCollapsible() {
    return this.children.length != 0 && this.depth >= this.minCollapsableDepth;
  }
  createItemWrapper(container) {
    let itemEl = container.createDiv();
    itemEl.classList.add("tree-item");
    if (this.itemClass.trim() != "")
      itemEl.classList.add(...this.itemClass.split(" "));
    itemEl.setAttribute("data-depth", this.depth.toString());
    if (this.isCollapsible())
      itemEl.classList.add("mod-collapsible");
    return itemEl;
  }
  async createItemContents(container) {
    var _a2;
    let itemContentsEl = container.createDiv("tree-item-contents");
    if (this.isCollapsible()) {
      this.createItemCollapseIcon(itemContentsEl);
      if (this.isCollapsed) {
        (_a2 = this.itemEl) == null ? void 0 : _a2.classList.add("is-collapsed");
      }
    }
    this.createItemIcon(itemContentsEl);
    await this.createItemTitle(itemContentsEl);
    return itemContentsEl;
  }
  async createItemLink(container) {
    if (this.tree.makeLinksWebStyle && this.href)
      this.href = Path.toWebStyle(this.href);
    let itemLinkEl = container.createEl(this.href ? "a" : "div", { cls: "tree-link" });
    if (this.href)
      itemLinkEl.setAttribute("href", this.href);
    let itemContentEl = await this.createItemContents(itemLinkEl);
    return { linkEl: itemLinkEl, contentEl: itemContentEl };
  }
  createItemCollapseIcon(container) {
    const arrowIcon = `<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" class="svg-icon right-triangle"><path d="M3 8L12 17L21 8"></path></svg>`;
    let itemIconEl = container.createDiv("collapse-icon");
    itemIconEl.innerHTML = arrowIcon;
    return itemIconEl;
  }
  async createItemTitle(container) {
    let titleEl = container.createEl("span", { cls: "tree-item-title" });
    if (this.tree.renderMarkdownTitles)
      MarkdownRendererAPI.renderMarkdownSimpleEl(this.title, titleEl);
    else
      titleEl.innerText = this.title;
    return titleEl;
  }
  createItemIcon(container) {
    if (this.icon.trim() == "")
      return void 0;
    let itemIconEl = container.createDiv("tree-item-icon");
    if (this.tree.renderMarkdownTitles)
      MarkdownRendererAPI.renderMarkdownSimpleEl(this.icon, itemIconEl);
    else
      itemIconEl.innerText = this.icon;
    return itemIconEl;
  }
  createItemChildren(container) {
    this.childContainer = container.createDiv("tree-item-children nav-folder-children");
    return this.childContainer;
  }
  slideUp(target, duration = 500) {
    target.style.transitionProperty = "height, margin, padding";
    target.style.transitionDuration = duration + "ms";
    target.style.boxSizing = "border-box";
    target.style.height = target.offsetHeight + "px";
    target.offsetHeight;
    target.style.overflow = "hidden";
    target.style.height = "0";
    target.style.paddingTop = "0";
    target.style.paddingBottom = "0";
    target.style.marginTop = "0";
    target.style.marginBottom = "0";
    window.setTimeout(async () => {
      target.style.display = "none";
      target.style.removeProperty("height");
      target.style.removeProperty("padding-top");
      target.style.removeProperty("padding-bottom");
      target.style.removeProperty("margin-top");
      target.style.removeProperty("margin-bottom");
      target.style.removeProperty("overflow");
      target.style.removeProperty("transition-duration");
      target.style.removeProperty("transition-property");
    }, duration);
  }
  slideDown(target, duration = 500) {
    target.style.removeProperty("display");
    let display = window.getComputedStyle(target).display;
    if (display === "none")
      display = "block";
    target.style.display = display;
    let height = target.offsetHeight;
    target.style.overflow = "hidden";
    target.style.height = "0";
    target.style.paddingTop = "0";
    target.style.paddingBottom = "0";
    target.style.marginTop = "0";
    target.style.marginBottom = "0";
    target.offsetHeight;
    target.style.boxSizing = "border-box";
    target.style.transitionProperty = "height, margin, padding";
    target.style.transitionDuration = duration + "ms";
    target.style.height = height + "px";
    target.style.removeProperty("padding-top");
    target.style.removeProperty("padding-bottom");
    target.style.removeProperty("margin-top");
    target.style.removeProperty("margin-bottom");
    window.setTimeout(async () => {
      target.style.removeProperty("height");
      target.style.removeProperty("overflow");
      target.style.removeProperty("transition-duration");
      target.style.removeProperty("transition-property");
    }, duration);
  }
};

// scripts/utils/downloadable.ts
var Downloadable = class {
  constructor(filename, content, vaultRelativeDestination, encoding = "utf8") {
    this.modifiedTime = 0;
    if (vaultRelativeDestination.isFile)
      throw new Error("vaultRelativeDestination must be a folder: " + vaultRelativeDestination.asString);
    this.filename = filename;
    this.content = content;
    this.relativeDirectory = vaultRelativeDestination;
    this.encoding = encoding;
  }
  get relativePath() {
    return this.relativeDirectory.joinString(this.filename);
  }
  async download(downloadDirectory) {
    let data = this.content instanceof Buffer ? this.content : Buffer.from(this.content.toString(), this.encoding);
    let writePath = this.getAbsoluteDownloadDirectory(downloadDirectory).joinString(this.filename);
    await writePath.writeFile(data, this.encoding);
  }
  getAbsoluteDownloadPath(downloadDirectory) {
    return this.relativeDirectory.absolute(downloadDirectory).joinString(this.filename);
  }
  getAbsoluteDownloadDirectory(downloadDirectory) {
    return this.relativeDirectory.absolute(downloadDirectory);
  }
};

// scripts/objects/outline-tree.ts
var OutlineTree = class extends Tree {
  constructor(webpage, minDepth = 1) {
    var _a2, _b;
    super();
    this.minDepth = 1;
    this.depth = 0;
    this.webpage = webpage;
    this.file = webpage.source;
    this.minDepth = minDepth;
    let headings = webpage.headings;
    this.depth = Math.min(...headings.map((h) => h.level)) - 1;
    let parent = this;
    for (let heading of headings) {
      if (heading.level < minDepth)
        continue;
      if (heading.level > parent.depth) {
        let child = this.createTreeItem(heading, parent);
        parent.children.push(child);
        if (heading.level == parent.depth + 1)
          parent = child;
      } else if (heading.level == parent.depth) {
        if (parent instanceof OutlineTreeItem) {
          let child = this.createTreeItem(heading, parent.parent);
          parent.parent.children.push(child);
          parent = child;
        }
      } else if (heading.level < parent.depth) {
        if (parent instanceof OutlineTreeItem) {
          let levelChange = parent.depth - heading.level;
          let backParent = (_a2 = parent.parent) != null ? _a2 : parent;
          for (let i = 0; i < levelChange; i++) {
            if (backParent instanceof OutlineTreeItem)
              backParent = (_b = backParent.parent) != null ? _b : backParent;
          }
          let child = this.createTreeItem(heading, backParent);
          backParent.children.push(child);
          parent = child;
        }
      }
    }
  }
  createTreeItem(heading, parent) {
    let item = new OutlineTreeItem(this, parent, heading);
    item.title = heading.heading;
    return item;
  }
};
var OutlineTreeItem = class extends TreeItem {
  constructor(tree, parent, heading) {
    super(tree, parent, heading.level);
    this.children = [];
    this.heading = heading.heading;
    this.href = tree.webpage.relativePath + "#" + heading.headingEl.id;
  }
  forAllChildren(func, recursive = true) {
    super.forAllChildren(func, recursive);
  }
  async createItemContents(container) {
    let linkEl = await super.createItemContents(container);
    linkEl == null ? void 0 : linkEl.setAttribute("heading-name", this.heading);
    linkEl.classList.add("heading-link");
    return linkEl;
  }
};

// scripts/objects/graph-view.ts
var GraphView = class {
  constructor() {
    this.graphOptions = new GraphViewOptions();
    this.isInitialized = false;
  }
  static InOutQuadBlend(start, end, t) {
    t /= 2;
    let t2 = 2 * t * (1 - t) + 0.5;
    t2 -= 0.5;
    t2 *= 2;
    return start + (end - start) * t2;
  }
  async init(files, options) {
    var _a2, _b;
    if (this.isInitialized)
      return;
    Object.assign(this.graphOptions, options.graphViewOptions);
    this.paths = files.map((f) => f.path);
    this.nodeCount = this.paths.length;
    this.linkSources = [];
    this.linkTargets = [];
    this.labels = [];
    this.radii = [];
    let linkCounts = [];
    for (let i = 0; i < this.nodeCount; i++) {
      linkCounts.push(0);
    }
    let resolvedLinks = Object.entries(app.metadataCache.resolvedLinks);
    let values = Array.from(resolvedLinks.values());
    let sources = values.map((v) => v[0]);
    let targets = values.map((v) => v[1]);
    for (let source of this.paths) {
      let sourceIndex = sources.indexOf(source);
      let file = files.find((f) => f.path == source);
      if (file) {
        let titleInfo = await Website.getTitleAndIcon(file, true);
        this.labels.push(titleInfo.title);
      }
      if (sourceIndex != -1) {
        let target = targets[sourceIndex];
        for (let link of Object.entries(target)) {
          if (link[0] == source)
            continue;
          if (this.paths.includes(link[0])) {
            let path1 = source;
            let path2 = link[0];
            let index1 = this.paths.indexOf(path1);
            let index2 = this.paths.indexOf(path2);
            if (index1 == -1 || index2 == -1)
              continue;
            this.linkSources.push(index1);
            this.linkTargets.push(index2);
            linkCounts[index1] = ((_a2 = linkCounts[index1]) != null ? _a2 : 0) + 1;
            linkCounts[index2] = ((_b = linkCounts[index2]) != null ? _b : 0) + 1;
          }
        }
      }
    }
    let maxLinks = Math.max(...linkCounts);
    this.radii = linkCounts.map((l) => GraphView.InOutQuadBlend(this.graphOptions.minNodeRadius, this.graphOptions.maxNodeRadius, Math.min(l / (maxLinks * 0.8), 1)));
    this.paths = this.paths.map((p) => new Path(p).setExtension(".html").makeUnixStyle().makeWebStyle(options.webStylePaths).asString);
    this.linkCount = this.linkSources.length;
    this.isInitialized = true;
  }
  static generateGraphEl(container) {
    let graphWrapper = container.createDiv();
    graphWrapper.classList.add("graph-view-wrapper");
    let graphHeader = graphWrapper.createDiv();
    graphHeader.addClass("sidebar-section-header");
    graphHeader.innerText = "Interactive Graph";
    let graphEl = graphWrapper.createDiv();
    graphEl.className = "graph-view-placeholder";
    graphEl.innerHTML = `
		<div class="graph-view-container">
			<div class="graph-icon graph-expand" role="button" aria-label="Expand" data-tooltip-position="top"><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" class="svg-icon"><line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline></svg></div>
			<canvas id="graph-canvas" class="hide" width="512px" height="512px"></canvas>
		</div>
		`;
    return graphWrapper;
  }
  getExportData() {
    if (!this.isInitialized)
      throw new Error("Graph not initialized");
    return `let graphData=
${JSON.stringify(this)};`;
  }
};

// scripts/html-generation/assets/asset.ts
var { minify: runMinify } = require_htmlminifier();
var mime = require_mime();
var Asset = class extends Downloadable {
  constructor(filename, content, type, inlinePolicy, minify2, mutability, loadMethod = "async" /* Async */, loadPriority = 100, cdnPath = void 0, options = new MarkdownWebpageRendererAPIOptions2()) {
    if (options.webStylePaths)
      filename = Path.toWebStyle(filename);
    super(filename, content, Asset.typeToPath(type));
    this.loadMethod = "" /* Default */;
    this.loadPriority = 100;
    this.onlineURL = void 0;
    this.childAssets = [];
    this.exportOptions = options;
    this.type = type;
    this.inlinePolicy = inlinePolicy;
    this.mutability = mutability;
    this.minify = minify2;
    this.loadMethod = loadMethod;
    this.loadPriority = loadPriority;
    this.onlineURL = cdnPath;
    this.modifiedTime = Date.now();
    switch (mutability) {
      case "static" /* Static */:
        AssetHandler.staticAssets.push(this);
        this.modifiedTime = AssetHandler.mainJsModTime;
        break;
      case "dynamic" /* Dynamic */:
        AssetHandler.dynamicAssets.push(this);
        break;
      case "temporary" /* Temporary */:
        AssetHandler.temporaryAssets.push(this);
        break;
    }
    if (mutability != "child" /* Child */)
      AssetHandler.allAssets.push(this);
  }
  async load(options) {
    this.exportOptions = options;
    if (this.type == "style" /* Style */ && typeof this.content == "string") {
      this.childAssets = [];
      this.content = await AssetHandler.getStyleChildAssets(this, false);
    }
    if (this.minify) {
      this.minifyAsset();
    }
  }
  async download(downloadDirectory) {
    if (this.isInlineFormat(this.exportOptions))
      return;
    await super.download(downloadDirectory);
  }
  static typeToPath(type) {
    switch (type) {
      case "style" /* Style */:
        return AssetHandler.cssPath;
      case "script" /* Script */:
        return AssetHandler.jsPath;
      case "media" /* Media */:
        return AssetHandler.mediaPath;
      case "html" /* HTML */:
        return AssetHandler.htmlPath;
      case "font" /* Font */:
        return AssetHandler.fontPath;
      case "other" /* Other */:
        return AssetHandler.libraryPath;
    }
  }
  static extentionToType(extention) {
    const mediaTypes = ["png", "jpg", "jpeg", "gif", "svg", "webp", "ico", "mp4", "webm", "ogg", "mp3", "wav", "flac", "aac", "m4a", "opus"];
    const scriptTypes = ["js", "ts"];
    const styleTypes = ["css", "scss", "sass", "less"];
    const htmlTypes = ["html", "htm"];
    const fontTypes = ["ttf", "woff", "woff2", "eot", "otf"];
    extention = extention.toLowerCase().replace(".", "");
    if (mediaTypes.includes(extention))
      return "media" /* Media */;
    if (scriptTypes.includes(extention))
      return "script" /* Script */;
    if (styleTypes.includes(extention))
      return "style" /* Style */;
    if (htmlTypes.includes(extention))
      return "html" /* HTML */;
    if (fontTypes.includes(extention))
      return "font" /* Font */;
    return "other" /* Other */;
  }
  async minifyAsset() {
    if (this.type == "html" /* HTML */ || typeof this.content != "string")
      return;
    let isJS = this.type == "script" /* Script */;
    let isCSS = this.type == "style" /* Style */;
    let tempContent = this.content;
    try {
      if (isJS)
        tempContent = `<script>${tempContent}<\/script>`;
      if (isCSS)
        tempContent = `<style>${tempContent}</style>`;
      tempContent = await runMinify(tempContent, { minifyCSS: isCSS, minifyJS: isJS, removeComments: true, collapseWhitespace: true });
      tempContent = tempContent.replace("<script>", "").replace("<\/script>", "").replace("<style>", "").replace("</style>", "");
      this.content = tempContent;
    } catch (e) {
      ExportLog.warning("Unable to minify " + (isJS ? "JS" : "CSS") + " file.");
      this.content = this.content.replace(/[\n\r]+/g, "");
    }
  }
  getAssetPath(relativeFrom = void 0) {
    if (this.isInlineFormat(this.exportOptions))
      return new Path("");
    if (relativeFrom == void 0)
      relativeFrom = Path.rootPath;
    let toRoot = Path.getRelativePath(relativeFrom, Path.rootPath);
    let newPath = toRoot.join(this.relativePath).makeUnixStyle();
    newPath.makeWebStyle(this.exportOptions.webStylePaths);
    return newPath;
  }
  isInlineFormat(options) {
    let isInlineFormat = this.inlinePolicy == "inline" /* Inline */ || this.inlinePolicy == "inlinehead" /* InlineHead */ || (this.inlinePolicy == "auto" /* Auto */ || this.inlinePolicy == "autohead" /* AutoHead */) && (options.inlineCSS && this.type == "style" /* Style */ || options.inlineJS && this.type == "script" /* Script */ || options.inlineMedia && this.type == "media" /* Media */ || options.inlineHTML && this.type == "html" /* HTML */ || options.inlineFonts && this.type == "font" /* Font */);
    return isInlineFormat;
  }
  isRefFormat(options) {
    let isRefFormat = this.inlinePolicy == "download" /* Download */ || this.inlinePolicy == "downloadhead" /* DownloadHead */ || (this.inlinePolicy == "auto" /* Auto */ || this.inlinePolicy == "autohead" /* AutoHead */) && !(options.inlineCSS && this.type == "style" /* Style */ || options.inlineJS && this.type == "script" /* Script */ || options.inlineMedia && this.type == "media" /* Media */ || options.inlineHTML && this.type == "html" /* HTML */ || options.inlineFonts && this.type == "font" /* Font */);
    return isRefFormat;
  }
  getHTML(options) {
    if (this.isInlineFormat(options)) {
      switch (this.type) {
        case "style" /* Style */:
          return `<style>${this.content}</style>`;
        case "script" /* Script */:
          return `<script ${this.loadMethod}>${this.content}<\/script>`;
        case "media" /* Media */:
          return `<${this.getHTMLTagName()} src="${this.getContentBase64()}"/>`;
        case "html" /* HTML */:
          return this.content;
        case "font" /* Font */:
          return `<style>@font-face{font-family:'${this.filename}';src:url(${this.getContentBase64()}) format('woff2');}</style>`;
        default:
          return "";
      }
    }
    if (this.isRefFormat(options)) {
      let path = this.getAssetPath(void 0).asString;
      if (options.offlineResources === false && this.onlineURL)
        path = this.onlineURL;
      let include = "";
      let attr = "";
      switch (this.type) {
        case "style" /* Style */:
          include = `<link rel="stylesheet" href="${path}">`;
          if (this.loadMethod == "async" /* Async */) {
            include = `<link rel="preload" href="${path}" as="style" onload="this.onload=null;this.rel='stylesheet'"><noscript><link rel="stylesheet" href="${path}"></noscript>`;
          }
          return include;
        case "script" /* Script */:
          include = `<script ${this.loadMethod} id="${this.relativePath.basename + "-script"}" src="${path}" onload='this.onload=null;this.setAttribute("loaded", "true")'><\/script>`;
          return include;
        case "media" /* Media */:
          attr = this.loadMethod == "defer" /* Defer */ ? "loading='eager'" : "loading='lazy'";
          if (this.loadMethod == "" /* Default */)
            attr = "";
          include = `<${this.getHTMLTagName()} src="${path}" ${attr} />`;
          return include;
        case "font" /* Font */:
          include = `<style>@font-face{font-family:'${this.filename}';src:url('${path}') format('woff2');}</style>`;
          return include;
        case "html" /* HTML */:
          return `<include src="${path}"></include>`;
        default:
          return "";
      }
    }
    return "";
  }
  static mimeToExtention(mime3) {
    const FileMimeType = { "audio/x-mpeg": "mpega", "application/postscript": "ps", "audio/x-aiff": "aiff", "application/x-aim": "aim", "image/x-jg": "art", "video/x-ms-asf": "asx", "audio/basic": "ulw", "video/x-msvideo": "avi", "video/x-rad-screenplay": "avx", "application/x-bcpio": "bcpio", "application/octet-stream": "exe", "image/bmp": "dib", "text/html": "html", "application/x-cdf": "cdf", "application/pkix-cert": "cer", "application/java": "class", "application/x-cpio": "cpio", "application/x-csh": "csh", "text/css": "css", "application/msword": "doc", "application/xml-dtd": "dtd", "video/x-dv": "dv", "application/x-dvi": "dvi", "application/vnd.ms-fontobject": "eot", "text/x-setext": "etx", "image/gif": "gif", "application/x-gtar": "gtar", "application/x-gzip": "gz", "application/x-hdf": "hdf", "application/mac-binhex40": "hqx", "text/x-component": "htc", "image/ief": "ief", "text/vnd.sun.j2me.app-descriptor": "jad", "application/java-archive": "jar", "text/x-java-source": "java", "application/x-java-jnlp-file": "jnlp", "image/jpeg": "jpg", "application/javascript": "js", "text/plain": "txt", "application/json": "json", "audio/midi": "midi", "application/x-latex": "latex", "audio/x-mpegurl": "m3u", "image/x-macpaint": "pnt", "text/troff": "tr", "application/mathml+xml": "mathml", "application/x-mif": "mif", "video/quicktime": "qt", "video/x-sgi-movie": "movie", "audio/mpeg": "mpa", "video/mp4": "mp4", "video/mpeg": "mpg", "video/mpeg2": "mpv2", "application/x-wais-source": "src", "application/x-netcdf": "nc", "application/oda": "oda", "application/vnd.oasis.opendocument.database": "odb", "application/vnd.oasis.opendocument.chart": "odc", "application/vnd.oasis.opendocument.formula": "odf", "application/vnd.oasis.opendocument.graphics": "odg", "application/vnd.oasis.opendocument.image": "odi", "application/vnd.oasis.opendocument.text-master": "odm", "application/vnd.oasis.opendocument.presentation": "odp", "application/vnd.oasis.opendocument.spreadsheet": "ods", "application/vnd.oasis.opendocument.text": "odt", "application/vnd.oasis.opendocument.graphics-template": "otg", "application/vnd.oasis.opendocument.text-web": "oth", "application/vnd.oasis.opendocument.presentation-template": "otp", "application/vnd.oasis.opendocument.spreadsheet-template": "ots", "application/vnd.oasis.opendocument.text-template": "ott", "application/ogg": "ogx", "video/ogg": "ogv", "audio/ogg": "spx", "application/x-font-opentype": "otf", "audio/flac": "flac", "application/annodex": "anx", "audio/annodex": "axa", "video/annodex": "axv", "application/xspf+xml": "xspf", "image/x-portable-bitmap": "pbm", "image/pict": "pict", "application/pdf": "pdf", "image/x-portable-graymap": "pgm", "audio/x-scpls": "pls", "image/png": "png", "image/x-portable-anymap": "pnm", "image/x-portable-pixmap": "ppm", "application/vnd.ms-powerpoint": "pps", "image/vnd.adobe.photoshop": "psd", "image/x-quicktime": "qtif", "image/x-cmu-raster": "ras", "application/rdf+xml": "rdf", "image/x-rgb": "rgb", "application/vnd.rn-realmedia": "rm", "application/rtf": "rtf", "text/richtext": "rtx", "application/font-sfnt": "sfnt", "application/x-sh": "sh", "application/x-shar": "shar", "application/x-stuffit": "sit", "application/x-sv4cpio": "sv4cpio", "application/x-sv4crc": "sv4crc", "image/svg+xml": "svg", "application/x-shockwave-flash": "swf", "application/x-tar": "tar", "application/x-tcl": "tcl", "application/x-tex": "tex", "application/x-texinfo": "texinfo", "image/tiff": "tiff", "text/tab-separated-values": "tsv", "application/x-font-ttf": "ttf", "application/x-ustar": "ustar", "application/voicexml+xml": "vxml", "image/x-xbitmap": "xbm", "application/xhtml+xml": "xhtml", "application/vnd.ms-excel": "xls", "application/xml": "xsl", "image/x-xpixmap": "xpm", "application/xslt+xml": "xslt", "application/vnd.mozilla.xul+xml": "xul", "image/x-xwindowdump": "xwd", "application/vnd.visio": "vsd", "audio/x-wav": "wav", "image/vnd.wap.wbmp": "wbmp", "text/vnd.wap.wml": "wml", "application/vnd.wap.wmlc": "wmlc", "text/vnd.wap.wmlsc": "wmls", "application/vnd.wap.wmlscriptc": "wmlscriptc", "video/x-ms-wmv": "wmv", "application/font-woff": "woff", "application/font-woff2": "woff2", "model/vrml": "wrl", "application/wspolicy+xml": "wspolicy", "application/x-compress": "z", "application/zip": "zip" };
    return FileMimeType[mime3] || mime3.split("/")[1] || "txt";
  }
  static extentionToMime(extention) {
    if (extention.startsWith("."))
      extention = extention.slice(1);
    const FileMimeType = { "mpega": "audio/x-mpeg", "ps": "application/postscript", "aiff": "audio/x-aiff", "aim": "application/x-aim", "art": "image/x-jg", "asx": "video/x-ms-asf", "ulw": "audio/basic", "avi": "video/x-msvideo", "avx": "video/x-rad-screenplay", "bcpio": "application/x-bcpio", "exe": "application/octet-stream", "dib": "image/bmp", "html": "text/html", "cdf": "application/x-cdf", "cer": "application/pkix-cert", "class": "application/java", "cpio": "application/x-cpio", "csh": "application/x-csh", "css": "text/css", "doc": "application/msword", "dtd": "application/xml-dtd", "dv": "video/x-dv", "dvi": "application/x-dvi", "eot": "application/vnd.ms-fontobject", "etx": "text/x-setext", "gif": "image/gif", "gtar": "application/x-gtar", "gz": "application/x-gzip", "hdf": "application/x-hdf", "hqx": "application/mac-binhex40", "htc": "text/x-component", "ief": "image/ief", "jad": "text/vnd.sun.j2me.app-descriptor", "jar": "application/java-archive", "java": "text/x-java-source", "jnlp": "application/x-java-jnlp-file", "jpg": "image/jpeg", "js": "application/javascript", "txt": "text/plain", "json": "application/json", "midi": "audio/midi", "latex": "application/x-latex", "m3u": "audio/x-mpegurl", "pnt": "image/x-macpaint", "tr": "text/troff", "mathml": "application/mathml+xml", "mif": "application/x-mif", "qt": "video/quicktime", "movie": "video/x-sgi-movie", "mpa": "audio/mpeg", "mp4": "video/mp4", "mpg": "video/mpeg", "mpv2": "video/mpeg2", "src": "application/x-wais-source", "nc": "application/x-netcdf", "oda": "application/oda", "odb": "application/vnd.oasis.opendocument.database", "odc": "application/vnd.oasis.opendocument.chart", "odf": "application/vnd.oasis.opendocument.formula", "odg": "application/vnd.oasis.opendocument.graphics", "odi": "application/vnd.oasis.opendocument.image", "odm": "application/vnd.oasis.opendocument.text-master", "odp": "application/vnd.oasis.opendocument.presentation", "ods": "application/vnd.oasis.opendocument.spreadsheet", "odt": "application/vnd.oasis.opendocument.text", "otg": "application/vnd.oasis.opendocument.graphics-template", "oth": "application/vnd.oasis.opendocument.text-web", "otp": "application/vnd.oasis.opendocument.presentation-template", "ots": "application/vnd.oasis.opendocument.spreadsheet-template", "ott": "application/vnd.oasis.opendocument.text-template", "ogx": "application/ogg", "ogv": "video/ogg", "spx": "audio/ogg", "otf": "application/x-font-opentype", "flac": "audio/flac", "anx": "application/annodex", "axa": "audio/annodex", "axv": "video/annodex", "xspf": "application/xspf+xml", "pbm": "image/x-portable-bitmap", "pict": "image/pict", "pdf": "application/pdf", "pgm": "image/x-portable-graymap", "pls": "audio/x-scpls", "png": "image/png", "pnm": "image/x-portable-anymap", "ppm": "image/x-portable-pixmap", "pps": "application/vnd.ms-powerpoint", "psd": "image/vnd.adobe.photoshop", "qtif": "image/x-quicktime", "ras": "image/x-cmu-raster", "rdf": "application/rdf+xml", "rgb": "image/x-rgb", "rm": "application/vnd.rn-realmedia", "rtf": "application/rtf", "rtx": "text/richtext", "sfnt": "application/font-sfnt", "sh": "application/x-sh", "shar": "application/x-shar", "sit": "application/x-stuffit", "sv4cpio": "application/x-sv4cpio", "sv4crc": "application/x-sv4crc", "svg": "image/svg+xml", "swf": "application/x-shockwave-flash", "tar": "application/x-tar", "tcl": "application/x-tcl", "tex": "application/x-tex", "texinfo": "application/x-texinfo", "tiff": "image/tiff", "tsv": "text/tab-separated-values", "ttf": "application/x-font-ttf", "ustar": "application/x-ustar", "vxml": "application/voicexml+xml", "xbm": "image/x-xbitmap", "xhtml": "application/xhtml+xml", "xls": "application/vnd.ms-excel", "xsl": "application/xml", "xpm": "image/x-xpixmap", "xslt": "application/xslt+xml", "xul": "application/vnd.mozilla.xul+xml", "xwd": "image/x-xwindowdump", "vsd": "application/vnd.visio", "wav": "audio/x-wav", "wbmp": "image/vnd.wap.wbmp", "wml": "text/vnd.wap.wml", "wmlc": "application/vnd.wap.wmlc", "wmls": "text/vnd.wap.wmlsc", "wmlscriptc": "application/vnd.wap.wmlscriptc", "wmv": "video/x-ms-wmv", "woff": "application/font-woff", "woff2": "application/font-woff2", "wrl": "model/vrml", "wspolicy": "application/wspolicy+xml", "z": "application/x-compress", "zip": "application/zip" };
    return FileMimeType[extention] || "application/octet-stream";
  }
  getContentBase64() {
    let extension = this.filename.split(".").pop() || "txt";
    let mimeType = mime(extension) || "text/plain";
    let base64 = this.content.toString("base64");
    return `data:${mimeType};base64,${base64}`;
  }
  getHTMLTagName() {
    switch (this.type) {
      case "style" /* Style */:
        return "link";
      case "script" /* Script */:
        return "script";
      case "font" /* Font */:
        return "style";
      case "html" /* HTML */:
        return "include";
    }
    let extension = this.filename.split(".").pop() || "txt";
    const extToTag = { "png": "img", "jpg": "img", "jpeg": "img", "tiff": "img", "bmp": "img", "avif": "img", "apng": "img", "gif": "img", "svg": "img", "webp": "img", "ico": "img", "mp4": "video", "webm": "video", "ogg": "video", "3gp": "video", "mov": "video", "mpeg": "video", "mp3": "audio", "wav": "audio", "flac": "audio", "aac": "audio", "m4a": "audio", "opus": "audio" };
    return extToTag[extension] || "img";
  }
};

// scripts/html-generation/html-generation-helpers.ts
var import_obsidian = require("obsidian");

// assets/obsidian-styles.txt.css
var obsidian_styles_txt_default = ".markdown-preview-view .heading-collapse-indicator \n{\n    margin-left: calc( 0px - var(--collapse-arrow-size) - 10px) !important;\n    padding: 0px 0px !important;\n}\n\n.node-insert-event \n{\n    animation-duration: unset !important;\n    animation-name: none !important;\n}\n\nhr\n{\n    border: none;\n	border-top: var(--hr-thickness) solid;\n    border-color: var(--hr-color);\n}\n\nh1:hover .collapse-indicator, h2:hover .collapse-indicator, h3:hover .collapse-indicator, h4:hover .collapse-indicator, h5:hover .collapse-indicator, h6:hover .collapse-indicator, .collapse-indicator:hover, .is-collapsed .collapse-indicator, .cm-fold-indicator.is-collapsed .collapse-indicator, .cm-gutterElement:hover .collapse-indicator, .cm-gutterElement .is-collapsed .collapse-indicator, .cm-line:hover .cm-fold-indicator .collapse-indicator, .fold-gutter.is-collapsed, .fold-gutter:hover, .metadata-properties-heading:hover .collapse-indicator {\n    opacity: 1;\n	transition: opacity 0.15s ease-in-out;\n}\n\n.collapse-indicator, .fold-gutter\n{\n	opacity: 0;\n	transition: opacity 0.15s ease-in-out;\n}\n\n@media print \n{\n    html body > :not(.print) \n    {\n        display: unset !important;\n    }\n\n    .collapse-indicator\n    {\n        display: none !important;\n    }\n\n    .is-collapsed > element > .collapse-indicator\n    {\n        display: unset !important;\n    }\n}\n\n/*#region Misc Hiding */\n\n.mod-header .metadata-container\n{\n	display: none !important;\n}\n\n/*#endregion */\n\n/*#region Transclusions */\n\n.markdown-embed .heading-collapse-indicator {\n    translate: -1em 0;\n}\n\n.markdown-embed.internal-embed.inline-embed .markdown-embed-content,\n.markdown-embed.internal-embed.inline-embed .markdown-embed-content .markdown-preview-view\n{\n	overflow: visible !important;\n}\n\n.markdown-embed-link\n{\n	display: none !important;\n}\n\n/*#endregion  */\n\n/*#region Canvas */\n\n.canvas-wrapper:not(.mod-readonly) .canvas-node-content.markdown-embed>.markdown-embed-content>.markdown-preview-view\n{\n	user-select: text !important;\n}\n\n.canvas-card-menu {\n	display: none;\n	cursor: default !important;\n\n}\n\n.canvas-controls {\n	display: none;\n	cursor: default !important;\n\n}\n\n.canvas-background\n{\n	pointer-events: visible !important;\n	cursor: grab !important;\n}\n\n.canvas-background:active\n{\n	cursor: grabbing !important;\n}\n\n.canvas-node-connection-point \n{\n	display: none;\n	cursor: default !important;\n\n}\n\n.canvas-node-content\n{\n	backface-visibility: visible !important;\n}\n\n.canvas-menu-container {\n	display: none;\n}\n\n.canvas-node-content-blocker\n{\n	cursor: pointer !important;\n}\n\n.canvas-wrapper\n{\n	position: relative;\n	cursor: default !important;\n}\n\n.canvas-node-resizer\n{\n	cursor: default !important;\n}\n\n.canvas-node-container\n{\n	cursor: default !important;\n}\n\n/*#endregion */\n\n/*#region Code Copy */\n\n/* Make code block copy button fade in and out */\n.markdown-rendered pre:not(:hover) > button.copy-code-button\n{\n	display: unset;\n	opacity: 0;\n}\n\n.markdown-rendered pre:hover > button.copy-code-button\n{\n	opacity: 1;\n}\n\n.markdown-rendered pre button.copy-code-button\n{\n	transition: opacity 0.2s ease-in-out, width 0.3s ease-in-out, background-color 0.2s ease-in-out;\n	text-overflow: clip;\n}\n\n.markdown-rendered pre > button.copy-code-button:hover\n{\n	background-color: var(--interactive-normal);\n}\n\n.markdown-rendered pre > button.copy-code-button:active\n{\n	background-color: var(--interactive-hover);\n	box-shadow: var(--input-shadow);\n	transition: none;\n}\n\n/*#endregion */\n\n/*#region Lists */\n\n.webpage-container .is-collapsed .list-collapse-indicator svg.svg-icon, \n.webpage-container .is-collapsed .collapse-indicator svg.svg-icon\n{\n	color: var(--collapse-icon-color-collapsed);\n}\n\n/*#endregion */\n";

// scripts/html-generation/assets/obsidian-styles.ts
var _ObsidianStyles = class extends Asset {
  constructor() {
    super("obsidian.css", "", "style" /* Style */, "autohead" /* AutoHead */, true, "dynamic" /* Dynamic */, "" /* Default */, 10);
    this.content = "";
  }
  async load(options) {
    var _a2;
    this.content = "";
    let appSheet = document.styleSheets[1];
    let stylesheets = Array.from(document.styleSheets);
    for (const element of stylesheets) {
      if (element.href && ((_a2 = element.href) == null ? void 0 : _a2.includes("app.css"))) {
        appSheet = element;
        break;
      }
    }
    let cssRules = Array.from(appSheet.cssRules);
    for (const element of cssRules) {
      let rule = element;
      let selectors = rule.cssText.split("{")[0].split(",");
      let declarations = rule.cssText.split("{")[1].split("}")[0].split(";");
      selectors = selectors.map((selector) => selector.trim());
      selectors = selectors.filter((selector) => _ObsidianStyles.stylesKeep.some((keep) => selector.includes(keep)) || !_ObsidianStyles.stylesFilter.some((filter) => selector.includes(filter)));
      if (selectors.length == 0)
        continue;
      let newRule = selectors.join(", ") + " { " + declarations.join("; ") + " }";
      this.content += newRule + "\n";
    }
    this.content += obsidian_styles_txt_default;
    await super.load(options);
  }
};
var ObsidianStyles = _ObsidianStyles;
ObsidianStyles.stylesFilter = [
  "workspace-",
  "cm-",
  "cm6",
  "ghost",
  "leaf",
  "CodeMirror",
  "@media",
  "pdf",
  "xfa",
  "annotation",
  "@keyframes",
  "load",
  "@-webkit",
  "setting",
  "filter",
  "decorator",
  "dictionary",
  "status",
  "windows",
  "titlebar",
  "source",
  "menu",
  "message",
  "popover",
  "suggestion",
  "prompt",
  "tab",
  "HyperMD",
  "workspace",
  "publish",
  "backlink",
  "sync",
  "vault",
  "mobile",
  "tablet",
  "phone",
  "textLayer",
  "header",
  "linux",
  "macos",
  "rename",
  "edit",
  "progress",
  "native",
  "aria",
  "tooltip",
  "drop",
  "sidebar",
  "mod-windows",
  "is-frameless",
  "is-hidden-frameless",
  "obsidian-app",
  "show-view-header",
  "is-maximized",
  "is-translucent",
  "community",
  "Layer"
];
ObsidianStyles.stylesKeep = ["tree", "scrollbar", "input[type", "table", "markdown-rendered", "css-settings-manager", "inline-embed", "background", "token"];

// scripts/html-generation/html-generation-helpers.ts
var HTMLGeneration;
((HTMLGeneration2) => {
  function createThemeToggle(container) {
    let label = container.createEl("label");
    let input = label.createEl("input");
    let div = label.createDiv();
    label.classList.add("theme-toggle-container");
    label.setAttribute("for", "theme_toggle");
    input.classList.add("theme-toggle-input");
    input.setAttribute("type", "checkbox");
    input.setAttribute("id", "theme_toggle");
    div.classList.add("toggle-background");
    return label;
  }
  HTMLGeneration2.createThemeToggle = createThemeToggle;
  let _validBodyClasses = void 0;
  async function getValidBodyClasses(cleanCache) {
    if (cleanCache)
      _validBodyClasses = void 0;
    if (_validBodyClasses)
      return _validBodyClasses;
    let bodyClasses = Array.from(document.body.classList);
    bodyClasses = bodyClasses.filter((value) => ObsidianStyles.stylesKeep.some((keep) => value.includes(keep)) || !ObsidianStyles.stylesFilter.some((filter) => value.includes(filter)));
    let validClasses = "";
    validClasses += " publish ";
    validClasses += " css-settings-manager ";
    let styles = AssetHandler.getAssetsOfType("style" /* Style */);
    let i = 0;
    let classes = [];
    for (var style of styles) {
      ExportLog.progress(i, styles.length, "Compiling css classes", "Scanning: " + style.filename, "var(--color-yellow)");
      if (typeof style.content != "string")
        continue;
      let matches = Array.from(style.content.matchAll(/\.([A-Za-z_-]+[\w-]+)/g));
      let styleClasses = matches.map((match) => match[0].substring(1).trim());
      styleClasses = styleClasses.filter((value, index, self2) => self2.indexOf(value) === index);
      classes = classes.concat(styleClasses);
      i++;
      await Utils.delay(0);
    }
    ExportLog.progress(1, 1, "Filtering classes", "...", "var(--color-yellow)");
    classes = classes.filter((value, index, self2) => self2.indexOf(value) === index);
    ExportLog.progress(1, 1, "Sorting classes", "...", "var(--color-yellow)");
    classes = classes.sort();
    i = 0;
    for (var bodyClass of bodyClasses) {
      ExportLog.progress(i, bodyClasses.length, "Collecting valid classes", "Scanning: " + bodyClass, "var(--color-yellow)");
      if (classes.includes(bodyClass)) {
        validClasses += bodyClass + " ";
      }
      i++;
    }
    ExportLog.progress(1, 1, "Cleanup classes", "...", "var(--color-yellow)");
    _validBodyClasses = validClasses.replace(/\s\s+/g, " ");
    ExportLog.progress(1, 1, "Filter duplicate classes", _validBodyClasses.length + " classes", "var(--color-yellow)");
    _validBodyClasses = _validBodyClasses.split(" ").filter((value, index, self2) => self2.indexOf(value) === index).join(" ").trim();
    ExportLog.progress(1, 1, "Classes done", "...", "var(--color-yellow)");
    return _validBodyClasses;
  }
  HTMLGeneration2.getValidBodyClasses = getValidBodyClasses;
  function getLucideIcon(iconName) {
    const iconEl = (0, import_obsidian.getIcon)(iconName);
    if (iconEl) {
      let svg = iconEl.outerHTML;
      iconEl.remove();
      return svg;
    } else {
      return void 0;
    }
  }
  HTMLGeneration2.getLucideIcon = getLucideIcon;
  function getEmojiIcon(iconCode) {
    let iconCodeInt = parseInt(iconCode, 16);
    if (!isNaN(iconCodeInt)) {
      return String.fromCodePoint(iconCodeInt);
    } else {
      return void 0;
    }
  }
  HTMLGeneration2.getEmojiIcon = getEmojiIcon;
  async function getIcon2(iconName) {
    var _a2, _b, _c;
    if (iconName.startsWith("emoji//")) {
      const iconCode = iconName.replace(/^emoji\/\//, "");
      iconName = (_a2 = getEmojiIcon(iconCode)) != null ? _a2 : "\uFFFD";
    } else if (iconName.startsWith("lucide//")) {
      const lucideIconName = iconName.replace(/^lucide\/\//, "");
      iconName = (_b = getLucideIcon(lucideIconName)) != null ? _b : "\uFFFD";
    }
    if (/^\p{Emoji}/gu.test(iconName)) {
      let codepoint = [...iconName].map((e) => e.codePointAt(0).toString(16)).join(`-`);
      switch (Settings.emojiStyle) {
        case "Twemoji" /* Twemoji */:
          return `<img src="https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${codepoint}.svg" class="emoji" />`;
        case "OpenMoji" /* OpenMoji */:
          console.log(codepoint);
          return `<img src="https://openmoji.org/data/color/svg/${codepoint.toUpperCase()}.svg" class="emoji" />`;
        case "OpenMojiOutline" /* OpenMojiOutline */:
          let req = await (0, import_obsidian.requestUrl)(`https://openmoji.org/data/black/svg/${codepoint.toUpperCase()}.svg`);
          if (req.status == 200)
            return req.text.replaceAll(/#00+/g, "currentColor").replaceAll(`stroke-width="2"`, `stroke-width="5"`);
          return iconName;
        case "FluentUI" /* FluentUI */:
          return `<img src="https://emoji.fluent-cdn.com/1.0.0/100x100/${codepoint}.png" class="emoji" />`;
        default:
          return iconName;
      }
    }
    return (_c = getLucideIcon(iconName.toLowerCase())) != null ? _c : iconName;
  }
  HTMLGeneration2.getIcon = getIcon2;
})(HTMLGeneration || (HTMLGeneration = {}));

// scripts/objects/webpage.ts
var { minify } = require_htmlminifier();
var Webpage = class extends Downloadable {
  constructor(file, destination, name, website, options) {
    if (destination && (!destination.isAbsolute || !destination.isDirectory))
      throw new Error("destination must be an absolute directory path: " + (destination == null ? void 0 : destination.asString));
    super(file.basename, "", Path.emptyPath);
    this.dependencies = [];
    this.viewType = "markdown";
    this.isConvertable = false;
    this.title = "";
    this.icon = "";
    this.titleInfo = { title: "", icon: "", isDefaultTitle: true, isDefaultIcon: true };
    options = Object.assign(new MarkdownWebpageRendererAPIOptions2(), options);
    let isConvertable = MarkdownRendererAPI.isConvertable(file.extension);
    this.filename = name != null ? name : file.basename;
    this.filename += isConvertable ? ".html" : "." + file.extension;
    this.isConvertable = isConvertable;
    this.exportOptions = options;
    this.source = file;
    this.website = website != null ? website : void 0;
    this.destinationFolder = destination != null ? destination : Path.vaultPath.joinString("Export");
    if (this.isConvertable)
      this.document = document.implementation.createHTMLDocument(this.source.basename);
    let sourcePath = new Path(file.path);
    this.relativeDirectory = sourcePath.directory;
    if (this.exportOptions.flattenExportPaths)
      this.relativeDirectory = Path.emptyPath;
    if (this.exportOptions.webStylePaths) {
      this.filename = Path.toWebStyle(this.filename);
      this.relativeDirectory.makeWebStyle();
    }
  }
  get html() {
    var _a2;
    let htmlString = "<!DOCTYPE html> " + ((_a2 = this.document) == null ? void 0 : _a2.documentElement.outerHTML);
    return htmlString;
  }
  get viewElement() {
    if (!this.document)
      throw new Error("Document is not defined");
    let viewContent = this.document.querySelector(".view-content");
    let markdownPreview = this.document.querySelector(".markdown-preview-view");
    if (!viewContent && !markdownPreview) {
      throw new Error("No content element found");
    }
    if (this.viewType != "markdown")
      return viewContent != null ? viewContent : markdownPreview;
    return markdownPreview != null ? markdownPreview : viewContent;
  }
  get sizerElement() {
    var _a2, _b, _c;
    if (this.viewType != "markdown")
      return (_b = (_a2 = this.document) == null ? void 0 : _a2.querySelector(".view-content")) == null ? void 0 : _b.firstChild;
    return (_c = this.document) == null ? void 0 : _c.querySelector(".markdown-preview-sizer");
  }
  get exportPath() {
    var _a2, _b;
    return (_b = (_a2 = this.destinationFolder) == null ? void 0 : _a2.join(this.relativePath)) != null ? _b : Path.vaultPath.join(this.relativePath);
  }
  get pathToRoot() {
    return Path.getRelativePath(this.relativePath, new Path(this.relativePath.workingDirectory), true).makeUnixStyle();
  }
  get tags() {
    var _a2, _b;
    let tagCaches = (_b = (_a2 = app.metadataCache.getFileCache(this.source)) == null ? void 0 : _a2.tags) == null ? void 0 : _b.values();
    if (tagCaches) {
      let tags = Array.from(tagCaches).map((tag) => tag.tag);
      return tags;
    }
    return [];
  }
  get headings() {
    let headers = [];
    if (this.document) {
      this.document.querySelectorAll(".heading").forEach((headerEl) => {
        var _a2, _b;
        let level = parseInt(headerEl.tagName[1]);
        if (headerEl.closest("[class^='block-language-']") || headerEl.closest(".markdown-embed.inline-embed"))
          level += 6;
        let heading = (_b = (_a2 = headerEl.getAttribute("data-heading")) != null ? _a2 : headerEl.innerText) != null ? _b : "";
        headers.push({ heading, level, headingEl: headerEl });
      });
    }
    return headers;
  }
  get aliases() {
    var _a2, _b;
    let aliases = (_b = (_a2 = this.frontmatter) == null ? void 0 : _a2.aliases) != null ? _b : [];
    return aliases;
  }
  get description() {
    return this.frontmatter["description"] || this.frontmatter["summary"] || "";
  }
  get author() {
    return this.frontmatter["author"] || this.exportOptions.authorName || "";
  }
  get fullURL() {
    var _a2;
    let url = Path.joinStrings((_a2 = this.exportOptions.siteURL) != null ? _a2 : "", this.relativePath.asString).makeUnixStyle().asString;
    return url;
  }
  get metadataImageURL() {
    var _a2, _b, _c;
    let mediaPathStr = (_b = (_a2 = this.viewElement.querySelector("img")) == null ? void 0 : _a2.getAttribute("src")) != null ? _b : "";
    let hasMedia = mediaPathStr.length > 0;
    if (!hasMedia)
      return void 0;
    if (!mediaPathStr.startsWith("http") && !mediaPathStr.startsWith("data:")) {
      let mediaPath = Path.joinStrings((_c = this.exportOptions.siteURL) != null ? _c : "", mediaPathStr);
      mediaPathStr = mediaPath.asString;
    }
    return mediaPathStr;
  }
  get frontmatter() {
    var _a2, _b;
    let frontmatter = (_b = (_a2 = app.metadataCache.getFileCache(this.source)) == null ? void 0 : _a2.frontmatter) != null ? _b : {};
    return frontmatter;
  }
  getCompatibilityContent() {
    let oldContent = this.sizerElement.outerHTML;
    let compatContent = this.sizerElement;
    compatContent.querySelectorAll("script, style, .collapse-indicator, .callout-icon, .icon, a.tag").forEach((script) => script.remove());
    function moveChildrenOut(element) {
      var _a2;
      let children = Array.from(element.children);
      (_a2 = element.parentElement) == null ? void 0 : _a2.append(...children);
      element.remove();
    }
    let headingTreeElements = Array.from(compatContent.querySelectorAll(".heading-wrapper"));
    headingTreeElements.forEach(moveChildrenOut);
    headingTreeElements = Array.from(compatContent.querySelectorAll(".heading-children"));
    headingTreeElements.forEach(moveChildrenOut);
    let lowDivs = Array.from(compatContent.children).filter((el) => el.tagName == "DIV" && el.childElementCount == 1);
    lowDivs.forEach(moveChildrenOut);
    let all = Array.from(compatContent.querySelectorAll("*"));
    all.forEach((el) => {
      let fillDefault = el.tagName == "text" ? "#181818" : "white";
      el.style.fill = el.style.fill.replace(/var\(([\w -]+)\)/g, `var($1, ${fillDefault})`);
      el.style.stroke = el.style.stroke.replace(/var\(([\w -]+)\)/g, "var($1, #181818)");
      el.style.backgroundColor = el.style.backgroundColor.replace(/var\(([\w -]+)\)/g, "var($1, white)");
      el.style.color = el.style.color.replace(/var\(([\w -]+)\)/g, "var($1, #181818)");
      el.removeAttribute("id");
      el.removeAttribute("class");
      el.removeAttribute("font-family");
    });
    let result = compatContent.innerHTML;
    compatContent.innerHTML = oldContent;
    result = result.replaceAll("<", " <");
    return result;
  }
  async create() {
    var _a2, _b, _c;
    this.titleInfo = await Website.getTitleAndIcon(this.source);
    this.title = this.titleInfo.title;
    this.icon = this.titleInfo.icon;
    if (!this.isConvertable) {
      this.content = (_a2 = await new Path(this.source.path).readFileBuffer()) != null ? _a2 : "";
      this.modifiedTime = this.source.stat.mtime;
      return this;
    }
    if (!this.document)
      return this;
    let webpageWithContent = await this.populateDocument();
    if (!webpageWithContent) {
      if (!MarkdownRendererAPI.checkCancelled())
        ExportLog.error(this.source, "Failed to create webpage");
      return;
    }
    if (this.exportOptions.addHeadTag)
      await this.addHead();
    if (this.exportOptions.addTitle)
      await this.addTitle();
    if (this.exportOptions.addSidebars) {
      let innerContent = this.document.body.innerHTML;
      this.document.body.innerHTML = "";
      let layout = this.generateWebpageLayout(innerContent);
      this.document.body.appendChild(layout.container);
      let rightSidebar = layout.right;
      let leftSidebar = layout.left;
      if (this.exportOptions.addGraphView) {
        GraphView.generateGraphEl(rightSidebar);
      }
      if (this.exportOptions.addOutline) {
        let headerTree = new OutlineTree(this, 1);
        headerTree.class = "outline-tree";
        headerTree.title = "Table Of Contents";
        headerTree.showNestingIndicator = false;
        headerTree.generateWithItemsClosed = this.exportOptions.startOutlineCollapsed === true;
        headerTree.minCollapsableDepth = (_b = this.exportOptions.minOutlineCollapsibleLevel) != null ? _b : 2;
        await headerTree.generateTreeWithContainer(rightSidebar);
      }
      if (this.exportOptions.addThemeToggle) {
        HTMLGeneration.createThemeToggle(layout.leftBar);
      }
      if (this.exportOptions.addSearch) {
        let searchbarHTML = `<div class="search-input-container"><input enterkeyhint="search" type="search" spellcheck="false" placeholder="Search..."><div class="search-input-clear-button" aria-label="Clear search"></div></div>`;
        leftSidebar.createDiv().outerHTML = searchbarHTML;
      }
      if (this.website && this.exportOptions.addFileNavigation) {
        leftSidebar.createDiv().outerHTML = this.website.fileTreeAsset.getHTML(this.exportOptions);
        if (this.exportOptions.openNavFileLocation) {
          let sidebar = leftSidebar.querySelector(".file-tree");
          let unixPath = this.relativePath.copy.makeUnixStyle().asString;
          let fileElement = sidebar == null ? void 0 : sidebar.querySelector(`[href="${unixPath}"]`);
          fileElement = fileElement == null ? void 0 : fileElement.closest(".tree-item");
          while (fileElement) {
            fileElement == null ? void 0 : fileElement.classList.remove("is-collapsed");
            let children = fileElement == null ? void 0 : fileElement.querySelector(".tree-item-children");
            if (children)
              children.style.display = "block";
            fileElement = (_c = fileElement == null ? void 0 : fileElement.parentElement) == null ? void 0 : _c.closest(".tree-item");
          }
        }
      }
    }
    if (this.exportOptions.includeJS) {
      let bodyScript = this.document.body.createEl("script");
      bodyScript.setAttribute("defer", "");
      bodyScript.innerText = AssetHandler.themeLoadJS.content.toString();
      this.document.body.prepend(bodyScript);
    }
    this.content = this.html;
    return this;
  }
  async populateDocument() {
    var _a2;
    if (!this.isConvertable || !this.document)
      return this;
    let body = this.document.body;
    if (this.exportOptions.addBodyClasses)
      body.setAttribute("class", Website.validBodyClasses || await HTMLGeneration.getValidBodyClasses(false));
    let options = { ...this.exportOptions, container: body };
    let renderInfo = await MarkdownRendererAPI.renderFile(this.source, options);
    let contentEl = renderInfo == null ? void 0 : renderInfo.contentEl;
    this.viewType = (_a2 = renderInfo == null ? void 0 : renderInfo.viewType) != null ? _a2 : "markdown";
    if (!contentEl)
      return void 0;
    if (MarkdownRendererAPI.checkCancelled())
      return void 0;
    if (this.viewType == "markdown") {
      contentEl.classList.toggle("allow-fold-headings", this.exportOptions.allowFoldingHeadings);
      contentEl.classList.toggle("allow-fold-lists", this.exportOptions.allowFoldingLists);
      contentEl.classList.add("is-readable-line-width");
    }
    if (this.sizerElement)
      this.sizerElement.style.paddingBottom = "";
    if (this.exportOptions.fixLinks)
      this.convertLinks();
    if (this.exportOptions.addMathjaxStyles) {
      let mathStyleEl = document.createElement("style");
      mathStyleEl.id = "MJX-CHTML-styles";
      await AssetHandler.mathjaxStyles.load(this.exportOptions);
      mathStyleEl.innerHTML = AssetHandler.mathjaxStyles.content;
      this.viewElement.prepend(mathStyleEl);
    }
    let outlinedImages = [];
    if (this.exportOptions.inlineMedia)
      await this.inlineMedia();
    else
      outlinedImages = await this.exportMedia();
    this.dependencies.push(...outlinedImages);
    if (this.exportOptions.webStylePaths) {
      this.dependencies.forEach((file) => {
        var _a3;
        file.filename = Path.toWebStyle(file.filename);
        file.relativeDirectory = (_a3 = file.relativeDirectory) == null ? void 0 : _a3.makeWebStyle();
      });
    }
    return this;
  }
  generateWebpageLayout(middleContent) {
    if (!this.document)
      throw new Error("Document is not defined");
    let collapseSidebarIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="svg-icon"><path d="M21 3H3C1.89543 3 1 3.89543 1 5V19C1 20.1046 1.89543 21 3 21H21C22.1046 21 23 20.1046 23 19V5C23 3.89543 22.1046 3 21 3Z"></path><path d="M10 4V20"></path><path d="M4 7H7"></path><path d="M4 10H7"></path><path d="M4 13H7"></path></svg>`;
    let pageContainer = this.document.createElement("div");
    let leftSidebar = this.document.createElement("div");
    let leftSidebarHandle = this.document.createElement("div");
    let leftContent = this.document.createElement("div");
    let leftTopbar = this.document.createElement("div");
    let leftTopbarContent = this.document.createElement("div");
    let leftCollapseIcon = this.document.createElement("div");
    let documentContainer = this.document.createElement("div");
    let rightSidebar = this.document.createElement("div");
    let rightSidebarHandle = this.document.createElement("div");
    let rightContent = this.document.createElement("div");
    let rightTopbar = this.document.createElement("div");
    let rightTopbarContent = this.document.createElement("div");
    let rightCollapseIcon = this.document.createElement("div");
    pageContainer.setAttribute("class", "webpage-container workspace");
    leftSidebar.setAttribute("class", "sidebar-left sidebar");
    leftSidebarHandle.setAttribute("class", "sidebar-handle");
    leftContent.setAttribute("class", "sidebar-content");
    leftTopbar.setAttribute("class", "sidebar-topbar");
    leftTopbarContent.setAttribute("class", "topbar-content");
    leftCollapseIcon.setAttribute("class", "clickable-icon sidebar-collapse-icon");
    documentContainer.setAttribute("class", "document-container markdown-reading-view");
    if (this.exportOptions.includeJS)
      documentContainer.classList.add("hide");
    rightSidebar.setAttribute("class", "sidebar-right sidebar");
    rightSidebarHandle.setAttribute("class", "sidebar-handle");
    rightContent.setAttribute("class", "sidebar-content");
    rightTopbar.setAttribute("class", "sidebar-topbar");
    rightTopbarContent.setAttribute("class", "topbar-content");
    rightCollapseIcon.setAttribute("class", "clickable-icon sidebar-collapse-icon");
    pageContainer.appendChild(leftSidebar);
    pageContainer.appendChild(documentContainer);
    pageContainer.appendChild(rightSidebar);
    if (this.exportOptions.allowResizeSidebars && this.exportOptions.includeJS)
      leftSidebar.appendChild(leftSidebarHandle);
    leftSidebar.appendChild(leftTopbar);
    leftSidebar.appendChild(leftContent);
    leftTopbar.appendChild(leftTopbarContent);
    leftTopbar.appendChild(leftCollapseIcon);
    leftCollapseIcon.innerHTML = collapseSidebarIcon;
    documentContainer.innerHTML += middleContent instanceof HTMLElement ? middleContent.outerHTML : middleContent.toString();
    if (this.exportOptions.allowResizeSidebars && this.exportOptions.includeJS)
      rightSidebar.appendChild(rightSidebarHandle);
    rightSidebar.appendChild(rightTopbar);
    rightSidebar.appendChild(rightContent);
    rightTopbar.appendChild(rightTopbarContent);
    rightTopbar.appendChild(rightCollapseIcon);
    rightCollapseIcon.innerHTML = collapseSidebarIcon;
    let leftSidebarScript = leftSidebar.createEl("script");
    let rightSidebarScript = rightSidebar.createEl("script");
    leftSidebarScript.setAttribute("defer", "");
    rightSidebarScript.setAttribute("defer", "");
    leftSidebarScript.innerHTML = `let ls = document.querySelector(".sidebar-left"); ls.classList.add("is-collapsed"); if (window.innerWidth > 768) ls.classList.remove("is-collapsed"); ls.style.setProperty("--sidebar-width", localStorage.getItem("sidebar-left-width"));`;
    rightSidebarScript.innerHTML = `let rs = document.querySelector(".sidebar-right"); rs.classList.add("is-collapsed"); if (window.innerWidth > 768) rs.classList.remove("is-collapsed"); rs.style.setProperty("--sidebar-width", localStorage.getItem("sidebar-right-width"));`;
    return { container: pageContainer, left: leftContent, leftBar: leftTopbarContent, right: rightContent, rightBar: rightTopbarContent, center: documentContainer };
  }
  async addTitle() {
    var _a2, _b, _c, _d, _e, _f, _g, _h;
    if (!this.document || !this.sizerElement || this.viewType != "markdown")
      return;
    let inlineTitle = this.document.querySelector(".inline-title");
    inlineTitle == null ? void 0 : inlineTitle.remove();
    let makeTitle = this.document.querySelector(".mk-inline-context");
    makeTitle == null ? void 0 : makeTitle.remove();
    let modHeader = this.document.querySelector(".mod-header");
    modHeader == null ? void 0 : modHeader.remove();
    let firstHeader = this.document.querySelector(":is(h1, h2, h3, h4, h5, h6):not(.markdown-embed-content *)");
    if (firstHeader) {
      let firstHeaderText = (_c = (_b = (_a2 = firstHeader.getAttribute("data-heading")) != null ? _a2 : firstHeader.textContent) == null ? void 0 : _b.toLowerCase()) != null ? _c : "";
      let lowerTitle = this.title.toLowerCase();
      let titleDiff = Utils.levenshteinDistance(firstHeaderText, lowerTitle) / lowerTitle.length;
      let basenameDiff = Utils.levenshteinDistance(firstHeaderText, this.source.basename.toLowerCase()) / this.source.basename.length;
      let difference = Math.min(titleDiff, basenameDiff);
      if (firstHeader.tagName == "H1" && difference < 0.2 || firstHeader.tagName == "H2" && difference < 0.1) {
        if (this.titleInfo.isDefaultTitle) {
          (_d = firstHeader.querySelector(".heading-collapse-indicator")) == null ? void 0 : _d.remove();
          this.title = firstHeader.innerHTML;
          ExportLog.log(`Using "${firstHeaderText}" header because it was very similar to the file's title.`);
        } else {
          ExportLog.log(`Replacing "${firstHeaderText}" header because it was very similar to the file's title.`);
        }
        firstHeader.remove();
      } else if (firstHeader.tagName == "H1") {
        let headerEl = (_e = firstHeader.closest(".heading-wrapper")) != null ? _e : firstHeader;
        let headerParent = headerEl.parentElement;
        if (headerParent && headerParent.classList.contains("markdown-preview-sizer")) {
          let childPosition = Array.from(headerParent.children).indexOf(headerEl);
          if (childPosition <= 2) {
            if (this.titleInfo.isDefaultTitle) {
              (_f = firstHeader.querySelector(".heading-collapse-indicator")) == null ? void 0 : _f.remove();
              this.title = firstHeader.innerHTML;
              ExportLog.log(`Using "${firstHeaderText}" header as title because it was H1 at the top of the page`);
            } else {
              ExportLog.log(`Replacing "${firstHeaderText}" header because it was H1 at the top of the page`);
            }
            firstHeader.remove();
          }
        }
      }
    }
    (_g = this.document.querySelector(".banner-header")) == null ? void 0 : _g.remove();
    let titleEl = this.document.createElement("h1");
    titleEl.classList.add("page-title", "heading");
    if ((_h = this.document) == null ? void 0 : _h.body.classList.contains("show-inline-title"))
      titleEl.classList.add("inline-title");
    titleEl.id = this.title;
    let pageIcon = void 0;
    if (this.icon != "" && !this.titleInfo.isDefaultIcon) {
      pageIcon = this.document.createElement("div");
      pageIcon.id = "webpage-icon";
    }
    MarkdownRendererAPI.renderMarkdownSimpleEl(this.title, titleEl);
    if (pageIcon) {
      MarkdownRendererAPI.renderMarkdownSimpleEl(this.icon, pageIcon);
      titleEl.prepend(pageIcon);
    }
    this.sizerElement.prepend(titleEl);
  }
  async addHead() {
    var _a2, _b, _c;
    if (!this.document)
      return;
    let rootPath = this.pathToRoot.copy.makeWebStyle(this.exportOptions.webStylePaths).asString;
    let description = this.description || this.exportOptions.siteName + " - " + this.titleInfo.title;
    let head = `
		<title>${this.titleInfo.title}</title>
		<base href="${rootPath}/">
		<meta id="root-path" root-path="${rootPath}/">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes, minimum-scale=1.0, maximum-scale=5.0">
		<meta charset="UTF-8">
		<meta name="description" content="${description}">
		<meta property="og:title" content="${this.titleInfo.title}">
		<meta property="og:description" content="${description}">
		<meta property="og:type" content="website">
		<meta property="og:url" content="${this.fullURL}">
		<meta property="og:image" content="${this.metadataImageURL}">
		<meta property="og:site_name" content="${this.exportOptions.siteName}">
		`;
    if (this.author && this.author != "") {
      head += `<meta name="author" content="${this.author}">`;
    }
    if (this.exportOptions.addRSS) {
      let rssURL = Path.joinStrings((_a2 = this.exportOptions.siteURL) != null ? _a2 : "", (_c = (_b = this.website) == null ? void 0 : _b.rssPath) != null ? _c : "").makeUnixStyle().asString;
      head += `<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="${rssURL}">`;
    }
    head += AssetHandler.getHeadReferences(this.exportOptions);
    this.document.head.innerHTML = head;
  }
  convertLinks() {
    if (!this.document)
      return;
    this.document.querySelectorAll("a.internal-link").forEach((linkEl) => {
      linkEl.setAttribute("target", "_self");
      let href = linkEl.getAttribute("href");
      if (!href)
        return;
      if (href.startsWith("#")) {
        linkEl.setAttribute("href", href.replaceAll(" ", "_"));
      } else {
        let targetHeader = href.split("#").length > 1 ? "#" + href.split("#")[1] : "";
        let target = href.split("#")[0];
        let targetFile = app.metadataCache.getFirstLinkpathDest(target, this.source.path);
        if (!targetFile)
          return;
        let targetPath = new Path(targetFile.path);
        if (MarkdownRendererAPI.isConvertable(targetPath.extensionName))
          targetPath.setExtension("html");
        targetPath.makeWebStyle(this.exportOptions.webStylePaths);
        let finalHref = targetPath.makeUnixStyle() + targetHeader.replaceAll(" ", "_");
        linkEl.setAttribute("href", finalHref);
      }
    });
    this.document.querySelectorAll("a.footnote-link").forEach((linkEl) => {
      linkEl.setAttribute("target", "_self");
    });
    this.document.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach((headerEl) => {
      var _a2, _b, _c;
      headerEl.setAttribute("id", (_c = (_b = (_a2 = headerEl.getAttribute("data-heading")) != null ? _a2 : headerEl.textContent) == null ? void 0 : _b.replaceAll(" ", "_")) != null ? _c : "");
    });
  }
  async inlineMedia() {
    var _a2, _b, _c;
    if (!this.document)
      return;
    let elements = Array.from(this.document.querySelectorAll("[src]:not(head [src])"));
    for (let mediaEl of elements) {
      let rawSrc = (_a2 = mediaEl.getAttribute("src")) != null ? _a2 : "";
      let filePath = Webpage.getMediaPath(rawSrc, this.source.path);
      if (filePath.isEmpty || filePath.isDirectory || filePath.isAbsolute)
        continue;
      let base64 = (_b = await filePath.readFileString("base64")) != null ? _b : "";
      if (base64 === "")
        return;
      let ext = filePath.extensionName;
      let type = (_c = app.viewRegistry.typeByExtension[ext]) != null ? _c : "audio";
      if (ext === "svg")
        ext += "+xml";
      mediaEl.setAttribute("src", `data:${type}/${ext};base64,${base64}`);
    }
    ;
  }
  async exportMedia() {
    var _a2;
    if (!this.document)
      return [];
    let downloads = [];
    let elements = Array.from(this.document.querySelectorAll("[src]:not(head [src]):not(span)"));
    for (let mediaEl of elements) {
      let rawSrc = (_a2 = mediaEl.getAttribute("src")) != null ? _a2 : "";
      let filePath = Webpage.getMediaPath(rawSrc, this.source.path);
      if (filePath.isEmpty || filePath.isDirectory || filePath.isAbsolute || MarkdownRendererAPI.isConvertable(filePath.extension))
        continue;
      let exportLocation = filePath.copy;
      let sourceFolder = new Path(this.source.path).directory;
      let mediaPathInExport = Path.getRelativePath(sourceFolder, filePath);
      if (mediaPathInExport.asString.startsWith("..")) {
        exportLocation = AssetHandler.mediaPath.joinString(filePath.fullName);
      }
      exportLocation = exportLocation.makeWebStyle(this.exportOptions.webStylePaths).makeUnixStyle();
      mediaEl.setAttribute("src", exportLocation.asString);
      let data = await filePath.readFileBuffer();
      if (data) {
        let imageDownload = new Downloadable(exportLocation.fullName, data, exportLocation.directory.makeForceFolder());
        let imageStat = filePath.stat;
        if (imageStat)
          imageDownload.modifiedTime = imageStat.mtimeMs;
        downloads.push(imageDownload);
      }
    }
    ;
    return downloads;
  }
  static getMediaPath(src, exportingFilePath) {
    var _a2, _b, _c, _d;
    let pathString = "";
    if (src.startsWith("app://")) {
      let fail = false;
      try {
        pathString = (_b = (_a2 = app.vault.resolveFileUrl(src)) == null ? void 0 : _a2.path) != null ? _b : "";
        if (pathString == "")
          fail = true;
      } catch (e) {
        fail = true;
      }
      if (fail) {
        pathString = src.replaceAll("app://", "").replaceAll("\\", "/");
        pathString = pathString.replaceAll(pathString.split("/")[0] + "/", "");
        pathString = Path.getRelativePathFromVault(new Path(pathString), true).asString;
        ExportLog.log(pathString, "Fallback path parsing:");
      }
    } else {
      pathString = (_d = (_c = app.metadataCache.getFirstLinkpathDest(src, exportingFilePath)) == null ? void 0 : _c.path) != null ? _d : "";
    }
    pathString = pathString != null ? pathString : "";
    return new Path(pathString);
  }
};

// scripts/objects/website.ts
var import_obsidian2 = require("obsidian");

// node_modules/minisearch/dist/es/index.js
var __assign = function() {
  __assign = Object.assign || function __assign2(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];
      for (var p in s)
        if (Object.prototype.hasOwnProperty.call(s, p))
          t[p] = s[p];
    }
    return t;
  };
  return __assign.apply(this, arguments);
};
function __awaiter(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function(resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator(thisArg, body) {
  var _ = { label: 0, sent: function() {
    if (t[0] & 1)
      throw t[1];
    return t[1];
  }, trys: [], ops: [] }, f, y, t, g;
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f)
      throw new TypeError("Generator is already executing.");
    while (g && (g = 0, op[0] && (_ = 0)), _)
      try {
        if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
          return t;
        if (y = 0, t)
          op = [op[0] & 2, t.value];
        switch (op[0]) {
          case 0:
          case 1:
            t = op;
            break;
          case 4:
            _.label++;
            return { value: op[1], done: false };
          case 5:
            _.label++;
            y = op[1];
            op = [0];
            continue;
          case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;
          default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
              _ = 0;
              continue;
            }
            if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (op[0] === 6 && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            if (t[2])
              _.ops.pop();
            _.trys.pop();
            continue;
        }
        op = body.call(thisArg, _);
      } catch (e) {
        op = [6, e];
        y = 0;
      } finally {
        f = t = 0;
      }
    if (op[0] & 5)
      throw op[1];
    return { value: op[0] ? op[1] : void 0, done: true };
  }
}
function __values(o) {
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  if (m)
    return m.call(o);
  if (o && typeof o.length === "number")
    return {
      next: function() {
        if (o && i >= o.length)
          o = void 0;
        return { value: o && o[i++], done: !o };
      }
    };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m)
    return o;
  var i = m.call(o), r, ar = [], e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
      ar.push(r.value);
  } catch (error) {
    e = { error };
  } finally {
    try {
      if (r && !r.done && (m = i["return"]))
        m.call(i);
    } finally {
      if (e)
        throw e.error;
    }
  }
  return ar;
}
var ENTRIES = "ENTRIES";
var KEYS = "KEYS";
var VALUES = "VALUES";
var LEAF = "";
var TreeIterator = function() {
  function TreeIterator2(set, type) {
    var node = set._tree;
    var keys = Array.from(node.keys());
    this.set = set;
    this._type = type;
    this._path = keys.length > 0 ? [{ node, keys }] : [];
  }
  TreeIterator2.prototype.next = function() {
    var value = this.dive();
    this.backtrack();
    return value;
  };
  TreeIterator2.prototype.dive = function() {
    if (this._path.length === 0) {
      return { done: true, value: void 0 };
    }
    var _a2 = last$1(this._path), node = _a2.node, keys = _a2.keys;
    if (last$1(keys) === LEAF) {
      return { done: false, value: this.result() };
    }
    var child = node.get(last$1(keys));
    this._path.push({ node: child, keys: Array.from(child.keys()) });
    return this.dive();
  };
  TreeIterator2.prototype.backtrack = function() {
    if (this._path.length === 0) {
      return;
    }
    var keys = last$1(this._path).keys;
    keys.pop();
    if (keys.length > 0) {
      return;
    }
    this._path.pop();
    this.backtrack();
  };
  TreeIterator2.prototype.key = function() {
    return this.set._prefix + this._path.map(function(_a2) {
      var keys = _a2.keys;
      return last$1(keys);
    }).filter(function(key) {
      return key !== LEAF;
    }).join("");
  };
  TreeIterator2.prototype.value = function() {
    return last$1(this._path).node.get(LEAF);
  };
  TreeIterator2.prototype.result = function() {
    switch (this._type) {
      case VALUES:
        return this.value();
      case KEYS:
        return this.key();
      default:
        return [this.key(), this.value()];
    }
  };
  TreeIterator2.prototype[Symbol.iterator] = function() {
    return this;
  };
  return TreeIterator2;
}();
var last$1 = function(array) {
  return array[array.length - 1];
};
var fuzzySearch = function(node, query, maxDistance) {
  var results = /* @__PURE__ */ new Map();
  if (query === void 0)
    return results;
  var n = query.length + 1;
  var m = n + maxDistance;
  var matrix = new Uint8Array(m * n).fill(maxDistance + 1);
  for (var j = 0; j < n; ++j)
    matrix[j] = j;
  for (var i = 1; i < m; ++i)
    matrix[i * n] = i;
  recurse(node, query, maxDistance, results, matrix, 1, n, "");
  return results;
};
var recurse = function(node, query, maxDistance, results, matrix, m, n, prefix) {
  var e_1, _a2;
  var offset = m * n;
  try {
    key:
      for (var _b = __values(node.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
        var key = _c.value;
        if (key === LEAF) {
          var distance = matrix[offset - 1];
          if (distance <= maxDistance) {
            results.set(prefix, [node.get(key), distance]);
          }
        } else {
          var i = m;
          for (var pos = 0; pos < key.length; ++pos, ++i) {
            var char = key[pos];
            var thisRowOffset = n * i;
            var prevRowOffset = thisRowOffset - n;
            var minDistance = matrix[thisRowOffset];
            var jmin = Math.max(0, i - maxDistance - 1);
            var jmax = Math.min(n - 1, i + maxDistance);
            for (var j = jmin; j < jmax; ++j) {
              var different = char !== query[j];
              var rpl = matrix[prevRowOffset + j] + +different;
              var del = matrix[prevRowOffset + j + 1] + 1;
              var ins = matrix[thisRowOffset + j] + 1;
              var dist = matrix[thisRowOffset + j + 1] = Math.min(rpl, del, ins);
              if (dist < minDistance)
                minDistance = dist;
            }
            if (minDistance > maxDistance) {
              continue key;
            }
          }
          recurse(node.get(key), query, maxDistance, results, matrix, i, n, prefix + key);
        }
      }
  } catch (e_1_1) {
    e_1 = { error: e_1_1 };
  } finally {
    try {
      if (_c && !_c.done && (_a2 = _b.return))
        _a2.call(_b);
    } finally {
      if (e_1)
        throw e_1.error;
    }
  }
};
var SearchableMap = function() {
  function SearchableMap2(tree, prefix) {
    if (tree === void 0) {
      tree = /* @__PURE__ */ new Map();
    }
    if (prefix === void 0) {
      prefix = "";
    }
    this._size = void 0;
    this._tree = tree;
    this._prefix = prefix;
  }
  SearchableMap2.prototype.atPrefix = function(prefix) {
    var e_1, _a2;
    if (!prefix.startsWith(this._prefix)) {
      throw new Error("Mismatched prefix");
    }
    var _b = __read(trackDown(this._tree, prefix.slice(this._prefix.length)), 2), node = _b[0], path = _b[1];
    if (node === void 0) {
      var _c = __read(last(path), 2), parentNode = _c[0], key = _c[1];
      try {
        for (var _d = __values(parentNode.keys()), _e = _d.next(); !_e.done; _e = _d.next()) {
          var k = _e.value;
          if (k !== LEAF && k.startsWith(key)) {
            var node_1 = /* @__PURE__ */ new Map();
            node_1.set(k.slice(key.length), parentNode.get(k));
            return new SearchableMap2(node_1, prefix);
          }
        }
      } catch (e_1_1) {
        e_1 = { error: e_1_1 };
      } finally {
        try {
          if (_e && !_e.done && (_a2 = _d.return))
            _a2.call(_d);
        } finally {
          if (e_1)
            throw e_1.error;
        }
      }
    }
    return new SearchableMap2(node, prefix);
  };
  SearchableMap2.prototype.clear = function() {
    this._size = void 0;
    this._tree.clear();
  };
  SearchableMap2.prototype.delete = function(key) {
    this._size = void 0;
    return remove(this._tree, key);
  };
  SearchableMap2.prototype.entries = function() {
    return new TreeIterator(this, ENTRIES);
  };
  SearchableMap2.prototype.forEach = function(fn) {
    var e_2, _a2;
    try {
      for (var _b = __values(this), _c = _b.next(); !_c.done; _c = _b.next()) {
        var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
        fn(key, value, this);
      }
    } catch (e_2_1) {
      e_2 = { error: e_2_1 };
    } finally {
      try {
        if (_c && !_c.done && (_a2 = _b.return))
          _a2.call(_b);
      } finally {
        if (e_2)
          throw e_2.error;
      }
    }
  };
  SearchableMap2.prototype.fuzzyGet = function(key, maxEditDistance) {
    return fuzzySearch(this._tree, key, maxEditDistance);
  };
  SearchableMap2.prototype.get = function(key) {
    var node = lookup(this._tree, key);
    return node !== void 0 ? node.get(LEAF) : void 0;
  };
  SearchableMap2.prototype.has = function(key) {
    var node = lookup(this._tree, key);
    return node !== void 0 && node.has(LEAF);
  };
  SearchableMap2.prototype.keys = function() {
    return new TreeIterator(this, KEYS);
  };
  SearchableMap2.prototype.set = function(key, value) {
    if (typeof key !== "string") {
      throw new Error("key must be a string");
    }
    this._size = void 0;
    var node = createPath(this._tree, key);
    node.set(LEAF, value);
    return this;
  };
  Object.defineProperty(SearchableMap2.prototype, "size", {
    get: function() {
      if (this._size) {
        return this._size;
      }
      this._size = 0;
      var iter = this.entries();
      while (!iter.next().done)
        this._size += 1;
      return this._size;
    },
    enumerable: false,
    configurable: true
  });
  SearchableMap2.prototype.update = function(key, fn) {
    if (typeof key !== "string") {
      throw new Error("key must be a string");
    }
    this._size = void 0;
    var node = createPath(this._tree, key);
    node.set(LEAF, fn(node.get(LEAF)));
    return this;
  };
  SearchableMap2.prototype.fetch = function(key, initial) {
    if (typeof key !== "string") {
      throw new Error("key must be a string");
    }
    this._size = void 0;
    var node = createPath(this._tree, key);
    var value = node.get(LEAF);
    if (value === void 0) {
      node.set(LEAF, value = initial());
    }
    return value;
  };
  SearchableMap2.prototype.values = function() {
    return new TreeIterator(this, VALUES);
  };
  SearchableMap2.prototype[Symbol.iterator] = function() {
    return this.entries();
  };
  SearchableMap2.from = function(entries) {
    var e_3, _a2;
    var tree = new SearchableMap2();
    try {
      for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
        var _b = __read(entries_1_1.value, 2), key = _b[0], value = _b[1];
        tree.set(key, value);
      }
    } catch (e_3_1) {
      e_3 = { error: e_3_1 };
    } finally {
      try {
        if (entries_1_1 && !entries_1_1.done && (_a2 = entries_1.return))
          _a2.call(entries_1);
      } finally {
        if (e_3)
          throw e_3.error;
      }
    }
    return tree;
  };
  SearchableMap2.fromObject = function(object) {
    return SearchableMap2.from(Object.entries(object));
  };
  return SearchableMap2;
}();
var trackDown = function(tree, key, path) {
  var e_4, _a2;
  if (path === void 0) {
    path = [];
  }
  if (key.length === 0 || tree == null) {
    return [tree, path];
  }
  try {
    for (var _b = __values(tree.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
      var k = _c.value;
      if (k !== LEAF && key.startsWith(k)) {
        path.push([tree, k]);
        return trackDown(tree.get(k), key.slice(k.length), path);
      }
    }
  } catch (e_4_1) {
    e_4 = { error: e_4_1 };
  } finally {
    try {
      if (_c && !_c.done && (_a2 = _b.return))
        _a2.call(_b);
    } finally {
      if (e_4)
        throw e_4.error;
    }
  }
  path.push([tree, key]);
  return trackDown(void 0, "", path);
};
var lookup = function(tree, key) {
  var e_5, _a2;
  if (key.length === 0 || tree == null) {
    return tree;
  }
  try {
    for (var _b = __values(tree.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
      var k = _c.value;
      if (k !== LEAF && key.startsWith(k)) {
        return lookup(tree.get(k), key.slice(k.length));
      }
    }
  } catch (e_5_1) {
    e_5 = { error: e_5_1 };
  } finally {
    try {
      if (_c && !_c.done && (_a2 = _b.return))
        _a2.call(_b);
    } finally {
      if (e_5)
        throw e_5.error;
    }
  }
};
var createPath = function(node, key) {
  var e_6, _a2;
  var keyLength = key.length;
  outer:
    for (var pos = 0; node && pos < keyLength; ) {
      try {
        for (var _b = (e_6 = void 0, __values(node.keys())), _c = _b.next(); !_c.done; _c = _b.next()) {
          var k = _c.value;
          if (k !== LEAF && key[pos] === k[0]) {
            var len = Math.min(keyLength - pos, k.length);
            var offset = 1;
            while (offset < len && key[pos + offset] === k[offset])
              ++offset;
            var child_1 = node.get(k);
            if (offset === k.length) {
              node = child_1;
            } else {
              var intermediate = /* @__PURE__ */ new Map();
              intermediate.set(k.slice(offset), child_1);
              node.set(key.slice(pos, pos + offset), intermediate);
              node.delete(k);
              node = intermediate;
            }
            pos += offset;
            continue outer;
          }
        }
      } catch (e_6_1) {
        e_6 = { error: e_6_1 };
      } finally {
        try {
          if (_c && !_c.done && (_a2 = _b.return))
            _a2.call(_b);
        } finally {
          if (e_6)
            throw e_6.error;
        }
      }
      var child = /* @__PURE__ */ new Map();
      node.set(key.slice(pos), child);
      return child;
    }
  return node;
};
var remove = function(tree, key) {
  var _a2 = __read(trackDown(tree, key), 2), node = _a2[0], path = _a2[1];
  if (node === void 0) {
    return;
  }
  node.delete(LEAF);
  if (node.size === 0) {
    cleanup(path);
  } else if (node.size === 1) {
    var _b = __read(node.entries().next().value, 2), key_1 = _b[0], value = _b[1];
    merge(path, key_1, value);
  }
};
var cleanup = function(path) {
  if (path.length === 0) {
    return;
  }
  var _a2 = __read(last(path), 2), node = _a2[0], key = _a2[1];
  node.delete(key);
  if (node.size === 0) {
    cleanup(path.slice(0, -1));
  } else if (node.size === 1) {
    var _b = __read(node.entries().next().value, 2), key_2 = _b[0], value = _b[1];
    if (key_2 !== LEAF) {
      merge(path.slice(0, -1), key_2, value);
    }
  }
};
var merge = function(path, key, value) {
  if (path.length === 0) {
    return;
  }
  var _a2 = __read(last(path), 2), node = _a2[0], nodeKey = _a2[1];
  node.set(nodeKey + key, value);
  node.delete(nodeKey);
};
var last = function(array) {
  return array[array.length - 1];
};
var _a;
var OR = "or";
var AND = "and";
var AND_NOT = "and_not";
var MiniSearch = function() {
  function MiniSearch2(options) {
    if ((options === null || options === void 0 ? void 0 : options.fields) == null) {
      throw new Error('MiniSearch: option "fields" must be provided');
    }
    var autoVacuum = options.autoVacuum == null || options.autoVacuum === true ? defaultAutoVacuumOptions : options.autoVacuum;
    this._options = __assign(__assign(__assign({}, defaultOptions), options), { autoVacuum, searchOptions: __assign(__assign({}, defaultSearchOptions), options.searchOptions || {}), autoSuggestOptions: __assign(__assign({}, defaultAutoSuggestOptions), options.autoSuggestOptions || {}) });
    this._index = new SearchableMap();
    this._documentCount = 0;
    this._documentIds = /* @__PURE__ */ new Map();
    this._idToShortId = /* @__PURE__ */ new Map();
    this._fieldIds = {};
    this._fieldLength = /* @__PURE__ */ new Map();
    this._avgFieldLength = [];
    this._nextId = 0;
    this._storedFields = /* @__PURE__ */ new Map();
    this._dirtCount = 0;
    this._currentVacuum = null;
    this._enqueuedVacuum = null;
    this._enqueuedVacuumConditions = defaultVacuumConditions;
    this.addFields(this._options.fields);
  }
  MiniSearch2.prototype.add = function(document2) {
    var e_1, _a2, e_2, _b, e_3, _c;
    var _d = this._options, extractField = _d.extractField, tokenize = _d.tokenize, processTerm = _d.processTerm, fields = _d.fields, idField = _d.idField;
    var id = extractField(document2, idField);
    if (id == null) {
      throw new Error('MiniSearch: document does not have ID field "'.concat(idField, '"'));
    }
    if (this._idToShortId.has(id)) {
      throw new Error("MiniSearch: duplicate ID ".concat(id));
    }
    var shortDocumentId = this.addDocumentId(id);
    this.saveStoredFields(shortDocumentId, document2);
    try {
      for (var fields_1 = __values(fields), fields_1_1 = fields_1.next(); !fields_1_1.done; fields_1_1 = fields_1.next()) {
        var field = fields_1_1.value;
        var fieldValue = extractField(document2, field);
        if (fieldValue == null)
          continue;
        var tokens = tokenize(fieldValue.toString(), field);
        var fieldId = this._fieldIds[field];
        var uniqueTerms = new Set(tokens).size;
        this.addFieldLength(shortDocumentId, fieldId, this._documentCount - 1, uniqueTerms);
        try {
          for (var tokens_1 = (e_2 = void 0, __values(tokens)), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) {
            var term = tokens_1_1.value;
            var processedTerm = processTerm(term, field);
            if (Array.isArray(processedTerm)) {
              try {
                for (var processedTerm_1 = (e_3 = void 0, __values(processedTerm)), processedTerm_1_1 = processedTerm_1.next(); !processedTerm_1_1.done; processedTerm_1_1 = processedTerm_1.next()) {
                  var t = processedTerm_1_1.value;
                  this.addTerm(fieldId, shortDocumentId, t);
                }
              } catch (e_3_1) {
                e_3 = { error: e_3_1 };
              } finally {
                try {
                  if (processedTerm_1_1 && !processedTerm_1_1.done && (_c = processedTerm_1.return))
                    _c.call(processedTerm_1);
                } finally {
                  if (e_3)
                    throw e_3.error;
                }
              }
            } else if (processedTerm) {
              this.addTerm(fieldId, shortDocumentId, processedTerm);
            }
          }
        } catch (e_2_1) {
          e_2 = { error: e_2_1 };
        } finally {
          try {
            if (tokens_1_1 && !tokens_1_1.done && (_b = tokens_1.return))
              _b.call(tokens_1);
          } finally {
            if (e_2)
              throw e_2.error;
          }
        }
      }
    } catch (e_1_1) {
      e_1 = { error: e_1_1 };
    } finally {
      try {
        if (fields_1_1 && !fields_1_1.done && (_a2 = fields_1.return))
          _a2.call(fields_1);
      } finally {
        if (e_1)
          throw e_1.error;
      }
    }
  };
  MiniSearch2.prototype.addAll = function(documents) {
    var e_4, _a2;
    try {
      for (var documents_1 = __values(documents), documents_1_1 = documents_1.next(); !documents_1_1.done; documents_1_1 = documents_1.next()) {
        var document_1 = documents_1_1.value;
        this.add(document_1);
      }
    } catch (e_4_1) {
      e_4 = { error: e_4_1 };
    } finally {
      try {
        if (documents_1_1 && !documents_1_1.done && (_a2 = documents_1.return))
          _a2.call(documents_1);
      } finally {
        if (e_4)
          throw e_4.error;
      }
    }
  };
  MiniSearch2.prototype.addAllAsync = function(documents, options) {
    var _this = this;
    if (options === void 0) {
      options = {};
    }
    var _a2 = options.chunkSize, chunkSize = _a2 === void 0 ? 10 : _a2;
    var acc = { chunk: [], promise: Promise.resolve() };
    var _b = documents.reduce(function(_a3, document2, i) {
      var chunk2 = _a3.chunk, promise2 = _a3.promise;
      chunk2.push(document2);
      if ((i + 1) % chunkSize === 0) {
        return {
          chunk: [],
          promise: promise2.then(function() {
            return new Promise(function(resolve) {
              return setTimeout(resolve, 0);
            });
          }).then(function() {
            return _this.addAll(chunk2);
          })
        };
      } else {
        return { chunk: chunk2, promise: promise2 };
      }
    }, acc), chunk = _b.chunk, promise = _b.promise;
    return promise.then(function() {
      return _this.addAll(chunk);
    });
  };
  MiniSearch2.prototype.remove = function(document2) {
    var e_5, _a2, e_6, _b, e_7, _c;
    var _d = this._options, tokenize = _d.tokenize, processTerm = _d.processTerm, extractField = _d.extractField, fields = _d.fields, idField = _d.idField;
    var id = extractField(document2, idField);
    if (id == null) {
      throw new Error('MiniSearch: document does not have ID field "'.concat(idField, '"'));
    }
    var shortId = this._idToShortId.get(id);
    if (shortId == null) {
      throw new Error("MiniSearch: cannot remove document with ID ".concat(id, ": it is not in the index"));
    }
    try {
      for (var fields_2 = __values(fields), fields_2_1 = fields_2.next(); !fields_2_1.done; fields_2_1 = fields_2.next()) {
        var field = fields_2_1.value;
        var fieldValue = extractField(document2, field);
        if (fieldValue == null)
          continue;
        var tokens = tokenize(fieldValue.toString(), field);
        var fieldId = this._fieldIds[field];
        var uniqueTerms = new Set(tokens).size;
        this.removeFieldLength(shortId, fieldId, this._documentCount, uniqueTerms);
        try {
          for (var tokens_2 = (e_6 = void 0, __values(tokens)), tokens_2_1 = tokens_2.next(); !tokens_2_1.done; tokens_2_1 = tokens_2.next()) {
            var term = tokens_2_1.value;
            var processedTerm = processTerm(term, field);
            if (Array.isArray(processedTerm)) {
              try {
                for (var processedTerm_2 = (e_7 = void 0, __values(processedTerm)), processedTerm_2_1 = processedTerm_2.next(); !processedTerm_2_1.done; processedTerm_2_1 = processedTerm_2.next()) {
                  var t = processedTerm_2_1.value;
                  this.removeTerm(fieldId, shortId, t);
                }
              } catch (e_7_1) {
                e_7 = { error: e_7_1 };
              } finally {
                try {
                  if (processedTerm_2_1 && !processedTerm_2_1.done && (_c = processedTerm_2.return))
                    _c.call(processedTerm_2);
                } finally {
                  if (e_7)
                    throw e_7.error;
                }
              }
            } else if (processedTerm) {
              this.removeTerm(fieldId, shortId, processedTerm);
            }
          }
        } catch (e_6_1) {
          e_6 = { error: e_6_1 };
        } finally {
          try {
            if (tokens_2_1 && !tokens_2_1.done && (_b = tokens_2.return))
              _b.call(tokens_2);
          } finally {
            if (e_6)
              throw e_6.error;
          }
        }
      }
    } catch (e_5_1) {
      e_5 = { error: e_5_1 };
    } finally {
      try {
        if (fields_2_1 && !fields_2_1.done && (_a2 = fields_2.return))
          _a2.call(fields_2);
      } finally {
        if (e_5)
          throw e_5.error;
      }
    }
    this._storedFields.delete(shortId);
    this._documentIds.delete(shortId);
    this._idToShortId.delete(id);
    this._fieldLength.delete(shortId);
    this._documentCount -= 1;
  };
  MiniSearch2.prototype.removeAll = function(documents) {
    var e_8, _a2;
    if (documents) {
      try {
        for (var documents_2 = __values(documents), documents_2_1 = documents_2.next(); !documents_2_1.done; documents_2_1 = documents_2.next()) {
          var document_2 = documents_2_1.value;
          this.remove(document_2);
        }
      } catch (e_8_1) {
        e_8 = { error: e_8_1 };
      } finally {
        try {
          if (documents_2_1 && !documents_2_1.done && (_a2 = documents_2.return))
            _a2.call(documents_2);
        } finally {
          if (e_8)
            throw e_8.error;
        }
      }
    } else if (arguments.length > 0) {
      throw new Error("Expected documents to be present. Omit the argument to remove all documents.");
    } else {
      this._index = new SearchableMap();
      this._documentCount = 0;
      this._documentIds = /* @__PURE__ */ new Map();
      this._idToShortId = /* @__PURE__ */ new Map();
      this._fieldLength = /* @__PURE__ */ new Map();
      this._avgFieldLength = [];
      this._storedFields = /* @__PURE__ */ new Map();
      this._nextId = 0;
    }
  };
  MiniSearch2.prototype.discard = function(id) {
    var _this = this;
    var shortId = this._idToShortId.get(id);
    if (shortId == null) {
      throw new Error("MiniSearch: cannot discard document with ID ".concat(id, ": it is not in the index"));
    }
    this._idToShortId.delete(id);
    this._documentIds.delete(shortId);
    this._storedFields.delete(shortId);
    (this._fieldLength.get(shortId) || []).forEach(function(fieldLength, fieldId) {
      _this.removeFieldLength(shortId, fieldId, _this._documentCount, fieldLength);
    });
    this._fieldLength.delete(shortId);
    this._documentCount -= 1;
    this._dirtCount += 1;
    this.maybeAutoVacuum();
  };
  MiniSearch2.prototype.maybeAutoVacuum = function() {
    if (this._options.autoVacuum === false) {
      return;
    }
    var _a2 = this._options.autoVacuum, minDirtFactor = _a2.minDirtFactor, minDirtCount = _a2.minDirtCount, batchSize = _a2.batchSize, batchWait = _a2.batchWait;
    this.conditionalVacuum({ batchSize, batchWait }, { minDirtCount, minDirtFactor });
  };
  MiniSearch2.prototype.discardAll = function(ids) {
    var e_9, _a2;
    var autoVacuum = this._options.autoVacuum;
    try {
      this._options.autoVacuum = false;
      try {
        for (var ids_1 = __values(ids), ids_1_1 = ids_1.next(); !ids_1_1.done; ids_1_1 = ids_1.next()) {
          var id = ids_1_1.value;
          this.discard(id);
        }
      } catch (e_9_1) {
        e_9 = { error: e_9_1 };
      } finally {
        try {
          if (ids_1_1 && !ids_1_1.done && (_a2 = ids_1.return))
            _a2.call(ids_1);
        } finally {
          if (e_9)
            throw e_9.error;
        }
      }
    } finally {
      this._options.autoVacuum = autoVacuum;
    }
    this.maybeAutoVacuum();
  };
  MiniSearch2.prototype.replace = function(updatedDocument) {
    var _a2 = this._options, idField = _a2.idField, extractField = _a2.extractField;
    var id = extractField(updatedDocument, idField);
    this.discard(id);
    this.add(updatedDocument);
  };
  MiniSearch2.prototype.vacuum = function(options) {
    if (options === void 0) {
      options = {};
    }
    return this.conditionalVacuum(options);
  };
  MiniSearch2.prototype.conditionalVacuum = function(options, conditions) {
    var _this = this;
    if (this._currentVacuum) {
      this._enqueuedVacuumConditions = this._enqueuedVacuumConditions && conditions;
      if (this._enqueuedVacuum != null) {
        return this._enqueuedVacuum;
      }
      this._enqueuedVacuum = this._currentVacuum.then(function() {
        var conditions2 = _this._enqueuedVacuumConditions;
        _this._enqueuedVacuumConditions = defaultVacuumConditions;
        return _this.performVacuuming(options, conditions2);
      });
      return this._enqueuedVacuum;
    }
    if (this.vacuumConditionsMet(conditions) === false) {
      return Promise.resolve();
    }
    this._currentVacuum = this.performVacuuming(options);
    return this._currentVacuum;
  };
  MiniSearch2.prototype.performVacuuming = function(options, conditions) {
    return __awaiter(this, void 0, void 0, function() {
      var initialDirtCount, batchSize, batchWait_1, i, _a2, _b, _c, term, fieldsData, fieldsData_1, fieldsData_1_1, _d, fieldId, fieldIndex, fieldIndex_1, fieldIndex_1_1, _e, shortId, e_10_1;
      var e_10, _f, e_11, _g, e_12, _h;
      return __generator(this, function(_j) {
        switch (_j.label) {
          case 0:
            initialDirtCount = this._dirtCount;
            if (!this.vacuumConditionsMet(conditions))
              return [3, 10];
            batchSize = options.batchSize || defaultVacuumOptions.batchSize;
            batchWait_1 = options.batchWait || defaultVacuumOptions.batchWait;
            i = 1;
            _j.label = 1;
          case 1:
            _j.trys.push([1, 7, 8, 9]);
            _a2 = __values(this._index), _b = _a2.next();
            _j.label = 2;
          case 2:
            if (!!_b.done)
              return [3, 6];
            _c = __read(_b.value, 2), term = _c[0], fieldsData = _c[1];
            try {
              for (fieldsData_1 = (e_11 = void 0, __values(fieldsData)), fieldsData_1_1 = fieldsData_1.next(); !fieldsData_1_1.done; fieldsData_1_1 = fieldsData_1.next()) {
                _d = __read(fieldsData_1_1.value, 2), fieldId = _d[0], fieldIndex = _d[1];
                try {
                  for (fieldIndex_1 = (e_12 = void 0, __values(fieldIndex)), fieldIndex_1_1 = fieldIndex_1.next(); !fieldIndex_1_1.done; fieldIndex_1_1 = fieldIndex_1.next()) {
                    _e = __read(fieldIndex_1_1.value, 1), shortId = _e[0];
                    if (this._documentIds.has(shortId)) {
                      continue;
                    }
                    if (fieldIndex.size <= 1) {
                      fieldsData.delete(fieldId);
                    } else {
                      fieldIndex.delete(shortId);
                    }
                  }
                } catch (e_12_1) {
                  e_12 = { error: e_12_1 };
                } finally {
                  try {
                    if (fieldIndex_1_1 && !fieldIndex_1_1.done && (_h = fieldIndex_1.return))
                      _h.call(fieldIndex_1);
                  } finally {
                    if (e_12)
                      throw e_12.error;
                  }
                }
              }
            } catch (e_11_1) {
              e_11 = { error: e_11_1 };
            } finally {
              try {
                if (fieldsData_1_1 && !fieldsData_1_1.done && (_g = fieldsData_1.return))
                  _g.call(fieldsData_1);
              } finally {
                if (e_11)
                  throw e_11.error;
              }
            }
            if (this._index.get(term).size === 0) {
              this._index.delete(term);
            }
            if (!(i % batchSize === 0))
              return [3, 4];
            return [4, new Promise(function(resolve) {
              return setTimeout(resolve, batchWait_1);
            })];
          case 3:
            _j.sent();
            _j.label = 4;
          case 4:
            i += 1;
            _j.label = 5;
          case 5:
            _b = _a2.next();
            return [3, 2];
          case 6:
            return [3, 9];
          case 7:
            e_10_1 = _j.sent();
            e_10 = { error: e_10_1 };
            return [3, 9];
          case 8:
            try {
              if (_b && !_b.done && (_f = _a2.return))
                _f.call(_a2);
            } finally {
              if (e_10)
                throw e_10.error;
            }
            return [7];
          case 9:
            this._dirtCount -= initialDirtCount;
            _j.label = 10;
          case 10:
            return [4, null];
          case 11:
            _j.sent();
            this._currentVacuum = this._enqueuedVacuum;
            this._enqueuedVacuum = null;
            return [2];
        }
      });
    });
  };
  MiniSearch2.prototype.vacuumConditionsMet = function(conditions) {
    if (conditions == null) {
      return true;
    }
    var minDirtCount = conditions.minDirtCount, minDirtFactor = conditions.minDirtFactor;
    minDirtCount = minDirtCount || defaultAutoVacuumOptions.minDirtCount;
    minDirtFactor = minDirtFactor || defaultAutoVacuumOptions.minDirtFactor;
    return this.dirtCount >= minDirtCount && this.dirtFactor >= minDirtFactor;
  };
  Object.defineProperty(MiniSearch2.prototype, "isVacuuming", {
    get: function() {
      return this._currentVacuum != null;
    },
    enumerable: false,
    configurable: true
  });
  Object.defineProperty(MiniSearch2.prototype, "dirtCount", {
    get: function() {
      return this._dirtCount;
    },
    enumerable: false,
    configurable: true
  });
  Object.defineProperty(MiniSearch2.prototype, "dirtFactor", {
    get: function() {
      return this._dirtCount / (1 + this._documentCount + this._dirtCount);
    },
    enumerable: false,
    configurable: true
  });
  MiniSearch2.prototype.has = function(id) {
    return this._idToShortId.has(id);
  };
  MiniSearch2.prototype.getStoredFields = function(id) {
    var shortId = this._idToShortId.get(id);
    if (shortId == null) {
      return void 0;
    }
    return this._storedFields.get(shortId);
  };
  MiniSearch2.prototype.search = function(query, searchOptions) {
    var e_13, _a2;
    if (searchOptions === void 0) {
      searchOptions = {};
    }
    var rawResults = this.executeQuery(query, searchOptions);
    var results = [];
    try {
      for (var rawResults_1 = __values(rawResults), rawResults_1_1 = rawResults_1.next(); !rawResults_1_1.done; rawResults_1_1 = rawResults_1.next()) {
        var _b = __read(rawResults_1_1.value, 2), docId = _b[0], _c = _b[1], score = _c.score, terms = _c.terms, match = _c.match;
        var quality = terms.length || 1;
        var result = {
          id: this._documentIds.get(docId),
          score: score * quality,
          terms: Object.keys(match),
          queryTerms: terms,
          match
        };
        Object.assign(result, this._storedFields.get(docId));
        if (searchOptions.filter == null || searchOptions.filter(result)) {
          results.push(result);
        }
      }
    } catch (e_13_1) {
      e_13 = { error: e_13_1 };
    } finally {
      try {
        if (rawResults_1_1 && !rawResults_1_1.done && (_a2 = rawResults_1.return))
          _a2.call(rawResults_1);
      } finally {
        if (e_13)
          throw e_13.error;
      }
    }
    if (query === MiniSearch2.wildcard && searchOptions.boostDocument == null && this._options.searchOptions.boostDocument == null) {
      return results;
    }
    results.sort(byScore);
    return results;
  };
  MiniSearch2.prototype.autoSuggest = function(queryString, options) {
    var e_14, _a2, e_15, _b;
    if (options === void 0) {
      options = {};
    }
    options = __assign(__assign({}, this._options.autoSuggestOptions), options);
    var suggestions = /* @__PURE__ */ new Map();
    try {
      for (var _c = __values(this.search(queryString, options)), _d = _c.next(); !_d.done; _d = _c.next()) {
        var _e = _d.value, score = _e.score, terms = _e.terms;
        var phrase = terms.join(" ");
        var suggestion = suggestions.get(phrase);
        if (suggestion != null) {
          suggestion.score += score;
          suggestion.count += 1;
        } else {
          suggestions.set(phrase, { score, terms, count: 1 });
        }
      }
    } catch (e_14_1) {
      e_14 = { error: e_14_1 };
    } finally {
      try {
        if (_d && !_d.done && (_a2 = _c.return))
          _a2.call(_c);
      } finally {
        if (e_14)
          throw e_14.error;
      }
    }
    var results = [];
    try {
      for (var suggestions_1 = __values(suggestions), suggestions_1_1 = suggestions_1.next(); !suggestions_1_1.done; suggestions_1_1 = suggestions_1.next()) {
        var _f = __read(suggestions_1_1.value, 2), suggestion = _f[0], _g = _f[1], score = _g.score, terms = _g.terms, count = _g.count;
        results.push({ suggestion, terms, score: score / count });
      }
    } catch (e_15_1) {
      e_15 = { error: e_15_1 };
    } finally {
      try {
        if (suggestions_1_1 && !suggestions_1_1.done && (_b = suggestions_1.return))
          _b.call(suggestions_1);
      } finally {
        if (e_15)
          throw e_15.error;
      }
    }
    results.sort(byScore);
    return results;
  };
  Object.defineProperty(MiniSearch2.prototype, "documentCount", {
    get: function() {
      return this._documentCount;
    },
    enumerable: false,
    configurable: true
  });
  Object.defineProperty(MiniSearch2.prototype, "termCount", {
    get: function() {
      return this._index.size;
    },
    enumerable: false,
    configurable: true
  });
  MiniSearch2.loadJSON = function(json, options) {
    if (options == null) {
      throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");
    }
    return this.loadJS(JSON.parse(json), options);
  };
  MiniSearch2.getDefault = function(optionName) {
    if (defaultOptions.hasOwnProperty(optionName)) {
      return getOwnProperty(defaultOptions, optionName);
    } else {
      throw new Error('MiniSearch: unknown option "'.concat(optionName, '"'));
    }
  };
  MiniSearch2.loadJS = function(js, options) {
    var e_16, _a2, e_17, _b, e_18, _c;
    var index = js.index, documentCount = js.documentCount, nextId = js.nextId, documentIds = js.documentIds, fieldIds = js.fieldIds, fieldLength = js.fieldLength, averageFieldLength = js.averageFieldLength, storedFields = js.storedFields, dirtCount = js.dirtCount, serializationVersion = js.serializationVersion;
    if (serializationVersion !== 1 && serializationVersion !== 2) {
      throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");
    }
    var miniSearch = new MiniSearch2(options);
    miniSearch._documentCount = documentCount;
    miniSearch._nextId = nextId;
    miniSearch._documentIds = objectToNumericMap(documentIds);
    miniSearch._idToShortId = /* @__PURE__ */ new Map();
    miniSearch._fieldIds = fieldIds;
    miniSearch._fieldLength = objectToNumericMap(fieldLength);
    miniSearch._avgFieldLength = averageFieldLength;
    miniSearch._storedFields = objectToNumericMap(storedFields);
    miniSearch._dirtCount = dirtCount || 0;
    miniSearch._index = new SearchableMap();
    try {
      for (var _d = __values(miniSearch._documentIds), _e = _d.next(); !_e.done; _e = _d.next()) {
        var _f = __read(_e.value, 2), shortId = _f[0], id = _f[1];
        miniSearch._idToShortId.set(id, shortId);
      }
    } catch (e_16_1) {
      e_16 = { error: e_16_1 };
    } finally {
      try {
        if (_e && !_e.done && (_a2 = _d.return))
          _a2.call(_d);
      } finally {
        if (e_16)
          throw e_16.error;
      }
    }
    try {
      for (var index_1 = __values(index), index_1_1 = index_1.next(); !index_1_1.done; index_1_1 = index_1.next()) {
        var _g = __read(index_1_1.value, 2), term = _g[0], data = _g[1];
        var dataMap = /* @__PURE__ */ new Map();
        try {
          for (var _h = (e_18 = void 0, __values(Object.keys(data))), _j = _h.next(); !_j.done; _j = _h.next()) {
            var fieldId = _j.value;
            var indexEntry = data[fieldId];
            if (serializationVersion === 1) {
              indexEntry = indexEntry.ds;
            }
            dataMap.set(parseInt(fieldId, 10), objectToNumericMap(indexEntry));
          }
        } catch (e_18_1) {
          e_18 = { error: e_18_1 };
        } finally {
          try {
            if (_j && !_j.done && (_c = _h.return))
              _c.call(_h);
          } finally {
            if (e_18)
              throw e_18.error;
          }
        }
        miniSearch._index.set(term, dataMap);
      }
    } catch (e_17_1) {
      e_17 = { error: e_17_1 };
    } finally {
      try {
        if (index_1_1 && !index_1_1.done && (_b = index_1.return))
          _b.call(index_1);
      } finally {
        if (e_17)
          throw e_17.error;
      }
    }
    return miniSearch;
  };
  MiniSearch2.prototype.executeQuery = function(query, searchOptions) {
    var _this = this;
    if (searchOptions === void 0) {
      searchOptions = {};
    }
    if (query === MiniSearch2.wildcard) {
      return this.executeWildcardQuery(searchOptions);
    }
    if (typeof query !== "string") {
      var options_1 = __assign(__assign(__assign({}, searchOptions), query), { queries: void 0 });
      var results_1 = query.queries.map(function(subquery) {
        return _this.executeQuery(subquery, options_1);
      });
      return this.combineResults(results_1, options_1.combineWith);
    }
    var _a2 = this._options, tokenize = _a2.tokenize, processTerm = _a2.processTerm, globalSearchOptions = _a2.searchOptions;
    var options = __assign(__assign({ tokenize, processTerm }, globalSearchOptions), searchOptions);
    var searchTokenize = options.tokenize, searchProcessTerm = options.processTerm;
    var terms = searchTokenize(query).flatMap(function(term) {
      return searchProcessTerm(term);
    }).filter(function(term) {
      return !!term;
    });
    var queries = terms.map(termToQuerySpec(options));
    var results = queries.map(function(query2) {
      return _this.executeQuerySpec(query2, options);
    });
    return this.combineResults(results, options.combineWith);
  };
  MiniSearch2.prototype.executeQuerySpec = function(query, searchOptions) {
    var e_19, _a2, e_20, _b;
    var options = __assign(__assign({}, this._options.searchOptions), searchOptions);
    var boosts = (options.fields || this._options.fields).reduce(function(boosts2, field) {
      var _a3;
      return __assign(__assign({}, boosts2), (_a3 = {}, _a3[field] = getOwnProperty(options.boost, field) || 1, _a3));
    }, {});
    var boostDocument = options.boostDocument, weights = options.weights, maxFuzzy = options.maxFuzzy, bm25params = options.bm25;
    var _c = __assign(__assign({}, defaultSearchOptions.weights), weights), fuzzyWeight = _c.fuzzy, prefixWeight = _c.prefix;
    var data = this._index.get(query.term);
    var results = this.termResults(query.term, query.term, 1, data, boosts, boostDocument, bm25params);
    var prefixMatches;
    var fuzzyMatches;
    if (query.prefix) {
      prefixMatches = this._index.atPrefix(query.term);
    }
    if (query.fuzzy) {
      var fuzzy = query.fuzzy === true ? 0.2 : query.fuzzy;
      var maxDistance = fuzzy < 1 ? Math.min(maxFuzzy, Math.round(query.term.length * fuzzy)) : fuzzy;
      if (maxDistance)
        fuzzyMatches = this._index.fuzzyGet(query.term, maxDistance);
    }
    if (prefixMatches) {
      try {
        for (var prefixMatches_1 = __values(prefixMatches), prefixMatches_1_1 = prefixMatches_1.next(); !prefixMatches_1_1.done; prefixMatches_1_1 = prefixMatches_1.next()) {
          var _d = __read(prefixMatches_1_1.value, 2), term = _d[0], data_1 = _d[1];
          var distance = term.length - query.term.length;
          if (!distance) {
            continue;
          }
          fuzzyMatches === null || fuzzyMatches === void 0 ? void 0 : fuzzyMatches.delete(term);
          var weight = prefixWeight * term.length / (term.length + 0.3 * distance);
          this.termResults(query.term, term, weight, data_1, boosts, boostDocument, bm25params, results);
        }
      } catch (e_19_1) {
        e_19 = { error: e_19_1 };
      } finally {
        try {
          if (prefixMatches_1_1 && !prefixMatches_1_1.done && (_a2 = prefixMatches_1.return))
            _a2.call(prefixMatches_1);
        } finally {
          if (e_19)
            throw e_19.error;
        }
      }
    }
    if (fuzzyMatches) {
      try {
        for (var _e = __values(fuzzyMatches.keys()), _f = _e.next(); !_f.done; _f = _e.next()) {
          var term = _f.value;
          var _g = __read(fuzzyMatches.get(term), 2), data_2 = _g[0], distance = _g[1];
          if (!distance) {
            continue;
          }
          var weight = fuzzyWeight * term.length / (term.length + distance);
          this.termResults(query.term, term, weight, data_2, boosts, boostDocument, bm25params, results);
        }
      } catch (e_20_1) {
        e_20 = { error: e_20_1 };
      } finally {
        try {
          if (_f && !_f.done && (_b = _e.return))
            _b.call(_e);
        } finally {
          if (e_20)
            throw e_20.error;
        }
      }
    }
    return results;
  };
  MiniSearch2.prototype.executeWildcardQuery = function(searchOptions) {
    var e_21, _a2;
    var results = /* @__PURE__ */ new Map();
    var options = __assign(__assign({}, this._options.searchOptions), searchOptions);
    try {
      for (var _b = __values(this._documentIds), _c = _b.next(); !_c.done; _c = _b.next()) {
        var _d = __read(_c.value, 2), shortId = _d[0], id = _d[1];
        var score = options.boostDocument ? options.boostDocument(id, "", this._storedFields.get(shortId)) : 1;
        results.set(shortId, {
          score,
          terms: [],
          match: {}
        });
      }
    } catch (e_21_1) {
      e_21 = { error: e_21_1 };
    } finally {
      try {
        if (_c && !_c.done && (_a2 = _b.return))
          _a2.call(_b);
      } finally {
        if (e_21)
          throw e_21.error;
      }
    }
    return results;
  };
  MiniSearch2.prototype.combineResults = function(results, combineWith) {
    if (combineWith === void 0) {
      combineWith = OR;
    }
    if (results.length === 0) {
      return /* @__PURE__ */ new Map();
    }
    var operator = combineWith.toLowerCase();
    return results.reduce(combinators[operator]) || /* @__PURE__ */ new Map();
  };
  MiniSearch2.prototype.toJSON = function() {
    var e_22, _a2, e_23, _b;
    var index = [];
    try {
      for (var _c = __values(this._index), _d = _c.next(); !_d.done; _d = _c.next()) {
        var _e = __read(_d.value, 2), term = _e[0], fieldIndex = _e[1];
        var data = {};
        try {
          for (var fieldIndex_2 = (e_23 = void 0, __values(fieldIndex)), fieldIndex_2_1 = fieldIndex_2.next(); !fieldIndex_2_1.done; fieldIndex_2_1 = fieldIndex_2.next()) {
            var _f = __read(fieldIndex_2_1.value, 2), fieldId = _f[0], freqs = _f[1];
            data[fieldId] = Object.fromEntries(freqs);
          }
        } catch (e_23_1) {
          e_23 = { error: e_23_1 };
        } finally {
          try {
            if (fieldIndex_2_1 && !fieldIndex_2_1.done && (_b = fieldIndex_2.return))
              _b.call(fieldIndex_2);
          } finally {
            if (e_23)
              throw e_23.error;
          }
        }
        index.push([term, data]);
      }
    } catch (e_22_1) {
      e_22 = { error: e_22_1 };
    } finally {
      try {
        if (_d && !_d.done && (_a2 = _c.return))
          _a2.call(_c);
      } finally {
        if (e_22)
          throw e_22.error;
      }
    }
    return {
      documentCount: this._documentCount,
      nextId: this._nextId,
      documentIds: Object.fromEntries(this._documentIds),
      fieldIds: this._fieldIds,
      fieldLength: Object.fromEntries(this._fieldLength),
      averageFieldLength: this._avgFieldLength,
      storedFields: Object.fromEntries(this._storedFields),
      dirtCount: this._dirtCount,
      index,
      serializationVersion: 2
    };
  };
  MiniSearch2.prototype.termResults = function(sourceTerm, derivedTerm, termWeight, fieldTermData, fieldBoosts, boostDocumentFn, bm25params, results) {
    var e_24, _a2, e_25, _b, _c;
    if (results === void 0) {
      results = /* @__PURE__ */ new Map();
    }
    if (fieldTermData == null)
      return results;
    try {
      for (var _d = __values(Object.keys(fieldBoosts)), _e = _d.next(); !_e.done; _e = _d.next()) {
        var field = _e.value;
        var fieldBoost = fieldBoosts[field];
        var fieldId = this._fieldIds[field];
        var fieldTermFreqs = fieldTermData.get(fieldId);
        if (fieldTermFreqs == null)
          continue;
        var matchingFields = fieldTermFreqs.size;
        var avgFieldLength = this._avgFieldLength[fieldId];
        try {
          for (var _f = (e_25 = void 0, __values(fieldTermFreqs.keys())), _g = _f.next(); !_g.done; _g = _f.next()) {
            var docId = _g.value;
            if (!this._documentIds.has(docId)) {
              this.removeTerm(fieldId, docId, derivedTerm);
              matchingFields -= 1;
              continue;
            }
            var docBoost = boostDocumentFn ? boostDocumentFn(this._documentIds.get(docId), derivedTerm, this._storedFields.get(docId)) : 1;
            if (!docBoost)
              continue;
            var termFreq = fieldTermFreqs.get(docId);
            var fieldLength = this._fieldLength.get(docId)[fieldId];
            var rawScore = calcBM25Score(termFreq, matchingFields, this._documentCount, fieldLength, avgFieldLength, bm25params);
            var weightedScore = termWeight * fieldBoost * docBoost * rawScore;
            var result = results.get(docId);
            if (result) {
              result.score += weightedScore;
              assignUniqueTerm(result.terms, sourceTerm);
              var match = getOwnProperty(result.match, derivedTerm);
              if (match) {
                match.push(field);
              } else {
                result.match[derivedTerm] = [field];
              }
            } else {
              results.set(docId, {
                score: weightedScore,
                terms: [sourceTerm],
                match: (_c = {}, _c[derivedTerm] = [field], _c)
              });
            }
          }
        } catch (e_25_1) {
          e_25 = { error: e_25_1 };
        } finally {
          try {
            if (_g && !_g.done && (_b = _f.return))
              _b.call(_f);
          } finally {
            if (e_25)
              throw e_25.error;
          }
        }
      }
    } catch (e_24_1) {
      e_24 = { error: e_24_1 };
    } finally {
      try {
        if (_e && !_e.done && (_a2 = _d.return))
          _a2.call(_d);
      } finally {
        if (e_24)
          throw e_24.error;
      }
    }
    return results;
  };
  MiniSearch2.prototype.addTerm = function(fieldId, documentId, term) {
    var indexData = this._index.fetch(term, createMap);
    var fieldIndex = indexData.get(fieldId);
    if (fieldIndex == null) {
      fieldIndex = /* @__PURE__ */ new Map();
      fieldIndex.set(documentId, 1);
      indexData.set(fieldId, fieldIndex);
    } else {
      var docs = fieldIndex.get(documentId);
      fieldIndex.set(documentId, (docs || 0) + 1);
    }
  };
  MiniSearch2.prototype.removeTerm = function(fieldId, documentId, term) {
    if (!this._index.has(term)) {
      this.warnDocumentChanged(documentId, fieldId, term);
      return;
    }
    var indexData = this._index.fetch(term, createMap);
    var fieldIndex = indexData.get(fieldId);
    if (fieldIndex == null || fieldIndex.get(documentId) == null) {
      this.warnDocumentChanged(documentId, fieldId, term);
    } else if (fieldIndex.get(documentId) <= 1) {
      if (fieldIndex.size <= 1) {
        indexData.delete(fieldId);
      } else {
        fieldIndex.delete(documentId);
      }
    } else {
      fieldIndex.set(documentId, fieldIndex.get(documentId) - 1);
    }
    if (this._index.get(term).size === 0) {
      this._index.delete(term);
    }
  };
  MiniSearch2.prototype.warnDocumentChanged = function(shortDocumentId, fieldId, term) {
    var e_26, _a2;
    try {
      for (var _b = __values(Object.keys(this._fieldIds)), _c = _b.next(); !_c.done; _c = _b.next()) {
        var fieldName = _c.value;
        if (this._fieldIds[fieldName] === fieldId) {
          this._options.logger("warn", "MiniSearch: document with ID ".concat(this._documentIds.get(shortDocumentId), ' has changed before removal: term "').concat(term, '" was not present in field "').concat(fieldName, '". Removing a document after it has changed can corrupt the index!'), "version_conflict");
          return;
        }
      }
    } catch (e_26_1) {
      e_26 = { error: e_26_1 };
    } finally {
      try {
        if (_c && !_c.done && (_a2 = _b.return))
          _a2.call(_b);
      } finally {
        if (e_26)
          throw e_26.error;
      }
    }
  };
  MiniSearch2.prototype.addDocumentId = function(documentId) {
    var shortDocumentId = this._nextId;
    this._idToShortId.set(documentId, shortDocumentId);
    this._documentIds.set(shortDocumentId, documentId);
    this._documentCount += 1;
    this._nextId += 1;
    return shortDocumentId;
  };
  MiniSearch2.prototype.addFields = function(fields) {
    for (var i = 0; i < fields.length; i++) {
      this._fieldIds[fields[i]] = i;
    }
  };
  MiniSearch2.prototype.addFieldLength = function(documentId, fieldId, count, length) {
    var fieldLengths = this._fieldLength.get(documentId);
    if (fieldLengths == null)
      this._fieldLength.set(documentId, fieldLengths = []);
    fieldLengths[fieldId] = length;
    var averageFieldLength = this._avgFieldLength[fieldId] || 0;
    var totalFieldLength = averageFieldLength * count + length;
    this._avgFieldLength[fieldId] = totalFieldLength / (count + 1);
  };
  MiniSearch2.prototype.removeFieldLength = function(documentId, fieldId, count, length) {
    if (count === 1) {
      this._avgFieldLength[fieldId] = 0;
      return;
    }
    var totalFieldLength = this._avgFieldLength[fieldId] * count - length;
    this._avgFieldLength[fieldId] = totalFieldLength / (count - 1);
  };
  MiniSearch2.prototype.saveStoredFields = function(documentId, doc) {
    var e_27, _a2;
    var _b = this._options, storeFields = _b.storeFields, extractField = _b.extractField;
    if (storeFields == null || storeFields.length === 0) {
      return;
    }
    var documentFields = this._storedFields.get(documentId);
    if (documentFields == null)
      this._storedFields.set(documentId, documentFields = {});
    try {
      for (var storeFields_1 = __values(storeFields), storeFields_1_1 = storeFields_1.next(); !storeFields_1_1.done; storeFields_1_1 = storeFields_1.next()) {
        var fieldName = storeFields_1_1.value;
        var fieldValue = extractField(doc, fieldName);
        if (fieldValue !== void 0)
          documentFields[fieldName] = fieldValue;
      }
    } catch (e_27_1) {
      e_27 = { error: e_27_1 };
    } finally {
      try {
        if (storeFields_1_1 && !storeFields_1_1.done && (_a2 = storeFields_1.return))
          _a2.call(storeFields_1);
      } finally {
        if (e_27)
          throw e_27.error;
      }
    }
  };
  MiniSearch2.wildcard = Symbol("*");
  return MiniSearch2;
}();
var getOwnProperty = function(object, property) {
  return Object.prototype.hasOwnProperty.call(object, property) ? object[property] : void 0;
};
var combinators = (_a = {}, _a[OR] = function(a, b) {
  var e_28, _a2;
  try {
    for (var _b = __values(b.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
      var docId = _c.value;
      var existing = a.get(docId);
      if (existing == null) {
        a.set(docId, b.get(docId));
      } else {
        var _d = b.get(docId), score = _d.score, terms = _d.terms, match = _d.match;
        existing.score = existing.score + score;
        existing.match = Object.assign(existing.match, match);
        assignUniqueTerms(existing.terms, terms);
      }
    }
  } catch (e_28_1) {
    e_28 = { error: e_28_1 };
  } finally {
    try {
      if (_c && !_c.done && (_a2 = _b.return))
        _a2.call(_b);
    } finally {
      if (e_28)
        throw e_28.error;
    }
  }
  return a;
}, _a[AND] = function(a, b) {
  var e_29, _a2;
  var combined = /* @__PURE__ */ new Map();
  try {
    for (var _b = __values(b.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
      var docId = _c.value;
      var existing = a.get(docId);
      if (existing == null)
        continue;
      var _d = b.get(docId), score = _d.score, terms = _d.terms, match = _d.match;
      assignUniqueTerms(existing.terms, terms);
      combined.set(docId, {
        score: existing.score + score,
        terms: existing.terms,
        match: Object.assign(existing.match, match)
      });
    }
  } catch (e_29_1) {
    e_29 = { error: e_29_1 };
  } finally {
    try {
      if (_c && !_c.done && (_a2 = _b.return))
        _a2.call(_b);
    } finally {
      if (e_29)
        throw e_29.error;
    }
  }
  return combined;
}, _a[AND_NOT] = function(a, b) {
  var e_30, _a2;
  try {
    for (var _b = __values(b.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
      var docId = _c.value;
      a.delete(docId);
    }
  } catch (e_30_1) {
    e_30 = { error: e_30_1 };
  } finally {
    try {
      if (_c && !_c.done && (_a2 = _b.return))
        _a2.call(_b);
    } finally {
      if (e_30)
        throw e_30.error;
    }
  }
  return a;
}, _a);
var defaultBM25params = { k: 1.2, b: 0.7, d: 0.5 };
var calcBM25Score = function(termFreq, matchingCount, totalCount, fieldLength, avgFieldLength, bm25params) {
  var k = bm25params.k, b = bm25params.b, d = bm25params.d;
  var invDocFreq = Math.log(1 + (totalCount - matchingCount + 0.5) / (matchingCount + 0.5));
  return invDocFreq * (d + termFreq * (k + 1) / (termFreq + k * (1 - b + b * fieldLength / avgFieldLength)));
};
var termToQuerySpec = function(options) {
  return function(term, i, terms) {
    var fuzzy = typeof options.fuzzy === "function" ? options.fuzzy(term, i, terms) : options.fuzzy || false;
    var prefix = typeof options.prefix === "function" ? options.prefix(term, i, terms) : options.prefix === true;
    return { term, fuzzy, prefix };
  };
};
var defaultOptions = {
  idField: "id",
  extractField: function(document2, fieldName) {
    return document2[fieldName];
  },
  tokenize: function(text) {
    return text.split(SPACE_OR_PUNCTUATION);
  },
  processTerm: function(term) {
    return term.toLowerCase();
  },
  fields: void 0,
  searchOptions: void 0,
  storeFields: [],
  logger: function(level, message) {
    if (typeof (console === null || console === void 0 ? void 0 : console[level]) === "function")
      console[level](message);
  },
  autoVacuum: true
};
var defaultSearchOptions = {
  combineWith: OR,
  prefix: false,
  fuzzy: false,
  maxFuzzy: 6,
  boost: {},
  weights: { fuzzy: 0.45, prefix: 0.375 },
  bm25: defaultBM25params
};
var defaultAutoSuggestOptions = {
  combineWith: AND,
  prefix: function(term, i, terms) {
    return i === terms.length - 1;
  }
};
var defaultVacuumOptions = { batchSize: 1e3, batchWait: 10 };
var defaultVacuumConditions = { minDirtFactor: 0.1, minDirtCount: 20 };
var defaultAutoVacuumOptions = __assign(__assign({}, defaultVacuumOptions), defaultVacuumConditions);
var assignUniqueTerm = function(target, term) {
  if (!target.includes(term))
    target.push(term);
};
var assignUniqueTerms = function(target, source) {
  var e_31, _a2;
  try {
    for (var source_1 = __values(source), source_1_1 = source_1.next(); !source_1_1.done; source_1_1 = source_1.next()) {
      var term = source_1_1.value;
      if (!target.includes(term))
        target.push(term);
    }
  } catch (e_31_1) {
    e_31 = { error: e_31_1 };
  } finally {
    try {
      if (source_1_1 && !source_1_1.done && (_a2 = source_1.return))
        _a2.call(source_1);
    } finally {
      if (e_31)
        throw e_31.error;
    }
  }
};
var byScore = function(_a2, _b) {
  var a = _a2.score;
  var b = _b.score;
  return b - a;
};
var createMap = function() {
  return /* @__PURE__ */ new Map();
};
var objectToNumericMap = function(object) {
  var e_32, _a2;
  var map = /* @__PURE__ */ new Map();
  try {
    for (var _b = __values(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
      var key = _c.value;
      map.set(parseInt(key, 10), object[key]);
    }
  } catch (e_32_1) {
    e_32 = { error: e_32_1 };
  } finally {
    try {
      if (_c && !_c.done && (_a2 = _b.return))
        _a2.call(_b);
    } finally {
      if (e_32)
        throw e_32.error;
    }
  }
  return map;
};
var SPACE_OR_PUNCTUATION = /[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;

// scripts/objects/website-index.ts
var WebsiteIndex = class {
  constructor(website) {
    this.exportTime = Date.now();
    this.previousMetadata = void 0;
    this.index = void 0;
    this.stopWords = ["a", "about", "actually", "almost", "also", "although", "always", "am", "an", "and", "any", "are", "as", "at", "be", "became", "become", "but", "by", "can", "could", "did", "do", "does", "each", "either", "else", "for", "from", "had", "has", "have", "hence", "how", "i", "if", "in", "is", "it", "its", "just", "may", "maybe", "me", "might", "mine", "must", "my", "mine", "must", "my", "neither", "nor", "not", "of", "oh", "ok", "when", "where", "whereas", "wherever", "whenever", "whether", "which", "while", "who", "whom", "whoever", "whose", "why", "will", "with", "within", "without", "would", "yes", "yet", "you", "your"];
    this.indexOptions = {
      idField: "path",
      fields: ["path", "title", "content", "tags", "headers"],
      storeFields: ["path", "title", "tags", "headers"],
      processTerm: (term, _fieldName) => this.stopWords.includes(term) ? null : term.toLowerCase()
    };
    this.allFiles = [];
    this.removedFiles = [];
    this.addedFiles = [];
    this.keptDependencies = [];
    this.web = website;
  }
  async init() {
    this.exportTime = Date.now();
    this.previousMetadata = await this.getExportMetadata();
    this.index = await this.getExportIndex();
    this.shouldApplyIncrementalExport(true);
    if (!this.previousMetadata)
      return false;
    return true;
  }
  shouldApplyIncrementalExport(printWarning = false) {
    var _a2, _b;
    let result = true;
    if (!Settings.onlyExportModified)
      result = false;
    if (Settings.exportPreset != "website" /* Website */)
      result = false;
    if (this.isVersionChanged() && this.previousMetadata) {
      if (printWarning)
        ExportLog.warning("Plugin version changed. All files will be re-exported.");
      result = false;
    }
    if (this.previousMetadata == void 0) {
      if (printWarning)
        ExportLog.warning("No existing export metadata found. All files will be exported.");
      result = false;
    }
    if (this.index == void 0) {
      if (printWarning)
        ExportLog.warning("No existing search index found. All files will be exported.");
      result = false;
    }
    let rssAbsoultePath = this.web.destination.joinString(this.web.rssPath);
    if (!rssAbsoultePath.exists && this.web.exportOptions.addRSS) {
      if (printWarning)
        ExportLog.warning("No existing RSS feed found. All files will be exported.");
      result = false;
    }
    let customHeadChanged = this.previousMetadata && ((_a2 = this.previousMetadata) == null ? void 0 : _a2.useCustomHeadContent) != (Settings.customHeadContentPath != "");
    if (customHeadChanged) {
      if (printWarning)
        ExportLog.warning(`${Settings.customHeadContentPath != "" ? "Added" : "Removed"} custom head content. All files will be re-exported.`);
      result = false;
    }
    let customFaviconChanged = this.previousMetadata && ((_b = this.previousMetadata) == null ? void 0 : _b.useCustomFavicon) != (Settings.faviconPath != "");
    if (customFaviconChanged) {
      if (printWarning)
        ExportLog.warning(`${Settings.faviconPath != "" ? "Added" : "Removed"} custom favicon. All files will be re-exported.`);
      result = false;
    }
    return result;
  }
  async getExportMetadata() {
    try {
      let metadataPath = this.web.destination.join(AssetHandler.libraryPath).joinString("metadata.json");
      let metadata = await metadataPath.readFileString();
      if (metadata)
        return JSON.parse(metadata);
    } catch (e) {
      ExportLog.warning(e, "Failed to parse metadata.json. Recreating metadata.");
    }
    return void 0;
  }
  async getExportIndex() {
    let index = void 0;
    try {
      let indexPath = this.web.destination.join(AssetHandler.libraryPath).joinString("search-index.json");
      let indexJson = await indexPath.readFileString();
      if (indexJson) {
        index = MiniSearch.loadJSON(indexJson, this.indexOptions);
      }
    } catch (e) {
      ExportLog.warning(e, "Failed to load search-index.json. Creating new index.");
      index = void 0;
    }
    return index;
  }
  async createIndex() {
    if (!this.index) {
      this.index = new MiniSearch(this.indexOptions);
    }
    function preprocessContent(contentElement) {
      function getTextNodes(element) {
        const textNodes2 = [];
        const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null);
        let node;
        while (node = walker.nextNode()) {
          textNodes2.push(node);
        }
        return textNodes2;
      }
      contentElement.querySelectorAll(".math, svg, img, .frontmatter, .metadata-container, .heading-after, style, script").forEach((el) => el.remove());
      const textNodes = getTextNodes(contentElement);
      let content = "";
      for (const node of textNodes) {
        content += " " + node.textContent + " ";
      }
      content = content.trim().replace(/\s+/g, " ");
      return content;
    }
    const htmlWebpages = this.web.webpages.filter((webpage) => webpage.document && webpage.viewElement);
    let progressCount = 0;
    let totalCount = htmlWebpages.length + this.web.dependencies.length + this.removedFiles.length;
    for (const webpage of htmlWebpages) {
      if (MarkdownRendererAPI.checkCancelled())
        return void 0;
      ExportLog.progress(progressCount, totalCount, "Indexing", "Adding: " + webpage.relativePath.asString, "var(--color-blue)");
      const content = preprocessContent(webpage.viewElement);
      if (content) {
        const webpagePath = webpage.relativePath.copy.makeUnixStyle().asString;
        if (this.index.has(webpagePath)) {
          this.index.discard(webpagePath);
        }
        this.index.add({
          path: webpagePath,
          title: webpage.title,
          content,
          tags: webpage.tags,
          headers: webpage.headings.map((header) => header.heading)
        });
      } else {
        console.warn(`No indexable content found for ${webpage.source.basename}`);
      }
      progressCount++;
    }
    for (const file of this.web.dependencies) {
      if (MarkdownRendererAPI.checkCancelled())
        return void 0;
      const filePath = file.relativePath.asString;
      if (this.index.has(filePath)) {
        continue;
      }
      ExportLog.progress(progressCount, totalCount, "Indexing", "Adding: " + file.filename, "var(--color-blue)");
      this.index.add({
        path: filePath,
        title: file.relativePath.basename,
        content: "",
        tags: [],
        headers: []
      });
      progressCount++;
    }
    for (const oldFile of this.removedFiles) {
      if (MarkdownRendererAPI.checkCancelled())
        return void 0;
      ExportLog.progress(progressCount, totalCount, "Indexing", "Removing: " + oldFile, "var(--color-blue)");
      if (this.index.has(oldFile))
        this.index.discard(oldFile);
      progressCount++;
    }
    ExportLog.progress(totalCount, totalCount, "Indexing", "Cleanup index", "var(--color-blue)");
    this.index.vacuum();
    return new Asset("search-index.json", JSON.stringify(this.index), "other" /* Other */, "download" /* Download */, false, "temporary" /* Temporary */);
  }
  async createMetadata(options) {
    let metadata = this.previousMetadata ? JSON.parse(JSON.stringify(this.previousMetadata)) : {};
    metadata.vaultName = this.web.exportOptions.siteName;
    metadata.lastExport = this.exportTime;
    metadata.pluginVersion = HTMLExportPlugin.plugin.manifest.version;
    metadata.validBodyClasses = Website.validBodyClasses;
    metadata.useCustomHeadContent = Settings.customHeadContentPath != "";
    metadata.useCustomFavicon = Settings.faviconPath != "";
    metadata.files = this.allFiles;
    metadata.mainDependencies = AssetHandler.getDownloads(options).map((asset) => asset.relativePath.copy.makeUnixStyle().asString);
    if (!metadata.fileInfo)
      metadata.fileInfo = {};
    let progressCount = 0;
    let totalCount = this.web.webpages.length + this.web.dependencies.length + this.removedFiles.length;
    for (const page of this.web.webpages) {
      if (MarkdownRendererAPI.checkCancelled())
        return void 0;
      ExportLog.progress(progressCount, totalCount, "Creating Metadata", "Adding: " + page.relativePath.asString, "var(--color-cyan)");
      let fileInfo = {};
      fileInfo.modifiedTime = this.exportTime;
      fileInfo.sourceSize = page.source.stat.size;
      fileInfo.exportedPath = page.relativePath.copy.makeUnixStyle().asString;
      fileInfo.dependencies = page.dependencies.map((asset) => asset.relativePath.copy.makeUnixStyle().asString);
      let exportPath = new Path(page.source.path).makeUnixStyle().asString;
      metadata.fileInfo[exportPath] = fileInfo;
      progressCount++;
    }
    for (const file of this.web.dependencies) {
      if (MarkdownRendererAPI.checkCancelled())
        return void 0;
      ExportLog.progress(progressCount, totalCount, "Creating Metadata", "Adding: " + file.relativePath.asString, "var(--color-cyan)");
      let fileInfo = {};
      fileInfo.modifiedTime = this.exportTime;
      fileInfo.sourceSize = file.content.length;
      fileInfo.exportedPath = file.relativePath.copy.makeUnixStyle().asString;
      fileInfo.dependencies = [];
      let exportPath = file.relativePath.copy.makeUnixStyle().asString;
      metadata.fileInfo[exportPath] = fileInfo;
      progressCount++;
    }
    for (const oldFile of this.removedFiles) {
      if (MarkdownRendererAPI.checkCancelled())
        return void 0;
      ExportLog.progress(progressCount, totalCount, "Creating Metadata", "Removing: " + oldFile, "var(--color-cyan)");
      delete metadata.fileInfo[oldFile];
      progressCount++;
    }
    return new Asset("metadata.json", JSON.stringify(metadata, null, 2), "other" /* Other */, "download" /* Download */, false, "temporary" /* Temporary */);
  }
  async deleteOldFiles(options) {
    options = Object.assign(new MarkdownWebpageRendererAPIOptions2(), options);
    if (!this.previousMetadata)
      return;
    if (this.removedFiles.length == 0) {
      ExportLog.log("No old files to delete");
      return;
    }
    for (let i = 0; i < this.removedFiles.length; i++) {
      if (MarkdownRendererAPI.checkCancelled())
        return;
      let removedPath = this.removedFiles[i];
      console.log("Removing old file: ", this.previousMetadata.fileInfo);
      let exportedPath = new Path(this.previousMetadata.fileInfo[removedPath].exportedPath);
      exportedPath.makeWebStyle(options.webStylePaths);
      let deletePath = this.web.destination.join(exportedPath);
      console.log("Deleting old file: " + deletePath.asString);
      await deletePath.delete(true);
      ExportLog.progress(i, this.removedFiles.length, "Deleting Old Files", "Deleting: " + deletePath.asString, "var(--color-orange)");
    }
    let folders = await Path.getAllEmptyFoldersRecursive(this.web.destination);
    if (MarkdownRendererAPI.checkCancelled())
      return;
    folders.sort((a, b) => a.depth - b.depth);
    for (let i = 0; i < folders.length; i++) {
      if (MarkdownRendererAPI.checkCancelled())
        return;
      let folder = folders[i];
      ExportLog.progress(i, folders.length, "Deleting Empty Folders", "Deleting: " + folder.asString, "var(--color-orange)");
      await folder.directory.delete(true);
    }
  }
  async updateBodyClasses() {
    if (!this.previousMetadata)
      return;
    if (this.previousMetadata.validBodyClasses == Website.validBodyClasses)
      return;
    console.log("Updating body classes of previous export");
    let convertableFiles = this.previousMetadata.files.filter((path) => {
      var _a2;
      return MarkdownRendererAPI.isConvertable((_a2 = path.split(".").pop()) != null ? _a2 : "");
    });
    let exportedPaths = convertableFiles.map((path) => {
      var _a2, _b, _c;
      return new Path((_c = (_b = (_a2 = this.previousMetadata) == null ? void 0 : _a2.fileInfo[path]) == null ? void 0 : _b.exportedPath) != null ? _c : "", this.web.destination.asString);
    });
    exportedPaths = exportedPaths.filter((path) => !path.isEmpty);
    for (let i = 0; i < exportedPaths.length; i++) {
      if (MarkdownRendererAPI.checkCancelled())
        return;
      let exportedPath = exportedPaths[i];
      let content = await exportedPath.readFileString();
      if (!content)
        continue;
      let dom = new DOMParser().parseFromString(content, "text/html");
      let body = dom.querySelector("body");
      if (!body)
        continue;
      body.className = Website.validBodyClasses;
      await exportedPath.writeFile(dom.documentElement.outerHTML);
      ExportLog.progress(i, exportedPaths.length, "Updating Body Classes", "Updating: " + exportedPath.asString, "var(--color-yellow)");
    }
  }
  isFileChanged(file) {
    let metadata = this.getMetadataForFile(file);
    if (!metadata) {
      return true;
    }
    return metadata.modifiedTime < file.stat.mtime || metadata.sourceSize !== file.stat.size;
  }
  hasFile(file) {
    return this.getMetadataForFile(file) !== void 0;
  }
  hasFileByPath(path) {
    return this.getMetadataForPath(path) !== void 0;
  }
  getMetadataForFile(file) {
    var _a2;
    return (_a2 = this.previousMetadata) == null ? void 0 : _a2.fileInfo[file.path];
  }
  getMetadataForPath(path) {
    var _a2;
    return (_a2 = this.previousMetadata) == null ? void 0 : _a2.fileInfo[path];
  }
  isVersionChanged() {
    var _a2;
    return ((_a2 = this.previousMetadata) == null ? void 0 : _a2.pluginVersion) !== HTMLExportPlugin.plugin.manifest.version;
  }
  getAllFiles() {
    this.allFiles = [];
    for (let file of this.web.batchFiles) {
      this.allFiles.push(file.path);
    }
    for (let asset of this.web.dependencies) {
      if (this.allFiles.some((path) => Path.equal(path, asset.relativePath.asString)))
        continue;
      this.allFiles.push(asset.relativePath.copy.makeUnixStyle().asString);
    }
    return this.allFiles;
  }
  getRemovedFiles() {
    if (!this.previousMetadata)
      return [];
    this.removedFiles = this.previousMetadata.files.filter((path) => {
      var _a2;
      return !this.allFiles.includes(path) && !((_a2 = this.previousMetadata) == null ? void 0 : _a2.mainDependencies.includes(path)) && !this.keptDependencies.includes(path);
    });
    console.log("Old files: ", this.removedFiles);
    return this.removedFiles;
  }
  getAddedFiles() {
    if (!this.previousMetadata)
      return [];
    this.addedFiles = this.allFiles.filter((path) => {
      var _a2;
      return !((_a2 = this.previousMetadata) == null ? void 0 : _a2.files.includes(path));
    });
    console.log("New files: ", this.addedFiles);
    return this.addedFiles;
  }
  getKeptDependencies() {
    var _a2, _b;
    if (!this.previousMetadata)
      return [];
    this.keptDependencies = [];
    for (let file of this.allFiles) {
      let dep = (_b = (_a2 = this.previousMetadata.fileInfo[file]) == null ? void 0 : _a2.dependencies) != null ? _b : [];
      this.keptDependencies.push(...dep);
    }
    this.allFiles.push(...this.keptDependencies);
    this.allFiles = this.allFiles.filter((path, index) => this.allFiles.findIndex((f) => f == path) == index);
    return this.keptDependencies;
  }
  async build(options) {
    this.getAllFiles();
    this.getKeptDependencies();
    this.getRemovedFiles();
    this.getAddedFiles();
    let metadataAsset = await this.createMetadata(options);
    if (!metadataAsset)
      return false;
    this.web.dependencies.push(metadataAsset);
    this.web.downloads.push(metadataAsset);
    if (options.addSearch) {
      let index = await this.createIndex();
      if (!index)
        return false;
      this.web.dependencies.push(index);
      this.web.downloads.push(index);
    }
    return true;
  }
};

// scripts/objects/website.ts
var import_rss = __toESM(require_lib3());
var Website = class {
  constructor() {
    this.webpages = [];
    this.dependencies = [];
    this.downloads = [];
    this.batchFiles = [];
    this.progress = 0;
    this.rssPath = AssetHandler.libraryPath.joinString("rss.xml").makeUnixStyle().asString;
    this.fileTreeHtml = "";
  }
  async createWithFiles(files, destination, options) {
    this.exportOptions = Object.assign(new MarkdownWebpageRendererAPIOptions2(), options);
    this.batchFiles = files;
    this.destination = destination;
    await this.initExport();
    console.log("Creating website with files: ", files);
    let useIncrementalExport = this.index.shouldApplyIncrementalExport();
    for (let file of files) {
      if (MarkdownRendererAPI.checkCancelled())
        return;
      ExportLog.progress(this.progress, this.batchFiles.length, "Generating HTML", "Exporting: " + file.path, "var(--interactive-accent)");
      this.progress++;
      let filename = new Path(file.path).basename;
      let webpage = new Webpage(file, destination, filename, this, this.exportOptions);
      let shouldExportPage = useIncrementalExport && this.index.isFileChanged(file) || !useIncrementalExport;
      if (!shouldExportPage)
        continue;
      let createdPage = await webpage.create();
      if (!createdPage)
        continue;
      this.webpages.push(webpage);
      this.downloads.push(webpage);
      this.downloads.push(...webpage.dependencies);
      this.dependencies.push(...webpage.dependencies);
    }
    this.dependencies.push(...AssetHandler.getDownloads(this.exportOptions));
    this.downloads.push(...AssetHandler.getDownloads(this.exportOptions));
    this.filterDownloads(true);
    this.index.build(this.exportOptions);
    this.filterDownloads();
    if (this.exportOptions.addRSS) {
      this.createRSS();
    }
    console.log("Website created: ", this);
    return this;
  }
  giveWarnings() {
    var _a2, _b, _c, _d, _e;
    if (app.plugins.enabledPlugins.has("obsidian-icon-folder")) {
      let fileToIconName = app.plugins.plugins["obsidian-icon-folder"].data;
      let noteIconsEnabled = (_a2 = fileToIconName.settings.iconsInNotesEnabled) != null ? _a2 : false;
      if (!noteIconsEnabled) {
        ExportLog.warning('For Iconize plugin support, enable "Toggle icons while editing notes" in the Iconize plugin settings.');
      }
    }
    if (app.plugins.enabledPlugins.has("obsidian-excalidraw-plugin")) {
      let embedMode = (_c = (_b = app.plugins.plugins["obsidian-excalidraw-plugin"]) == null ? void 0 : _b.settings["previewImageType"]) != null ? _c : "";
      if (embedMode != "SVG") {
        ExportLog.warning('For Excalidraw embed support, set the embed mode to "Native SVG" in the Excalidraw plugin settings.');
      }
    }
    if (app.plugins.enabledPlugins.has("obsidian-banners")) {
      let bannerPlugin = app.plugins.plugins["obsidian-banners"];
      let version = (_e = (_d = bannerPlugin == null ? void 0 : bannerPlugin.manifest) == null ? void 0 : _d.version) != null ? _e : "0.0.0";
      version = version.substring(0, 5);
      if (version < "2.0.5") {
        ExportLog.warning("The Banner plugin version 2.0.5 or higher is required for full support. You have version " + version + ".");
      }
    }
    if (this.exportOptions.addRSS && (this.exportOptions.siteURL == "" || this.exportOptions.siteURL == void 0)) {
      ExportLog.warning("Creating an RSS feed requires a site url to be set in the export settings.");
    }
  }
  async initExport() {
    var _a2, _b;
    this.progress = 0;
    this.index = new WebsiteIndex(this);
    await MarkdownRendererAPI.beginBatch();
    this.giveWarnings();
    if (this.exportOptions.addGraphView) {
      ExportLog.progress(0, 1, "Initialize Export", "Generating graph view", "var(--color-yellow)");
      let convertableFiles = this.batchFiles.filter((file) => MarkdownRendererAPI.isConvertable(file.extension));
      this.globalGraph = new GraphView();
      await this.globalGraph.init(convertableFiles, this.exportOptions);
    }
    if (this.exportOptions.addFileNavigation) {
      ExportLog.progress(0, 1, "Initialize Export", "Generating file tree", "var(--color-yellow)");
      this.fileTree = new FileTree(this.batchFiles, false, true);
      this.fileTree.makeLinksWebStyle = (_a2 = this.exportOptions.webStylePaths) != null ? _a2 : true;
      this.fileTree.showNestingIndicator = true;
      this.fileTree.generateWithItemsClosed = true;
      this.fileTree.showFileExtentionTags = true;
      this.fileTree.hideFileExtentionTags = ["md"];
      this.fileTree.title = (_b = this.exportOptions.siteName) != null ? _b : app.vault.getName();
      this.fileTree.class = "file-tree";
      let tempTreeContainer = document.body.createDiv();
      await this.fileTree.generateTreeWithContainer(tempTreeContainer);
      this.fileTreeHtml = tempTreeContainer.innerHTML;
      tempTreeContainer.remove();
    }
    ExportLog.progress(0, 1, "Initialize Export", "loading assets", "var(--color-yellow)");
    await AssetHandler.reloadAssets();
    Website.validBodyClasses = await HTMLGeneration.getValidBodyClasses(true);
    if (this.exportOptions.addGraphView) {
      ExportLog.progress(1, 1, "Loading graph asset", "...", "var(--color-yellow)");
      this.graphDataAsset = new Asset("graph-data.js", this.globalGraph.getExportData(), "script" /* Script */, "autohead" /* AutoHead */, true, "temporary" /* Temporary */);
      this.graphDataAsset.load(this.exportOptions);
    }
    if (this.exportOptions.addFileNavigation) {
      ExportLog.progress(1, 1, "Loading file tree asset", "...", "var(--color-yellow)");
      this.fileTreeAsset = new Asset("file-tree.html", this.fileTreeHtml, "html" /* HTML */, "auto" /* Auto */, true, "temporary" /* Temporary */);
      this.fileTreeAsset.load(this.exportOptions);
    }
    ExportLog.progress(1, 1, "Initializing index", "...", "var(--color-yellow)");
    await this.index.init();
  }
  async createRSS() {
    var _a2, _b, _c, _d, _e, _f, _g;
    let author = this.exportOptions.authorName || void 0;
    this.rss = new import_rss.default({
      title: (_a2 = this.exportOptions.siteName) != null ? _a2 : app.vault.getName(),
      description: "Obsidian digital garden",
      generator: "Webpage HTML Export plugin for Obsidian",
      feed_url: Path.joinStrings((_b = this.exportOptions.siteURL) != null ? _b : "", this.rssPath).asString,
      site_url: (_c = this.exportOptions.siteURL) != null ? _c : "",
      image_url: Path.joinStrings((_d = this.exportOptions.siteURL) != null ? _d : "", AssetHandler.favicon.relativePath.asString).asString,
      pubDate: new Date(this.index.exportTime),
      copyright: author,
      ttl: 60,
      custom_elements: [
        { "dc:creator": author }
      ]
    });
    for (let page of this.webpages) {
      if (!page.isConvertable || page.sizerElement.innerText.length < 5)
        continue;
      let title = page.title;
      let url = Path.joinStrings((_e = this.exportOptions.siteURL) != null ? _e : "", page.relativePath.asString).asString;
      let guid = page.source.path;
      let date = new Date(page.source.stat.mtime);
      author = (_f = page.author) != null ? _f : author;
      let media = (_g = page.metadataImageURL) != null ? _g : "";
      let hasMedia = media != "";
      let description = page.description;
      if (!description) {
        let keepTextLinksImages = function(element) {
          var _a3, _b2, _c2;
          let walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT);
          let node;
          let nodes = [];
          while (node = walker.nextNode()) {
            if (node.nodeType == Node.ELEMENT_NODE) {
              let element2 = node;
              if (element2.tagName == "A" || element2.tagName == "IMG" || element2.tagName == "BR") {
                nodes.push(element2);
              }
              if (element2.tagName == "DIV") {
                let classes = (_a3 = element2.parentElement) == null ? void 0 : _a3.classList;
                if ((classes == null ? void 0 : classes.contains("heading-children")) || (classes == null ? void 0 : classes.contains("markdown-preview-sizer"))) {
                  nodes.push(document.createElement("br"));
                }
              }
              if (element2.tagName == "LI") {
                nodes.push(document.createElement("br"));
              }
            } else {
              if (((_b2 = node.parentElement) == null ? void 0 : _b2.tagName) != "A" && ((_c2 = node.parentElement) == null ? void 0 : _c2.tagName) != "IMG")
                nodes.push(node);
            }
          }
          element.innerHTML = "";
          element.append(...nodes);
        };
        let content = page.viewElement.cloneNode(true);
        content.querySelectorAll(`h1, h2, h3, h4, h5, h6, .mermaid, table, mjx-container, style, script, 
.mod-header, .mod-footer, .metadata-container, .frontmatter, img[src^="data:"]`).forEach((heading) => heading.remove());
        content.querySelectorAll("[src]").forEach((el) => {
          var _a3;
          let src = el.src;
          if (!src)
            return;
          if (src.startsWith("http") || src.startsWith("data:"))
            return;
          src = src.replace("app://obsidian", "");
          src = src.replace(".md", "");
          let path = Path.joinStrings((_a3 = this.exportOptions.siteURL) != null ? _a3 : "", src);
          el.src = path.asString;
        });
        content.querySelectorAll("[href]").forEach((el) => {
          var _a3;
          let href = el.href;
          if (!href)
            return;
          if (href.startsWith("http") || href.startsWith("data:"))
            return;
          href = href.replace("app://obsidian", "");
          href = href.replace(".md", "");
          let path = Path.joinStrings((_a3 = this.exportOptions.siteURL) != null ? _a3 : "", href);
          el.href = path.asString;
        });
        keepTextLinksImages(content);
        description = content.innerHTML;
        content.remove();
      }
      let tags = page.tags.map((t) => t).map((tag) => `<a class="tag" href="${this.exportOptions.siteURL}?query=tag:${tag.replace("#", "")}">${tag}</a>`).join(" ");
      let tagContainer = document.body.createDiv();
      tagContainer.innerHTML = tags;
      tagContainer.style.display = "flex";
      tagContainer.style.gap = "0.4em";
      tagContainer.querySelectorAll("a.tag").forEach((tag) => {
        tag.style.backgroundColor = "#046c74";
        tag.style.color = "white";
        tag.style.fontWeight = "700";
        tag.style.border = "none";
        tag.style.borderRadius = "1em";
        tag.style.padding = "0.2em 0.5em";
      });
      description = tagContainer.innerHTML + " \n " + description;
      tagContainer.remove();
      this.rss.item({
        title,
        description,
        url,
        guid,
        date,
        enclosure: hasMedia ? { url: media } : void 0,
        author,
        custom_elements: [
          hasMedia ? { "content:encoded": `<figure><img src="${media}"></figure>` } : void 0
        ]
      });
    }
    let result = this.rss.xml();
    let rssAbsoultePath = this.destination.joinString(this.rssPath);
    let rssFileOld = await rssAbsoultePath.readFileString();
    if (rssFileOld) {
      let rssDocOld = new DOMParser().parseFromString(rssFileOld, "text/xml");
      let rssDocNew = new DOMParser().parseFromString(result, "text/xml");
      let oldItems = Array.from(rssDocOld.querySelectorAll("item"));
      let newItems = Array.from(rssDocNew.querySelectorAll("item"));
      oldItems = oldItems.filter((oldItem) => !newItems.find((newItem) => {
        var _a3, _b2;
        return ((_a3 = newItem.querySelector("guid")) == null ? void 0 : _a3.textContent) == ((_b2 = oldItem.querySelector("guid")) == null ? void 0 : _b2.textContent);
      }));
      oldItems = oldItems.filter((oldItem) => {
        var _a3, _b2;
        return !this.index.removedFiles.contains((_b2 = (_a3 = oldItem.querySelector("guid")) == null ? void 0 : _a3.textContent) != null ? _b2 : "");
      });
      newItems = newItems.concat(oldItems);
      newItems.forEach((item) => item.remove());
      let channel = rssDocNew.querySelector("channel");
      newItems.forEach((item) => channel == null ? void 0 : channel.appendChild(item));
      result = rssDocNew.documentElement.outerHTML;
    }
    let rss = new Asset("rss.xml", result, "other" /* Other */, "download" /* Download */, false, "temporary" /* Temporary */);
    rss.download(this.destination);
  }
  filterDownloads(onlyDuplicates = false) {
    this.dependencies = this.dependencies.filter((file, index) => this.dependencies.findIndex((f) => f.relativePath.asString == file.relativePath.asString) == index);
    this.downloads = this.downloads.filter((file, index) => this.downloads.findIndex((f) => f.relativePath.asString == file.relativePath.asString) == index);
    if (!this.index.shouldApplyIncrementalExport() || onlyDuplicates)
      return;
    let localThis = this;
    function filterFunction(file) {
      if (file.filename.endsWith(".html"))
        return true;
      if (localThis.index.hasFileByPath(file.relativePath.asString) && file.filename.endsWith(".woff") || file.filename.endsWith(".woff2") || file.filename.endsWith(".otf") || file.filename.endsWith(".ttf")) {
        return false;
      }
      let metadata = localThis.index.getMetadataForPath(file.relativePath.copy.makeUnixStyle().asString);
      if (metadata && (file.modifiedTime > metadata.modifiedTime || metadata.sourceSize != file.content.length))
        return true;
      console.log("Excluding: " + file.relativePath.asString);
      return false;
    }
    this.dependencies = this.dependencies.filter(filterFunction);
    this.downloads = this.downloads.filter(filterFunction);
  }
  static async getTitleAndIcon(file, skipIcon = false) {
    var _a2, _b, _c, _d, _e, _f;
    const { app: app2 } = HTMLExportPlugin.plugin;
    const { titleProperty } = Settings;
    let iconOutput = "";
    let iconProperty = "";
    let title = file.name;
    let isDefaultTitle = true;
    let useDefaultIcon = false;
    if (file instanceof import_obsidian2.TFile) {
      const fileCache = app2.metadataCache.getFileCache(file);
      const frontmatter = fileCache == null ? void 0 : fileCache.frontmatter;
      const titleFromFrontmatter = (_a2 = frontmatter == null ? void 0 : frontmatter[titleProperty]) != null ? _a2 : frontmatter == null ? void 0 : frontmatter.banner_header;
      title = titleFromFrontmatter != null ? titleFromFrontmatter : file.basename;
      if (title != file.basename)
        isDefaultTitle = false;
      if (title.endsWith(".excalidraw"))
        title = title.substring(0, title.length - 11);
      iconProperty = (_c = (_b = frontmatter == null ? void 0 : frontmatter.icon) != null ? _b : frontmatter == null ? void 0 : frontmatter.sticker) != null ? _c : frontmatter == null ? void 0 : frontmatter.banner_icon;
      if (!iconProperty && Settings.showDefaultTreeIcons) {
        useDefaultIcon = true;
        let isMedia = Asset.extentionToType(file.extension) == "media" /* Media */;
        iconProperty = isMedia ? Settings.defaultMediaIcon : Settings.defaultFileIcon;
        if (file.extension == "canvas")
          iconProperty = "lucide//layout-dashboard";
      }
    }
    if (skipIcon)
      return { title, icon: "", isDefaultIcon: true, isDefaultTitle };
    if (file instanceof import_obsidian2.TFolder && Settings.showDefaultTreeIcons) {
      iconProperty = Settings.defaultFolderIcon;
      useDefaultIcon = true;
    }
    iconOutput = await HTMLGeneration.getIcon(iconProperty != null ? iconProperty : "");
    let isUnchangedNotEmojiNotHTML = iconProperty == iconOutput && iconOutput.length < 40 && !/\p{Emoji}/u.test(iconOutput) && !iconOutput.includes("<") && !iconOutput.includes(">");
    let parsedAsIconize = false;
    if ((useDefaultIcon || !iconProperty || isUnchangedNotEmojiNotHTML) && app2.plugins.enabledPlugins.has("obsidian-icon-folder")) {
      let fileToIconName = app2.plugins.plugins["obsidian-icon-folder"].data;
      let noteIconsEnabled = (_d = fileToIconName.settings.iconsInNotesEnabled) != null ? _d : false;
      if (noteIconsEnabled) {
        let iconIdentifier = (_e = fileToIconName.settings.iconIdentifier) != null ? _e : ":";
        let iconProperty2 = fileToIconName[file.path];
        if (iconProperty2 && typeof iconProperty2 != "string") {
          iconProperty2 = (_f = iconProperty2.iconName) != null ? _f : "";
        }
        if (iconProperty2 && typeof iconProperty2 == "string" && iconProperty2.trim() != "") {
          if (file instanceof import_obsidian2.TFile)
            app2.fileManager.processFrontMatter(file, (frontmatter) => {
              frontmatter.icon = iconProperty2;
            });
          iconOutput = iconIdentifier + iconProperty2 + iconIdentifier;
          parsedAsIconize = true;
        }
      }
    }
    if (!parsedAsIconize && isUnchangedNotEmojiNotHTML)
      iconOutput = "";
    return { title, icon: iconOutput, isDefaultIcon: useDefaultIcon, isDefaultTitle };
  }
};

// scripts/objects/file-tree.ts
var FileTree = class extends Tree {
  constructor(files, keepOriginalExtensions = false, sort = true) {
    super();
    this.children = [];
    this.showFileExtentionTags = true;
    this.hideFileExtentionTags = [];
    this.files = files;
    this.keepOriginalExtensions = keepOriginalExtensions;
    this.sort = sort;
    this.renderMarkdownTitles = true;
  }
  async populateTree() {
    for (let file of this.files) {
      let pathSections = [];
      let parentFile = file;
      while (parentFile != void 0) {
        pathSections.push(parentFile);
        parentFile = parentFile.parent;
      }
      pathSections.reverse();
      let parent = this;
      for (let i = 1; i < pathSections.length; i++) {
        let section = pathSections[i];
        let isFolder = section instanceof import_obsidian3.TFolder;
        let child = parent.children.find((sibling) => sibling.title == section.name && sibling.isFolder == isFolder && sibling.depth == i);
        if (child == void 0) {
          child = new FileTreeItem(this, parent, i);
          child.title = section.name;
          child.isFolder = isFolder;
          if (child.isFolder) {
            child.itemClass = "mod-tree-folder nav-folder";
            let titleInfo = await Website.getTitleAndIcon(section);
            child.icon = titleInfo.icon;
          } else
            child.itemClass = "mod-tree-file nav-file";
          parent.children.push(child);
        }
        parent = child;
      }
      if (parent instanceof FileTreeItem) {
        let titleInfo = await Website.getTitleAndIcon(file);
        let path = new Path(file.path).makeUnixStyle();
        if (file instanceof import_obsidian3.TFolder)
          path.makeForceFolder();
        else {
          if (path.asString.endsWith(".excalidraw.md"))
            path.setExtension("drawing");
          parent.originalExtension = path.extensionName;
          if (!this.keepOriginalExtensions && MarkdownRendererAPI.isConvertable(path.extensionName))
            path.setExtension("html");
        }
        parent.href = path.asString;
        parent.title = path.basename == "." ? "" : titleInfo.title;
        parent.icon = titleInfo.icon || "";
      }
    }
    if (this.sort) {
      this.sortAlphabetically();
      this.sortByIsFolder();
    }
  }
  async generateTree(container) {
    await this.populateTree();
    await super.generateTree(container);
  }
  sortByIsFolder(reverse = false) {
    this.children.sort((a, b) => reverse ? a.isFolder && !b.isFolder ? -1 : 1 : a.isFolder && !b.isFolder ? -1 : 1);
    for (let child of this.children) {
      child.sortByIsFolder(reverse);
    }
  }
  forAllChildren(func, recursive = true) {
    for (let child of this.children) {
      func(child);
      if (recursive)
        child.forAllChildren(func);
    }
  }
};
var FileTreeItem = class extends TreeItem {
  constructor() {
    super(...arguments);
    this.children = [];
    this.isFolder = false;
    this.originalExtension = "";
  }
  forAllChildren(func, recursive = true) {
    super.forAllChildren(func, recursive);
  }
  sortByIsFolder(reverse = false) {
    this.children.sort((a, b) => reverse ? a.isFolder && !b.isFolder ? -1 : 1 : a.isFolder && !b.isFolder ? -1 : 1);
    for (let child of this.children) {
      child.sortByIsFolder(reverse);
    }
  }
  async createItemContents(container) {
    let containerEl = await super.createItemContents(container);
    if (this.isFolder)
      containerEl.addClass("nav-folder-title");
    else
      containerEl.addClass("nav-file-title");
    if (!this.isFolder && this.tree.showFileExtentionTags && !this.tree.hideFileExtentionTags.contains(this.originalExtension)) {
      let tag = containerEl.createDiv({ cls: "nav-file-tag" });
      tag.textContent = this.originalExtension.toUpperCase();
    }
    return containerEl;
  }
  async createItemTitle(container) {
    let titleEl = await super.createItemTitle(container);
    if (this.isFolder)
      titleEl.addClass("nav-folder-title-content", "tree-item-inner");
    else
      titleEl.addClass("nav-file-title-content", "tree-item-inner");
    return titleEl;
  }
};

// scripts/objects/file-picker.ts
var FilePickerTree = class extends FileTree {
  constructor(files, keepOriginalExtensions = false, sort = true) {
    super(files, keepOriginalExtensions, sort);
    this.children = [];
  }
  async populateTree() {
    for (let file of this.files) {
      let pathSections = [];
      let parentFile = file;
      while (parentFile != void 0) {
        pathSections.push(parentFile);
        parentFile = parentFile.parent;
      }
      pathSections.reverse();
      let parent = this;
      for (let i = 1; i < pathSections.length; i++) {
        let section = pathSections[i];
        let isFolder = section instanceof import_obsidian4.TFolder;
        let child = parent.children.find((sibling) => sibling.title == section.name && sibling.isFolder == isFolder && sibling.depth == i);
        if (child == void 0) {
          child = new FilePickerTreeItem(this, parent, i);
          child.title = section.name;
          child.isFolder = isFolder;
          if (child.isFolder) {
            child.href = section.path;
            child.itemClass = "mod-tree-folder";
          } else {
            child.file = file;
            child.itemClass = "mod-tree-file";
          }
          parent.children.push(child);
        }
        parent = child;
      }
      if (parent instanceof FilePickerTreeItem) {
        let titleInfo = await Website.getTitleAndIcon(file, true);
        let path = new Path(file.path).makeUnixStyle();
        if (file instanceof import_obsidian4.TFolder)
          path.makeForceFolder();
        else {
          parent.originalExtension = path.extensionName;
          if (!this.keepOriginalExtensions && MarkdownRendererAPI.isConvertable(path.extensionName))
            path.setExtension("html");
        }
        parent.href = path.asString;
        parent.title = path.basename == "." ? "" : titleInfo.title;
      }
    }
    if (this.sort) {
      this.sortAlphabetically();
      this.sortByIsFolder();
    }
  }
  async generateTree(container) {
    await super.generateTree(container);
    let selectAllButton = new FilePickerTreeItem(this, this, 0);
    selectAllButton.title = "Select All";
    selectAllButton.itemClass = "mod-tree-control";
    let itemEl = await selectAllButton.generateItemHTML(container);
    let oldItemEl = itemEl;
    itemEl = itemEl.cloneNode(true);
    selectAllButton.checkbox = itemEl.querySelector("input");
    selectAllButton.itemEl = itemEl;
    selectAllButton.childContainer = itemEl.querySelector(".tree-item-children");
    container.prepend(itemEl);
    oldItemEl.remove();
    let localThis = this;
    function selectAll() {
      let checked = selectAllButton.checkbox.checked;
      selectAllButton.check(!checked);
      localThis.forAllChildren((child) => child.check(!checked));
    }
    selectAllButton.checkbox.addEventListener("click", (event) => {
      selectAllButton.checkbox.checked = !selectAllButton.checkbox.checked;
      selectAll();
      event.stopPropagation();
    });
    selectAllButton.itemEl.addEventListener("click", () => {
      selectAll();
    });
    this.selectAllItem = selectAllButton;
  }
  getSelectedFiles() {
    let selectedFiles = [];
    this.forAllChildren((child) => {
      if (child.checked && !child.isFolder)
        selectedFiles.push(child.file);
    });
    return selectedFiles;
  }
  getSelectedFilesSavePaths() {
    var _a2;
    let selectedFiles = [];
    if ((_a2 = this.selectAllItem) == null ? void 0 : _a2.checked) {
      selectedFiles = ["all"];
      return selectedFiles;
    }
    this.forAllChildren((child) => {
      selectedFiles.push(...child.getSelectedFilesSavePaths());
    }, false);
    return selectedFiles;
  }
  setSelectedFiles(files) {
    var _a2;
    if (files.includes("all")) {
      (_a2 = this.selectAllItem) == null ? void 0 : _a2.check(true, false, true);
      this.forAllChildren((child) => child.check(true));
      return;
    }
    this.forAllChildren((child) => {
      var _a3;
      if (files.includes((_a3 = child.href) != null ? _a3 : "")) {
        child.check(true);
      }
    });
    this.evaluateFolderChecks();
  }
  forAllChildren(func, recursive) {
    super.forAllChildren(func, recursive);
  }
  evaluateFolderChecks() {
    var _a2, _b;
    this.forAllChildren((child) => {
      var _a3, _b2;
      if (child.isFolder) {
        let uncheckedChildren = (_a3 = child == null ? void 0 : child.itemEl) == null ? void 0 : _a3.querySelectorAll(".mod-tree-file .file-checkbox:not(.checked)");
        if (!child.checked && (uncheckedChildren == null ? void 0 : uncheckedChildren.length) == 0) {
          child.check(true, false, true);
        } else if ((_b2 = uncheckedChildren == null ? void 0 : uncheckedChildren.length) != null ? _b2 : 0 > 0) {
          child.check(false, false, true);
        }
      }
    });
    if (this.children.reduce((acc, child) => acc && child.checked, true)) {
      (_a2 = this.selectAllItem) == null ? void 0 : _a2.check(true, false, true);
    } else {
      (_b = this.selectAllItem) == null ? void 0 : _b.check(false, false, true);
    }
  }
};
var FilePickerTreeItem = class extends FileTreeItem {
  constructor() {
    super(...arguments);
    this.checked = false;
  }
  async createItemContents(container) {
    let linkEl = await super.createItemContents(container);
    this.checkbox = linkEl.createEl("input");
    linkEl.prepend(this.checkbox);
    this.checkbox.classList.add("file-checkbox");
    this.checkbox.setAttribute("type", "checkbox");
    this.checkbox.addEventListener("click", (event) => {
      event.stopPropagation();
      this.check(this.checkbox.checked, false);
      this.tree.evaluateFolderChecks();
    });
    let localThis = this;
    linkEl == null ? void 0 : linkEl.addEventListener("click", function(event) {
      if (localThis.isFolder)
        localThis.toggleCollapse();
      else
        localThis.toggle(true);
    });
    return linkEl;
  }
  check(checked, evaluate = false, skipChildren = false) {
    this.checked = checked;
    this.checkbox.checked = checked;
    this.checkbox.classList.toggle("checked", checked);
    if (!skipChildren)
      this.checkAllChildren(checked);
    if (evaluate)
      this.tree.evaluateFolderChecks();
  }
  toggle(evaluate = false) {
    this.check(!this.checked, evaluate);
  }
  checkAllChildren(checked) {
    this.forAllChildren((child) => child.check(checked));
  }
  forAllChildren(func, recursive) {
    super.forAllChildren(func, recursive);
  }
  getSelectedFilesSavePaths() {
    var _a2;
    let selectedFiles = [];
    if (this.checked) {
      selectedFiles.push((_a2 = this.href) != null ? _a2 : "");
    } else if (this.isFolder) {
      this.forAllChildren((child) => {
        selectedFiles.push(...child.getSelectedFilesSavePaths());
      }, false);
    }
    return selectedFiles;
  }
};

// scripts/settings/export-modal.ts
var _ExportModal = class extends import_obsidian5.Modal {
  constructor() {
    super(app);
    this.isClosed = true;
    this.canceled = true;
    this.pickedFiles = void 0;
    this.validPath = true;
  }
  overridePickedFiles(files) {
    this.pickedFiles = files;
  }
  async open() {
    var _a2, _b, _c, _d;
    this.isClosed = false;
    this.canceled = true;
    super.open();
    if (!this.filePickerModalEl) {
      this.filePickerModalEl = this.containerEl.createDiv({ cls: "modal" });
      this.containerEl.insertBefore(this.filePickerModalEl, this.modalEl);
      this.filePickerModalEl.style.position = "relative";
      this.filePickerModalEl.style.zIndex = "1";
      this.filePickerModalEl.style.width = "25em";
      this.filePickerModalEl.style.padding = "0";
      this.filePickerModalEl.style.margin = "10px";
      this.filePickerModalEl.style.maxHeight = "80%";
      this.filePickerModalEl.style.boxShadow = "0 0 7px 1px inset #00000060";
      let container = this.filePickerModalEl.createDiv({ cls: "modal-content tree-container mod-root file-picker-tree file-tree mod-nav-indicator" });
      container.style.height = "100%";
      container.style.width = "100%";
      container.style.padding = "0";
      container.style.margin = "0";
      container.style.display = "flex";
      container.style.flexDirection = "column";
      container.style.alignItems = "flex-end";
      let scrollArea = container.createDiv({ cls: "tree-scroll-area" });
      scrollArea.style.height = "100%";
      scrollArea.style.width = "100%";
      scrollArea.style.overflowY = "auto";
      scrollArea.style.overflowX = "hidden";
      scrollArea.style.padding = "1em";
      scrollArea.style.boxShadow = "0 0 7px 1px inset #00000060";
      this.filePicker = new FilePickerTree(app.vault.getFiles(), true, true);
      this.filePicker.generateWithItemsClosed = true;
      this.filePicker.showFileExtentionTags = true;
      this.filePicker.hideFileExtentionTags = ["md"];
      await this.filePicker.generateTree(scrollArea);
      if (((_b = (_a2 = this.pickedFiles) == null ? void 0 : _a2.length) != null ? _b : 0 > 0) || Settings.filesToExport[0].length > 0) {
        let filesToPick = (_d = (_c = this.pickedFiles) == null ? void 0 : _c.map((file) => file.path)) != null ? _d : Settings.filesToExport[0];
        this.filePicker.setSelectedFiles(filesToPick);
      }
      let saveFiles = new import_obsidian5.Setting(container).addButton((button) => {
        button.setButtonText("Save").onClick(async () => {
          Settings.filesToExport[0] = this.filePicker.getSelectedFilesSavePaths();
          await SettingsPage3.saveSettings();
        });
      });
      saveFiles.settingEl.style.border = "none";
      saveFiles.settingEl.style.marginRight = "1em";
    }
    const { contentEl } = this;
    contentEl.empty();
    this.titleEl.setText(_ExportModal.title);
    if (HTMLExportPlugin.updateInfo.updateAvailable) {
      let updateNotice = contentEl.createEl("strong", { text: `Update Available: ${HTMLExportPlugin.updateInfo.currentVersion} \u27F6 ${HTMLExportPlugin.updateInfo.latestVersion}` });
      updateNotice.setAttribute("style", `margin-block-start: calc(var(--h3-size)/2);
			background-color: var(--interactive-normal);
			padding: 4px;
			padding-left: 1em;
			padding-right: 1em;
			color: var(--color-red);
			border-radius: 5px;
			display: block;
			width: fit-content;`);
      let updateNotes = contentEl.createEl("div", { text: HTMLExportPlugin.updateInfo.updateNote });
      updateNotes.setAttribute("style", `margin-block-start: calc(var(--h3-size)/2);
			background-color: var(--background-secondary-alt);
			padding: 4px;
			padding-left: 1em;
			padding-right: 1em;
			color: var(--text-normal);
			font-size: var(--font-ui-smaller);
			border-radius: 5px;
			display: block;
			width: fit-content;
			white-space: pre-wrap;`);
    }
    let modeDescriptions = {
      "website": "This will export a file structure suitable for uploading to your own web server.",
      "documents": "This will export self-contained, but slow loading and large, html documents.",
      "raw-documents": "This will export raw, self-contained documents without the website layout. This is useful for sharing individual notes, or printing."
    };
    let exportModeSetting = new import_obsidian5.Setting(contentEl).setName("Export Mode").setDesc(modeDescriptions[Settings.exportPreset] + "\n\nSome options are only available in certain modes.").setHeading().addDropdown((dropdown) => dropdown.addOption("website", "Online Web Server").addOption("documents", "HTML Documents").addOption("raw-documents", "Raw HTML Documents").setValue(["website", "documents", "raw-documents"].contains(Settings.exportPreset) ? Settings.exportPreset : "website").onChange(async (value) => {
      Settings.exportPreset = value;
      switch (value) {
        case "website":
          Settings.inlineAssets = false;
          Settings.makeNamesWebStyle = true;
          Settings.addGraphView = true;
          Settings.addFileNav = true;
          Settings.addSearchBar = true;
          await SettingsPage3.saveSettings();
          break;
        case "documents":
          Settings.inlineAssets = true;
          Settings.makeNamesWebStyle = false;
          Settings.addFileNav = true;
          Settings.addGraphView = false;
          Settings.addSearchBar = false;
          await SettingsPage3.saveSettings();
          break;
        case "raw-documents":
          Settings.inlineAssets = true;
          Settings.makeNamesWebStyle = false;
          Settings.addGraphView = false;
          Settings.addFileNav = false;
          Settings.addSearchBar = false;
          await SettingsPage3.saveSettings();
          break;
      }
      this.open();
    }));
    exportModeSetting.descEl.style.whiteSpace = "pre-wrap";
    SettingsPage3.createToggle(contentEl, "Open after export", () => Settings.openAfterExport, (value) => Settings.openAfterExport = value);
    let exportButton = void 0;
    function setExportDisabled(disabled) {
      if (exportButton) {
        exportButton.setDisabled(disabled);
        if (exportButton.disabled)
          exportButton.buttonEl.style.opacity = "0.5";
        else
          exportButton.buttonEl.style.opacity = "1";
      }
    }
    let validatePath = (path) => path.validate({
      allowEmpty: false,
      allowRelative: false,
      allowAbsolute: true,
      allowDirectories: true,
      allowTildeHomeDirectory: true,
      requireExists: true
    });
    let exportPathInput = SettingsPage3.createFileInput(contentEl, () => Settings.exportPath, (value) => Settings.exportPath = value, {
      name: "",
      description: "",
      placeholder: "Type or browse an export directory...",
      defaultPath: Utils.idealDefaultPath(),
      pickFolder: true,
      validation: validatePath,
      onChanged: (path) => !validatePath(path).valid ? setExportDisabled(true) : setExportDisabled(false)
    });
    let { fileInput } = exportPathInput;
    fileInput.addButton((button) => {
      exportButton = button;
      setExportDisabled(!this.validPath);
      button.setButtonText("Export").onClick(async () => {
        this.canceled = false;
        this.close();
      });
    });
    new import_obsidian5.Setting(contentEl).setDesc("More options located on the plugin settings page.").addExtraButton((button) => button.setTooltip("Open plugin settings").onClick(() => {
      app.setting.open();
      app.setting.openTabById("webpage-html-export");
    }));
    this.filePickerModalEl.style.height = this.modalEl.clientHeight * 2 + "px";
    await Utils.waitUntil(() => this.isClosed, 60 * 60 * 1e3, 10);
    this.pickedFiles = this.filePicker.getSelectedFiles();
    this.filePickerModalEl.remove();
    this.exportInfo = { canceled: this.canceled, pickedFiles: this.pickedFiles, exportPath: new Path(Settings.exportPath), validPath: this.validPath };
    return this.exportInfo;
  }
  onClose() {
    const { contentEl } = this;
    contentEl.empty();
    this.isClosed = true;
    _ExportModal.title = "Export to HTML";
  }
};
var ExportModal = _ExportModal;
ExportModal.title = "Export to HTML";

// scripts/settings/settings-migration.ts
var import_obsidian6 = require("obsidian");
async function migrateSettings() {
  if (Settings.settingsVersion == HTMLExportPlugin.pluginVersion)
    return;
  new import_obsidian6.Notice("Webpage HTML Export settings have been updated to a new version. Please update your settings if any have been reset.", 1e4);
  var settingsToSave = [
    "filesToExport",
    "exportPath",
    "includePluginCSS",
    "includeGraphView",
    "graphMaxNodeSize",
    "graphMinNodeSize",
    "graphEdgePruning",
    "graphCentralForce",
    "graphRepulsionForce",
    "graphLinkLength",
    "graphAttractionForce"
  ];
  try {
    var savedSettings = JSON.parse(JSON.stringify(Object.assign({}, Settings)));
    Object.assign(Settings, DEFAULT_SETTINGS);
    for (var i = 0; i < settingsToSave.length; i++) {
      var settingName = settingsToSave[i];
      Settings[settingName] = savedSettings[settingName];
    }
    Settings.settingsVersion = HTMLExportPlugin.pluginVersion;
  } catch (e) {
    ExportLog.error(e, "Failed to migrate settings, resetting to default settings.");
    Object.assign(Settings, DEFAULT_SETTINGS);
  }
  await SettingsPage3.saveSettings();
  return;
}

// scripts/settings/settings.ts
var EmojiStyle = /* @__PURE__ */ ((EmojiStyle2) => {
  EmojiStyle2["Native"] = "Native";
  EmojiStyle2["Twemoji"] = "Twemoji";
  EmojiStyle2["OpenMoji"] = "OpenMoji";
  EmojiStyle2["OpenMojiOutline"] = "OpenMojiOutline";
  EmojiStyle2["FluentUI"] = "FluentUI";
  return EmojiStyle2;
})(EmojiStyle || {});
var Settings = class {
};
var DEFAULT_SETTINGS = {
  settingsVersion: "0.0.0",
  makeOfflineCompatible: false,
  inlineAssets: false,
  includePluginCSS: "",
  includeSvelteCSS: true,
  titleProperty: "title",
  customHeadContentPath: "",
  faviconPath: "",
  documentWidth: "40em",
  sidebarWidth: "20em",
  minOutlineCollapse: 2,
  startOutlineCollapsed: false,
  allowFoldingHeadings: true,
  allowFoldingLists: true,
  allowResizingSidebars: true,
  logLevel: "warning",
  minifyHTML: true,
  makeNamesWebStyle: true,
  onlyExportModified: true,
  deleteOldFiles: true,
  addThemeToggle: true,
  addOutline: true,
  addFileNav: true,
  addSearchBar: true,
  addGraphView: true,
  addTitle: true,
  addRSSFeed: true,
  siteURL: "",
  authorName: "",
  vaultTitle: app.vault.getName(),
  exportPreset: "website" /* Website */,
  openAfterExport: false,
  graphAttractionForce: 1,
  graphLinkLength: 10,
  graphRepulsionForce: 150,
  graphCentralForce: 3,
  graphEdgePruning: 100,
  graphMinNodeSize: 3,
  graphMaxNodeSize: 7,
  showDefaultTreeIcons: false,
  emojiStyle: "Native" /* Native */,
  defaultFileIcon: "lucide//file",
  defaultFolderIcon: "lucide//folder",
  defaultMediaIcon: "lucide//file-image",
  exportPath: "",
  filesToExport: [[]]
};
var _SettingsPage = class extends import_obsidian7.PluginSettingTab {
  constructor(plugin) {
    super(app, plugin);
    this.blacklistedPluginIDs = [];
    _SettingsPage.plugin = plugin;
  }
  display() {
    const { containerEl: contentEl } = this;
    contentEl.empty();
    let header = contentEl.createEl("h2", { text: "HTML Export Settings" });
    header.style.display = "block";
    header.style.marginBottom = "15px";
    let supportContainer = contentEl.createDiv();
    supportContainer.style.marginBottom = "15px";
    let supportLink = contentEl.createEl("a");
    let buttonColor = Utils.sampleCSSColorHex("--color-accent", document.body).hex;
    let buttonTextColor = Utils.sampleCSSColorHex("--text-on-accent", document.body).hex;
    supportLink.href = `href="https://www.buymeacoffee.com/nathangeorge"`;
    supportLink.style.height = "40px";
    supportLink.innerHTML = `<img style="height:40px;" src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=nathangeorge&button_colour=${buttonColor}&font_colour=${buttonTextColor}&font_family=Poppins&outline_colour=${buttonTextColor}&coffee_colour=FFDD00">`;
    let supportHeader = contentEl.createDiv({ text: "Support the continued development of this plugin.", cls: "setting-item-description" });
    supportHeader.style.display = "block";
    supportContainer.style.display = "grid";
    supportContainer.style.gridTemplateColumns = "0.5fr 0.5fr";
    supportContainer.style.gridTemplateRows = "40px 20px";
    supportContainer.appendChild(supportLink);
    let debugInfoButton = contentEl.createEl("button");
    let bugIcon = (0, import_obsidian7.getIcon)("bug");
    if (bugIcon)
      debugInfoButton.appendChild(bugIcon);
    debugInfoButton.style.height = "100%";
    debugInfoButton.style.aspectRatio = "1/1";
    debugInfoButton.style.justifySelf = "end";
    let debugHeader = contentEl.createDiv({ text: "Copy debug info to clipboard", cls: "setting-item-description" });
    debugHeader.style.display = "block";
    debugHeader.style.justifySelf = "end";
    debugInfoButton.addEventListener("click", () => {
      navigator.clipboard.writeText(ExportLog.getDebugInfo());
      new import_obsidian7.Notice("Debug info copied to clipboard!");
    });
    supportContainer.appendChild(debugInfoButton);
    supportContainer.appendChild(supportHeader);
    supportContainer.appendChild(debugHeader);
    if (Settings.exportPreset != "raw-documents" /* RawDocuments */) {
      _SettingsPage.createDivider(contentEl);
      let section2 = _SettingsPage.createSection(contentEl, "Page Features", "Control the visibility of different page features");
      _SettingsPage.createToggle(section2, "Theme toggle", () => Settings.addThemeToggle, (value) => Settings.addThemeToggle = value);
      _SettingsPage.createToggle(section2, "Document outline / table of contents", () => Settings.addOutline, (value) => Settings.addOutline = value);
      _SettingsPage.createToggle(section2, "File navigation tree", () => Settings.addFileNav, (value) => Settings.addFileNav = value);
      _SettingsPage.createToggle(section2, "File & folder icons", () => Settings.showDefaultTreeIcons, (value) => Settings.showDefaultTreeIcons = value);
      if (Settings.exportPreset == "website" /* Website */) {
        _SettingsPage.createToggle(section2, "Search bar", () => Settings.addSearchBar, (value) => Settings.addSearchBar = value);
        _SettingsPage.createToggle(section2, "Graph view", () => Settings.addGraphView, (value) => Settings.addGraphView = value);
        let graphViewSection = _SettingsPage.createSection(section2, "Graph View Settings", "Control the behavior of the graph view simulation");
        new import_obsidian7.Setting(graphViewSection).setName("Attraction Force").setDesc("How much should linked nodes attract each other? This will make the graph appear more clustered.").addSlider((slider) => slider.setLimits(0, 100, 1).setValue(Settings.graphAttractionForce / (2 / 100)).setDynamicTooltip().onChange(async (value) => {
          let remapMultiplier = 2 / 100;
          Settings.graphAttractionForce = value * remapMultiplier;
          await _SettingsPage.saveSettings();
        }).showTooltip());
        new import_obsidian7.Setting(graphViewSection).setName("Link Length").setDesc("How long should the links between nodes be? The shorter the links the closer connected nodes will cluster together.").addSlider((slider) => slider.setLimits(0, 100, 1).setValue(Settings.graphLinkLength).setDynamicTooltip().onChange(async (value) => {
          Settings.graphLinkLength = value;
          await _SettingsPage.saveSettings();
        }).showTooltip());
        new import_obsidian7.Setting(graphViewSection).setName("Repulsion Force").setDesc("How much should nodes repel each other? This will make the graph appear more spread out.").addSlider((slider) => slider.setLimits(0, 100, 1).setValue(Settings.graphRepulsionForce / 3).setDynamicTooltip().onChange(async (value) => {
          Settings.graphRepulsionForce = value * 3;
          await _SettingsPage.saveSettings();
        }).showTooltip());
        new import_obsidian7.Setting(graphViewSection).setName("Central Force").setDesc("How much should nodes be attracted to the center? This will make the graph appear more dense and circular.").addSlider((slider) => slider.setLimits(0, 100, 1).setValue(Settings.graphCentralForce / (5 / 100)).setDynamicTooltip().onChange(async (value) => {
          let remapMultiplier = 5 / 100;
          Settings.graphCentralForce = value * remapMultiplier;
          await _SettingsPage.saveSettings();
        }).showTooltip());
        new import_obsidian7.Setting(graphViewSection).setName("Max Node Radius").setDesc("How large should the largest nodes be? Nodes are sized by how many links they have. The larger a node is the more it will attract other nodes. This can be used to create a good grouping around the most important nodes.").addSlider((slider) => slider.setLimits(3, 15, 1).setValue(Settings.graphMaxNodeSize).setDynamicTooltip().onChange(async (value) => {
          Settings.graphMaxNodeSize = value;
          await _SettingsPage.saveSettings();
        }).showTooltip());
        new import_obsidian7.Setting(graphViewSection).setName("Min Node Radius").setDesc("How small should the smallest nodes be? The smaller a node is the less it will attract other nodes.").addSlider((slider) => slider.setLimits(3, 15, 1).setValue(Settings.graphMinNodeSize).setDynamicTooltip().onChange(async (value) => {
          Settings.graphMinNodeSize = value;
          await _SettingsPage.saveSettings();
        }).showTooltip());
        new import_obsidian7.Setting(graphViewSection).setName("Edge Pruning Factor").setDesc("Edges with a length above this threshold will not be rendered, however they will still contribute to the simulation. This can help large tangled graphs look more organised. Hovering over a node will still display these links.").addSlider((slider) => slider.setLimits(0, 100, 1).setValue(100 - Settings.graphEdgePruning).setDynamicTooltip().onChange(async (value) => {
          Settings.graphEdgePruning = 100 - value;
          await _SettingsPage.saveSettings();
        }).showTooltip());
      }
      let iconTutorial = new import_obsidian7.Setting(section2).setName("Custom icons").setDesc(`Use the 'Iconize' plugin to add custom icons to your files and folders.
Or set the 'icon' property of your file to an emoji or lucide icon name.
This feature does not require "File & folder icons" to be enbaled.`);
      iconTutorial.infoEl.style.whiteSpace = "pre-wrap";
      new import_obsidian7.Setting(section2).setName("Icon emoji style").addDropdown((dropdown) => {
        for (let style in EmojiStyle)
          dropdown.addOption(style, style);
        dropdown.setValue(Settings.emojiStyle);
        dropdown.onChange(async (value) => {
          Settings.emojiStyle = value;
          await _SettingsPage.saveSettings();
        });
      });
      _SettingsPage.createText(section2, "Page title property", () => Settings.titleProperty, (value) => Settings.titleProperty = value, "Override a specific file's title / name by defining this property in the frontmatter.");
      _SettingsPage.createFileInput(section2, () => Settings.customHeadContentPath, (value) => Settings.customHeadContentPath = value, {
        name: "Custom head content",
        description: "Custom scripts, styles, or anything else (html file)",
        placeholder: "Path to html formatted file...",
        defaultPath: Path.vaultPath,
        validation: (path) => path.validate({
          allowEmpty: true,
          allowAbsolute: true,
          allowRelative: true,
          allowFiles: true,
          requireExists: true,
          requireExtentions: ["html", "htm", "txt"]
        })
      });
      _SettingsPage.createFileInput(section2, () => Settings.faviconPath, (value) => Settings.faviconPath = value, {
        name: "Favicon path",
        description: "Add a custom favicon image to the website",
        placeholder: "Path to image file...",
        defaultPath: Path.vaultPath,
        validation: (path) => path.validate({
          allowEmpty: true,
          allowAbsolute: true,
          allowRelative: true,
          allowFiles: true,
          requireExists: true,
          requireExtentions: ["png", "ico", "jpg", "jpeg", "svg"]
        })
      });
    }
    let section;
    if (Settings.exportPreset != "raw-documents" /* RawDocuments */) {
      _SettingsPage.createDivider(contentEl);
      section = _SettingsPage.createSection(contentEl, "Page Behaviors", "Change the behavior of included page features");
      new import_obsidian7.Setting(section).setName("Min Outline Collapse Depth").setDesc("Only allow outline items to be collapsed if they are at least this many levels deep in the tree.").addDropdown((dropdown) => dropdown.addOption("1", "1").addOption("2", "2").addOption("100", "No Collapse").setValue(Settings.minOutlineCollapse.toString()).onChange(async (value) => {
        Settings.minOutlineCollapse = parseInt(value);
        await _SettingsPage.saveSettings();
      }));
      _SettingsPage.createToggle(section, "Start Outline Collapsed", () => Settings.startOutlineCollapsed, (value) => Settings.startOutlineCollapsed = value, "All outline items will be collapsed by default.");
      _SettingsPage.createToggle(section, "Allow folding headings", () => Settings.allowFoldingHeadings, (value) => Settings.allowFoldingHeadings = value, "Fold headings using an arrow icon, like in Obsidian.");
      _SettingsPage.createToggle(section, "Allow folding lists", () => Settings.allowFoldingLists, (value) => Settings.allowFoldingLists = value, "Fold lists using an arrow icon, like in Obsidian.");
      _SettingsPage.createToggle(section, "Allow resizing sidebars", () => Settings.allowResizingSidebars, (value) => Settings.allowResizingSidebars = value, "Allow the user to resize the sidebar width.");
    }
    _SettingsPage.createDivider(contentEl);
    section = _SettingsPage.createSection(contentEl, "Layout Options", "Set document and sidebar widths");
    new import_obsidian7.Setting(section).setName("Document Width").setDesc("Sets the line width of the exported document in css units. (ex. 600px, 50em)").addText((text) => text.setValue(Settings.documentWidth).setPlaceholder("40em").onChange(async (value) => {
      Settings.documentWidth = value;
      await _SettingsPage.saveSettings();
    })).addExtraButton((button) => button.setIcon("reset").setTooltip("Reset to default").onClick(() => {
      Settings.documentWidth = "";
      _SettingsPage.saveSettings();
      this.display();
    }));
    new import_obsidian7.Setting(section).setName("Sidebar Width").setDesc("Sets the width of the sidebar in css units. (ex. 20em, 200px)").addText((text) => text.setValue(Settings.sidebarWidth).setPlaceholder("20em").onChange(async (value) => {
      Settings.sidebarWidth = value;
      await _SettingsPage.saveSettings();
    })).addExtraButton((button) => button.setIcon("reset").setTooltip("Reset to default").onClick(() => {
      Settings.sidebarWidth = "";
      _SettingsPage.saveSettings();
      this.display();
    }));
    _SettingsPage.createDivider(contentEl);
    section = _SettingsPage.createSection(contentEl, "Export Options", "Change the behavior of the export process.");
    _SettingsPage.createToggle(section, "Only export modfied files", () => Settings.onlyExportModified, (value) => Settings.onlyExportModified = value, "Only generate new html for files which have been modified since the last export.");
    _SettingsPage.createToggle(section, "Delete old files", () => Settings.deleteOldFiles, (value) => Settings.deleteOldFiles = value, "Delete files from a previous export that are no longer being exported.");
    _SettingsPage.createToggle(section, "Minify HTML", () => Settings.minifyHTML, (value) => Settings.minifyHTML = value, "Minify HTML to make it load faster.");
    new import_obsidian7.Setting(section).setName("Log Level").setDesc("Set the level of logging to display in the export log.").addDropdown((dropdown) => dropdown.addOption("all", "All").addOption("warning", "Warning").addOption("error", "Error").addOption("fatal", "Only Fatal Errors").setValue(Settings.logLevel).onChange(async (value) => {
      Settings.logLevel = value;
      await _SettingsPage.saveSettings();
    }));
    _SettingsPage.createDivider(contentEl);
    section = _SettingsPage.createSection(contentEl, "Asset Options", "Add plugin styles, or make the page offline compatible.");
    _SettingsPage.createToggle(section, "Make Offline Compatible", () => Settings.makeOfflineCompatible, (value) => Settings.makeOfflineCompatible = value, "Download any online assets / images / scripts so the page can be viewed offline. Or so the website does not depend on a CDN.");
    _SettingsPage.createToggle(section, "Include Svelte CSS", () => Settings.includeSvelteCSS, (value) => Settings.includeSvelteCSS = value, "Include the CSS from any plugins that use the svelte framework. These can not be chosen individually because their styles are not associated with their respective plugins.");
    new import_obsidian7.Setting(section).setName("Include CSS from Plugins").setDesc("Include the CSS from the following plugins in the exported HTML. If plugin features aren't rendering correctly, try adding the plugin to this list. Avoid adding plugins unless you specifically notice a problem, because more CSS will increase the loading time of your page.");
    let pluginsList = new FlowList(section);
    Utils.getPluginIDs().forEach(async (plugin) => {
      let pluginManifest = Utils.getPluginManifest(plugin);
      if (!pluginManifest)
        return;
      if ((await this.getBlacklistedPluginIDs()).contains(pluginManifest.id)) {
        return;
      }
      let pluginDir = pluginManifest.dir;
      if (!pluginDir)
        return;
      let pluginPath = new Path(pluginDir);
      let hasCSS = pluginPath.joinString("styles.css").exists;
      if (!hasCSS)
        return;
      let isChecked = Settings.includePluginCSS.match(new RegExp(`^${plugin}`, "m")) != null;
      pluginsList.addItem(pluginManifest.name, plugin, isChecked, (value) => {
        Settings.includePluginCSS = pluginsList.checkedList.join("\n");
        _SettingsPage.saveSettings();
      });
    });
    _SettingsPage.createDivider(contentEl);
    section = _SettingsPage.createSection(contentEl, "Metadata", "Control general site data and RSS feed creation");
    _SettingsPage.createText(section, "Public site URL", () => Settings.siteURL, (value) => Settings.siteURL = (value.endsWith("/") || value == "" ? value : value + "/").trim(), "The url that this site will be hosted at. This is needed to reference links and images in metadata and RSS. (Because these links cannot be relative)", (value) => value.startsWith("http://") || value.startsWith("https://") || value.trim() == "" ? "" : "URL must start with 'http://' or 'https://'");
    _SettingsPage.createText(section, "Author Name", () => Settings.authorName, (value) => Settings.authorName = value, "The default name of the author of the site");
    _SettingsPage.createText(section, "Vault Title", () => Settings.vaultTitle, (value) => Settings.vaultTitle = value, "The title of the vault");
    _SettingsPage.createToggle(section, "Create RSS feed", () => Settings.addRSSFeed, (value) => Settings.addRSSFeed = value, `Create an RSS feed for the website located at ${Settings.siteURL}lib/rss.xml`);
    let summaryTutorial = new import_obsidian7.Setting(section).setName("Metadata Properties").setDesc(`Use the 'description' or 'summary' property to set a custom summary of a page.
Use the 'author' property to set the author of a specific page.`);
    summaryTutorial.infoEl.style.whiteSpace = "pre-wrap";
  }
  async getBlacklistedPluginIDs() {
    if (this.blacklistedPluginIDs.length > 0)
      return this.blacklistedPluginIDs;
    this.blacklistedPluginIDs = third_party_styles_blacklist_default.replaceAll("\r", "").split("\n");
    return this.blacklistedPluginIDs;
  }
  static async loadSettings() {
    let loadedSettings = await _SettingsPage.plugin.loadData();
    Object.assign(Settings, DEFAULT_SETTINGS, loadedSettings);
    await migrateSettings();
    _SettingsPage.loaded = true;
  }
  static async saveSettings() {
    await _SettingsPage.plugin.saveData(Object.assign({}, Settings));
  }
  static renameFile(file, oldPath) {
    let oldPathParsed = new Path(oldPath).asString;
    Settings.filesToExport.forEach((fileList) => {
      let index = fileList.indexOf(oldPathParsed);
      if (index >= 0) {
        fileList[index] = file.path;
      }
    });
    _SettingsPage.saveSettings();
  }
  static async updateSettings(usePreviousSettings = false, overrideFiles = void 0) {
    if (!usePreviousSettings) {
      let modal = new ExportModal();
      if (overrideFiles)
        modal.overridePickedFiles(overrideFiles);
      return await modal.open();
    }
    let files = Settings.filesToExport[0];
    let path = new Path(Settings.exportPath);
    if (files.length == 0 && overrideFiles == void 0 || !path.exists || !path.isAbsolute || !path.isDirectory) {
      new import_obsidian7.Notice("Please set the export path and files to export in the settings first.", 5e3);
      let modal = new ExportModal();
      if (overrideFiles)
        modal.overridePickedFiles(overrideFiles);
      return await modal.open();
    }
    return void 0;
  }
  static getFilesToExport() {
    let files = [];
    let allFiles = app.vault.getFiles();
    let exportPaths = Settings.filesToExport[0];
    if (!exportPaths)
      return [];
    for (let path of exportPaths) {
      let file = app.vault.getAbstractFileByPath(path);
      if (file instanceof import_obsidian7.TFile)
        files.push(file);
      else if (file instanceof import_obsidian7.TFolder) {
        let newFiles = allFiles.filter((f) => {
          var _a2;
          return f.path.startsWith((_a2 = file == null ? void 0 : file.path) != null ? _a2 : "*");
        });
        files.push(...newFiles);
      }
    }
    ;
    return files;
  }
  static createDivider(container) {
    let hr = container.createEl("hr");
    hr.style.marginTop = "20px";
    hr.style.marginBottom = "20px";
    hr.style.borderColor = "var(--interactive-accent)";
    hr.style.opacity = "0.5";
  }
  static createToggle(container, name, get, set, desc = "") {
    let setting = new import_obsidian7.Setting(container);
    setting.setName(name);
    if (desc != "")
      setting.setDesc(desc);
    setting.addToggle((toggle) => toggle.setValue(get()).onChange(async (value) => {
      set(value);
      await _SettingsPage.saveSettings();
    }));
    return setting;
  }
  static createText(container, name, get, set, desc = "", validation) {
    let setting = new import_obsidian7.Setting(container);
    let errorText = this.createError(container);
    let value = get();
    if (value != "")
      errorText.setText(validation ? validation(value) : "");
    setting.setName(name);
    if (desc != "")
      setting.setDesc(desc);
    setting.addText((text) => text.setValue(value).onChange(async (value2) => {
      let error = validation ? validation(value2) : "";
      if (error == "") {
        set(value2);
        await _SettingsPage.saveSettings();
      }
      errorText.setText(error);
    }));
    return setting;
  }
  static createError(container) {
    let error = container.createDiv({ cls: "setting-item-description" });
    error.style.color = "var(--color-red)";
    error.style.marginBottom = "0.75rem";
    return error;
  }
  static createFileInput(container, get, set, options) {
    var _a2, _b, _c, _d, _e, _f, _g;
    let name = (_a2 = options == null ? void 0 : options.name) != null ? _a2 : "";
    let description = (_b = options == null ? void 0 : options.description) != null ? _b : "";
    let placeholder = (_c = options == null ? void 0 : options.placeholder) != null ? _c : "Path to file...";
    let defaultPath = (_d = options == null ? void 0 : options.defaultPath) != null ? _d : Path.vaultPath;
    let pickFolder = (_e = options == null ? void 0 : options.pickFolder) != null ? _e : false;
    let validation = (_f = options == null ? void 0 : options.validation) != null ? _f : (path) => ({ valid: true, isEmpty: false, error: "" });
    let browseButton = (_g = options == null ? void 0 : options.browseButton) != null ? _g : true;
    let onChanged = options == null ? void 0 : options.onChanged;
    let headContentErrorMessage = this.createError(container);
    if (get().trim() != "") {
      let tempPath = new Path(get());
      headContentErrorMessage.setText(validation(tempPath).error);
    }
    let headContentInput = void 0;
    let fileInput = new import_obsidian7.Setting(container);
    if (name != "")
      fileInput.setName(name);
    if (description != "")
      fileInput.setDesc(description);
    if (name == "" && description == "")
      fileInput.infoEl.style.display = "none";
    let textEl;
    fileInput.addText((text) => {
      textEl = text;
      headContentInput = text;
      text.inputEl.style.width = "100%";
      text.setPlaceholder(placeholder).setValue(get()).onChange(async (value) => {
        let path = new Path(value);
        let valid = validation(path);
        headContentErrorMessage.setText(valid.error);
        if (valid.valid) {
          headContentErrorMessage.setText("");
          set(value.replaceAll('"', ""));
          text.setValue(get());
          await _SettingsPage.saveSettings();
        }
        if (onChanged)
          onChanged(path);
      });
    });
    let browseButtonEl = void 0;
    if (browseButton) {
      fileInput.addButton((button) => {
        browseButtonEl = button.buttonEl;
        button.setButtonText("Browse").onClick(async () => {
          let path = pickFolder ? await Utils.showSelectFolderDialog(defaultPath) : await Utils.showSelectFileDialog(defaultPath);
          if (!path)
            return;
          set(path.asString);
          let valid = validation(path);
          headContentErrorMessage.setText(valid.error);
          if (valid.valid) {
            await _SettingsPage.saveSettings();
          }
          if (onChanged)
            onChanged(path);
          headContentInput == null ? void 0 : headContentInput.setValue(get());
        });
      });
    }
    container.appendChild(headContentErrorMessage);
    return { fileInput, textInput: textEl, browseButton: browseButtonEl };
  }
  static createSection(container, name, desc) {
    let section = container.createEl("details");
    let summary = section.createEl("summary");
    summary.style.display = "block";
    summary.style.marginLeft = "-1em";
    section.style.paddingLeft = "2em";
    section.style.borderLeft = "1px solid var(--interactive-accent)";
    new import_obsidian7.Setting(summary).setName(name).setDesc(desc).setHeading();
    return section;
  }
};
var SettingsPage3 = _SettingsPage;
SettingsPage3.settings = DEFAULT_SETTINGS;
SettingsPage3.loaded = false;

// scripts/api-options.ts
var MarkdownRendererAPIOptions = class {
  constructor() {
    this.container = void 0;
    this.keepViewContainer = true;
    this.makeHeadersTrees = true;
    this.postProcess = true;
    this.displayProgress = true;
  }
};
var GraphViewOptions = class {
  constructor() {
    this.attractionForce = 1;
    this.linkLength = 10;
    this.repulsionForce = 150;
    this.centralForce = 3;
    this.edgePruning = 100;
    this.minNodeRadius = 3;
    this.maxNodeRadius = 7;
  }
};
var MarkdownWebpageRendererAPIOptions2 = class extends MarkdownRendererAPIOptions {
  constructor() {
    super(...arguments);
    this.addSidebars = Settings.exportPreset != "raw-documents" /* RawDocuments */;
    this.addThemeToggle = Settings.addThemeToggle;
    this.addFileNavigation = Settings.addFileNav;
    this.addOutline = Settings.addOutline;
    this.addSearch = Settings.addSearchBar;
    this.addGraphView = Settings.addGraphView;
    this.addBodyClasses = true;
    this.addMathjaxStyles = true;
    this.addHeadTag = true;
    this.addRSS = Settings.addRSSFeed;
    this.addTitle = Settings.addTitle;
    this.graphViewOptions = new GraphViewOptions();
    this.allowFoldingLists = Settings.allowFoldingLists;
    this.allowFoldingHeadings = Settings.allowFoldingHeadings;
    this.allowResizeSidebars = Settings.allowResizingSidebars;
    this.openNavFileLocation = true;
    this.startOutlineCollapsed = Settings.startOutlineCollapsed;
    this.minOutlineCollapsibleLevel = Settings.minOutlineCollapse;
    this.includeJS = true;
    this.includeCSS = true;
    this.inlineMedia = Settings.inlineAssets;
    this.inlineCSS = Settings.inlineAssets;
    this.inlineJS = Settings.inlineAssets;
    this.inlineHTML = Settings.inlineAssets;
    this.inlineFonts = Settings.inlineAssets;
    this.offlineResources = Settings.makeOfflineCompatible;
    this.webStylePaths = Settings.makeNamesWebStyle;
    this.flattenExportPaths = false;
    this.fixLinks = true;
    this.siteURL = Settings.siteURL;
    this.siteName = Settings.vaultTitle || app.vault.getName();
    this.authorName = Settings.authorName;
  }
};

// scripts/render-api.ts
var import_obsidian8 = require("obsidian");

// scripts/utils/tab-manager.ts
var TabManager;
((TabManager2) => {
  function getLeaf(navType, splitDirection = "vertical") {
    let leaf = navType === "split" ? app.workspace.getLeaf(navType, splitDirection) : app.workspace.getLeaf(navType);
    return leaf;
  }
  async function openFileInNewTab(file, navType, splitDirection = "vertical") {
    let leaf = getLeaf(navType, splitDirection);
    try {
      await leaf.openFile(file, void 0).catch((reason) => {
        ExportLog.error(reason);
      });
    } catch (error) {
      ExportLog.error(error);
    }
    return leaf;
  }
  TabManager2.openFileInNewTab = openFileInNewTab;
  function openNewTab(navType, splitDirection = "vertical") {
    return getLeaf(navType, splitDirection);
  }
  TabManager2.openNewTab = openNewTab;
})(TabManager || (TabManager = {}));

// scripts/render-api.ts
var MarkdownRendererAPI;
((MarkdownRendererAPI2) => {
  MarkdownRendererAPI2.convertableExtensions = ["md", "canvas", "drawing", "excalidraw"];
  function makeHeadingsTrees(html) {
    function getHeaderEl(headingContainer) {
      let first = headingContainer.firstElementChild;
      if (first && /[Hh][1-6]/g.test(first.tagName))
        return first;
      else
        return;
    }
    function makeHeaderTree(headerDiv, childrenContainer) {
      let headerEl = getHeaderEl(headerDiv);
      if (!headerEl)
        return;
      let possibleChild = headerDiv.nextElementSibling;
      while (possibleChild != null) {
        let possibleChildHeader = getHeaderEl(possibleChild);
        if (possibleChildHeader) {
          if (possibleChildHeader.tagName <= headerEl.tagName) {
            break;
          }
          if (possibleChildHeader.querySelector(":has(section.footnotes)") || possibleChildHeader.classList.contains("mod-footer")) {
            break;
          }
        }
        let nextEl = possibleChild.nextElementSibling;
        childrenContainer.appendChild(possibleChild);
        possibleChild = nextEl;
      }
    }
    html.querySelectorAll("div:has(> :is(h1, h2, h3, h4, h5, h6):not([class^='block-language-'] *)):not(.markdown-preview-sizer)").forEach(function(header) {
      header.classList.add("heading-wrapper");
      let hEl = getHeaderEl(header);
      if (!hEl || hEl.classList.contains("heading"))
        return;
      hEl.classList.add("heading");
      let collapseIcon = hEl.querySelector(".heading-collapse-indicator");
      if (!collapseIcon) {
        collapseIcon = hEl.createDiv({ cls: "heading-collapse-indicator collapse-indicator collapse-icon" });
        collapseIcon.innerHTML = _MarkdownRendererInternal.arrowHTML;
        hEl.prepend(collapseIcon);
      }
      let children = header.createDiv({ cls: "heading-children" });
      makeHeaderTree(header, children);
    });
    html.querySelectorAll(":is(h1, h2, h3, h4, h5, h6):not(.heading)").forEach((el) => el.classList.add("heading"));
    html.querySelectorAll("div h1, div .inline-title").forEach((element) => {
      var _a2;
      (_a2 = element.querySelector(".heading-collapse-indicator")) == null ? void 0 : _a2.remove();
    });
    html.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach((el) => el.innerHTML = el.innerHTML.replaceAll("\n", ""));
  }
  async function renderMarkdownToString(markdown, options) {
    options = Object.assign(new MarkdownRendererAPIOptions(), options);
    let html = await _MarkdownRendererInternal.renderMarkdown(markdown, options);
    if (!html)
      return;
    if (options.postProcess)
      await _MarkdownRendererInternal.postProcessHTML(html, options);
    if (options.makeHeadersTrees)
      makeHeadingsTrees(html);
    let text = html.innerHTML;
    if (!options.container)
      html.remove();
    return text;
  }
  MarkdownRendererAPI2.renderMarkdownToString = renderMarkdownToString;
  async function renderMarkdownToElement(markdown, options) {
    options = Object.assign(new MarkdownRendererAPIOptions(), options);
    let html = await _MarkdownRendererInternal.renderMarkdown(markdown, options);
    if (!html)
      return;
    if (options.postProcess)
      await _MarkdownRendererInternal.postProcessHTML(html, options);
    if (options.makeHeadersTrees)
      makeHeadingsTrees(html);
    return html;
  }
  MarkdownRendererAPI2.renderMarkdownToElement = renderMarkdownToElement;
  async function renderFile(file, options) {
    options = Object.assign(new MarkdownRendererAPIOptions(), options);
    let result = await _MarkdownRendererInternal.renderFile(file, options);
    if (!result)
      return;
    if (options.postProcess)
      await _MarkdownRendererInternal.postProcessHTML(result.contentEl, options);
    if (options.makeHeadersTrees)
      makeHeadingsTrees(result.contentEl);
    return result;
  }
  MarkdownRendererAPI2.renderFile = renderFile;
  async function renderFileToString(file, options) {
    options = Object.assign(new MarkdownRendererAPIOptions(), options);
    let result = await this.renderFile(file, options);
    if (!result)
      return;
    let text = result.contentEl.innerHTML;
    if (!options.container)
      result.contentEl.remove();
    return text;
  }
  MarkdownRendererAPI2.renderFileToString = renderFileToString;
  async function renderFileToWebpage(file, options) {
    options = Object.assign(new MarkdownWebpageRendererAPIOptions2(), options);
    this.beginBatch(options);
    let webpage = new Webpage(file, void 0, file.basename, void 0, options);
    webpage = await webpage.create();
    if (!webpage) {
      ExportLog.error("Failed to create webpage for file " + file.path);
      return;
    }
    this.endBatch();
    return webpage;
  }
  MarkdownRendererAPI2.renderFileToWebpage = renderFileToWebpage;
  async function renderMarkdownSimple(markdown) {
    let container = document.body.createDiv();
    await _MarkdownRendererInternal.renderSimpleMarkdown(markdown, container);
    let text = container.innerHTML;
    container.remove();
    return text;
  }
  MarkdownRendererAPI2.renderMarkdownSimple = renderMarkdownSimple;
  async function renderMarkdownSimpleEl(markdown, container) {
    await _MarkdownRendererInternal.renderSimpleMarkdown(markdown, container);
  }
  MarkdownRendererAPI2.renderMarkdownSimpleEl = renderMarkdownSimpleEl;
  function isConvertable(extention) {
    if (extention.startsWith("."))
      extention = extention.substring(1);
    return this.convertableExtensions.contains(extention);
  }
  MarkdownRendererAPI2.isConvertable = isConvertable;
  function checkCancelled() {
    return _MarkdownRendererInternal.checkCancelled();
  }
  MarkdownRendererAPI2.checkCancelled = checkCancelled;
  async function beginBatch(options) {
    options = Object.assign(new MarkdownRendererAPIOptions(), options);
    await _MarkdownRendererInternal.beginBatch(options);
  }
  MarkdownRendererAPI2.beginBatch = beginBatch;
  function endBatch() {
    _MarkdownRendererInternal.endBatch();
  }
  MarkdownRendererAPI2.endBatch = endBatch;
})(MarkdownRendererAPI || (MarkdownRendererAPI = {}));
var _MarkdownRendererInternal;
((_MarkdownRendererInternal2) => {
  _MarkdownRendererInternal2.errorInBatch = false;
  _MarkdownRendererInternal2.cancelled = false;
  _MarkdownRendererInternal2.batchStarted = false;
  let logContainer;
  let loadingContainer;
  const infoColor = "var(--text-normal)";
  const warningColor = "var(--color-yellow)";
  const errorColor = "var(--color-red)";
  const infoBoxColor = "rgba(0,0,0,0.15)";
  const warningBoxColor = "rgba(var(--color-yellow-rgb), 0.15)";
  const errorBoxColor = "rgba(var(--color-red-rgb), 0.15)";
  _MarkdownRendererInternal2.arrowHTML = "<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' class='svg-icon right-triangle'><path d='M3 8L12 17L21 8'></path></svg>";
  function checkCancelled() {
    if (_MarkdownRendererInternal2.cancelled || !_MarkdownRendererInternal2.renderLeaf) {
      ExportLog.log("cancelled");
      _MarkdownRendererInternal2.endBatch();
      return true;
    }
    return false;
  }
  _MarkdownRendererInternal2.checkCancelled = checkCancelled;
  function failRender(file, message) {
    var _a2;
    if (checkCancelled())
      return void 0;
    ExportLog.error(message, `Rendering ${(_a2 = file == null ? void 0 : file.path) != null ? _a2 : " custom markdown "} failed: `);
    return;
  }
  async function renderFile(file, options) {
    let loneFile = !_MarkdownRendererInternal2.batchStarted;
    if (loneFile) {
      ExportLog.log("Exporting single file, starting batch");
      await _MarkdownRendererInternal2.beginBatch(options);
    }
    let success = await Utils.waitUntil(() => _MarkdownRendererInternal2.renderLeaf != void 0 || checkCancelled(), 2e3, 1);
    if (!success || !_MarkdownRendererInternal2.renderLeaf)
      return failRender(file, "Failed to get leaf for rendering!");
    try {
      await _MarkdownRendererInternal2.renderLeaf.openFile(file, { active: false });
    } catch (e) {
      return failRender(file, e);
    }
    let html;
    let view = _MarkdownRendererInternal2.renderLeaf.view;
    let viewType = view.getViewType();
    switch (viewType) {
      case "markdown":
        let preview = view.previewMode;
        html = await renderMarkdownView(preview, options);
        break;
      case "kanban":
        html = await renderGeneric(view, options);
        break;
      case "excalidraw":
        html = await renderExcalidraw(view, options);
        break;
      case "canvas":
        html = await renderCanvas(view, options);
        break;
      default:
        html = await renderGeneric(view, options);
        break;
    }
    if (checkCancelled())
      return void 0;
    if (!html)
      return failRender(file, "Failed to render file!");
    if (loneFile)
      _MarkdownRendererInternal2.endBatch();
    return { contentEl: html, viewType };
  }
  _MarkdownRendererInternal2.renderFile = renderFile;
  async function renderMarkdown(markdown, options) {
    let loneFile = !_MarkdownRendererInternal2.batchStarted;
    if (loneFile) {
      ExportLog.log("Exporting single file, starting batch");
      await _MarkdownRendererInternal2.beginBatch(options);
    }
    let success = await Utils.waitUntil(() => _MarkdownRendererInternal2.renderLeaf != void 0 || checkCancelled(), 2e3, 1);
    if (!success || !_MarkdownRendererInternal2.renderLeaf)
      return failRender(void 0, "Failed to get leaf for rendering!");
    let view = new import_obsidian8.MarkdownView(_MarkdownRendererInternal2.renderLeaf);
    _MarkdownRendererInternal2.renderLeaf.view = view;
    try {
      view.setViewData(markdown, true);
    } catch (e) {
      return failRender(void 0, e);
    }
    let html;
    let preview = view.previewMode;
    html = await renderMarkdownView(preview, options);
    if (checkCancelled())
      return void 0;
    if (!html)
      return failRender(void 0, "Failed to render file!");
    if (loneFile)
      _MarkdownRendererInternal2.endBatch();
    return html;
  }
  _MarkdownRendererInternal2.renderMarkdown = renderMarkdown;
  async function renderMarkdownView(preview, options) {
    var _a2, _b, _c, _d;
    preview.load();
    let renderer = preview.renderer;
    await renderer.unfoldAllHeadings();
    await renderer.unfoldAllLists();
    await renderer.parseSync();
    if (!window.mermaid) {
      await (0, import_obsidian8.loadMermaid)();
    }
    let sections = renderer.sections;
    let newMarkdownEl = document.body.createDiv({ cls: "markdown-preview-view markdown-rendered" });
    let newSizerEl = newMarkdownEl.createDiv({ cls: "markdown-preview-sizer markdown-preview-section" });
    if (!newMarkdownEl || !newSizerEl)
      return failRender(preview.file, "Please specify a container element, or enable keepViewContainer!");
    preview.containerEl = newSizerEl;
    let promises = [];
    let foldedCallouts = [];
    for (let i = 0; i < sections.length; i++) {
      let section = sections[i];
      section.shown = true;
      section.rendered = false;
      section.resetCompute();
      section.setCollapsed(false);
      section.el.empty();
      newSizerEl.appendChild(section.el);
      await section.render();
      let success = await Utils.waitUntil(() => section.el && section.rendered || checkCancelled(), 2e3, 1);
      if (!success)
        return failRender(preview.file, "Failed to render section!");
      await renderer.measureSection(section);
      success = await Utils.waitUntil(() => section.computed || checkCancelled(), 2e3, 1);
      if (!success)
        return failRender(preview.file, "Failed to compute section!");
      await preview.postProcess(section, promises, renderer.frontmatter);
      let folded = Array.from(section.el.querySelectorAll(".callout-content[style*='display: none']"));
      for (let callout of folded) {
        callout.style.display = "";
      }
      foldedCallouts.push(...folded);
      let dataview = app.plugins.plugins["dataview"];
      if (dataview) {
        let jsKeyword = (_b = (_a2 = dataview.settings) == null ? void 0 : _a2.dataviewJsKeyword) != null ? _b : "dataviewjs";
        let emptyDataviewSelector = `:is(.block-language-dataview, .block-language-${jsKeyword}):not(.node-insert-event), :is(.block-language-dataview, .block-language-${jsKeyword}):empty`;
        await Utils.waitUntil(() => !section.el.querySelector(emptyDataviewSelector) || checkCancelled(), 4e3, 1);
        if (checkCancelled())
          return void 0;
        if (section.el.querySelector(emptyDataviewSelector)) {
          ExportLog.warning("Dataview plugin elements were not rendered correctly in file " + preview.file.name + "!");
        }
      }
      await Utils.waitUntil(() => !section.el.querySelector(".markdown-preview-sizer:empty") || checkCancelled(), 500, 1);
      if (checkCancelled())
        return void 0;
      if (section.el.querySelector(".markdown-preview-sizer:empty")) {
        ExportLog.warning("Transclusions were not rendered correctly in file " + preview.file.name + "!");
      }
      await Utils.waitUntil(() => !section.el.querySelector("[class^='block-language-']:empty") || checkCancelled(), 500, 1);
      if (checkCancelled())
        return void 0;
      let canvases = Array.from(section.el.querySelectorAll("canvas:not(.pdf-embed canvas)"));
      for (let canvas of canvases) {
        let data = canvas.toDataURL();
        if (data.length < 100) {
          ExportLog.log(canvas.outerHTML, "Failed to render canvas based plugin element in file " + preview.file.name + ":");
          canvas.remove();
          continue;
        }
        let image = document.createElement("img");
        image.src = data;
        image.style.width = canvas.style.width || "100%";
        image.style.maxWidth = "100%";
        canvas.replaceWith(image);
      }
      ;
      console.debug(section.el.outerHTML);
      let invalidPluginBlocks = Array.from(section.el.querySelectorAll("[class^='block-language-']:empty"));
      for (let block of invalidPluginBlocks) {
        ExportLog.warning(`Plugin element ${block.className || ((_c = block.parentElement) == null ? void 0 : _c.className) || "unknown"} from ${preview.file.name} not rendered correctly!`);
      }
    }
    await Promise.all(promises);
    for (let callout of foldedCallouts) {
      callout.style.display = "none";
    }
    newSizerEl.empty();
    for (let i = 0; i < sections.length; i++) {
      let section = sections[i];
      newSizerEl.appendChild(section.el.cloneNode(true));
    }
    let banner = preview.containerEl.querySelector(".obsidian-banner-wrapper");
    if (banner) {
      newSizerEl.before(banner);
    }
    if (options.keepViewContainer === false) {
      newMarkdownEl.outerHTML = newSizerEl.innerHTML;
      console.log("keeping only sizer content");
    }
    (_d = options.container) == null ? void 0 : _d.appendChild(newMarkdownEl);
    return newMarkdownEl;
  }
  _MarkdownRendererInternal2.renderMarkdownView = renderMarkdownView;
  async function renderSimpleMarkdown(markdown, container) {
    let renderComp = new import_obsidian8.Component();
    renderComp.load();
    await import_obsidian8.MarkdownRenderer.render(app, markdown, container, "/", renderComp);
    renderComp.unload();
    let renderedEl = container.children[container.children.length - 1];
    if (renderedEl && renderedEl.tagName == "P") {
      renderedEl.outerHTML = renderedEl.innerHTML;
    }
    container.querySelectorAll("a.tag").forEach((element) => {
      element.remove();
    });
    container.querySelectorAll("ol").forEach((listEl) => {
      var _a2;
      if (listEl.parentElement) {
        let start = (_a2 = listEl.getAttribute("start")) != null ? _a2 : "1";
        listEl.parentElement.createSpan().outerHTML = `${start}. ${listEl.innerText}`;
        listEl.remove();
      }
    });
    container.querySelectorAll("ul").forEach((listEl) => {
      if (listEl.parentElement) {
        listEl.parentElement.createSpan().innerHTML = "- " + listEl.innerHTML;
        listEl.remove();
      }
    });
    container.querySelectorAll("li").forEach((listEl) => {
      if (listEl.parentElement) {
        listEl.parentElement.createSpan().innerHTML = listEl.innerHTML;
        listEl.remove();
      }
    });
  }
  _MarkdownRendererInternal2.renderSimpleMarkdown = renderSimpleMarkdown;
  async function renderGeneric(view, options) {
    var _a2;
    await Utils.delay(2e3);
    if (checkCancelled())
      return void 0;
    let contentEl = view.containerEl;
    (_a2 = options.container) == null ? void 0 : _a2.appendChild(contentEl);
    return contentEl;
  }
  async function renderExcalidraw(view, options) {
    var _a2;
    await Utils.delay(500);
    let scene = view.excalidrawData.scene;
    let svg = await view.svg(scene, "", false);
    let isLight = !svg.getAttribute("filter");
    if (!isLight)
      svg.removeAttribute("filter");
    svg.classList.add(isLight ? "light" : "dark");
    let contentEl = document.createElement("div");
    contentEl.classList.add("view-content");
    let sizerEl = contentEl.createDiv();
    sizerEl.classList.add("excalidraw-plugin");
    sizerEl.appendChild(svg);
    if (checkCancelled())
      return void 0;
    if (options.keepViewContainer === false) {
      contentEl = svg;
    }
    (_a2 = options.container) == null ? void 0 : _a2.appendChild(contentEl);
    return contentEl;
  }
  async function renderCanvas(view, options) {
    var _a2, _b, _c;
    if (checkCancelled())
      return void 0;
    let canvas = view.canvas;
    let nodes = canvas.nodes;
    let edges = canvas.edges;
    for (const node of nodes) {
      await node[1].render();
    }
    for (const edge of edges) {
      await edge[1].render();
    }
    canvas.zoomToFit();
    await Utils.delay(500);
    let contentEl = view.contentEl;
    let canvasEl = contentEl.querySelector(".canvas");
    canvasEl.innerHTML = "";
    let edgeContainer = canvasEl.createEl("svg", { cls: "canvas-edges" });
    let edgeHeadContainer = canvasEl.createEl("svg", { cls: "canvas-edges" });
    for (const node of nodes) {
      let nodeEl = node[1].nodeEl;
      let childPreview = (_b = (_a2 = node[1]) == null ? void 0 : _a2.child) == null ? void 0 : _b.previewMode;
      let embedEl = nodeEl.querySelector(".markdown-embed-content.node-insert-event");
      if (childPreview && embedEl) {
        node[1].render();
        embedEl.innerHTML = "";
        let optionsCopy = Object.assign({}, options);
        optionsCopy.container = embedEl;
        await renderMarkdownView(childPreview, optionsCopy);
      }
      canvasEl.appendChild(nodeEl);
    }
    for (const edge of edges) {
      let edgeEl = edge[1].lineGroupEl;
      let headEl = edge[1].lineEndGroupEl;
      edgeContainer.appendChild(edgeEl);
      edgeHeadContainer.appendChild(headEl);
      if (edge[1].label) {
        let labelEl = edge[1].labelElement.wrapperEl;
        canvasEl.appendChild(labelEl);
      }
    }
    if (checkCancelled())
      return void 0;
    if (options.keepViewContainer === false) {
      contentEl = canvasEl;
    }
    (_c = options.container) == null ? void 0 : _c.appendChild(contentEl);
    return contentEl;
  }
  _MarkdownRendererInternal2.renderCanvas = renderCanvas;
  async function postProcessHTML(html, options) {
    var _a2;
    if (options.keepViewContainer === false) {
      html.querySelectorAll(".mod-header, .mod-footer").forEach((e) => e.remove());
    }
    html.querySelectorAll("p:has(div)").forEach((element) => {
      let span = document.body.createEl("span");
      span.innerHTML = element.innerHTML;
      element.replaceWith(span);
      span.style.display = "block";
      span.style.marginBlockStart = "var(--p-spacing)";
      span.style.marginBlockEnd = "var(--p-spacing)";
    });
    html.querySelectorAll("input[type=text]").forEach((element) => {
      element.setAttribute("value", element.value);
      element.value = "";
    });
    html.querySelectorAll("textarea").forEach((element) => {
      element.textContent = element.value;
    });
    html.querySelectorAll("a.tag").forEach((element) => {
      var _a3;
      let split = element.href.split("#");
      let tag = (_a3 = split[1]) != null ? _a3 : element.href.substring(1);
      element.setAttribute("href", `?query=tag:${tag}`);
    });
    html.querySelectorAll("img, video, .media-embed:has( > :is(img, video))").forEach((element) => {
      let width = element.getAttribute("width");
      if (width) {
        element.removeAttribute("width");
        element.style.width = width.trim() != "" ? width + "px" : "";
        element.style.maxWidth = "100%";
      }
    });
    html.querySelectorAll("span.internal-embed.pdf-embed").forEach((pdf) => {
      var _a3, _b;
      let embed = document.createElement("embed");
      embed.setAttribute("src", (_a3 = pdf.getAttribute("src")) != null ? _a3 : "");
      embed.style.width = pdf.style.width || "100%";
      embed.style.maxWidth = "100%";
      embed.style.height = pdf.style.height || "800px";
      let container = (_b = pdf.parentElement) == null ? void 0 : _b.parentElement;
      container == null ? void 0 : container.querySelectorAll("*").forEach((el) => el.remove());
      if (container)
        container.appendChild(embed);
    });
    html.querySelectorAll("div[class^='mk-']").forEach((element) => {
      element.remove();
    });
    let frontmatter = html.querySelector(".frontmatter");
    if (frontmatter) {
      let frontmatterParent = frontmatter.parentElement;
      let sizer = html.querySelector(".markdown-preview-sizer");
      if (sizer) {
        sizer.before(frontmatter);
      }
      frontmatterParent == null ? void 0 : frontmatterParent.remove();
    }
    html.querySelectorAll("iframe").forEach((element) => {
      element.setAttribute("loading", "lazy");
    });
    var collapsableListItems = Array.from(html.querySelectorAll("li:has(ul), li:has(ol)"));
    for (const item of collapsableListItems) {
      let collapseIcon = item.querySelector(".collapse-icon");
      if (!collapseIcon) {
        collapseIcon = item.createDiv({ cls: "list-collapse-indicator collapse-indicator collapse-icon" });
        collapseIcon.innerHTML = this.arrowHTML;
        item.prepend(collapseIcon);
      }
    }
    let tocEls = Array.from(html.querySelectorAll(".block-language-toc.dynamic-toc li > a"));
    for (const element of tocEls) {
      let renderEl = document.body.createDiv();
      renderSimpleMarkdown((_a2 = element.textContent) != null ? _a2 : "", renderEl);
      element.textContent = renderEl.textContent;
      renderEl.remove();
    }
  }
  _MarkdownRendererInternal2.postProcessHTML = postProcessHTML;
  async function beginBatch(options) {
    if (_MarkdownRendererInternal2.batchStarted)
      return;
    _MarkdownRendererInternal2.errorInBatch = false;
    _MarkdownRendererInternal2.cancelled = false;
    _MarkdownRendererInternal2.batchStarted = true;
    loadingContainer = void 0;
    logContainer = void 0;
    logShowing = false;
    AssetHandler.exportOptions = options;
    _MarkdownRendererInternal2.renderLeaf = TabManager.openNewTab("window", "vertical");
    let parentFound = await Utils.waitUntil(() => _MarkdownRendererInternal2.renderLeaf && _MarkdownRendererInternal2.renderLeaf.parent || checkCancelled(), 2e3, 1);
    if (!parentFound) {
      try {
        _MarkdownRendererInternal2.renderLeaf.detach();
      } catch (e) {
        ExportLog.error(e, "Failed to detach render leaf: ");
      }
      if (!checkCancelled()) {
        new import_obsidian8.Notice("Error: Failed to create leaf for rendering!");
        throw new Error("Failed to create leaf for rendering!");
      }
      return;
    }
    let obsidianWindow = _MarkdownRendererInternal2.renderLeaf.view.containerEl.win;
    _MarkdownRendererInternal2.electronWindow = obsidianWindow.electronWindow;
    if (!_MarkdownRendererInternal2.electronWindow) {
      new import_obsidian8.Notice("Failed to get the render window, please try again.");
      _MarkdownRendererInternal2.errorInBatch = false;
      _MarkdownRendererInternal2.cancelled = false;
      _MarkdownRendererInternal2.batchStarted = false;
      _MarkdownRendererInternal2.renderLeaf = void 0;
      _MarkdownRendererInternal2.electronWindow = void 0;
      return;
    }
    if (options.displayProgress === false) {
      let newPosition = { x: 0, y: window.screen.height };
      obsidianWindow.moveTo(newPosition.x, newPosition.y);
      _MarkdownRendererInternal2.electronWindow.hide();
    } else {
      _MarkdownRendererInternal2.renderLeaf.parent.containerEl.style.height = "0";
      _MarkdownRendererInternal2.renderLeaf.parent.parent.containerEl.querySelector(".clickable-icon, .workspace-tab-header-container-inner").style.display = "none";
      _MarkdownRendererInternal2.renderLeaf.parent.containerEl.style.maxHeight = "var(--header-height)";
      _MarkdownRendererInternal2.renderLeaf.parent.parent.containerEl.classList.remove("mod-vertical");
      _MarkdownRendererInternal2.renderLeaf.parent.parent.containerEl.classList.add("mod-horizontal");
      let newSize = { width: 800, height: 400 };
      obsidianWindow.resizeTo(newSize.width, newSize.height);
      let newPosition = { x: window.screen.width / 2 - 450, y: window.screen.height - 450 - 75 };
      obsidianWindow.moveTo(newPosition.x, newPosition.y);
    }
    _MarkdownRendererInternal2.electronWindow.setAlwaysOnTop(true, "floating", 1);
    _MarkdownRendererInternal2.electronWindow.webContents.setBackgroundThrottling(false);
    function windowClosed() {
      var _a2;
      if (_MarkdownRendererInternal2.cancelled)
        return;
      endBatch();
      _MarkdownRendererInternal2.cancelled = true;
      (_a2 = _MarkdownRendererInternal2.electronWindow) == null ? void 0 : _a2.off("close", windowClosed);
    }
    _MarkdownRendererInternal2.electronWindow.on("close", windowClosed);
    createLoadingContainer();
  }
  _MarkdownRendererInternal2.beginBatch = beginBatch;
  function endBatch() {
    if (!_MarkdownRendererInternal2.batchStarted)
      return;
    if (_MarkdownRendererInternal2.renderLeaf) {
      if (!_MarkdownRendererInternal2.errorInBatch) {
        ExportLog.log("Closing render window");
        _MarkdownRendererInternal2.renderLeaf.detach();
      } else {
        ExportLog.warning("Error in batch, leaving render window open");
        _reportProgress(1, 1, "Completed with errors", "Please see the log for more details.", errorColor);
      }
    }
    _MarkdownRendererInternal2.electronWindow = void 0;
    _MarkdownRendererInternal2.renderLeaf = void 0;
    _MarkdownRendererInternal2.batchStarted = false;
  }
  _MarkdownRendererInternal2.endBatch = endBatch;
  function generateLogEl(title, message, textColor, backgroundColor) {
    let logEl = document.createElement("div");
    logEl.className = "html-render-log-item";
    logEl.style.display = "flex";
    logEl.style.flexDirection = "column";
    logEl.style.marginBottom = "2px";
    logEl.style.fontSize = "12px";
    logEl.innerHTML = `
		<div class="html-render-log-title" style="font-weight: bold; margin-left: 1em;"></div>
		<div class="html-render-log-message" style="margin-left: 2em; font-size: 0.8em;white-space: pre-wrap;"></div>
		`;
    logEl.querySelector(".html-render-log-title").textContent = title;
    logEl.querySelector(".html-render-log-message").textContent = message.toString();
    logEl.style.color = textColor;
    logEl.style.backgroundColor = backgroundColor;
    logEl.style.borderLeft = `5px solid ${textColor}`;
    logEl.style.borderBottom = "1px solid var(--divider-color)";
    logEl.style.borderTop = "1px solid var(--divider-color)";
    return logEl;
  }
  function createLoadingContainer() {
    if (!loadingContainer) {
      loadingContainer = document.createElement("div");
      loadingContainer.className = `html-render-progress-container`;
      loadingContainer.setAttribute("style", "height: 100%; min-width: 100%; display:flex; flex-direction:column; align-content: center; justify-content: center; align-items: center;");
      loadingContainer.innerHTML = `
			<div class="html-render-progress-container" style="height: 100%;min-width: 100%;display:flex;flex-direction:column;">
				<div style="display: flex;height: 100%;">
					<div style="flex-grow: 1;display: flex;flex-direction: column;align-items: center;justify-content: center;">
						<h1 style="">Generating HTML</h1>
						<progress class="html-render-progressbar" value="0" min="0" max="1" style="width: 300px; height: 15px; background-color: transparent; color: var(--interactive-accent);"></progress>
						<span class="html-render-submessage" style="margin-block-start: 2em;"></span>
					</div>
					<div class="html-render-log" style="display:none; flex-direction: column; border-left: 1px solid var(--divider-color); overflow-y: auto; width: 300px; max-width: 300px; min-width: 300px;">
						<h1 style="color: var(--color-yellow);padding: 0.3em;background-color: rgba(100, 70, 20, 0.1);margin: 0;">Export Log</h1>
					</div>
				</div>
			</div>
			`;
      _MarkdownRendererInternal2.renderLeaf.parent.parent.containerEl.appendChild(loadingContainer);
    }
  }
  let logShowing = false;
  function appendLogEl(logEl) {
    var _a2;
    logContainer = (_a2 = loadingContainer == null ? void 0 : loadingContainer.querySelector(".html-render-log")) != null ? _a2 : void 0;
    if (!logContainer || !_MarkdownRendererInternal2.renderLeaf) {
      console.error("Failed to append log element, log container or render leaf is undefined!");
      return;
    }
    if (!logShowing) {
      _MarkdownRendererInternal2.renderLeaf.view.containerEl.win.resizeTo(900, 500);
      logContainer.style.display = "flex";
      logShowing = true;
    }
    logContainer.appendChild(logEl);
    logEl.scrollIntoView({ behavior: "instant", block: "end", inline: "end" });
  }
  async function _reportProgress(complete, total, message, subMessage, progressColor) {
    var _a2;
    if (!_MarkdownRendererInternal2.batchStarted)
      return;
    if (!_MarkdownRendererInternal2.renderLeaf || !_MarkdownRendererInternal2.renderLeaf.parent || !_MarkdownRendererInternal2.renderLeaf.parent.parent)
      return;
    let loadingContainer2 = _MarkdownRendererInternal2.renderLeaf.parent.parent.containerEl.querySelector(`.html-render-progress-container`);
    if (!loadingContainer2)
      return;
    let progress = complete / total;
    let progressBar = loadingContainer2.querySelector("progress");
    if (progressBar) {
      progressBar.value = progress;
      progressBar.style.backgroundColor = "transparent";
      progressBar.style.color = progressColor;
    }
    let messageElement = loadingContainer2.querySelector("h1");
    if (messageElement) {
      messageElement.innerText = message;
    }
    let subMessageElement = loadingContainer2.querySelector("span.html-render-submessage");
    if (subMessageElement) {
      subMessageElement.innerText = subMessage;
    }
    (_a2 = _MarkdownRendererInternal2.electronWindow) == null ? void 0 : _a2.setProgressBar(progress);
  }
  _MarkdownRendererInternal2._reportProgress = _reportProgress;
  async function _reportError(messageTitle, message, fatal) {
    if (!_MarkdownRendererInternal2.batchStarted)
      return;
    _MarkdownRendererInternal2.errorInBatch = true;
    let found = await Utils.waitUntil(() => _MarkdownRendererInternal2.renderLeaf && _MarkdownRendererInternal2.renderLeaf.parent && _MarkdownRendererInternal2.renderLeaf.parent.parent, 100, 10);
    if (!found)
      return;
    appendLogEl(generateLogEl(messageTitle, message, errorColor, errorBoxColor));
    if (fatal) {
      _MarkdownRendererInternal2.renderLeaf = void 0;
      loadingContainer = void 0;
      logContainer = void 0;
    }
  }
  _MarkdownRendererInternal2._reportError = _reportError;
  async function _reportWarning(messageTitle, message) {
    if (!_MarkdownRendererInternal2.batchStarted)
      return;
    let found = await Utils.waitUntil(() => _MarkdownRendererInternal2.renderLeaf && _MarkdownRendererInternal2.renderLeaf.parent && _MarkdownRendererInternal2.renderLeaf.parent.parent, 100, 10);
    if (!found)
      return;
    appendLogEl(generateLogEl(messageTitle, message, warningColor, warningBoxColor));
  }
  _MarkdownRendererInternal2._reportWarning = _reportWarning;
  async function _reportInfo(messageTitle, message) {
    if (!_MarkdownRendererInternal2.batchStarted)
      return;
    let found = await Utils.waitUntil(() => _MarkdownRendererInternal2.renderLeaf && _MarkdownRendererInternal2.renderLeaf.parent && _MarkdownRendererInternal2.renderLeaf.parent.parent, 100, 10);
    if (!found)
      return;
    appendLogEl(generateLogEl(messageTitle, message, infoColor, infoBoxColor));
  }
  _MarkdownRendererInternal2._reportInfo = _reportInfo;
})(_MarkdownRendererInternal || (_MarkdownRendererInternal = {}));

// scripts/html-generation/render-log.ts
var ExportLog;
((ExportLog2) => {
  ExportLog2.fullLog = "";
  function logToString(message, title) {
    let messageString = typeof message === "string" ? message : JSON.stringify(message).replaceAll("\n", "\n		");
    let titleString = title != "" ? title + "	" : "";
    let log2 = `${titleString}${messageString}
`;
    return log2;
  }
  function humanReadableJSON(object) {
    let string = JSON.stringify(object, null, 2).replaceAll(/\"|\{|\}|,/g, "").split("\n").map((s) => s.trim()).join("\n	");
    let lines = string.split("\n");
    lines = lines.filter((line) => line.contains(":"));
    let names = lines.map((line) => line.split(":")[0] + " ");
    let values = lines.map((line) => line.split(":").slice(1).join(":"));
    let maxLength = Math.max(...names.map((name) => name.length)) + 3;
    let table = "";
    for (let i = 0; i < names.length; i++) {
      let padString = i % 2 == 0 ? "-" : " ";
      table += `${names[i].padEnd(maxLength, padString)}${values[i]}
`;
    }
    return table;
  }
  function log(message, messageTitle = "") {
    pullPathLogs();
    messageTitle = `[INFO] ${messageTitle}`;
    ExportLog2.fullLog += logToString(message, messageTitle);
    if (SettingsPage3.loaded && !(Settings.logLevel == "all"))
      return;
    if (messageTitle != "")
      console.log(messageTitle + " ", message);
    else
      console.log(message);
    _MarkdownRendererInternal._reportInfo(messageTitle, message);
  }
  ExportLog2.log = log;
  function warning(message, messageTitle = "") {
    pullPathLogs();
    messageTitle = `[WARNING] ${messageTitle}`;
    ExportLog2.fullLog += logToString(message, messageTitle);
    if (SettingsPage3.loaded && !["warning", "all"].contains(Settings.logLevel))
      return;
    if (messageTitle != "")
      console.warn(messageTitle + " ", message);
    else
      console.warn(message);
    _MarkdownRendererInternal._reportWarning(messageTitle, message);
  }
  ExportLog2.warning = warning;
  function error(message, messageTitle = "", fatal = false) {
    pullPathLogs();
    messageTitle = (fatal ? "[FATAL ERROR] " : "[ERROR] ") + messageTitle;
    ExportLog2.fullLog += logToString(message, messageTitle);
    if (SettingsPage3.loaded && !fatal && !["error", "warning", "all"].contains(Settings.logLevel))
      return;
    if (fatal && messageTitle == "Error")
      messageTitle = "Fatal Error";
    if (messageTitle != "")
      console.error(messageTitle + " ", message);
    else
      console.error(message);
    _MarkdownRendererInternal._reportError(messageTitle, message, fatal);
  }
  ExportLog2.error = error;
  function progress(complete, total, message, subMessage, progressColor = "var(--interactive-accent)") {
    pullPathLogs();
    if (total == 0) {
      complete = 1;
      total = 1;
    }
    _MarkdownRendererInternal._reportProgress(complete, total, message, subMessage, progressColor);
  }
  ExportLog2.progress = progress;
  function pullPathLogs() {
    let logs = Path.dequeueLog();
    for (let thisLog of logs) {
      switch (thisLog.type) {
        case "info":
          log(thisLog.message, thisLog.title);
          break;
        case "warn":
          warning(thisLog.message, thisLog.title);
          break;
        case "error":
          error(thisLog.message, thisLog.title, false);
          break;
        case "fatal":
          error(thisLog.message, thisLog.title, true);
          break;
      }
    }
  }
  function getDebugInfo() {
    let debugInfo = "";
    debugInfo += `Log:
${ExportLog2.fullLog}

`;
    let settingsCopy = Object.assign({}, Settings);
    settingsCopy.filesToExport = settingsCopy.filesToExport[0].length;
    settingsCopy.includePluginCSS = settingsCopy.includePluginCSS.split("\n").length + " plugins included";
    debugInfo += `Settings:
${humanReadableJSON(settingsCopy)}

`;
    let loadedPlugins = Object.values(app.plugins.plugins).filter((plugin) => plugin._loaded == true).map((plugin) => plugin.manifest.name).join("\n	");
    debugInfo += `Enabled Plugins:
	${loadedPlugins}`;
    return debugInfo;
  }
  ExportLog2.getDebugInfo = getDebugInfo;
  function testThrowError(chance) {
    if (Math.random() < chance) {
      throw new Error("Test error");
    }
  }
  ExportLog2.testThrowError = testThrowError;
})(ExportLog || (ExportLog = {}));

// scripts/utils/utils.ts
var dialog = require("electron").remote.dialog;
var Utils = class {
  static async delay(ms) {
    return new Promise((resolve) => setTimeout(resolve, ms));
  }
  static padStringBeggining(str, length, char) {
    return char.repeat(length - str.length) + str;
  }
  static includesAny(str, substrings) {
    for (let substring of substrings) {
      if (str.includes(substring))
        return true;
    }
    return false;
  }
  static async urlAvailable(url) {
    const controller = new AbortController();
    const id = setTimeout(() => controller.abort(), 4e3);
    const response = await fetch(url, { signal: controller.signal, mode: "no-cors" });
    clearTimeout(id);
    return response;
  }
  static sampleCSSColorHex(variable, testParentEl) {
    let testEl = document.createElement("div");
    testEl.style.setProperty("display", "none");
    testEl.style.setProperty("color", "var(" + variable + ")");
    testParentEl.appendChild(testEl);
    let col = getComputedStyle(testEl).color;
    let opacity = getComputedStyle(testEl).opacity;
    testEl.remove();
    function toColorObject(str) {
      var match = str.match(/rgb?\((\d+),\s*(\d+),\s*(\d+)\)/);
      return match ? {
        red: parseInt(match[1]),
        green: parseInt(match[2]),
        blue: parseInt(match[3]),
        alpha: 1
      } : null;
    }
    var color = toColorObject(col), alpha = parseFloat(opacity);
    return isNaN(alpha) && (alpha = 1), color ? {
      a: alpha * color.alpha,
      hex: Utils.padStringBeggining(color.red.toString(16), 2, "0") + Utils.padStringBeggining(color.green.toString(16), 2, "0") + Utils.padStringBeggining(color.blue.toString(16), 2, "0")
    } : {
      a: alpha,
      hex: "ffffff"
    };
  }
  static async changeViewMode(view, modeName) {
    const mode = view.modes[modeName];
    mode && await view.setMode(mode);
  }
  static async showSaveDialog(defaultPath, defaultFileName, showAllFilesOption = true) {
    let absoluteDefaultPath = defaultPath.directory.absolute().joinString(defaultFileName);
    let filters = [{
      name: Utils.trimStart(absoluteDefaultPath.extension, ".").toUpperCase() + " Files",
      extensions: [Utils.trimStart(absoluteDefaultPath.extension, ".")]
    }];
    if (showAllFilesOption) {
      filters.push({
        name: "All Files",
        extensions: ["*"]
      });
    }
    let picker = await dialog.showSaveDialog({
      defaultPath: absoluteDefaultPath.asString,
      filters,
      properties: ["showOverwriteConfirmation"]
    });
    if (picker.canceled || !picker.filePath)
      return;
    let pickedPath = new Path(picker.filePath);
    Settings.exportPath = pickedPath.asString;
    SettingsPage3.saveSettings();
    return pickedPath;
  }
  static async showSelectFolderDialog(defaultPath) {
    if (!defaultPath.exists)
      defaultPath = Path.vaultPath;
    let picker = await dialog.showOpenDialog({
      defaultPath: defaultPath.directory.asString,
      properties: ["openDirectory"]
    });
    if (picker.canceled)
      return;
    let path = new Path(picker.filePaths[0]);
    Settings.exportPath = path.directory.asString;
    SettingsPage3.saveSettings();
    return path;
  }
  static async showSelectFileDialog(defaultPath) {
    if (!defaultPath.exists)
      defaultPath = Path.vaultPath;
    let picker = await dialog.showOpenDialog({
      defaultPath: defaultPath.directory.asString,
      properties: ["openFile"]
    });
    if (picker.canceled)
      return;
    let path = new Path(picker.filePaths[0]);
    return path;
  }
  static idealDefaultPath() {
    let lastPath = new Path(Settings.exportPath);
    if (lastPath.asString != "" && lastPath.exists) {
      return lastPath.directory;
    }
    return Path.vaultPath;
  }
  static async downloadFiles(files, rootPath) {
    if (!rootPath.isAbsolute)
      throw new Error("folderPath must be absolute: " + rootPath.asString);
    ExportLog.progress(0, files.length, "Saving HTML files to disk", "...", "var(--color-green)");
    for (let i = 0; i < files.length; i++) {
      let file = files[i];
      try {
        await file.download(rootPath.directory);
        ExportLog.progress(i + 1, files.length, "Saving HTML files to disk", "Saving: " + file.filename, "var(--color-green)");
      } catch (e) {
        ExportLog.error(e.stack, "Could not save file: " + file.filename);
        continue;
      }
    }
  }
  static async waitUntil(condition, timeout = 1e3, interval = 100) {
    if (condition())
      return true;
    return new Promise((resolve, reject) => {
      let timer = 0;
      let intervalId = setInterval(() => {
        if (condition()) {
          clearInterval(intervalId);
          resolve(true);
        } else {
          timer += interval;
          if (timer >= timeout) {
            clearInterval(intervalId);
            resolve(false);
          }
        }
      }, interval);
    });
  }
  static getPluginIDs() {
    let pluginsArray = Array.from(app.plugins.enabledPlugins.values());
    for (let i = 0; i < pluginsArray.length; i++) {
      if (app.plugins.manifests[pluginsArray[i]] == void 0) {
        pluginsArray.splice(i, 1);
        i--;
      }
    }
    return pluginsArray;
  }
  static getPluginManifest(pluginID) {
    var _a2;
    return (_a2 = app.plugins.manifests[pluginID]) != null ? _a2 : null;
  }
  static getActiveTextView() {
    let view = app.workspace.getActiveViewOfType(import_obsidian9.TextFileView);
    if (!view) {
      return null;
    }
    return view;
  }
  static trimEnd(inputString, trimString) {
    if (inputString.endsWith(trimString)) {
      return inputString.substring(0, inputString.length - trimString.length);
    }
    return inputString;
  }
  static trimStart(inputString, trimString) {
    if (inputString.startsWith(trimString)) {
      return inputString.substring(trimString.length);
    }
    return inputString;
  }
  static async openPath(path) {
    await window.electron.remote.shell.openPath(path.asString);
  }
  static levenshteinDistance(string1, string2) {
    if (!string1.length)
      return string2.length;
    if (!string2.length)
      return string1.length;
    const arr = [];
    for (let i = 0; i <= string2.length; i++) {
      arr[i] = [i];
      for (let j = 1; j <= string1.length; j++) {
        arr[i][j] = i === 0 ? j : Math.min(arr[i - 1][j] + 1, arr[i][j - 1] + 1, arr[i - 1][j - 1] + (string1[j - 1] === string2[i - 1] ? 0 : 1));
      }
    }
    return arr[string2.length][string1.length];
  }
};

// scripts/utils/path.ts
var import_fs2 = require("fs");
var import_fs3 = require("fs");
var import_os = require("os");
var pathTools = require_upath();
var _Path = class {
  constructor(path, workingDirectory = _Path.vaultPath.asString) {
    this._root = "";
    this._dir = "";
    this._parent = "";
    this._base = "";
    this._ext = "";
    this._name = "";
    this._fullPath = "";
    this._isDirectory = false;
    this._isFile = false;
    this._exists = void 0;
    this._rawString = "";
    this._isWindows = process.platform === "win32";
    this._workingDirectory = _Path.parsePath(workingDirectory).fullPath;
    this.reparse(path);
    if (this.isAbsolute)
      this._workingDirectory = "";
  }
  static log(title, message, type) {
    this.logQueue.push({ title, message, type });
  }
  static dequeueLog() {
    let queue = this.logQueue;
    this.logQueue = [];
    return queue;
  }
  reparse(path) {
    let parsed = _Path.parsePath(path);
    this._root = parsed.root;
    this._dir = parsed.dir;
    this._parent = parsed.parent;
    this._base = parsed.base;
    this._ext = parsed.ext;
    this._name = parsed.name;
    this._fullPath = parsed.fullPath;
    this._isDirectory = this._ext == "";
    this._isFile = this._ext != "";
    this._exists = void 0;
    this._rawString = path;
    if (this._isWindows) {
      if (this._root.startsWith("http:") || this._root.startsWith("https:")) {
        this._isWindows = false;
        this.reparse(this._fullPath.replaceAll("\\", "/"));
      } else {
        this._root = this._root.replaceAll("/", "\\");
        this._dir = this._dir.replaceAll("/", "\\");
        this._parent = this._parent.replaceAll("/", "\\");
        this._fullPath = this._fullPath.replaceAll("/", "\\");
        this._workingDirectory = this._workingDirectory.replaceAll("/", "\\");
      }
    }
    this._exists;
    return this;
  }
  joinString(...paths) {
    return this.copy.reparse(_Path.joinStringPaths(this.asString, ...paths));
  }
  join(...paths) {
    return new _Path(_Path.joinStringPaths(this.asString, ...paths.map((p) => p.asString)), this._workingDirectory);
  }
  makeAbsolute(workingDirectory = this._workingDirectory) {
    if (workingDirectory instanceof _Path && !workingDirectory.isAbsolute)
      throw new Error("workingDirectory must be an absolute path: " + workingDirectory.asString);
    if (!this.isAbsolute) {
      this._fullPath = _Path.joinStringPaths(workingDirectory.toString(), this.asString);
      this._workingDirectory = "";
      this.reparse(this.asString);
    }
    return this;
  }
  makeForceFolder() {
    if (!this.isDirectory) {
      this.reparse(this.asString + "/");
    }
    return this;
  }
  makeNormalized() {
    let fullPath = pathTools.normalizeSafe(this.absolute().asString);
    let newWorkingDir = "";
    let newFullPath = "";
    let reachedEndOfWorkingDir = false;
    for (let i = 0; i < fullPath.length; i++) {
      let fullChar = fullPath.charAt(i);
      let workingChar = this.workingDirectory.charAt(i);
      if (fullChar == workingChar && !reachedEndOfWorkingDir) {
        newWorkingDir += fullChar;
        continue;
      }
      reachedEndOfWorkingDir = true;
      newFullPath += fullChar;
    }
    this.reparse(newFullPath);
    this._workingDirectory = newWorkingDir;
    return this;
  }
  normalized() {
    return this.copy.makeNormalized();
  }
  makeRootAbsolute() {
    if (!this.isAbsolute) {
      if (this._isWindows) {
        if (this._fullPath.contains(":")) {
          this._fullPath = this.asString.substring(this._fullPath.indexOf(":") - 1);
        } else {
          this._fullPath = "\\" + this.asString;
        }
      } else {
        this._fullPath = "/" + this.asString;
      }
      this.reparse(this.asString);
    }
    return this;
  }
  setWorkingDirectory(workingDirectory) {
    this._workingDirectory = workingDirectory;
    return this;
  }
  makeRootRelative() {
    if (this.isAbsolute) {
      if (this._isWindows) {
        this._fullPath = this.asString.replace(/^.:\/\//i, "").replace(/^.:\//i, "");
        this._fullPath = Utils.trimStart(this._fullPath, "\\");
      } else {
        this._fullPath = Utils.trimStart(this._fullPath, "/");
      }
      this.reparse(this.asString);
    }
    return this;
  }
  makeWebStyle(makeWebStyle = true) {
    if (!makeWebStyle)
      return this;
    this._fullPath = _Path.toWebStyle(this.asString);
    this.reparse(this.asString);
    return this;
  }
  makeWindowsStyle() {
    this._isWindows = true;
    this._fullPath = this.asString.replaceAll("/", "\\");
    this.reparse(this.asString);
    return this;
  }
  makeUnixStyle() {
    this._isWindows = false;
    this._fullPath = this.asString.replaceAll("\\", "/").replace(/^.:\/\//i, "/");
    this.reparse(this.asString);
    return this;
  }
  setExtension(extension) {
    if (!extension.contains("."))
      extension = "." + extension;
    this._ext = extension;
    this._base = this._name + this._ext;
    this._fullPath = _Path.joinStringPaths(this._dir, this._base);
    this.reparse(this._fullPath);
    return this;
  }
  replaceExtension(searchExt, replaceExt) {
    if (!searchExt.contains("."))
      searchExt = "." + searchExt;
    if (!replaceExt.contains("."))
      replaceExt = "." + replaceExt;
    this._ext = this._ext.replace(searchExt, replaceExt);
    this._base = this._name + this._ext;
    this._fullPath = _Path.joinStringPaths(this._dir, this._base);
    this.reparse(this._fullPath);
    return this;
  }
  toString() {
    return this.asString;
  }
  get root() {
    return this._root;
  }
  get directory() {
    return new _Path(this._dir, this._workingDirectory);
  }
  get parent() {
    return new _Path(this._parent, this._workingDirectory);
  }
  get fullName() {
    return this._base;
  }
  get extension() {
    return this._ext;
  }
  get extensionName() {
    return this._ext.replace(".", "");
  }
  get basename() {
    return this._name;
  }
  get depth() {
    return this.asString.replaceAll("\\", "/").replaceAll("//", "/").split("/").length - 1;
  }
  get rawString() {
    return this._rawString;
  }
  get asString() {
    return this._fullPath;
  }
  get isDirectory() {
    return this._isDirectory;
  }
  get isEmpty() {
    return this.asString == ".";
  }
  get isFile() {
    return this._isFile;
  }
  get workingDirectory() {
    return this._workingDirectory;
  }
  get exists() {
    if (this._exists == void 0) {
      try {
        this._exists = _Path.pathExists(this.absolute().asString);
      } catch (error) {
        this._exists = false;
        _Path.log("Error checking if path exists: " + this.asString, error, "error");
      }
    }
    return this._exists;
  }
  get stat() {
    if (!this.exists)
      return;
    try {
      let stat = (0, import_fs3.statSync)(this.absolute().asString);
      return stat;
    } catch (error) {
      _Path.log("Error getting stat: " + this.asString, error, "error");
      return;
    }
  }
  assertExists() {
    if (!this.exists) {
      new import_obsidian10.Notice("Error: Path does not exist: \n\n" + this.asString, 5e3);
      ExportLog.error("Path does not exist: " + this.asString);
    }
    return this.exists;
  }
  get isAbsolute() {
    let asString = this.asString;
    if (asString.startsWith("http:") || asString.startsWith("https:"))
      return true;
    if (this._isWindows) {
      if (asString.match(/^[A-Za-z]:[\\|\/|\\\\|\/\/]/))
        return true;
      if (asString.startsWith("\\") && !asString.contains(":"))
        return true;
      else
        return false;
    } else {
      if (asString.startsWith("/"))
        return true;
      else
        return false;
    }
  }
  get isRelative() {
    return !this.isAbsolute;
  }
  get copy() {
    return new _Path(this.asString, this._workingDirectory);
  }
  getDepth() {
    return this.asString.split("/").length - 1;
  }
  absolute(workingDirectory = this._workingDirectory) {
    return this.copy.makeAbsolute(workingDirectory);
  }
  validate(options) {
    var _a2, _b;
    let error = "";
    let valid = true;
    let isEmpty = this.rawString.trim() == "";
    options.requireExtentions = (_b = (_a2 = options.requireExtentions) == null ? void 0 : _a2.map((e) => e.replace(".", ""))) != null ? _b : [];
    let dottedExtention = options.requireExtentions.map((e) => "." + e);
    if (!options.allowEmpty && isEmpty) {
      error += "Path cannot be empty\n";
      valid = false;
    } else if (options.allowEmpty && isEmpty) {
      return { valid: true, isEmpty, error: "" };
    }
    if (options.requireExists && !this.exists) {
      error += "Path does not exist";
      valid = false;
    } else if (!options.allowTildeHomeDirectory && this.asString.startsWith("~")) {
      error += "Home directory with tilde (~) is not allowed";
      valid = false;
    } else if (!options.allowAbsolute && this.isAbsolute) {
      error += "Path cannot be absolute";
      valid = false;
    } else if (!options.allowRelative && this.isRelative) {
      error += "Path cannot be relative";
      valid = false;
    } else if (!options.allowFiles && this.isFile) {
      error += "Path cannot be a file";
      valid = false;
    } else if (!options.allowDirectories && this.isDirectory) {
      error += "Path cannot be a directory";
      valid = false;
    } else if (options.requireExtentions.length > 0 && !options.requireExtentions.includes(this.extensionName) && !isEmpty) {
      error += "Path must be: " + dottedExtention.join(", ");
      valid = false;
    }
    return { valid, isEmpty, error };
  }
  async createDirectory() {
    if (!this.exists) {
      let path = this.absolute().directory.asString;
      try {
        await import_fs2.promises.mkdir(path, { recursive: true });
      } catch (error) {
        _Path.log("Error creating directory: " + path, error, "error");
        return false;
      }
    }
    return true;
  }
  async readFileString(encoding = "utf-8") {
    if (!this.exists || this.isDirectory)
      return;
    try {
      let data = await import_fs2.promises.readFile(this.absolute().asString, { encoding });
      return data;
    } catch (error) {
      _Path.log("Error reading file: " + this.asString, error, "error");
      return;
    }
  }
  async readFileBuffer() {
    if (!this.exists || this.isDirectory)
      return;
    try {
      let data = await import_fs2.promises.readFile(this.absolute().asString);
      return data;
    } catch (error) {
      _Path.log("Error reading file buffer: " + this.asString, error, "error");
      return;
    }
  }
  async writeFile(data, encoding = "utf-8") {
    if (this.isDirectory)
      return false;
    try {
      await import_fs2.promises.writeFile(this.absolute().asString, data, { encoding });
      return true;
    } catch (error) {
      let dirExists = await this.createDirectory();
      if (!dirExists)
        return false;
      try {
        await import_fs2.promises.writeFile(this.absolute().asString, data, { encoding });
        return true;
      } catch (error2) {
        _Path.log("Error writing file: " + this.asString, error2, "error");
        return false;
      }
    }
  }
  async delete(recursive = false) {
    if (!this.exists)
      return false;
    try {
      await import_fs2.promises.rm(this.absolute().asString, { recursive });
      return true;
    } catch (error) {
      _Path.log("Error deleting file: " + this.asString, error, "error");
      return false;
    }
  }
  static fromString(path) {
    return new _Path(path);
  }
  static parsePath(path) {
    var _a2;
    let args = (_a2 = path.split("?")[1]) != null ? _a2 : "";
    path = path.split("?")[0];
    if (process.platform === "win32") {
      if (path.startsWith("~")) {
        path = path.replace("~", (0, import_os.homedir)());
      }
    }
    try {
      path = decodeURI(path);
    } catch (trash) {
      try {
        path = decodeURI(path.replaceAll("%", ""));
      } catch (e) {
        this.log("Could not decode path:" + path, e, "info");
      }
    }
    let parsed = pathTools.parse(path);
    if (parsed.ext.contains(" ")) {
      parsed.ext = "";
    }
    if (parsed.name.endsWith(" ")) {
      parsed.name += parsed.ext;
      parsed.ext = "";
    }
    let parent = parsed.dir;
    let fullPath = "";
    if (path.endsWith("/") || path.endsWith("\\") || parsed.ext == "") {
      if (path.endsWith("/") || path.endsWith("\\"))
        path = path.substring(0, path.length - 1);
      parsed.dir = pathTools.normalizeSafe(path);
      let items = parsed.dir.split("/");
      parsed.name = items[items.length - 1];
      parsed.base = parsed.name;
      parsed.ext = "";
      fullPath = parsed.dir;
    } else {
      fullPath = pathTools.join(parent, parsed.base);
    }
    if (args && args.trim() != "")
      fullPath += "?" + args;
    if (fullPath.startsWith("http:"))
      parsed.root = "http://";
    else if (fullPath.startsWith("https:"))
      parsed.root = "https://";
    parsed.dir = parsed.dir.replace(/[:][\\/](?![\\/])/g, "://");
    parent = parsed.dir;
    fullPath = fullPath.replace(/[:][\\/](?![\\/])/g, "://");
    return { root: parsed.root, dir: parsed.dir, parent, base: parsed.base, ext: parsed.ext, name: parsed.name, fullPath };
  }
  static pathExists(path) {
    return (0, import_fs.existsSync)(path);
  }
  static joinStringPaths(...paths) {
    let joined = pathTools.join(...paths);
    if (joined.startsWith("http")) {
      joined = joined.replaceAll(":/", "://");
    }
    try {
      return decodeURI(joined);
    } catch (e) {
      this.log("Could not decode joined paths: " + joined, e, "info");
      return joined;
    }
  }
  static joinPath(...paths) {
    return new _Path(_Path.joinStringPaths(...paths.map((p) => p.asString)), paths[0]._workingDirectory);
  }
  static joinStrings(...paths) {
    return new _Path(_Path.joinStringPaths(...paths));
  }
  static getRelativePath(from, to, useAbsolute = false) {
    let fromUse = useAbsolute ? from.absolute() : from;
    let toUse = useAbsolute ? to.absolute() : to;
    let relative = pathTools.relative(fromUse.directory.asString, toUse.asString);
    let workingDir = from.absolute().directory.asString;
    return new _Path(relative, workingDir);
  }
  static getRelativePathFromVault(path, useAbsolute = false) {
    return _Path.getRelativePath(_Path.vaultPath, path, useAbsolute);
  }
  static get vaultPath() {
    var _a2;
    if (this.vaultPathCache != void 0)
      return this.vaultPathCache;
    let adapter = app.vault.adapter;
    if (adapter instanceof import_obsidian10.FileSystemAdapter) {
      let basePath = (_a2 = adapter.getBasePath()) != null ? _a2 : "";
      this.vaultPathCache = new _Path(basePath, "");
      return this.vaultPathCache;
    }
    throw new Error("Vault path could not be determined");
  }
  static get vaultConfigDir() {
    if (this.vaultConfigDirCache == void 0) {
      this.vaultConfigDirCache = new _Path(app.vault.configDir, "");
    }
    return this.vaultConfigDirCache;
  }
  static get emptyPath() {
    return new _Path("", "");
  }
  static get rootPath() {
    return new _Path("/", "");
  }
  static toWebStyle(path) {
    return path.replaceAll(" ", "-").replaceAll(/-{2,}/g, "-").toLowerCase();
  }
  static equal(path1, path2) {
    let path1Parsed = new _Path(path1).makeUnixStyle().makeWebStyle().asString;
    let path2Parsed = new _Path(path2).makeUnixStyle().makeWebStyle().asString;
    return path1Parsed == path2Parsed;
  }
  static async getAllEmptyFoldersRecursive(folder) {
    if (!folder.isDirectory)
      throw new Error("folder must be a directory: " + folder.asString);
    let folders = [];
    let folderFiles = await import_fs2.promises.readdir(folder.asString);
    for (let i = 0; i < folderFiles.length; i++) {
      let file = folderFiles[i];
      let path = folder.joinString(file);
      if ((await import_fs2.promises.stat(path.asString)).isDirectory()) {
        let subFolders = await this.getAllEmptyFoldersRecursive(path);
        if (subFolders.length == 0) {
          let subFiles = await import_fs2.promises.readdir(path.asString);
          if (subFiles.length == 0)
            folders.push(path);
        } else {
          folders.push(...subFolders);
        }
      }
    }
    return folders;
  }
  static async getAllFilesInFolderRecursive(folder) {
    if (!folder.isDirectory)
      throw new Error("folder must be a directory: " + folder.asString);
    let files = [];
    let folderFiles = await import_fs2.promises.readdir(folder.asString);
    for (let i = 0; i < folderFiles.length; i++) {
      let file = folderFiles[i];
      let path = folder.joinString(file);
      ExportLog.progress(i, folderFiles.length, "Finding Old Files", "Searching: " + folder.asString, "var(--color-yellow)");
      if ((await import_fs2.promises.stat(path.asString)).isDirectory()) {
        files.push(...await this.getAllFilesInFolderRecursive(path));
      } else {
        files.push(path);
      }
    }
    return files;
  }
};
var Path = _Path;
Path.logQueue = [];
Path.vaultPathCache = void 0;
Path.vaultConfigDirCache = void 0;

// scripts/html-generation/assets/other-plugin-styles.ts
var OtherPluginStyles = class extends Asset {
  constructor() {
    super("other-plugins.css", "", "style" /* Style */, "autohead" /* AutoHead */, true, "dynamic" /* Dynamic */, "async" /* Async */, 9);
    this.content = "";
    this.lastEnabledPluginStyles = "";
  }
  async load(options) {
    if (this.lastEnabledPluginStyles == Settings.includePluginCSS)
      return;
    this.content = "";
    let thirdPartyPluginStyleNames = Settings.includePluginCSS.split("\n");
    for (let i = 0; i < thirdPartyPluginStyleNames.length; i++) {
      if (!thirdPartyPluginStyleNames[i] || thirdPartyPluginStyleNames[i] && !/\S/.test(thirdPartyPluginStyleNames[i]))
        continue;
      let path = AssetHandler.vaultPluginsPath.joinString(thirdPartyPluginStyleNames[i].replace("\n", ""), "styles.css");
      if (!path.exists)
        continue;
      let style = await path.readFileString();
      if (style) {
        this.content += style;
        console.log("Loaded plugin style: " + thirdPartyPluginStyleNames[i] + " size: " + style.length);
      }
    }
    this.modifiedTime = Date.now();
    this.lastEnabledPluginStyles = Settings.includePluginCSS;
    await super.load(options);
  }
};

// scripts/html-generation/assets/theme-styles.ts
var ThemeStyles = class extends Asset {
  constructor() {
    super("theme.css", "", "style" /* Style */, "autohead" /* AutoHead */, true, "dynamic" /* Dynamic */, "" /* Default */, 8);
    this.content = "";
    this.lastThemeName = "";
  }
  static async getThemeContent(themeName) {
    var _a2;
    if (themeName == "Default")
      return "/* Using default theme. */";
    let themePath = AssetHandler.vaultPluginsPath.joinString(`../themes/${themeName}/theme.css`).absolute();
    if (!themePath.exists) {
      ExportLog.warning("Cannot find theme at path: \n\n" + themePath);
      return "";
    }
    let themeContent = (_a2 = await themePath.readFileString()) != null ? _a2 : "";
    return themeContent;
  }
  static getCurrentThemeName() {
    var _a2;
    let themeName = (_a2 = app.vault.config) == null ? void 0 : _a2.cssTheme;
    return (themeName != null ? themeName : "") == "" ? "Default" : themeName;
  }
  async load(options) {
    let themeName = ThemeStyles.getCurrentThemeName();
    if (themeName == this.lastThemeName) {
      this.modifiedTime = 0;
      return;
    }
    this.content = await ThemeStyles.getThemeContent(themeName);
    this.modifiedTime = Date.now();
    this.lastThemeName = themeName;
    await super.load(options);
  }
};

// scripts/html-generation/assets/snippet-styles.ts
var SnippetStyles = class extends Asset {
  constructor() {
    super("snippets.css", "", "style" /* Style */, "autohead" /* AutoHead */, true, "dynamic" /* Dynamic */, "async" /* Async */, 2);
    this.content = "";
  }
  static getEnabledSnippets() {
    var _a2, _b;
    return (_b = (_a2 = app.vault.config) == null ? void 0 : _a2.enabledCssSnippets) != null ? _b : [];
  }
  static async getStyleSnippetsContent() {
    var _a2;
    let snippetContents = [];
    let enabledSnippets = this.getEnabledSnippets();
    for (let i = 0; i < enabledSnippets.length; i++) {
      let path = new Path(`.obsidian/snippets/${enabledSnippets[i]}.css`).absolute();
      if (path.exists)
        snippetContents.push((_a2 = await path.readFileString()) != null ? _a2 : "\n");
    }
    return snippetContents;
  }
  async load(options) {
    let snippetsList = await SnippetStyles.getStyleSnippetsContent();
    let snippets = "\n";
    for (let i = 0; i < snippetsList.length; i++) {
      snippets += snippetsList[i] + "\n";
    }
    snippets = snippets.replaceAll(/^publish /gm, "html body[class].publish ");
    this.content = snippets;
    this.modifiedTime = Date.now();
    await super.load(options);
  }
};

// scripts/html-generation/assets/mathjax-styles.ts
var MathjaxStyles = class extends Asset {
  constructor() {
    super("mathjax.css", "", "style" /* Style */, "inline" /* Inline */, true, "dynamic" /* Dynamic */);
    this.mathjaxStylesheet = void 0;
    this.lastMathjaxChanged = -1;
    this.content = "";
  }
  async load(options) {
    var _a2;
    if (this.mathjaxStylesheet == void 0)
      this.mathjaxStylesheet = Array.from(document.styleSheets).find((sheet) => sheet.ownerNode.id == "MJX-CHTML-styles");
    if (this.mathjaxStylesheet == void 0) {
      return;
    }
    this.modifiedTime = Date.now();
    let changed = (_a2 = this.mathjaxStylesheet) == null ? void 0 : _a2.ownerNode.getAttribute("data-change");
    if (changed != this.lastMathjaxChanged) {
      this.content = "";
      for (let i = 0; i < this.mathjaxStylesheet.cssRules.length; i++) {
        this.content += this.mathjaxStylesheet.cssRules[i].cssText + "\n";
      }
    } else {
      return;
    }
    this.lastMathjaxChanged = changed;
    await super.load(options);
  }
};

// scripts/html-generation/assets/custom-head-content.ts
var CustomHeadContent = class extends Asset {
  constructor() {
    super("custom-head-content.html", "", "html" /* HTML */, "autohead" /* AutoHead */, false, "dynamic" /* Dynamic */);
    this.content = "";
  }
  async load(options) {
    var _a2, _b, _c;
    if (!SettingsPage3.loaded)
      return;
    let customHeadPath = new Path(Settings.customHeadContentPath);
    if (customHeadPath.isEmpty) {
      this.content = "";
      return;
    }
    let validation = customHeadPath.validate({
      allowEmpty: false,
      allowFiles: true,
      allowAbsolute: true,
      allowRelative: true,
      requireExists: true
    });
    if (!validation.valid) {
      this.content = "";
      ExportLog.error(validation.error + customHeadPath.asString);
      return;
    }
    this.modifiedTime = (_b = (_a2 = customHeadPath.stat) == null ? void 0 : _a2.mtimeMs) != null ? _b : this.modifiedTime;
    this.content = (_c = await customHeadPath.readFileString()) != null ? _c : "";
    await super.load(options);
  }
};

// scripts/html-generation/assets/global-variable-styles.ts
var GlobalVariableStyles = class extends Asset {
  constructor() {
    super("global-variable-styles.css", "", "style" /* Style */, "autohead" /* AutoHead */, true, "dynamic" /* Dynamic */, "async" /* Async */, 6);
    this.content = "";
  }
  async load(options) {
    var _a2;
    let bodyStyle = ((_a2 = document.body.getAttribute("style")) != null ? _a2 : "").replaceAll('"', "'").replaceAll("; ", " !important;\n	");
    let lineWidth = Settings.documentWidth || "40em";
    let sidebarWidth = Settings.sidebarWidth || "20em";
    if (!isNaN(Number(lineWidth)))
      lineWidth += "px";
    if (!isNaN(Number(sidebarWidth)))
      sidebarWidth += "px";
    let lineWidthCss = `min(${lineWidth}, calc(100vw - 2em))`;
    this.content = `
        :root body
        {
			--line-width: ${lineWidthCss};
			--line-width-adaptive: ${lineWidthCss};
			--file-line-width: ${lineWidthCss};
			--sidebar-width: min(${sidebarWidth}, 80vw);
        }

		body
        {
            ${bodyStyle}
        }
        `;
    this.modifiedTime = Date.now();
    await super.load(options);
  }
};

// assets/icon.png
var icon_default = __toBinary("iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAgVBMVEVHcEyff/+adPiZdPiZdPiZdfiXd/eZdPiUdPSYdPeZc/ebc/mYdPiYdPiZc/iZc/eZdPefb/+adPmXc/eXdPeZdfeZdfibc/eadPeZdfiYdPWYc/afb/eZc/eYdfeadPeZcviZdfWZdPeadPmYc/aXc/eXb/ecdfibdfmZdfiXd/creNEqAAAAK3RSTlMAEH+//88g3zDvgF/vcJ+PrxAwQGCPn0BgUHCQIM/PkFBQoK+wgCBQj29AobxPoQAAA1RJREFUeAG1mQeT4yAMheVFgeCUc2zHyfZe////26qZyyGLzZvD37S7Lbx9SEKCEER14phnnqbCB/5iVtE0zCP/UNMkLJiF5SQWTvgvq4nX5zUV5w9PKlA1rAQ2norhZywcxKCdVQXTP6Ejop63k60f6JOBeVWqvFIG+uRLti1TXgpPRDv+JPhi6a8MDPyFK7++GPD8w7ZkeQnux4CwKlheQvdPZi3bYuUluGTrQlUg/VMDFBLFYuvLcj0fclJyfd4fGhBOCWfgcYI2wLz0BJMzsFHfxAPdIgakuCF2PM5guUPDcMbj+HEDeK6eZ3LU8RhgFJwdYs+jXBDEJbZDuACPcpUxd1EiS6/pk2geUQA3PMqtkcC4QG2H4IxNcYA7HmNJn9ybZwiAsYqz8wttnZvRZR4kv4wE+H+FtV1m+MC9CayocwJXeEvDBJaE4iMgAJay8/RJBwhghbCTofYRCDKURgNLk3VagFgBtxwvvVGF4crol2jLGf5W5o19VGhWgIEvWr1Jld1MgT1aHc46Puq7n0kHjlxbdXCvdBrhFvp//6KNmqPDf1oImUF6qYKAW9hlJ+lOFTjcdZyaafu0WgMbiMUsXp8+FJMFarbZQtcCKa06nd4jg3HWBvSC0V338yf64ak7awyVGWRA8uLePXak6O4Y36QAWfaPAdykHj3lvXaRvU6FXKu9eD57Wbsvmpd9S0IXOKVBDIjjar9OFgqDFxPN8ZvkrE7oeQwnEo+cUEMXP5cZ2cXF45EHxoBPvKFVNzr7Gcxn5p3zX/qkAw2oeeeMTVbpoBnAex/v832SF8n80ZIBG9Rm/A9XXP3+qBAzAi3bSFCdirBVBcCtQHAHm7THLn52pelA1/ljQjIBj4E8SEnb8MCVAxBgJxYeiXCFW/tinoxQMZAAKXRGoWkL5x5/ytcTb8ZCRQKkEHQK40NdTuHBKsKEFlYQ9r8VMvzx4zz/wmIR6Gj6/COXwUCIQjLaMYMxABS8/BfaIUBhOHaHrgljpT8PytMRyGP6gVaeJWGIQswaUOWIKzyKAaDMEB4DiQEgBBCVTDNAFeC8MiMxxnnr+7peN+4ygoc1TjW/qV0EL+A4874J+EGHipy5qEe7wnTXlyy4iqbB903k6DrK8gEsMFeCpiVuYwAAAABJRU5ErkJggg==");

// scripts/html-generation/assets/favicon.ts
var Favicon = class extends Asset {
  constructor() {
    super("favicon.png", "", "media" /* Media */, "autohead" /* AutoHead */, false, "dynamic" /* Dynamic */);
  }
  async load(options) {
    var _a2, _b;
    if (Settings.faviconPath == "")
      this.content = Buffer.from(icon_default);
    let iconPath = new Path(Settings.faviconPath);
    let icon = await iconPath.readFileBuffer();
    if (icon) {
      this.content = icon;
      this.filename = "favicon" + iconPath.extension;
      this.modifiedTime = (_b = (_a2 = iconPath.stat) == null ? void 0 : _a2.mtimeMs) != null ? _b : this.modifiedTime;
    }
    await super.load(options);
  }
  getHTML() {
    if (Settings.inlineAssets) {
      return `<link rel="icon" href="data:image/png;base64,${this.content.toString("base64")}">`;
    } else {
      return `<link rel="icon" href="${this.getAssetPath()}">`;
    }
  }
};

// scripts/html-generation/assets/local-fetch-buffer.ts
var import_obsidian11 = require("obsidian");

// node_modules/file-type/browser.js
var import_readable_web_to_node_stream = __toESM(require_lib4(), 1);

// node_modules/file-type/core.js
var import_node_buffer3 = require("node:buffer");

// node_modules/token-types/lib/index.js
var ieee754 = __toESM(require_ieee754(), 1);
var import_node_buffer = require("node:buffer");
function dv(array) {
  return new DataView(array.buffer, array.byteOffset);
}
var UINT8 = {
  len: 1,
  get(array, offset) {
    return dv(array).getUint8(offset);
  },
  put(array, offset, value) {
    dv(array).setUint8(offset, value);
    return offset + 1;
  }
};
var UINT16_LE = {
  len: 2,
  get(array, offset) {
    return dv(array).getUint16(offset, true);
  },
  put(array, offset, value) {
    dv(array).setUint16(offset, value, true);
    return offset + 2;
  }
};
var UINT16_BE = {
  len: 2,
  get(array, offset) {
    return dv(array).getUint16(offset);
  },
  put(array, offset, value) {
    dv(array).setUint16(offset, value);
    return offset + 2;
  }
};
var UINT32_LE = {
  len: 4,
  get(array, offset) {
    return dv(array).getUint32(offset, true);
  },
  put(array, offset, value) {
    dv(array).setUint32(offset, value, true);
    return offset + 4;
  }
};
var UINT32_BE = {
  len: 4,
  get(array, offset) {
    return dv(array).getUint32(offset);
  },
  put(array, offset, value) {
    dv(array).setUint32(offset, value);
    return offset + 4;
  }
};
var INT32_BE = {
  len: 4,
  get(array, offset) {
    return dv(array).getInt32(offset);
  },
  put(array, offset, value) {
    dv(array).setInt32(offset, value);
    return offset + 4;
  }
};
var UINT64_LE = {
  len: 8,
  get(array, offset) {
    return dv(array).getBigUint64(offset, true);
  },
  put(array, offset, value) {
    dv(array).setBigUint64(offset, value, true);
    return offset + 8;
  }
};
var StringType = class {
  constructor(len, encoding) {
    this.len = len;
    this.encoding = encoding;
  }
  get(uint8Array, offset) {
    return import_node_buffer.Buffer.from(uint8Array).toString(this.encoding, offset, offset + this.len);
  }
};
var AnsiStringType = class {
  constructor(len) {
    this.len = len;
  }
  static decode(buffer, offset, until) {
    let str = "";
    for (let i = offset; i < until; ++i) {
      str += AnsiStringType.codePointToString(AnsiStringType.singleByteDecoder(buffer[i]));
    }
    return str;
  }
  static inRange(a, min, max) {
    return min <= a && a <= max;
  }
  static codePointToString(cp) {
    if (cp <= 65535) {
      return String.fromCharCode(cp);
    } else {
      cp -= 65536;
      return String.fromCharCode((cp >> 10) + 55296, (cp & 1023) + 56320);
    }
  }
  static singleByteDecoder(bite) {
    if (AnsiStringType.inRange(bite, 0, 127)) {
      return bite;
    }
    const codePoint = AnsiStringType.windows1252[bite - 128];
    if (codePoint === null) {
      throw Error("invaliding encoding");
    }
    return codePoint;
  }
  get(buffer, offset = 0) {
    return AnsiStringType.decode(buffer, offset, offset + this.len);
  }
};
AnsiStringType.windows1252 = [
  8364,
  129,
  8218,
  402,
  8222,
  8230,
  8224,
  8225,
  710,
  8240,
  352,
  8249,
  338,
  141,
  381,
  143,
  144,
  8216,
  8217,
  8220,
  8221,
  8226,
  8211,
  8212,
  732,
  8482,
  353,
  8250,
  339,
  157,
  382,
  376,
  160,
  161,
  162,
  163,
  164,
  165,
  166,
  167,
  168,
  169,
  170,
  171,
  172,
  173,
  174,
  175,
  176,
  177,
  178,
  179,
  180,
  181,
  182,
  183,
  184,
  185,
  186,
  187,
  188,
  189,
  190,
  191,
  192,
  193,
  194,
  195,
  196,
  197,
  198,
  199,
  200,
  201,
  202,
  203,
  204,
  205,
  206,
  207,
  208,
  209,
  210,
  211,
  212,
  213,
  214,
  215,
  216,
  217,
  218,
  219,
  220,
  221,
  222,
  223,
  224,
  225,
  226,
  227,
  228,
  229,
  230,
  231,
  232,
  233,
  234,
  235,
  236,
  237,
  238,
  239,
  240,
  241,
  242,
  243,
  244,
  245,
  246,
  247,
  248,
  249,
  250,
  251,
  252,
  253,
  254,
  255
];

// node_modules/peek-readable/lib/EndOfFileStream.js
var defaultMessages = "End-Of-Stream";
var EndOfStreamError = class extends Error {
  constructor() {
    super(defaultMessages);
  }
};

// node_modules/peek-readable/lib/Deferred.js
var Deferred = class {
  constructor() {
    this.resolve = () => null;
    this.reject = () => null;
    this.promise = new Promise((resolve, reject) => {
      this.reject = reject;
      this.resolve = resolve;
    });
  }
};

// node_modules/peek-readable/lib/StreamReader.js
var maxStreamReadSize = 1 * 1024 * 1024;
var StreamReader = class {
  constructor(s) {
    this.s = s;
    this.deferred = null;
    this.endOfStream = false;
    this.peekQueue = [];
    if (!s.read || !s.once) {
      throw new Error("Expected an instance of stream.Readable");
    }
    this.s.once("end", () => this.reject(new EndOfStreamError()));
    this.s.once("error", (err) => this.reject(err));
    this.s.once("close", () => this.reject(new Error("Stream closed")));
  }
  async peek(uint8Array, offset, length) {
    const bytesRead = await this.read(uint8Array, offset, length);
    this.peekQueue.push(uint8Array.subarray(offset, offset + bytesRead));
    return bytesRead;
  }
  async read(buffer, offset, length) {
    if (length === 0) {
      return 0;
    }
    if (this.peekQueue.length === 0 && this.endOfStream) {
      throw new EndOfStreamError();
    }
    let remaining = length;
    let bytesRead = 0;
    while (this.peekQueue.length > 0 && remaining > 0) {
      const peekData = this.peekQueue.pop();
      if (!peekData)
        throw new Error("peekData should be defined");
      const lenCopy = Math.min(peekData.length, remaining);
      buffer.set(peekData.subarray(0, lenCopy), offset + bytesRead);
      bytesRead += lenCopy;
      remaining -= lenCopy;
      if (lenCopy < peekData.length) {
        this.peekQueue.push(peekData.subarray(lenCopy));
      }
    }
    while (remaining > 0 && !this.endOfStream) {
      const reqLen = Math.min(remaining, maxStreamReadSize);
      const chunkLen = await this.readFromStream(buffer, offset + bytesRead, reqLen);
      bytesRead += chunkLen;
      if (chunkLen < reqLen)
        break;
      remaining -= chunkLen;
    }
    return bytesRead;
  }
  async readFromStream(buffer, offset, length) {
    const readBuffer = this.s.read(length);
    if (readBuffer) {
      buffer.set(readBuffer, offset);
      return readBuffer.length;
    } else {
      const request = {
        buffer,
        offset,
        length,
        deferred: new Deferred()
      };
      this.deferred = request.deferred;
      this.s.once("readable", () => {
        this.readDeferred(request);
      });
      return request.deferred.promise;
    }
  }
  readDeferred(request) {
    const readBuffer = this.s.read(request.length);
    if (readBuffer) {
      request.buffer.set(readBuffer, request.offset);
      request.deferred.resolve(readBuffer.length);
      this.deferred = null;
    } else {
      this.s.once("readable", () => {
        this.readDeferred(request);
      });
    }
  }
  reject(err) {
    this.endOfStream = true;
    if (this.deferred) {
      this.deferred.reject(err);
      this.deferred = null;
    }
  }
};

// node_modules/strtok3/lib/AbstractTokenizer.js
var import_node_buffer2 = require("node:buffer");
var AbstractTokenizer = class {
  constructor(fileInfo) {
    this.position = 0;
    this.numBuffer = new Uint8Array(8);
    this.fileInfo = fileInfo ? fileInfo : {};
  }
  async readToken(token, position = this.position) {
    const uint8Array = import_node_buffer2.Buffer.alloc(token.len);
    const len = await this.readBuffer(uint8Array, { position });
    if (len < token.len)
      throw new EndOfStreamError();
    return token.get(uint8Array, 0);
  }
  async peekToken(token, position = this.position) {
    const uint8Array = import_node_buffer2.Buffer.alloc(token.len);
    const len = await this.peekBuffer(uint8Array, { position });
    if (len < token.len)
      throw new EndOfStreamError();
    return token.get(uint8Array, 0);
  }
  async readNumber(token) {
    const len = await this.readBuffer(this.numBuffer, { length: token.len });
    if (len < token.len)
      throw new EndOfStreamError();
    return token.get(this.numBuffer, 0);
  }
  async peekNumber(token) {
    const len = await this.peekBuffer(this.numBuffer, { length: token.len });
    if (len < token.len)
      throw new EndOfStreamError();
    return token.get(this.numBuffer, 0);
  }
  async ignore(length) {
    if (this.fileInfo.size !== void 0) {
      const bytesLeft = this.fileInfo.size - this.position;
      if (length > bytesLeft) {
        this.position += bytesLeft;
        return bytesLeft;
      }
    }
    this.position += length;
    return length;
  }
  async close() {
  }
  normalizeOptions(uint8Array, options) {
    if (options && options.position !== void 0 && options.position < this.position) {
      throw new Error("`options.position` must be equal or greater than `tokenizer.position`");
    }
    if (options) {
      return {
        mayBeLess: options.mayBeLess === true,
        offset: options.offset ? options.offset : 0,
        length: options.length ? options.length : uint8Array.length - (options.offset ? options.offset : 0),
        position: options.position ? options.position : this.position
      };
    }
    return {
      mayBeLess: false,
      offset: 0,
      length: uint8Array.length,
      position: this.position
    };
  }
};

// node_modules/strtok3/lib/ReadStreamTokenizer.js
var maxBufferSize = 256e3;
var ReadStreamTokenizer = class extends AbstractTokenizer {
  constructor(stream, fileInfo) {
    super(fileInfo);
    this.streamReader = new StreamReader(stream);
  }
  async getFileInfo() {
    return this.fileInfo;
  }
  async readBuffer(uint8Array, options) {
    const normOptions = this.normalizeOptions(uint8Array, options);
    const skipBytes = normOptions.position - this.position;
    if (skipBytes > 0) {
      await this.ignore(skipBytes);
      return this.readBuffer(uint8Array, options);
    } else if (skipBytes < 0) {
      throw new Error("`options.position` must be equal or greater than `tokenizer.position`");
    }
    if (normOptions.length === 0) {
      return 0;
    }
    const bytesRead = await this.streamReader.read(uint8Array, normOptions.offset, normOptions.length);
    this.position += bytesRead;
    if ((!options || !options.mayBeLess) && bytesRead < normOptions.length) {
      throw new EndOfStreamError();
    }
    return bytesRead;
  }
  async peekBuffer(uint8Array, options) {
    const normOptions = this.normalizeOptions(uint8Array, options);
    let bytesRead = 0;
    if (normOptions.position) {
      const skipBytes = normOptions.position - this.position;
      if (skipBytes > 0) {
        const skipBuffer = new Uint8Array(normOptions.length + skipBytes);
        bytesRead = await this.peekBuffer(skipBuffer, { mayBeLess: normOptions.mayBeLess });
        uint8Array.set(skipBuffer.subarray(skipBytes), normOptions.offset);
        return bytesRead - skipBytes;
      } else if (skipBytes < 0) {
        throw new Error("Cannot peek from a negative offset in a stream");
      }
    }
    if (normOptions.length > 0) {
      try {
        bytesRead = await this.streamReader.peek(uint8Array, normOptions.offset, normOptions.length);
      } catch (err) {
        if (options && options.mayBeLess && err instanceof EndOfStreamError) {
          return 0;
        }
        throw err;
      }
      if (!normOptions.mayBeLess && bytesRead < normOptions.length) {
        throw new EndOfStreamError();
      }
    }
    return bytesRead;
  }
  async ignore(length) {
    const bufSize = Math.min(maxBufferSize, length);
    const buf = new Uint8Array(bufSize);
    let totBytesRead = 0;
    while (totBytesRead < length) {
      const remaining = length - totBytesRead;
      const bytesRead = await this.readBuffer(buf, { length: Math.min(bufSize, remaining) });
      if (bytesRead < 0) {
        return bytesRead;
      }
      totBytesRead += bytesRead;
    }
    return totBytesRead;
  }
};

// node_modules/strtok3/lib/BufferTokenizer.js
var BufferTokenizer = class extends AbstractTokenizer {
  constructor(uint8Array, fileInfo) {
    super(fileInfo);
    this.uint8Array = uint8Array;
    this.fileInfo.size = this.fileInfo.size ? this.fileInfo.size : uint8Array.length;
  }
  async readBuffer(uint8Array, options) {
    if (options && options.position) {
      if (options.position < this.position) {
        throw new Error("`options.position` must be equal or greater than `tokenizer.position`");
      }
      this.position = options.position;
    }
    const bytesRead = await this.peekBuffer(uint8Array, options);
    this.position += bytesRead;
    return bytesRead;
  }
  async peekBuffer(uint8Array, options) {
    const normOptions = this.normalizeOptions(uint8Array, options);
    const bytes2read = Math.min(this.uint8Array.length - normOptions.position, normOptions.length);
    if (!normOptions.mayBeLess && bytes2read < normOptions.length) {
      throw new EndOfStreamError();
    } else {
      uint8Array.set(this.uint8Array.subarray(normOptions.position, normOptions.position + bytes2read), normOptions.offset);
      return bytes2read;
    }
  }
  async close() {
  }
};

// node_modules/strtok3/lib/core.js
function fromStream(stream, fileInfo) {
  fileInfo = fileInfo ? fileInfo : {};
  return new ReadStreamTokenizer(stream, fileInfo);
}
function fromBuffer(uint8Array, fileInfo) {
  return new BufferTokenizer(uint8Array, fileInfo);
}

// node_modules/file-type/util.js
function stringToBytes(string) {
  return [...string].map((character) => character.charCodeAt(0));
}
function tarHeaderChecksumMatches(buffer, offset = 0) {
  const readSum = Number.parseInt(buffer.toString("utf8", 148, 154).replace(/\0.*$/, "").trim(), 8);
  if (Number.isNaN(readSum)) {
    return false;
  }
  let sum = 8 * 32;
  for (let index = offset; index < offset + 148; index++) {
    sum += buffer[index];
  }
  for (let index = offset + 156; index < offset + 512; index++) {
    sum += buffer[index];
  }
  return readSum === sum;
}
var uint32SyncSafeToken = {
  get: (buffer, offset) => buffer[offset + 3] & 127 | buffer[offset + 2] << 7 | buffer[offset + 1] << 14 | buffer[offset] << 21,
  len: 4
};

// node_modules/file-type/supported.js
var extensions = [
  "jpg",
  "png",
  "apng",
  "gif",
  "webp",
  "flif",
  "xcf",
  "cr2",
  "cr3",
  "orf",
  "arw",
  "dng",
  "nef",
  "rw2",
  "raf",
  "tif",
  "bmp",
  "icns",
  "jxr",
  "psd",
  "indd",
  "zip",
  "tar",
  "rar",
  "gz",
  "bz2",
  "7z",
  "dmg",
  "mp4",
  "mid",
  "mkv",
  "webm",
  "mov",
  "avi",
  "mpg",
  "mp2",
  "mp3",
  "m4a",
  "oga",
  "ogg",
  "ogv",
  "opus",
  "flac",
  "wav",
  "spx",
  "amr",
  "pdf",
  "epub",
  "elf",
  "macho",
  "exe",
  "swf",
  "rtf",
  "wasm",
  "woff",
  "woff2",
  "eot",
  "ttf",
  "otf",
  "ico",
  "flv",
  "ps",
  "xz",
  "sqlite",
  "nes",
  "crx",
  "xpi",
  "cab",
  "deb",
  "ar",
  "rpm",
  "Z",
  "lz",
  "cfb",
  "mxf",
  "mts",
  "blend",
  "bpg",
  "docx",
  "pptx",
  "xlsx",
  "3gp",
  "3g2",
  "j2c",
  "jp2",
  "jpm",
  "jpx",
  "mj2",
  "aif",
  "qcp",
  "odt",
  "ods",
  "odp",
  "xml",
  "mobi",
  "heic",
  "cur",
  "ktx",
  "ape",
  "wv",
  "dcm",
  "ics",
  "glb",
  "pcap",
  "dsf",
  "lnk",
  "alias",
  "voc",
  "ac3",
  "m4v",
  "m4p",
  "m4b",
  "f4v",
  "f4p",
  "f4b",
  "f4a",
  "mie",
  "asf",
  "ogm",
  "ogx",
  "mpc",
  "arrow",
  "shp",
  "aac",
  "mp1",
  "it",
  "s3m",
  "xm",
  "ai",
  "skp",
  "avif",
  "eps",
  "lzh",
  "pgp",
  "asar",
  "stl",
  "chm",
  "3mf",
  "zst",
  "jxl",
  "vcf",
  "jls",
  "pst",
  "dwg",
  "parquet",
  "class",
  "arj",
  "cpio",
  "ace",
  "avro",
  "icc",
  "fbx"
];
var mimeTypes = [
  "image/jpeg",
  "image/png",
  "image/gif",
  "image/webp",
  "image/flif",
  "image/x-xcf",
  "image/x-canon-cr2",
  "image/x-canon-cr3",
  "image/tiff",
  "image/bmp",
  "image/vnd.ms-photo",
  "image/vnd.adobe.photoshop",
  "application/x-indesign",
  "application/epub+zip",
  "application/x-xpinstall",
  "application/vnd.oasis.opendocument.text",
  "application/vnd.oasis.opendocument.spreadsheet",
  "application/vnd.oasis.opendocument.presentation",
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
  "application/vnd.openxmlformats-officedocument.presentationml.presentation",
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  "application/zip",
  "application/x-tar",
  "application/x-rar-compressed",
  "application/gzip",
  "application/x-bzip2",
  "application/x-7z-compressed",
  "application/x-apple-diskimage",
  "application/x-apache-arrow",
  "video/mp4",
  "audio/midi",
  "video/x-matroska",
  "video/webm",
  "video/quicktime",
  "video/vnd.avi",
  "audio/wav",
  "audio/qcelp",
  "audio/x-ms-asf",
  "video/x-ms-asf",
  "application/vnd.ms-asf",
  "video/mpeg",
  "video/3gpp",
  "audio/mpeg",
  "audio/mp4",
  "audio/opus",
  "video/ogg",
  "audio/ogg",
  "application/ogg",
  "audio/x-flac",
  "audio/ape",
  "audio/wavpack",
  "audio/amr",
  "application/pdf",
  "application/x-elf",
  "application/x-mach-binary",
  "application/x-msdownload",
  "application/x-shockwave-flash",
  "application/rtf",
  "application/wasm",
  "font/woff",
  "font/woff2",
  "application/vnd.ms-fontobject",
  "font/ttf",
  "font/otf",
  "image/x-icon",
  "video/x-flv",
  "application/postscript",
  "application/eps",
  "application/x-xz",
  "application/x-sqlite3",
  "application/x-nintendo-nes-rom",
  "application/x-google-chrome-extension",
  "application/vnd.ms-cab-compressed",
  "application/x-deb",
  "application/x-unix-archive",
  "application/x-rpm",
  "application/x-compress",
  "application/x-lzip",
  "application/x-cfb",
  "application/x-mie",
  "application/mxf",
  "video/mp2t",
  "application/x-blender",
  "image/bpg",
  "image/j2c",
  "image/jp2",
  "image/jpx",
  "image/jpm",
  "image/mj2",
  "audio/aiff",
  "application/xml",
  "application/x-mobipocket-ebook",
  "image/heif",
  "image/heif-sequence",
  "image/heic",
  "image/heic-sequence",
  "image/icns",
  "image/ktx",
  "application/dicom",
  "audio/x-musepack",
  "text/calendar",
  "text/vcard",
  "model/gltf-binary",
  "application/vnd.tcpdump.pcap",
  "audio/x-dsf",
  "application/x.ms.shortcut",
  "application/x.apple.alias",
  "audio/x-voc",
  "audio/vnd.dolby.dd-raw",
  "audio/x-m4a",
  "image/apng",
  "image/x-olympus-orf",
  "image/x-sony-arw",
  "image/x-adobe-dng",
  "image/x-nikon-nef",
  "image/x-panasonic-rw2",
  "image/x-fujifilm-raf",
  "video/x-m4v",
  "video/3gpp2",
  "application/x-esri-shape",
  "audio/aac",
  "audio/x-it",
  "audio/x-s3m",
  "audio/x-xm",
  "video/MP1S",
  "video/MP2P",
  "application/vnd.sketchup.skp",
  "image/avif",
  "application/x-lzh-compressed",
  "application/pgp-encrypted",
  "application/x-asar",
  "model/stl",
  "application/vnd.ms-htmlhelp",
  "model/3mf",
  "image/jxl",
  "application/zstd",
  "image/jls",
  "application/vnd.ms-outlook",
  "image/vnd.dwg",
  "application/x-parquet",
  "application/java-vm",
  "application/x-arj",
  "application/x-cpio",
  "application/x-ace-compressed",
  "application/avro",
  "application/vnd.iccprofile",
  "application/x.autodesk.fbx"
];

// node_modules/file-type/core.js
var minimumBytes = 4100;
async function fileTypeFromBuffer(input) {
  return new FileTypeParser().fromBuffer(input);
}
function _check(buffer, headers, options) {
  options = {
    offset: 0,
    ...options
  };
  for (const [index, header] of headers.entries()) {
    if (options.mask) {
      if (header !== (options.mask[index] & buffer[index + options.offset])) {
        return false;
      }
    } else if (header !== buffer[index + options.offset]) {
      return false;
    }
  }
  return true;
}
var FileTypeParser = class {
  constructor(options) {
    this.detectors = options == null ? void 0 : options.customDetectors;
    this.fromTokenizer = this.fromTokenizer.bind(this);
    this.fromBuffer = this.fromBuffer.bind(this);
    this.parse = this.parse.bind(this);
  }
  async fromTokenizer(tokenizer) {
    const initialPosition = tokenizer.position;
    for (const detector of this.detectors || []) {
      const fileType = await detector(tokenizer);
      if (fileType) {
        return fileType;
      }
      if (initialPosition !== tokenizer.position) {
        return void 0;
      }
    }
    return this.parse(tokenizer);
  }
  async fromBuffer(input) {
    if (!(input instanceof Uint8Array || input instanceof ArrayBuffer)) {
      throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof input}\``);
    }
    const buffer = input instanceof Uint8Array ? input : new Uint8Array(input);
    if (!((buffer == null ? void 0 : buffer.length) > 1)) {
      return;
    }
    return this.fromTokenizer(fromBuffer(buffer));
  }
  async fromBlob(blob) {
    const buffer = await blob.arrayBuffer();
    return this.fromBuffer(new Uint8Array(buffer));
  }
  async fromStream(stream) {
    const tokenizer = await fromStream(stream);
    try {
      return await this.fromTokenizer(tokenizer);
    } finally {
      await tokenizer.close();
    }
  }
  async toDetectionStream(readableStream, options = {}) {
    const { default: stream } = await import("node:stream");
    const { sampleSize = minimumBytes } = options;
    return new Promise((resolve, reject) => {
      readableStream.on("error", reject);
      readableStream.once("readable", () => {
        (async () => {
          var _a2, _b;
          try {
            const pass = new stream.PassThrough();
            const outputStream = stream.pipeline ? stream.pipeline(readableStream, pass, () => {
            }) : readableStream.pipe(pass);
            const chunk = (_b = (_a2 = readableStream.read(sampleSize)) != null ? _a2 : readableStream.read()) != null ? _b : import_node_buffer3.Buffer.alloc(0);
            try {
              pass.fileType = await this.fromBuffer(chunk);
            } catch (error) {
              if (error instanceof EndOfStreamError) {
                pass.fileType = void 0;
              } else {
                reject(error);
              }
            }
            resolve(outputStream);
          } catch (error) {
            reject(error);
          }
        })();
      });
    });
  }
  check(header, options) {
    return _check(this.buffer, header, options);
  }
  checkString(header, options) {
    return this.check(stringToBytes(header), options);
  }
  async parse(tokenizer) {
    this.buffer = import_node_buffer3.Buffer.alloc(minimumBytes);
    if (tokenizer.fileInfo.size === void 0) {
      tokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER;
    }
    this.tokenizer = tokenizer;
    await tokenizer.peekBuffer(this.buffer, { length: 12, mayBeLess: true });
    if (this.check([66, 77])) {
      return {
        ext: "bmp",
        mime: "image/bmp"
      };
    }
    if (this.check([11, 119])) {
      return {
        ext: "ac3",
        mime: "audio/vnd.dolby.dd-raw"
      };
    }
    if (this.check([120, 1])) {
      return {
        ext: "dmg",
        mime: "application/x-apple-diskimage"
      };
    }
    if (this.check([77, 90])) {
      return {
        ext: "exe",
        mime: "application/x-msdownload"
      };
    }
    if (this.check([37, 33])) {
      await tokenizer.peekBuffer(this.buffer, { length: 24, mayBeLess: true });
      if (this.checkString("PS-Adobe-", { offset: 2 }) && this.checkString(" EPSF-", { offset: 14 })) {
        return {
          ext: "eps",
          mime: "application/eps"
        };
      }
      return {
        ext: "ps",
        mime: "application/postscript"
      };
    }
    if (this.check([31, 160]) || this.check([31, 157])) {
      return {
        ext: "Z",
        mime: "application/x-compress"
      };
    }
    if (this.check([199, 113])) {
      return {
        ext: "cpio",
        mime: "application/x-cpio"
      };
    }
    if (this.check([96, 234])) {
      return {
        ext: "arj",
        mime: "application/x-arj"
      };
    }
    if (this.check([239, 187, 191])) {
      this.tokenizer.ignore(3);
      return this.parse(tokenizer);
    }
    if (this.check([71, 73, 70])) {
      return {
        ext: "gif",
        mime: "image/gif"
      };
    }
    if (this.check([73, 73, 188])) {
      return {
        ext: "jxr",
        mime: "image/vnd.ms-photo"
      };
    }
    if (this.check([31, 139, 8])) {
      return {
        ext: "gz",
        mime: "application/gzip"
      };
    }
    if (this.check([66, 90, 104])) {
      return {
        ext: "bz2",
        mime: "application/x-bzip2"
      };
    }
    if (this.checkString("ID3")) {
      await tokenizer.ignore(6);
      const id3HeaderLength = await tokenizer.readToken(uint32SyncSafeToken);
      if (tokenizer.position + id3HeaderLength > tokenizer.fileInfo.size) {
        return {
          ext: "mp3",
          mime: "audio/mpeg"
        };
      }
      await tokenizer.ignore(id3HeaderLength);
      return this.fromTokenizer(tokenizer);
    }
    if (this.checkString("MP+")) {
      return {
        ext: "mpc",
        mime: "audio/x-musepack"
      };
    }
    if ((this.buffer[0] === 67 || this.buffer[0] === 70) && this.check([87, 83], { offset: 1 })) {
      return {
        ext: "swf",
        mime: "application/x-shockwave-flash"
      };
    }
    if (this.check([255, 216, 255])) {
      if (this.check([247], { offset: 3 })) {
        return {
          ext: "jls",
          mime: "image/jls"
        };
      }
      return {
        ext: "jpg",
        mime: "image/jpeg"
      };
    }
    if (this.check([79, 98, 106, 1])) {
      return {
        ext: "avro",
        mime: "application/avro"
      };
    }
    if (this.checkString("FLIF")) {
      return {
        ext: "flif",
        mime: "image/flif"
      };
    }
    if (this.checkString("8BPS")) {
      return {
        ext: "psd",
        mime: "image/vnd.adobe.photoshop"
      };
    }
    if (this.checkString("WEBP", { offset: 8 })) {
      return {
        ext: "webp",
        mime: "image/webp"
      };
    }
    if (this.checkString("MPCK")) {
      return {
        ext: "mpc",
        mime: "audio/x-musepack"
      };
    }
    if (this.checkString("FORM")) {
      return {
        ext: "aif",
        mime: "audio/aiff"
      };
    }
    if (this.checkString("icns", { offset: 0 })) {
      return {
        ext: "icns",
        mime: "image/icns"
      };
    }
    if (this.check([80, 75, 3, 4])) {
      try {
        while (tokenizer.position + 30 < tokenizer.fileInfo.size) {
          await tokenizer.readBuffer(this.buffer, { length: 30 });
          const zipHeader = {
            compressedSize: this.buffer.readUInt32LE(18),
            uncompressedSize: this.buffer.readUInt32LE(22),
            filenameLength: this.buffer.readUInt16LE(26),
            extraFieldLength: this.buffer.readUInt16LE(28)
          };
          zipHeader.filename = await tokenizer.readToken(new StringType(zipHeader.filenameLength, "utf-8"));
          await tokenizer.ignore(zipHeader.extraFieldLength);
          if (zipHeader.filename === "META-INF/mozilla.rsa") {
            return {
              ext: "xpi",
              mime: "application/x-xpinstall"
            };
          }
          if (zipHeader.filename.endsWith(".rels") || zipHeader.filename.endsWith(".xml")) {
            const type = zipHeader.filename.split("/")[0];
            switch (type) {
              case "_rels":
                break;
              case "word":
                return {
                  ext: "docx",
                  mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
                };
              case "ppt":
                return {
                  ext: "pptx",
                  mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
                };
              case "xl":
                return {
                  ext: "xlsx",
                  mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                };
              default:
                break;
            }
          }
          if (zipHeader.filename.startsWith("xl/")) {
            return {
              ext: "xlsx",
              mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
            };
          }
          if (zipHeader.filename.startsWith("3D/") && zipHeader.filename.endsWith(".model")) {
            return {
              ext: "3mf",
              mime: "model/3mf"
            };
          }
          if (zipHeader.filename === "mimetype" && zipHeader.compressedSize === zipHeader.uncompressedSize) {
            let mimeType = await tokenizer.readToken(new StringType(zipHeader.compressedSize, "utf-8"));
            mimeType = mimeType.trim();
            switch (mimeType) {
              case "application/epub+zip":
                return {
                  ext: "epub",
                  mime: "application/epub+zip"
                };
              case "application/vnd.oasis.opendocument.text":
                return {
                  ext: "odt",
                  mime: "application/vnd.oasis.opendocument.text"
                };
              case "application/vnd.oasis.opendocument.spreadsheet":
                return {
                  ext: "ods",
                  mime: "application/vnd.oasis.opendocument.spreadsheet"
                };
              case "application/vnd.oasis.opendocument.presentation":
                return {
                  ext: "odp",
                  mime: "application/vnd.oasis.opendocument.presentation"
                };
              default:
            }
          }
          if (zipHeader.compressedSize === 0) {
            let nextHeaderIndex = -1;
            while (nextHeaderIndex < 0 && tokenizer.position < tokenizer.fileInfo.size) {
              await tokenizer.peekBuffer(this.buffer, { mayBeLess: true });
              nextHeaderIndex = this.buffer.indexOf("504B0304", 0, "hex");
              await tokenizer.ignore(nextHeaderIndex >= 0 ? nextHeaderIndex : this.buffer.length);
            }
          } else {
            await tokenizer.ignore(zipHeader.compressedSize);
          }
        }
      } catch (error) {
        if (!(error instanceof EndOfStreamError)) {
          throw error;
        }
      }
      return {
        ext: "zip",
        mime: "application/zip"
      };
    }
    if (this.checkString("OggS")) {
      await tokenizer.ignore(28);
      const type = import_node_buffer3.Buffer.alloc(8);
      await tokenizer.readBuffer(type);
      if (_check(type, [79, 112, 117, 115, 72, 101, 97, 100])) {
        return {
          ext: "opus",
          mime: "audio/opus"
        };
      }
      if (_check(type, [128, 116, 104, 101, 111, 114, 97])) {
        return {
          ext: "ogv",
          mime: "video/ogg"
        };
      }
      if (_check(type, [1, 118, 105, 100, 101, 111, 0])) {
        return {
          ext: "ogm",
          mime: "video/ogg"
        };
      }
      if (_check(type, [127, 70, 76, 65, 67])) {
        return {
          ext: "oga",
          mime: "audio/ogg"
        };
      }
      if (_check(type, [83, 112, 101, 101, 120, 32, 32])) {
        return {
          ext: "spx",
          mime: "audio/ogg"
        };
      }
      if (_check(type, [1, 118, 111, 114, 98, 105, 115])) {
        return {
          ext: "ogg",
          mime: "audio/ogg"
        };
      }
      return {
        ext: "ogx",
        mime: "application/ogg"
      };
    }
    if (this.check([80, 75]) && (this.buffer[2] === 3 || this.buffer[2] === 5 || this.buffer[2] === 7) && (this.buffer[3] === 4 || this.buffer[3] === 6 || this.buffer[3] === 8)) {
      return {
        ext: "zip",
        mime: "application/zip"
      };
    }
    if (this.checkString("ftyp", { offset: 4 }) && (this.buffer[8] & 96) !== 0) {
      const brandMajor = this.buffer.toString("binary", 8, 12).replace("\0", " ").trim();
      switch (brandMajor) {
        case "avif":
        case "avis":
          return { ext: "avif", mime: "image/avif" };
        case "mif1":
          return { ext: "heic", mime: "image/heif" };
        case "msf1":
          return { ext: "heic", mime: "image/heif-sequence" };
        case "heic":
        case "heix":
          return { ext: "heic", mime: "image/heic" };
        case "hevc":
        case "hevx":
          return { ext: "heic", mime: "image/heic-sequence" };
        case "qt":
          return { ext: "mov", mime: "video/quicktime" };
        case "M4V":
        case "M4VH":
        case "M4VP":
          return { ext: "m4v", mime: "video/x-m4v" };
        case "M4P":
          return { ext: "m4p", mime: "video/mp4" };
        case "M4B":
          return { ext: "m4b", mime: "audio/mp4" };
        case "M4A":
          return { ext: "m4a", mime: "audio/x-m4a" };
        case "F4V":
          return { ext: "f4v", mime: "video/mp4" };
        case "F4P":
          return { ext: "f4p", mime: "video/mp4" };
        case "F4A":
          return { ext: "f4a", mime: "audio/mp4" };
        case "F4B":
          return { ext: "f4b", mime: "audio/mp4" };
        case "crx":
          return { ext: "cr3", mime: "image/x-canon-cr3" };
        default:
          if (brandMajor.startsWith("3g")) {
            if (brandMajor.startsWith("3g2")) {
              return { ext: "3g2", mime: "video/3gpp2" };
            }
            return { ext: "3gp", mime: "video/3gpp" };
          }
          return { ext: "mp4", mime: "video/mp4" };
      }
    }
    if (this.checkString("MThd")) {
      return {
        ext: "mid",
        mime: "audio/midi"
      };
    }
    if (this.checkString("wOFF") && (this.check([0, 1, 0, 0], { offset: 4 }) || this.checkString("OTTO", { offset: 4 }))) {
      return {
        ext: "woff",
        mime: "font/woff"
      };
    }
    if (this.checkString("wOF2") && (this.check([0, 1, 0, 0], { offset: 4 }) || this.checkString("OTTO", { offset: 4 }))) {
      return {
        ext: "woff2",
        mime: "font/woff2"
      };
    }
    if (this.check([212, 195, 178, 161]) || this.check([161, 178, 195, 212])) {
      return {
        ext: "pcap",
        mime: "application/vnd.tcpdump.pcap"
      };
    }
    if (this.checkString("DSD ")) {
      return {
        ext: "dsf",
        mime: "audio/x-dsf"
      };
    }
    if (this.checkString("LZIP")) {
      return {
        ext: "lz",
        mime: "application/x-lzip"
      };
    }
    if (this.checkString("fLaC")) {
      return {
        ext: "flac",
        mime: "audio/x-flac"
      };
    }
    if (this.check([66, 80, 71, 251])) {
      return {
        ext: "bpg",
        mime: "image/bpg"
      };
    }
    if (this.checkString("wvpk")) {
      return {
        ext: "wv",
        mime: "audio/wavpack"
      };
    }
    if (this.checkString("%PDF")) {
      try {
        await tokenizer.ignore(1350);
        const maxBufferSize2 = 10 * 1024 * 1024;
        const buffer = import_node_buffer3.Buffer.alloc(Math.min(maxBufferSize2, tokenizer.fileInfo.size));
        await tokenizer.readBuffer(buffer, { mayBeLess: true });
        if (buffer.includes(import_node_buffer3.Buffer.from("AIPrivateData"))) {
          return {
            ext: "ai",
            mime: "application/postscript"
          };
        }
      } catch (error) {
        if (!(error instanceof EndOfStreamError)) {
          throw error;
        }
      }
      return {
        ext: "pdf",
        mime: "application/pdf"
      };
    }
    if (this.check([0, 97, 115, 109])) {
      return {
        ext: "wasm",
        mime: "application/wasm"
      };
    }
    if (this.check([73, 73])) {
      const fileType = await this.readTiffHeader(false);
      if (fileType) {
        return fileType;
      }
    }
    if (this.check([77, 77])) {
      const fileType = await this.readTiffHeader(true);
      if (fileType) {
        return fileType;
      }
    }
    if (this.checkString("MAC ")) {
      return {
        ext: "ape",
        mime: "audio/ape"
      };
    }
    if (this.check([26, 69, 223, 163])) {
      async function readField() {
        const msb = await tokenizer.peekNumber(UINT8);
        let mask = 128;
        let ic = 0;
        while ((msb & mask) === 0 && mask !== 0) {
          ++ic;
          mask >>= 1;
        }
        const id = import_node_buffer3.Buffer.alloc(ic + 1);
        await tokenizer.readBuffer(id);
        return id;
      }
      async function readElement() {
        const id = await readField();
        const lengthField = await readField();
        lengthField[0] ^= 128 >> lengthField.length - 1;
        const nrLength = Math.min(6, lengthField.length);
        return {
          id: id.readUIntBE(0, id.length),
          len: lengthField.readUIntBE(lengthField.length - nrLength, nrLength)
        };
      }
      async function readChildren(children) {
        while (children > 0) {
          const element = await readElement();
          if (element.id === 17026) {
            const rawValue = await tokenizer.readToken(new StringType(element.len, "utf-8"));
            return rawValue.replaceAll(/\00.*$/g, "");
          }
          await tokenizer.ignore(element.len);
          --children;
        }
      }
      const re = await readElement();
      const docType = await readChildren(re.len);
      switch (docType) {
        case "webm":
          return {
            ext: "webm",
            mime: "video/webm"
          };
        case "matroska":
          return {
            ext: "mkv",
            mime: "video/x-matroska"
          };
        default:
          return;
      }
    }
    if (this.check([82, 73, 70, 70])) {
      if (this.check([65, 86, 73], { offset: 8 })) {
        return {
          ext: "avi",
          mime: "video/vnd.avi"
        };
      }
      if (this.check([87, 65, 86, 69], { offset: 8 })) {
        return {
          ext: "wav",
          mime: "audio/wav"
        };
      }
      if (this.check([81, 76, 67, 77], { offset: 8 })) {
        return {
          ext: "qcp",
          mime: "audio/qcelp"
        };
      }
    }
    if (this.checkString("SQLi")) {
      return {
        ext: "sqlite",
        mime: "application/x-sqlite3"
      };
    }
    if (this.check([78, 69, 83, 26])) {
      return {
        ext: "nes",
        mime: "application/x-nintendo-nes-rom"
      };
    }
    if (this.checkString("Cr24")) {
      return {
        ext: "crx",
        mime: "application/x-google-chrome-extension"
      };
    }
    if (this.checkString("MSCF") || this.checkString("ISc(")) {
      return {
        ext: "cab",
        mime: "application/vnd.ms-cab-compressed"
      };
    }
    if (this.check([237, 171, 238, 219])) {
      return {
        ext: "rpm",
        mime: "application/x-rpm"
      };
    }
    if (this.check([197, 208, 211, 198])) {
      return {
        ext: "eps",
        mime: "application/eps"
      };
    }
    if (this.check([40, 181, 47, 253])) {
      return {
        ext: "zst",
        mime: "application/zstd"
      };
    }
    if (this.check([127, 69, 76, 70])) {
      return {
        ext: "elf",
        mime: "application/x-elf"
      };
    }
    if (this.check([33, 66, 68, 78])) {
      return {
        ext: "pst",
        mime: "application/vnd.ms-outlook"
      };
    }
    if (this.checkString("PAR1")) {
      return {
        ext: "parquet",
        mime: "application/x-parquet"
      };
    }
    if (this.check([207, 250, 237, 254])) {
      return {
        ext: "macho",
        mime: "application/x-mach-binary"
      };
    }
    if (this.check([79, 84, 84, 79, 0])) {
      return {
        ext: "otf",
        mime: "font/otf"
      };
    }
    if (this.checkString("#!AMR")) {
      return {
        ext: "amr",
        mime: "audio/amr"
      };
    }
    if (this.checkString("{\\rtf")) {
      return {
        ext: "rtf",
        mime: "application/rtf"
      };
    }
    if (this.check([70, 76, 86, 1])) {
      return {
        ext: "flv",
        mime: "video/x-flv"
      };
    }
    if (this.checkString("IMPM")) {
      return {
        ext: "it",
        mime: "audio/x-it"
      };
    }
    if (this.checkString("-lh0-", { offset: 2 }) || this.checkString("-lh1-", { offset: 2 }) || this.checkString("-lh2-", { offset: 2 }) || this.checkString("-lh3-", { offset: 2 }) || this.checkString("-lh4-", { offset: 2 }) || this.checkString("-lh5-", { offset: 2 }) || this.checkString("-lh6-", { offset: 2 }) || this.checkString("-lh7-", { offset: 2 }) || this.checkString("-lzs-", { offset: 2 }) || this.checkString("-lz4-", { offset: 2 }) || this.checkString("-lz5-", { offset: 2 }) || this.checkString("-lhd-", { offset: 2 })) {
      return {
        ext: "lzh",
        mime: "application/x-lzh-compressed"
      };
    }
    if (this.check([0, 0, 1, 186])) {
      if (this.check([33], { offset: 4, mask: [241] })) {
        return {
          ext: "mpg",
          mime: "video/MP1S"
        };
      }
      if (this.check([68], { offset: 4, mask: [196] })) {
        return {
          ext: "mpg",
          mime: "video/MP2P"
        };
      }
    }
    if (this.checkString("ITSF")) {
      return {
        ext: "chm",
        mime: "application/vnd.ms-htmlhelp"
      };
    }
    if (this.check([202, 254, 186, 190])) {
      return {
        ext: "class",
        mime: "application/java-vm"
      };
    }
    if (this.check([253, 55, 122, 88, 90, 0])) {
      return {
        ext: "xz",
        mime: "application/x-xz"
      };
    }
    if (this.checkString("<?xml ")) {
      return {
        ext: "xml",
        mime: "application/xml"
      };
    }
    if (this.check([55, 122, 188, 175, 39, 28])) {
      return {
        ext: "7z",
        mime: "application/x-7z-compressed"
      };
    }
    if (this.check([82, 97, 114, 33, 26, 7]) && (this.buffer[6] === 0 || this.buffer[6] === 1)) {
      return {
        ext: "rar",
        mime: "application/x-rar-compressed"
      };
    }
    if (this.checkString("solid ")) {
      return {
        ext: "stl",
        mime: "model/stl"
      };
    }
    if (this.checkString("AC")) {
      const version = this.buffer.toString("binary", 2, 6);
      if (version.match("^d*") && version >= 1e3 && version <= 1050) {
        return {
          ext: "dwg",
          mime: "image/vnd.dwg"
        };
      }
    }
    if (this.checkString("070707")) {
      return {
        ext: "cpio",
        mime: "application/x-cpio"
      };
    }
    if (this.checkString("BLENDER")) {
      return {
        ext: "blend",
        mime: "application/x-blender"
      };
    }
    if (this.checkString("!<arch>")) {
      await tokenizer.ignore(8);
      const string = await tokenizer.readToken(new StringType(13, "ascii"));
      if (string === "debian-binary") {
        return {
          ext: "deb",
          mime: "application/x-deb"
        };
      }
      return {
        ext: "ar",
        mime: "application/x-unix-archive"
      };
    }
    if (this.checkString("**ACE", { offset: 7 })) {
      await tokenizer.peekBuffer(this.buffer, { length: 14, mayBeLess: true });
      if (this.checkString("**", { offset: 12 })) {
        return {
          ext: "ace",
          mime: "application/x-ace-compressed"
        };
      }
    }
    if (this.check([137, 80, 78, 71, 13, 10, 26, 10])) {
      await tokenizer.ignore(8);
      async function readChunkHeader() {
        return {
          length: await tokenizer.readToken(INT32_BE),
          type: await tokenizer.readToken(new StringType(4, "binary"))
        };
      }
      do {
        const chunk = await readChunkHeader();
        if (chunk.length < 0) {
          return;
        }
        switch (chunk.type) {
          case "IDAT":
            return {
              ext: "png",
              mime: "image/png"
            };
          case "acTL":
            return {
              ext: "apng",
              mime: "image/apng"
            };
          default:
            await tokenizer.ignore(chunk.length + 4);
        }
      } while (tokenizer.position + 8 < tokenizer.fileInfo.size);
      return {
        ext: "png",
        mime: "image/png"
      };
    }
    if (this.check([65, 82, 82, 79, 87, 49, 0, 0])) {
      return {
        ext: "arrow",
        mime: "application/x-apache-arrow"
      };
    }
    if (this.check([103, 108, 84, 70, 2, 0, 0, 0])) {
      return {
        ext: "glb",
        mime: "model/gltf-binary"
      };
    }
    if (this.check([102, 114, 101, 101], { offset: 4 }) || this.check([109, 100, 97, 116], { offset: 4 }) || this.check([109, 111, 111, 118], { offset: 4 }) || this.check([119, 105, 100, 101], { offset: 4 })) {
      return {
        ext: "mov",
        mime: "video/quicktime"
      };
    }
    if (this.check([73, 73, 82, 79, 8, 0, 0, 0, 24])) {
      return {
        ext: "orf",
        mime: "image/x-olympus-orf"
      };
    }
    if (this.checkString("gimp xcf ")) {
      return {
        ext: "xcf",
        mime: "image/x-xcf"
      };
    }
    if (this.check([73, 73, 85, 0, 24, 0, 0, 0, 136, 231, 116, 216])) {
      return {
        ext: "rw2",
        mime: "image/x-panasonic-rw2"
      };
    }
    if (this.check([48, 38, 178, 117, 142, 102, 207, 17, 166, 217])) {
      async function readHeader() {
        const guid = import_node_buffer3.Buffer.alloc(16);
        await tokenizer.readBuffer(guid);
        return {
          id: guid,
          size: Number(await tokenizer.readToken(UINT64_LE))
        };
      }
      await tokenizer.ignore(30);
      while (tokenizer.position + 24 < tokenizer.fileInfo.size) {
        const header = await readHeader();
        let payload = header.size - 24;
        if (_check(header.id, [145, 7, 220, 183, 183, 169, 207, 17, 142, 230, 0, 192, 12, 32, 83, 101])) {
          const typeId = import_node_buffer3.Buffer.alloc(16);
          payload -= await tokenizer.readBuffer(typeId);
          if (_check(typeId, [64, 158, 105, 248, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, 68, 43])) {
            return {
              ext: "asf",
              mime: "audio/x-ms-asf"
            };
          }
          if (_check(typeId, [192, 239, 25, 188, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, 68, 43])) {
            return {
              ext: "asf",
              mime: "video/x-ms-asf"
            };
          }
          break;
        }
        await tokenizer.ignore(payload);
      }
      return {
        ext: "asf",
        mime: "application/vnd.ms-asf"
      };
    }
    if (this.check([171, 75, 84, 88, 32, 49, 49, 187, 13, 10, 26, 10])) {
      return {
        ext: "ktx",
        mime: "image/ktx"
      };
    }
    if ((this.check([126, 16, 4]) || this.check([126, 24, 4])) && this.check([48, 77, 73, 69], { offset: 4 })) {
      return {
        ext: "mie",
        mime: "application/x-mie"
      };
    }
    if (this.check([39, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { offset: 2 })) {
      return {
        ext: "shp",
        mime: "application/x-esri-shape"
      };
    }
    if (this.check([255, 79, 255, 81])) {
      return {
        ext: "j2c",
        mime: "image/j2c"
      };
    }
    if (this.check([0, 0, 0, 12, 106, 80, 32, 32, 13, 10, 135, 10])) {
      await tokenizer.ignore(20);
      const type = await tokenizer.readToken(new StringType(4, "ascii"));
      switch (type) {
        case "jp2 ":
          return {
            ext: "jp2",
            mime: "image/jp2"
          };
        case "jpx ":
          return {
            ext: "jpx",
            mime: "image/jpx"
          };
        case "jpm ":
          return {
            ext: "jpm",
            mime: "image/jpm"
          };
        case "mjp2":
          return {
            ext: "mj2",
            mime: "image/mj2"
          };
        default:
          return;
      }
    }
    if (this.check([255, 10]) || this.check([0, 0, 0, 12, 74, 88, 76, 32, 13, 10, 135, 10])) {
      return {
        ext: "jxl",
        mime: "image/jxl"
      };
    }
    if (this.check([254, 255])) {
      if (this.check([0, 60, 0, 63, 0, 120, 0, 109, 0, 108], { offset: 2 })) {
        return {
          ext: "xml",
          mime: "application/xml"
        };
      }
      return void 0;
    }
    if (this.check([0, 0, 1, 186]) || this.check([0, 0, 1, 179])) {
      return {
        ext: "mpg",
        mime: "video/mpeg"
      };
    }
    if (this.check([0, 1, 0, 0, 0])) {
      return {
        ext: "ttf",
        mime: "font/ttf"
      };
    }
    if (this.check([0, 0, 1, 0])) {
      return {
        ext: "ico",
        mime: "image/x-icon"
      };
    }
    if (this.check([0, 0, 2, 0])) {
      return {
        ext: "cur",
        mime: "image/x-icon"
      };
    }
    if (this.check([208, 207, 17, 224, 161, 177, 26, 225])) {
      return {
        ext: "cfb",
        mime: "application/x-cfb"
      };
    }
    await tokenizer.peekBuffer(this.buffer, { length: Math.min(256, tokenizer.fileInfo.size), mayBeLess: true });
    if (this.check([97, 99, 115, 112], { offset: 36 })) {
      return {
        ext: "icc",
        mime: "application/vnd.iccprofile"
      };
    }
    if (this.checkString("BEGIN:")) {
      if (this.checkString("VCARD", { offset: 6 })) {
        return {
          ext: "vcf",
          mime: "text/vcard"
        };
      }
      if (this.checkString("VCALENDAR", { offset: 6 })) {
        return {
          ext: "ics",
          mime: "text/calendar"
        };
      }
    }
    if (this.checkString("FUJIFILMCCD-RAW")) {
      return {
        ext: "raf",
        mime: "image/x-fujifilm-raf"
      };
    }
    if (this.checkString("Extended Module:")) {
      return {
        ext: "xm",
        mime: "audio/x-xm"
      };
    }
    if (this.checkString("Creative Voice File")) {
      return {
        ext: "voc",
        mime: "audio/x-voc"
      };
    }
    if (this.check([4, 0, 0, 0]) && this.buffer.length >= 16) {
      const jsonSize = this.buffer.readUInt32LE(12);
      if (jsonSize > 12 && this.buffer.length >= jsonSize + 16) {
        try {
          const header = this.buffer.slice(16, jsonSize + 16).toString();
          const json = JSON.parse(header);
          if (json.files) {
            return {
              ext: "asar",
              mime: "application/x-asar"
            };
          }
        } catch (e) {
        }
      }
    }
    if (this.check([6, 14, 43, 52, 2, 5, 1, 1, 13, 1, 2, 1, 1, 2])) {
      return {
        ext: "mxf",
        mime: "application/mxf"
      };
    }
    if (this.checkString("SCRM", { offset: 44 })) {
      return {
        ext: "s3m",
        mime: "audio/x-s3m"
      };
    }
    if (this.check([71]) && this.check([71], { offset: 188 })) {
      return {
        ext: "mts",
        mime: "video/mp2t"
      };
    }
    if (this.check([71], { offset: 4 }) && this.check([71], { offset: 196 })) {
      return {
        ext: "mts",
        mime: "video/mp2t"
      };
    }
    if (this.check([66, 79, 79, 75, 77, 79, 66, 73], { offset: 60 })) {
      return {
        ext: "mobi",
        mime: "application/x-mobipocket-ebook"
      };
    }
    if (this.check([68, 73, 67, 77], { offset: 128 })) {
      return {
        ext: "dcm",
        mime: "application/dicom"
      };
    }
    if (this.check([76, 0, 0, 0, 1, 20, 2, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70])) {
      return {
        ext: "lnk",
        mime: "application/x.ms.shortcut"
      };
    }
    if (this.check([98, 111, 111, 107, 0, 0, 0, 0, 109, 97, 114, 107, 0, 0, 0, 0])) {
      return {
        ext: "alias",
        mime: "application/x.apple.alias"
      };
    }
    if (this.checkString("Kaydara FBX Binary  \0")) {
      return {
        ext: "fbx",
        mime: "application/x.autodesk.fbx"
      };
    }
    if (this.check([76, 80], { offset: 34 }) && (this.check([0, 0, 1], { offset: 8 }) || this.check([1, 0, 2], { offset: 8 }) || this.check([2, 0, 2], { offset: 8 }))) {
      return {
        ext: "eot",
        mime: "application/vnd.ms-fontobject"
      };
    }
    if (this.check([6, 6, 237, 245, 216, 29, 70, 229, 189, 49, 239, 231, 254, 116, 183, 29])) {
      return {
        ext: "indd",
        mime: "application/x-indesign"
      };
    }
    await tokenizer.peekBuffer(this.buffer, { length: Math.min(512, tokenizer.fileInfo.size), mayBeLess: true });
    if (tarHeaderChecksumMatches(this.buffer)) {
      return {
        ext: "tar",
        mime: "application/x-tar"
      };
    }
    if (this.check([255, 254])) {
      if (this.check([60, 0, 63, 0, 120, 0, 109, 0, 108, 0], { offset: 2 })) {
        return {
          ext: "xml",
          mime: "application/xml"
        };
      }
      if (this.check([255, 14, 83, 0, 107, 0, 101, 0, 116, 0, 99, 0, 104, 0, 85, 0, 112, 0, 32, 0, 77, 0, 111, 0, 100, 0, 101, 0, 108, 0], { offset: 2 })) {
        return {
          ext: "skp",
          mime: "application/vnd.sketchup.skp"
        };
      }
      return void 0;
    }
    if (this.checkString("-----BEGIN PGP MESSAGE-----")) {
      return {
        ext: "pgp",
        mime: "application/pgp-encrypted"
      };
    }
    if (this.buffer.length >= 2 && this.check([255, 224], { offset: 0, mask: [255, 224] })) {
      if (this.check([16], { offset: 1, mask: [22] })) {
        if (this.check([8], { offset: 1, mask: [8] })) {
          return {
            ext: "aac",
            mime: "audio/aac"
          };
        }
        return {
          ext: "aac",
          mime: "audio/aac"
        };
      }
      if (this.check([2], { offset: 1, mask: [6] })) {
        return {
          ext: "mp3",
          mime: "audio/mpeg"
        };
      }
      if (this.check([4], { offset: 1, mask: [6] })) {
        return {
          ext: "mp2",
          mime: "audio/mpeg"
        };
      }
      if (this.check([6], { offset: 1, mask: [6] })) {
        return {
          ext: "mp1",
          mime: "audio/mpeg"
        };
      }
    }
  }
  async readTiffTag(bigEndian) {
    const tagId = await this.tokenizer.readToken(bigEndian ? UINT16_BE : UINT16_LE);
    this.tokenizer.ignore(10);
    switch (tagId) {
      case 50341:
        return {
          ext: "arw",
          mime: "image/x-sony-arw"
        };
      case 50706:
        return {
          ext: "dng",
          mime: "image/x-adobe-dng"
        };
      default:
    }
  }
  async readTiffIFD(bigEndian) {
    const numberOfTags = await this.tokenizer.readToken(bigEndian ? UINT16_BE : UINT16_LE);
    for (let n = 0; n < numberOfTags; ++n) {
      const fileType = await this.readTiffTag(bigEndian);
      if (fileType) {
        return fileType;
      }
    }
  }
  async readTiffHeader(bigEndian) {
    const version = (bigEndian ? UINT16_BE : UINT16_LE).get(this.buffer, 2);
    const ifdOffset = (bigEndian ? UINT32_BE : UINT32_LE).get(this.buffer, 4);
    if (version === 42) {
      if (ifdOffset >= 6) {
        if (this.checkString("CR", { offset: 8 })) {
          return {
            ext: "cr2",
            mime: "image/x-canon-cr2"
          };
        }
        if (ifdOffset >= 8 && (this.check([28, 0, 254, 0], { offset: 8 }) || this.check([31, 0, 11, 0], { offset: 8 }))) {
          return {
            ext: "nef",
            mime: "image/x-nikon-nef"
          };
        }
      }
      await this.tokenizer.ignore(ifdOffset);
      const fileType = await this.readTiffIFD(bigEndian);
      return fileType != null ? fileType : {
        ext: "tif",
        mime: "image/tiff"
      };
    }
    if (version === 43) {
      return {
        ext: "tif",
        mime: "image/tiff"
      };
    }
  }
};
var supportedExtensions = new Set(extensions);
var supportedMimeTypes = new Set(mimeTypes);

// scripts/html-generation/assets/local-fetch-buffer.ts
var FetchBuffer = class extends Asset {
  constructor(filename, url, type, inlinePolicy, minify2, mutability, loadPriority) {
    super(filename, "", type, inlinePolicy, minify2, mutability, "" /* Default */, loadPriority);
    this.url = url;
    let stringURL = this.url instanceof Path ? this.url.asString : this.url;
    if (stringURL.startsWith("http"))
      this.onlineURL = stringURL;
  }
  async load(options) {
    if (this.url instanceof Path) {
      if (this.url.isRelative) {
        this.url.setWorkingDirectory("").makeAbsolute();
      }
      this.url = this.url.makeUnixStyle().asString;
    }
    if (options.offlineResources === false && this.url.startsWith("http"))
      return;
    if (this.url.startsWith("http") && (this.url.split(".").length <= 2 || this.url.split("/").length <= 2)) {
      this.onlineURL = void 0;
      return;
    }
    let res;
    try {
      if (this.url.startsWith("http")) {
        let testResp = await Utils.urlAvailable(this.url);
        if (testResp.type == "opaque")
          res = await (0, import_obsidian11.requestUrl)(this.url);
        else {
          ExportLog.log(`Url ${this.url} is not available`);
          return;
        }
      } else {
        res = await fetch(this.url);
      }
    } catch (e) {
      ExportLog.log(e, `Failed to fetch ${this.url}`);
      return;
    }
    if (res.status != 200) {
      ExportLog.log(`Failed to fetch ${this.url} with status ${res.status}`);
      return;
    }
    let data;
    if (res instanceof Response) {
      data = await res.arrayBuffer();
    } else {
      data = res.arrayBuffer;
    }
    this.content = Buffer.from(data);
    this.modifiedTime = Date.now();
    if (this.relativePath.extension == "") {
      let type = await fileTypeFromBuffer(this.content);
      if (type) {
        this.relativePath.setExtension(type.ext);
        this.filename = this.relativePath.fullName;
        this.type = Asset.extentionToType(type.ext);
        this.relativeDirectory = Asset.typeToPath(this.type);
      }
    }
    await super.load(options);
  }
};

// scripts/html-generation/assets/supported-plugin-styles.ts
var SupportedPluginStyles = class extends Asset {
  constructor() {
    super("supported-plugins.css", "", "style" /* Style */, "autohead" /* AutoHead */, true, "dynamic" /* Dynamic */, "async" /* Async */, 5);
    this.content = "";
  }
  async load(options) {
    var _a2;
    this.content = "";
    let stylesheets = document.styleSheets;
    for (let i = 1; i < stylesheets.length; i++) {
      let styleID = (_a2 = stylesheets[i].ownerNode) == null ? void 0 : _a2.id;
      if (styleID == "ADMONITIONS_CUSTOM_STYLE_SHEET" || styleID == "css-settings-manager" || Settings.includeSvelteCSS && this.isSvelteStylesheet(stylesheets[i])) {
        ExportLog.log("Including stylesheet: " + styleID);
        let style = stylesheets[i].cssRules;
        for (let item in style) {
          if (style[item].cssText != void 0) {
            this.content += "\n" + style[item].cssText;
          }
        }
      }
      this.content += "\n\n /* ---- */\n\n";
    }
    this.modifiedTime = Date.now();
    await super.load(options);
  }
  getStylesheetContent(stylesheet) {
    let content = "";
    let style = stylesheet.cssRules;
    for (let item in style) {
      if (style[item].cssText != void 0) {
        content += "\n" + style[item].cssText;
      }
    }
    return content;
  }
  isSvelteStylesheet(stylesheet) {
    if (stylesheet.ownerNode == void 0)
      return false;
    let styleID = stylesheet.ownerNode.id;
    if (styleID.contains("svelte"))
      return true;
    let sheetContent = this.getStylesheetContent(stylesheet);
    let first1000 = sheetContent.substring(0, 1e3);
    if (first1000.contains(".svelte-")) {
      return true;
    }
    return false;
  }
};

// scripts/html-generation/asset-handler.ts
var mime2 = require_mime();
var _AssetHandler = class {
  static get libraryPath() {
    if (!this.libraryFolder)
      this.initialize();
    return _AssetHandler.libraryFolder.copy.makeWebStyle(this.exportOptions.webStylePaths);
  }
  static get mediaPath() {
    if (!this.mediaFolder)
      this.initialize();
    return _AssetHandler.mediaFolder.copy.makeWebStyle(this.exportOptions.webStylePaths);
  }
  static get jsPath() {
    if (!this.jsFolder)
      this.initialize();
    return _AssetHandler.jsFolder.copy.makeWebStyle(this.exportOptions.webStylePaths);
  }
  static get cssPath() {
    if (!this.cssFolder)
      this.initialize();
    return _AssetHandler.cssFolder.copy.makeWebStyle(this.exportOptions.webStylePaths);
  }
  static get fontPath() {
    if (!this.fontFolder)
      this.initialize();
    return _AssetHandler.fontFolder.copy.makeWebStyle(this.exportOptions.webStylePaths);
  }
  static get htmlPath() {
    if (!this.htmlFolder)
      this.initialize();
    return _AssetHandler.htmlFolder.copy.makeWebStyle(this.exportOptions.webStylePaths);
  }
  static async initialize() {
    var _a2, _b;
    this.libraryFolder = new Path("lib").makeUnixStyle();
    this.mediaFolder = this.libraryFolder.joinString("media").makeUnixStyle();
    this.jsFolder = this.libraryFolder.joinString("scripts").makeUnixStyle();
    this.cssFolder = this.libraryFolder.joinString("styles").makeUnixStyle();
    this.fontFolder = this.libraryFolder.joinString("fonts").makeUnixStyle();
    this.htmlFolder = this.libraryFolder.joinString("html").makeUnixStyle();
    this.vaultPluginsPath = Path.vaultPath.joinString(app.vault.configDir, "plugins/").makeAbsolute();
    this.mainJsModTime = (_b = (_a2 = this.vaultPluginsPath.joinString("webpage-html-export/main.js").stat) == null ? void 0 : _a2.mtimeMs) != null ? _b : 0;
    this.staticAssets.forEach((asset) => asset.modifiedTime = this.mainJsModTime);
    this.allAssets.sort((a, b) => a.loadPriority - b.loadPriority);
    let loadPromises = [];
    for (let asset of this.allAssets) {
      loadPromises.push(asset.load(this.exportOptions));
    }
    await Promise.all(loadPromises);
    let graphViewJSPath = this.graphViewJS.getAssetPath();
    this.graphViewJS.getHTML = () => `<script type="module" async id="graph-view-script" src="${graphViewJSPath}"><\/script>`;
  }
  static async reloadAssets() {
    this.allAssets = this.allAssets.filter((asset) => asset.mutability != "temporary" /* Temporary */);
    this.temporaryAssets = [];
    let i = 0;
    let loadPromises = [];
    for (let asset of this.dynamicAssets) {
      let loadPromise = asset.load(this.exportOptions);
      loadPromise.then(() => {
        i++;
        ExportLog.progress(i, this.dynamicAssets.length, "Initialize Export", "Loading asset: " + asset.filename, "var(--color-yellow)");
      });
      loadPromises.push(loadPromise);
    }
    await Promise.all(loadPromises);
  }
  static getAssetsOfType(type) {
    let assets = this.allAssets.filter((asset) => asset.type == type);
    assets = assets.concat(this.allAssets.map((asset) => asset.childAssets).flat().filter((asset) => asset.type == type));
    return assets;
  }
  static getAssetsOfInlinePolicy(inlinePolicy) {
    let assets = this.allAssets.filter((asset) => asset.inlinePolicy == inlinePolicy);
    assets = assets.concat(this.allAssets.map((asset) => asset.childAssets).flat().filter((asset) => asset.inlinePolicy == inlinePolicy));
    return assets;
  }
  static filterDownloads(downloads, options) {
    if (!options.addGraphView || !options.addSidebars) {
      downloads = downloads.filter((asset) => ![this.graphViewJS, this.graphWASMJS, this.graphWASM, this.renderWorkerJS, this.tinyColorJS, this.pixiJS].includes(asset));
    }
    if (!options.addSearch || !options.addSidebars) {
      downloads = downloads.filter((asset) => ![this.minisearchJS].includes(asset));
    }
    if (!options.includeCSS) {
      downloads = downloads.filter((asset) => asset.type != "style" /* Style */);
    }
    if (!options.includeJS) {
      downloads = downloads.filter((asset) => asset.type != "script" /* Script */);
    }
    downloads = downloads.filter((asset, index, self2) => self2.findIndex((t) => t.relativePath.asString == asset.relativePath.asString) === index);
    downloads = downloads.filter((asset) => asset.content && asset.content.length > 0);
    return downloads;
  }
  static getDownloads(options) {
    let downloads = this.getAssetsOfInlinePolicy("download" /* Download */).concat(this.getAssetsOfInlinePolicy("downloadhead" /* DownloadHead */));
    if (!options.inlineMedia) {
      downloads = downloads.concat(this.getAssetsOfInlinePolicy("auto" /* Auto */));
      downloads = downloads.concat(this.getAssetsOfInlinePolicy("autohead" /* AutoHead */));
    }
    downloads = this.filterDownloads(downloads, options);
    downloads.sort((a, b) => b.loadPriority - a.loadPriority);
    return downloads;
  }
  static getHeadReferences(options) {
    let head = "";
    let referenceAssets = this.getAssetsOfInlinePolicy("downloadhead" /* DownloadHead */).concat(this.getAssetsOfInlinePolicy("autohead" /* AutoHead */)).concat(this.getAssetsOfInlinePolicy("inlinehead" /* InlineHead */));
    referenceAssets = this.filterDownloads(referenceAssets, options);
    referenceAssets.sort((a, b) => b.loadPriority - a.loadPriority);
    for (let asset of referenceAssets) {
      head += asset.getHTML(options);
    }
    return head;
  }
  static async getStyleChildAssets(asset, makeBase64External = false) {
    if (typeof asset.content != "string")
      throw new Error("Asset content is not a string");
    let content = asset.content.replaceAll("app://obsidian.md/", "");
    let urls = Array.from(content.matchAll(/url\("([^"]+)"\)|url\('([^']+)'\)/g));
    urls = urls.filter((url, index, self2) => self2.findIndex((t) => t[0] === url[0]) === index);
    let promises = [];
    for (let urlObj of urls) {
      let url = urlObj[1] || urlObj[2];
      url = url.trim();
      if (!this.exportOptions.offlineResources && url.startsWith("http"))
        continue;
      if (url == "")
        continue;
      if (url.startsWith("data:")) {
        if (!this.exportOptions.inlineMedia && makeBase64External) {
          let hash = function(str, seed = 0) {
            let h1 = 3735928559 ^ seed, h2 = 1103547991 ^ seed;
            for (let i = 0, ch; i < str.length; i++) {
              ch = str.charCodeAt(i);
              h1 = Math.imul(h1 ^ ch, 2654435761);
              h2 = Math.imul(h2 ^ ch, 1597334677);
            }
            h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507);
            h1 ^= Math.imul(h2 ^ h2 >>> 13, 3266489909);
            h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507);
            h2 ^= Math.imul(h1 ^ h1 >>> 13, 3266489909);
            return 4294967296 * (2097151 & h2) + (h1 >>> 0);
          };
          let splitData = url.split(",");
          let data = splitData.slice(1).join(",");
          let extension = Asset.mimeToExtention(splitData[0].split(":")[1].split(";")[0]);
          let buffer = Buffer.from(data, "base64");
          let dataHash = hash(data);
          let filename = `${dataHash}.${extension}`;
          if (extension == "") {
            let type3 = await fileTypeFromBuffer(buffer);
            if (type3)
              extension = type3.ext;
            filename = `${dataHash}.${extension}`;
          }
          let type2 = Asset.extentionToType(extension);
          let childAsset2 = new Asset(filename, buffer, type2, "download" /* Download */, false, "child" /* Child */);
          asset.childAssets.push(childAsset2);
          let loadPromise2 = childAsset2.load(this.exportOptions);
          promises.push(loadPromise2);
          loadPromise2.then(() => {
            if (childAsset2.content == void 0 || childAsset2.content == null || childAsset2.content.length == 0) {
              return;
            }
            let newPath = childAsset2.getAssetPath(asset.getAssetPath());
            content = content.replaceAll(url, newPath.asString);
          });
        }
        continue;
      }
      let path = new Path(url);
      let type = Asset.extentionToType(path.extension);
      let childAsset = new FetchBuffer(path.fullName, url, type, "download" /* Download */, false, "child" /* Child */);
      asset.childAssets.push(childAsset);
      let loadPromise = childAsset.load(this.exportOptions);
      promises.push(loadPromise);
      loadPromise.then(() => {
        if (childAsset.content == void 0 || childAsset.content == null || childAsset.content.length == 0) {
          return;
        }
        if (this.exportOptions.inlineMedia) {
          let base64 = childAsset.content.toString("base64");
          content = content.replaceAll(url, `data:${mime2.getType(url)};base64,${base64}`);
        } else {
          childAsset.relativeDirectory.makeWebStyle(this.exportOptions.webStylePaths);
          if (this.exportOptions.webStylePaths)
            childAsset.filename = Path.toWebStyle(childAsset.filename);
          let newPath = childAsset.getAssetPath(asset.getAssetPath());
          content = content.replaceAll(url, newPath.asString);
        }
      });
    }
    await Promise.all(promises);
    return content;
  }
};
var AssetHandler = _AssetHandler;
AssetHandler.staticAssets = [];
AssetHandler.dynamicAssets = [];
AssetHandler.allAssets = [];
AssetHandler.temporaryAssets = [];
AssetHandler.exportOptions = new MarkdownWebpageRendererAPIOptions2();
AssetHandler.obsidianStyles = new ObsidianStyles();
AssetHandler.otherPluginStyles = new OtherPluginStyles();
AssetHandler.themeStyles = new ThemeStyles();
AssetHandler.snippetStyles = new SnippetStyles();
AssetHandler.mathjaxStyles = new MathjaxStyles();
AssetHandler.globalDataStyles = new GlobalVariableStyles();
AssetHandler.supportedPluginStyles = new SupportedPluginStyles();
AssetHandler.websiteStyles = new Asset("main-styles.css", plugin_styles_txt_default, "style" /* Style */, "autohead" /* AutoHead */, true, "static" /* Static */, "async" /* Async */, 4);
AssetHandler.deferredCSS = new Asset("deferred.css", deferred_txt_default2, "style" /* Style */, "inlinehead" /* InlineHead */, true, "static" /* Static */, "defer" /* Defer */);
AssetHandler.websiteJS = new Asset("webpage.js", website_txt_default, "script" /* Script */, "autohead" /* AutoHead */, true, "static" /* Static */, "async" /* Async */);
AssetHandler.graphViewJS = new Asset("graph-view.js", graph_view_txt_default, "script" /* Script */, "autohead" /* AutoHead */, true, "static" /* Static */);
AssetHandler.graphWASMJS = new Asset("graph-wasm.js", graph_wasm_txt_default, "script" /* Script */, "autohead" /* AutoHead */, true, "static" /* Static */);
AssetHandler.graphWASM = new Asset("graph-wasm.wasm", Buffer.from(graph_wasm_default), "script" /* Script */, "download" /* Download */, false, "static" /* Static */);
AssetHandler.renderWorkerJS = new Asset("graph-render-worker.js", graph_render_worker_txt_default, "script" /* Script */, "autohead" /* AutoHead */, true, "static" /* Static */);
AssetHandler.deferredJS = new Asset("deferred.js", deferred_txt_default, "script" /* Script */, "inlinehead" /* InlineHead */, true, "static" /* Static */, "defer" /* Defer */);
AssetHandler.themeLoadJS = new Asset("theme-load.js", theme_load_txt_default, "script" /* Script */, "inline" /* Inline */, true, "static" /* Static */, "defer" /* Defer */);
AssetHandler.tinyColorJS = new Asset("tinycolor.js", tinycolor_txt_default, "script" /* Script */, "autohead" /* AutoHead */, true, "static" /* Static */);
AssetHandler.pixiJS = new Asset("pixi.js", pixi_txt_default, "script" /* Script */, "autohead" /* AutoHead */, true, "static" /* Static */, "async" /* Async */, 100, "https://cdnjs.cloudflare.com/ajax/libs/pixi.js/7.4.0/pixi.min.js");
AssetHandler.minisearchJS = new Asset("minisearch.js", minisearch_txt_default, "script" /* Script */, "autohead" /* AutoHead */, true, "static" /* Static */, "async" /* Async */, 100, "https://cdn.jsdelivr.net/npm/minisearch@6.3.0/dist/umd/index.min.js");
AssetHandler.favicon = new Favicon();
AssetHandler.customHeadContent = new CustomHeadContent();
AssetHandler.mainJsModTime = 0;

// scripts/exporter.ts
var import_obsidian12 = require("obsidian");
var HTMLExporter = class {
  static async export(usePreviousSettings = true, overrideFiles = void 0) {
    var _a2, _b, _c;
    let info = await SettingsPage3.updateSettings(usePreviousSettings, overrideFiles);
    if (!info && !usePreviousSettings || info && info.canceled)
      return;
    let files = (_b = (_a2 = info == null ? void 0 : info.pickedFiles) != null ? _a2 : overrideFiles) != null ? _b : SettingsPage3.getFilesToExport();
    let exportPath = (_c = info == null ? void 0 : info.exportPath) != null ? _c : new Path(Settings.exportPath);
    let website = await HTMLExporter.exportFiles(files, exportPath, true, Settings.deleteOldFiles);
    if (!website)
      return;
    if (Settings.openAfterExport)
      Utils.openPath(exportPath);
    new import_obsidian12.Notice("\u2705 Finished HTML Export:\n\n" + exportPath, 5e3);
  }
  static async exportFiles(files, destination, saveFiles, deleteOld) {
    var website = await new Website().createWithFiles(files, destination);
    if (!website) {
      new import_obsidian12.Notice("\u274C Export Cancelled", 5e3);
      return;
    }
    await website.index.updateBodyClasses();
    if (deleteOld)
      await website.index.deleteOldFiles();
    if (saveFiles) {
      await Utils.downloadFiles(website.downloads, destination);
    }
    MarkdownRendererAPI.endBatch();
    return website;
  }
  static async exportFolder(folder, rootExportPath, saveFiles, clearDirectory) {
    let folderPath = new Path(folder.path);
    let allFiles = HTMLExportPlugin.plugin.app.vault.getFiles();
    let files = allFiles.filter((file) => new Path(file.path).directory.asString.startsWith(folderPath.asString));
    return await this.exportFiles(files, rootExportPath, saveFiles, clearDirectory);
  }
  static async exportVault(rootExportPath, saveFiles, clearDirectory) {
    let files = HTMLExportPlugin.plugin.app.vault.getFiles();
    return await this.exportFiles(files, rootExportPath, saveFiles, clearDirectory);
  }
};

// scripts/main.ts
var _HTMLExportPlugin = class extends import_obsidian13.Plugin {
  constructor() {
    super(...arguments);
    this.api = MarkdownRendererAPI;
    this.settings = Settings;
    this.assetHandler = AssetHandler;
    this.Path = Path;
  }
  async onload() {
    console.log("Loading webpage-html-export plugin");
    _HTMLExportPlugin.plugin = this;
    this.checkForUpdates();
    _HTMLExportPlugin.pluginVersion = this.manifest.version;
    window.WebpageHTMLExport = this;
    this.addSettingTab(new SettingsPage3(this));
    await SettingsPage3.loadSettings();
    await AssetHandler.initialize();
    this.addRibbonIcon("folder-up", "Export Vault to HTML", () => {
      HTMLExporter.export(false);
    });
    this.registerEvent(this.app.vault.on("rename", SettingsPage3.renameFile));
    this.addCommand({
      id: "export-html-vault",
      name: "Export using previous settings",
      callback: () => {
        HTMLExporter.export(true);
      }
    });
    this.addCommand({
      id: "export-html-current",
      name: "Export only current file using previous settings",
      callback: () => {
        let file = this.app.workspace.getActiveFile();
        if (!file) {
          new import_obsidian13.Notice("No file is currently open!", 5e3);
          return;
        }
        HTMLExporter.export(true, [file]);
      }
    });
    this.addCommand({
      id: "export-html-setting",
      name: "Set html export settings",
      callback: () => {
        HTMLExporter.export(false);
      }
    });
    this.registerEvent(this.app.workspace.on("file-menu", (menu, file) => {
      menu.addItem((item) => {
        item.setTitle("Export as HTML").setIcon("download").setSection("export").onClick(() => {
          ExportModal.title = `Export ${file.name} as HTML`;
          if (file instanceof import_obsidian13.TFile) {
            HTMLExporter.export(false, [file]);
          } else if (file instanceof import_obsidian13.TFolder) {
            let filesInFolder = this.app.vault.getFiles().filter((f) => new Path(f.path).directory.asString.startsWith(file.path));
            HTMLExporter.export(false, filesInFolder);
          } else {
            ExportLog.error("File is not a TFile or TFolder! Invalid type: " + typeof file);
            new import_obsidian13.Notice("File is not a File or Folder! Invalid type: " + typeof file, 5e3);
          }
        });
      });
    }));
  }
  async checkForUpdates() {
    var _a2, _b;
    let currentVersion = this.manifest.version;
    try {
      let url = "https://raw.githubusercontent.com/KosmosisDire/obsidian-webpage-export/master/manifest.json?cache=" + Date.now();
      if (this.manifest.version.endsWith("b"))
        url = "https://raw.githubusercontent.com/KosmosisDire/obsidian-webpage-export/master/manifest-beta.json?cache=" + Date.now();
      let manifestResp = await (0, import_obsidian13.requestUrl)(url);
      if (manifestResp.status != 200)
        throw new Error("Could not fetch manifest");
      let manifest = manifestResp.json;
      let latestVersion = (_a2 = manifest.version) != null ? _a2 : currentVersion;
      let updateAvailable = currentVersion < latestVersion;
      let updateNote = (_b = manifest.updateNote) != null ? _b : "";
      _HTMLExportPlugin.updateInfo = { updateAvailable, latestVersion, currentVersion, updateNote };
      if (updateAvailable)
        ExportLog.log("Update available: " + latestVersion + " (current: " + currentVersion + ")");
      return _HTMLExportPlugin.updateInfo;
    } catch (e) {
      ExportLog.log("Could not check for update");
      _HTMLExportPlugin.updateInfo = { updateAvailable: false, latestVersion: currentVersion, currentVersion, updateNote: "" };
      return _HTMLExportPlugin.updateInfo;
    }
  }
  onunload() {
    ExportLog.log("unloading webpage-html-export plugin");
  }
};
var HTMLExportPlugin = _HTMLExportPlugin;
HTMLExportPlugin.updateInfo = { updateAvailable: false, latestVersion: "0", currentVersion: "0", updateNote: "" };
HTMLExportPlugin.pluginVersion = "0.0.0";
/*!
 * HTML Parser By John Resig (ejohn.org)
 * Modified by Juriy "kangax" Zaytsev
 * Original code by Erik Arvidsson, Mozilla Public License
 * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
 */
/*!
 * mime-db
 * Copyright(c) 2014 Jonathan Ong
 * MIT Licensed
 */
/*!
 * mime-types
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/* nosourcemap */