import { __require as c } from "./java.mjs";
import { __require as l } from "./javadoclike.mjs";
var t, o;
function v() {
  if (o)
    return t;
  o = 1;
  var s = c(), i = l();
  t = a, a.displayName = "javadoc", a.aliases = [];
  function a(n) {
    n.register(s), n.register(i), function(e) {
      var r = /(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m, u = /#\s*\w+(?:\s*\([^()]*\))?/.source, d = /(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*<mem>)?|<mem>/.source.replace(/<mem>/g, function() {
        return u;
      });
      e.languages.javadoc = e.languages.extend("javadoclike", {}), e.languages.insertBefore("javadoc", "keyword", {
        reference: {
          pattern: RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source + "(?:" + d + ")"),
          lookbehind: !0,
          inside: {
            function: {
              pattern: /(#\s*)\w+(?=\s*\()/,
              lookbehind: !0
            },
            field: {
              pattern: /(#\s*)\w+/,
              lookbehind: !0
            },
            namespace: {
              pattern: /\b(?:[a-z]\w*\s*\.\s*)+/,
              inside: {
                punctuation: /\./
              }
            },
            "class-name": /\b[A-Z]\w*/,
            keyword: e.languages.java.keyword,
            punctuation: /[#()[\],.]/
          }
        },
        "class-name": {
          // @param <T> the first generic type parameter
          pattern: /(@param\s+)<[A-Z]\w*>/,
          lookbehind: !0,
          inside: {
            punctuation: /[.<>]/
          }
        },
        "code-section": [{
          pattern: /(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,
          lookbehind: !0,
          inside: {
            code: {
              // there can't be any HTML inside of {@code} tags
              pattern: r,
              lookbehind: !0,
              inside: e.languages.java,
              alias: "language-java"
            }
          }
        }, {
          pattern: /(<(code|pre|tt)>(?!<code>)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,
          lookbehind: !0,
          inside: {
            line: {
              pattern: r,
              lookbehind: !0,
              inside: {
                // highlight HTML tags and entities
                tag: e.languages.markup.tag,
                entity: e.languages.markup.entity,
                code: {
                  // everything else is Java code
                  pattern: /.+/,
                  inside: e.languages.java,
                  alias: "language-java"
                }
              }
            }
          }
        }],
        tag: e.languages.markup.tag,
        entity: e.languages.markup.entity
      }), e.languages.javadoclike.addSupport("java", e.languages.javadoc);
    }(n);
  }
  return t;
}
export {
  v as __require
};
