import { decodeNamedCharacterReference as o } from "../../../decode-named-character-reference@1.1.0/node_modules/decode-named-character-reference/index.dom.js";
import { decodeNumericCharacterReference as a } from "../../../micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.js";
const n = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
function m(r) {
  return r.replace(n, f);
}
function f(r, c, e) {
  if (c)
    return c;
  if (e.charCodeAt(0) === 35) {
    const t = e.charCodeAt(1), d = t === 120 || t === 88;
    return a(e.slice(d ? 2 : 1), d ? 16 : 10);
  }
  return o(e) || r;
}
export {
  m as decodeString
};
//# sourceMappingURL=index.js.map
