function Context(e, p, m, h, g, _) {
  this.indented = e, this.column = p, this.type = m, this.info = h, this.align = g, this.prev = _;
}
function pushContext(p, m, h, g) {
  var _ = p.indented;
  return p.context && p.context.type == "statement" && h != "statement" && (_ = p.context.indented), p.context = new Context(_, m, h, g, null, p.context);
}
function popContext(e) {
  var p = e.context.type;
  return (p == ")" || p == "]" || p == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
}
function typeBefore(e, p, m) {
  if (p.prevToken == "variable" || p.prevToken == "type" || /\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0, m)) || p.typeAtEndOfLine && e.column() == e.indentation()) return true;
}
function isTopScope(e) {
  for (; ; ) {
    if (!e || e.type == "top") return true;
    if (e.type == "}" && e.prev.info != "namespace") return false;
    e = e.prev;
  }
}
function clike(_) {
  var v = _.statementIndentUnit, b = _.dontAlignCalls, x = _.keywords || {}, S = _.types || {}, C = _.builtin || {}, w = _.blockKeywords || {}, T = _.defKeywords || {}, E = _.atoms || {}, D = _.hooks || {}, O = _.multiLineStrings, k = _.indentStatements !== false, A = _.indentSwitch !== false, j = _.namespaceSeparator, M = _.isPunctuationChar || /[\[\]{}\(\),;\:\.]/, N = _.numberStart || /[\d\.]/, P = _.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i, F = _.isOperatorChar || /[+\-*&%=<>!?|\/]/, I = _.isIdentifierChar || /[\w\$_\xa1-\uffff]/, L = _.isReservedIdentifier || false, R, z;
  function B(e, p) {
    var m = e.next();
    if (D[m]) {
      var h = D[m](e, p);
      if (h !== false) return h;
    }
    if (m == '"' || m == "'") return p.tokenize = V(m), p.tokenize(e, p);
    if (N.test(m)) {
      if (e.backUp(1), e.match(P)) return "number";
      e.next();
    }
    if (M.test(m)) return R = m, null;
    if (m == "/") {
      if (e.eat("*")) return p.tokenize = H, H(e, p);
      if (e.eat("/")) return e.skipToEnd(), "comment";
    }
    if (F.test(m)) {
      for (; !e.match(/^\/[\/*]/, false) && e.eat(F); ) ;
      return "operator";
    }
    if (e.eatWhile(I), j) for (; e.match(j); ) e.eatWhile(I);
    var g = e.current();
    return contains(x, g) ? (contains(w, g) && (R = "newstatement"), contains(T, g) && (z = true), "keyword") : contains(S, g) ? "type" : contains(C, g) || L && L(g) ? (contains(w, g) && (R = "newstatement"), "builtin") : contains(E, g) ? "atom" : "variable";
  }
  function V(e) {
    return function(p, m) {
      for (var h = false, g, _2 = false; (g = p.next()) != null; ) {
        if (g == e && !h) {
          _2 = true;
          break;
        }
        h = !h && g == "\\";
      }
      return (_2 || !(h || O)) && (m.tokenize = null), "string";
    };
  }
  function H(e, p) {
    for (var m = false, h; h = e.next(); ) {
      if (h == "/" && m) {
        p.tokenize = null;
        break;
      }
      m = h == "*";
    }
    return "comment";
  }
  function U(e, p) {
    _.typeFirstDefinitions && e.eol() && isTopScope(p.context) && (p.typeAtEndOfLine = typeBefore(e, p, e.pos));
  }
  return {
    name: _.name,
    startState: function(p) {
      return {
        tokenize: null,
        context: new Context(-p, 0, "top", null, false),
        indented: 0,
        startOfLine: true,
        prevToken: null
      };
    },
    token: function(e, v2) {
      var y = v2.context;
      if (e.sol() && (y.align ?? (y.align = false), v2.indented = e.indentation(), v2.startOfLine = true), e.eatSpace()) return U(e, v2), null;
      R = z = null;
      var b2 = (v2.tokenize || B)(e, v2);
      if (b2 == "comment" || b2 == "meta") return b2;
      if (y.align ?? (y.align = true), R == ";" || R == ":" || R == "," && e.match(/^\s*(?:\/\/.*)?$/, false)) for (; v2.context.type == "statement"; ) popContext(v2);
      else if (R == "{") pushContext(v2, e.column(), "}");
      else if (R == "[") pushContext(v2, e.column(), "]");
      else if (R == "(") pushContext(v2, e.column(), ")");
      else if (R == "}") {
        for (; y.type == "statement"; ) y = popContext(v2);
        for (y.type == "}" && (y = popContext(v2)); y.type == "statement"; ) y = popContext(v2);
      } else R == y.type ? popContext(v2) : k && ((y.type == "}" || y.type == "top") && R != ";" || y.type == "statement" && R == "newstatement") && pushContext(v2, e.column(), "statement", e.current());
      if (b2 == "variable" && (v2.prevToken == "def" || _.typeFirstDefinitions && typeBefore(e, v2, e.start) && isTopScope(v2.context) && e.match(/^\s*\(/, false)) && (b2 = "def"), D.token) {
        var x2 = D.token(e, v2, b2);
        x2 !== void 0 && (b2 = x2);
      }
      return b2 == "def" && _.styleDefs === false && (b2 = "variable"), v2.startOfLine = false, v2.prevToken = z ? "def" : b2 || R, U(e, v2), b2;
    },
    indent: function(e, p, m) {
      if (e.tokenize != B && e.tokenize != null || e.typeAtEndOfLine && isTopScope(e.context)) return null;
      var h = e.context, y = p && p.charAt(0), x2 = y == h.type;
      if (h.type == "statement" && y == "}" && (h = h.prev), _.dontIndentStatements) for (; h.type == "statement" && _.dontIndentStatements.test(h.info); ) h = h.prev;
      if (D.indent) {
        var S2 = D.indent(e, h, p, m.unit);
        if (typeof S2 == "number") return S2;
      }
      var C2 = h.prev && h.prev.info == "switch";
      if (_.allmanIndentation && /[{(]/.test(y)) {
        for (; h.type != "top" && h.type != "}"; ) h = h.prev;
        return h.indented;
      }
      return h.type == "statement" ? h.indented + (y == "{" ? 0 : v || m.unit) : h.align && (!b || h.type != ")") ? h.column + (x2 ? 0 : 1) : h.type == ")" && !x2 ? h.indented + (v || m.unit) : h.indented + (x2 ? 0 : m.unit) + (!x2 && C2 && !/^(?:case|default)\b/.test(p) ? m.unit : 0);
    },
    languageData: {
      indentOnInput: A ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/,
      commentTokens: {
        line: "//",
        block: {
          open: "/*",
          close: "*/"
        }
      },
      autocomplete: Object.keys(x).concat(Object.keys(S)).concat(Object.keys(C)).concat(Object.keys(E)),
      ..._.languageData
    }
  };
}
function words(e) {
  for (var p = {}, m = e.split(" "), h = 0; h < m.length; ++h) p[m[h]] = true;
  return p;
}
function contains(e, p) {
  return typeof e == "function" ? e(p) : e.propertyIsEnumerable(p);
}
var cKeywords = "auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran", cppKeywords = "alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq", objCKeywords = "bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available", objCBuiltins = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION  NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT", basicCTypes = words("int long char short double float unsigned signed void bool"), basicObjCTypes = words("SEL instancetype id Class Protocol BOOL");
function cTypes(e) {
  return contains(basicCTypes, e) || /.+_t$/.test(e);
}
function objCTypes(e) {
  return cTypes(e) || contains(basicObjCTypes, e);
}
var cBlockKeywords = "case do else for if switch while struct enum union", cDefKeywords = "struct enum union";
function cppHook(e, p) {
  if (!p.startOfLine) return false;
  for (var m, h = null; m = e.peek(); ) {
    if (m == "\\" && e.match(/^.$/)) {
      h = cppHook;
      break;
    } else if (m == "/" && e.match(/^\/[\/\*]/, false)) break;
    e.next();
  }
  return p.tokenize = h, "meta";
}
function pointerHook(e, p) {
  return p.prevToken == "type" ? "type" : false;
}
function cIsReservedIdentifier(e) {
  return !e || e.length < 2 || e[0] != "_" ? false : e[1] == "_" || e[1] !== e[1].toLowerCase();
}
function cpp14Literal(e) {
  return e.eatWhile(/[\w\.']/), "number";
}
function cpp11StringHook(e, p) {
  if (e.backUp(1), e.match(/^(?:R|u8R|uR|UR|LR)/)) {
    var m = e.match(/^"([^\s\\()]{0,16})\(/);
    return m ? (p.cpp11RawStringDelim = m[1], p.tokenize = tokenRawString, tokenRawString(e, p)) : false;
  }
  return e.match(/^(?:u8|u|U|L)/) ? e.match(/^["']/, false) ? "string" : false : (e.next(), false);
}
function cppLooksLikeConstructor(e) {
  var p = /(\w+)::~?(\w+)$/.exec(e);
  return p && p[1] == p[2];
}
function tokenAtString(e, p) {
  for (var m; (m = e.next()) != null; ) if (m == '"' && !e.eat('"')) {
    p.tokenize = null;
    break;
  }
  return "string";
}
function tokenRawString(e, p) {
  var m = p.cpp11RawStringDelim.replace(/[^\w\s]/g, "\\$&");
  return e.match(/* @__PURE__ */ RegExp(".*?\\)" + m + '"')) ? p.tokenize = null : e.skipToEnd(), "string";
}
clike({
  name: "c",
  keywords: words(cKeywords),
  types: cTypes,
  blockKeywords: words(cBlockKeywords),
  defKeywords: words(cDefKeywords),
  typeFirstDefinitions: true,
  atoms: words("NULL true false"),
  isReservedIdentifier: cIsReservedIdentifier,
  hooks: {
    "#": cppHook,
    "*": pointerHook
  }
}), clike({
  name: "cpp",
  keywords: words(cKeywords + " " + cppKeywords),
  types: cTypes,
  blockKeywords: words(cBlockKeywords + " class try catch"),
  defKeywords: words(cDefKeywords + " class namespace"),
  typeFirstDefinitions: true,
  atoms: words("true false NULL nullptr"),
  dontIndentStatements: /^template$/,
  isIdentifierChar: /[\w\$_~\xa1-\uffff]/,
  isReservedIdentifier: cIsReservedIdentifier,
  hooks: {
    "#": cppHook,
    "*": pointerHook,
    u: cpp11StringHook,
    U: cpp11StringHook,
    L: cpp11StringHook,
    R: cpp11StringHook,
    0: cpp14Literal,
    1: cpp14Literal,
    2: cpp14Literal,
    3: cpp14Literal,
    4: cpp14Literal,
    5: cpp14Literal,
    6: cpp14Literal,
    7: cpp14Literal,
    8: cpp14Literal,
    9: cpp14Literal,
    token: function(e, p, m) {
      if (m == "variable" && e.peek() == "(" && (p.prevToken == ";" || p.prevToken == null || p.prevToken == "}") && cppLooksLikeConstructor(e.current())) return "def";
    }
  },
  namespaceSeparator: "::"
}), clike({
  name: "java",
  keywords: words("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),
  types: words("var byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),
  blockKeywords: words("catch class do else finally for if switch try while"),
  defKeywords: words("class interface enum @interface"),
  typeFirstDefinitions: true,
  atoms: words("true false null"),
  number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
  hooks: {
    "@": function(e) {
      return e.match("interface", false) ? false : (e.eatWhile(/[\w\$_]/), "meta");
    },
    '"': function(e, p) {
      return e.match(/""$/) ? (p.tokenize = tokenTripleString, p.tokenize(e, p)) : false;
    }
  }
});
const csharp = clike({
  name: "csharp",
  keywords: words("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in init interface internal is lock namespace new operator out override params private protected public readonly record ref required return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),
  types: words("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),
  blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
  defKeywords: words("class interface namespace record struct var"),
  typeFirstDefinitions: true,
  atoms: words("true false null"),
  hooks: { "@": function(e, p) {
    return e.eat('"') ? (p.tokenize = tokenAtString, tokenAtString(e, p)) : (e.eatWhile(/[\w\$_]/), "meta");
  } }
});
function tokenTripleString(e, p) {
  for (var m = false; !e.eol(); ) {
    if (!m && e.match('"""')) {
      p.tokenize = null;
      break;
    }
    m = e.next() == "\\" && !m;
  }
  return "string";
}
function tokenNestedComment(e) {
  return function(p, m) {
    for (var h; h = p.next(); ) if (h == "*" && p.eat("/")) if (e == 1) {
      m.tokenize = null;
      break;
    } else return m.tokenize = tokenNestedComment(e - 1), m.tokenize(p, m);
    else if (h == "/" && p.eat("*")) return m.tokenize = tokenNestedComment(e + 1), m.tokenize(p, m);
    return "comment";
  };
}
const scala = clike({
  name: "scala",
  keywords: words("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),
  types: words("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),
  multiLineStrings: true,
  blockKeywords: words("catch class enum do else finally for forSome if match switch try while"),
  defKeywords: words("class enum def object package trait type val var"),
  atoms: words("true false null"),
  indentStatements: false,
  indentSwitch: false,
  isOperatorChar: /[+\-*&%=<>!?|\/#:@]/,
  hooks: {
    "@": function(e) {
      return e.eatWhile(/[\w\$_]/), "meta";
    },
    '"': function(e, p) {
      return e.match('""') ? (p.tokenize = tokenTripleString, p.tokenize(e, p)) : false;
    },
    "'": function(e) {
      return e.match(/^(\\[^'\s]+|[^\\'])'/) ? "character" : (e.eatWhile(/[\w\$_\xa1-\uffff]/), "atom");
    },
    "=": function(p, m) {
      var h = m.context;
      return h.type == "}" && h.align && p.eat(">") ? (m.context = new Context(h.indented, h.column, h.type, h.info, null, h.prev), "operator") : false;
    },
    "/": function(e, p) {
      return e.eat("*") ? (p.tokenize = tokenNestedComment(1), p.tokenize(e, p)) : false;
    }
  },
  languageData: { closeBrackets: { brackets: [
    "(",
    "[",
    "{",
    "'",
    '"',
    '"""'
  ] } }
});
function tokenKotlinString(e) {
  return function(p, m) {
    for (var h = false, g, _ = false; !p.eol(); ) {
      if (!e && !h && p.match('"')) {
        _ = true;
        break;
      }
      if (e && p.match('"""')) {
        _ = true;
        break;
      }
      g = p.next(), !h && g == "$" && p.match("{") && p.skipTo("}"), h = !h && g == "\\" && !e;
    }
    return (_ || !e) && (m.tokenize = null), "string";
  };
}
const kotlin = clike({
  name: "kotlin",
  keywords: words("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),
  types: words("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),
  intendSwitch: false,
  indentStatements: false,
  multiLineStrings: true,
  number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(ul?|l|f)?/i,
  blockKeywords: words("catch class do else finally for if where try while enum"),
  defKeywords: words("class val var object interface fun"),
  atoms: words("true false null this"),
  hooks: {
    "@": function(e) {
      return e.eatWhile(/[\w\$_]/), "meta";
    },
    "*": function(e, p) {
      return p.prevToken == "." ? "variable" : "operator";
    },
    '"': function(e, p) {
      return p.tokenize = tokenKotlinString(e.match('""')), p.tokenize(e, p);
    },
    "/": function(e, p) {
      return e.eat("*") ? (p.tokenize = tokenNestedComment(1), p.tokenize(e, p)) : false;
    },
    indent: function(e, p, m, h) {
      var g = m && m.charAt(0);
      if ((e.prevToken == "}" || e.prevToken == ")") && m == "") return e.indented;
      if (e.prevToken == "operator" && m != "}" && e.context.type != "}" || e.prevToken == "variable" && g == "." || (e.prevToken == "}" || e.prevToken == ")") && g == ".") return h * 2 + p.indented;
      if (p.align && p.type == "}") return p.indented + (e.context.type == (m || "").charAt(0) ? 0 : h);
    }
  },
  languageData: { closeBrackets: { brackets: [
    "(",
    "[",
    "{",
    "'",
    '"',
    '"""'
  ] } }
});
clike({
  name: "shader",
  keywords: words("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),
  types: words("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),
  blockKeywords: words("for while do if else struct"),
  builtin: words("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),
  atoms: words("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),
  indentSwitch: false,
  hooks: { "#": cppHook }
}), clike({
  name: "nesc",
  keywords: words(cKeywords + " as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),
  types: cTypes,
  blockKeywords: words(cBlockKeywords),
  atoms: words("null true false"),
  hooks: { "#": cppHook }
});
const objectiveC = clike({
  name: "objectivec",
  keywords: words(cKeywords + " " + objCKeywords),
  types: objCTypes,
  builtin: words(objCBuiltins),
  blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized"),
  defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class"),
  dontIndentStatements: /^@.*$/,
  typeFirstDefinitions: true,
  atoms: words("YES NO NULL Nil nil true false nullptr"),
  isReservedIdentifier: cIsReservedIdentifier,
  hooks: {
    "#": cppHook,
    "*": pointerHook
  }
}), objectiveCpp = clike({
  name: "objectivecpp",
  keywords: words(cKeywords + " " + objCKeywords + " " + cppKeywords),
  types: objCTypes,
  builtin: words(objCBuiltins),
  blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),
  defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class class namespace"),
  dontIndentStatements: /^@.*$|^template$/,
  typeFirstDefinitions: true,
  atoms: words("YES NO NULL Nil nil true false nullptr"),
  isReservedIdentifier: cIsReservedIdentifier,
  hooks: {
    "#": cppHook,
    "*": pointerHook,
    u: cpp11StringHook,
    U: cpp11StringHook,
    L: cpp11StringHook,
    R: cpp11StringHook,
    0: cpp14Literal,
    1: cpp14Literal,
    2: cpp14Literal,
    3: cpp14Literal,
    4: cpp14Literal,
    5: cpp14Literal,
    6: cpp14Literal,
    7: cpp14Literal,
    8: cpp14Literal,
    9: cpp14Literal,
    token: function(e, p, m) {
      if (m == "variable" && e.peek() == "(" && (p.prevToken == ";" || p.prevToken == null || p.prevToken == "}") && cppLooksLikeConstructor(e.current())) return "def";
    }
  },
  namespaceSeparator: "::"
}), squirrel = clike({
  name: "squirrel",
  keywords: words("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),
  types: cTypes,
  blockKeywords: words("case catch class else for foreach if switch try while"),
  defKeywords: words("function local class"),
  typeFirstDefinitions: true,
  atoms: words("true false null"),
  hooks: { "#": cppHook }
});
var stringTokenizer = null;
function tokenCeylonString(e) {
  return function(p, m) {
    for (var h = false, g, _ = false; !p.eol(); ) {
      if (!h && p.match('"') && (e == "single" || p.match('""'))) {
        _ = true;
        break;
      }
      if (!h && p.match("``")) {
        stringTokenizer = tokenCeylonString(e), _ = true;
        break;
      }
      g = p.next(), h = e == "single" && !h && g == "\\";
    }
    return _ && (m.tokenize = null), "string";
  };
}
clike({
  name: "ceylon",
  keywords: words("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),
  types: function(e) {
    var p = e.charAt(0);
    return p === p.toUpperCase() && p !== p.toLowerCase();
  },
  blockKeywords: words("case catch class dynamic else finally for function if interface module new object switch try while"),
  defKeywords: words("class dynamic function interface module object package value"),
  builtin: words("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),
  isPunctuationChar: /[\[\]{}\(\),;\:\.`]/,
  isOperatorChar: /[+\-*&%=<>!?|^~:\/]/,
  numberStart: /[\d#$]/,
  number: /^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,
  multiLineStrings: true,
  typeFirstDefinitions: true,
  atoms: words("true false null larger smaller equal empty finished"),
  indentSwitch: false,
  styleDefs: false,
  hooks: {
    "@": function(e) {
      return e.eatWhile(/[\w\$_]/), "meta";
    },
    '"': function(e, p) {
      return p.tokenize = tokenCeylonString(e.match('""') ? "triple" : "single"), p.tokenize(e, p);
    },
    "`": function(e, p) {
      return !stringTokenizer || !e.match("`") ? false : (p.tokenize = stringTokenizer, stringTokenizer = null, p.tokenize(e, p));
    },
    "'": function(e) {
      return e.match(/^(\\[^'\s]+|[^\\'])'/) ? "string.special" : (e.eatWhile(/[\w\$_\xa1-\uffff]/), "atom");
    },
    token: function(e, p, m) {
      if ((m == "variable" || m == "type") && p.prevToken == ".") return "variableName.special";
    }
  },
  languageData: { closeBrackets: { brackets: [
    "(",
    "[",
    "{",
    "'",
    '"',
    '"""'
  ] } }
});
function pushInterpolationStack(e) {
  (e.interpolationStack || (e.interpolationStack = [])).push(e.tokenize);
}
function popInterpolationStack(e) {
  return (e.interpolationStack || (e.interpolationStack = [])).pop();
}
function sizeInterpolationStack(e) {
  return e.interpolationStack ? e.interpolationStack.length : 0;
}
function tokenDartString(e, p, m, h) {
  var g = false;
  if (p.eat(e)) if (p.eat(e)) g = true;
  else return "string";
  function _(p2, m2) {
    for (var _2 = false; !p2.eol(); ) {
      if (!h && !_2 && p2.peek() == "$") return pushInterpolationStack(m2), m2.tokenize = tokenInterpolation, "string";
      var v = p2.next();
      if (v == e && !_2 && (!g || p2.match(e + e))) {
        m2.tokenize = null;
        break;
      }
      _2 = !h && !_2 && v == "\\";
    }
    return "string";
  }
  return m.tokenize = _, _(p, m);
}
function tokenInterpolation(e, p) {
  return e.eat("$"), e.eat("{") ? p.tokenize = null : p.tokenize = tokenInterpolationIdentifier, null;
}
function tokenInterpolationIdentifier(e, p) {
  return e.eatWhile(/[\w_]/), p.tokenize = popInterpolationStack(p), "variable";
}
const dart = clike({
  name: "dart",
  keywords: words("this super static final const abstract class extends external factory implements mixin get native set typedef with enum throw rethrow assert break case continue default in return new deferred async await covariant try catch finally do else for if switch while import library export part of show hide is as extension on yield late required sealed base interface when inline"),
  blockKeywords: words("try catch finally do else for if switch while"),
  builtin: words("void bool num int double dynamic var String Null Never"),
  atoms: words("true false null"),
  number: /^(?:0x[a-f\d_]+|(?:[\d_]+\.?[\d_]*|\.[\d_]+)(?:e[-+]?[\d_]+)?)/i,
  hooks: {
    "@": function(e) {
      return e.eatWhile(/[\w\$_\.]/), "meta";
    },
    "'": function(e, p) {
      return tokenDartString("'", e, p, false);
    },
    '"': function(e, p) {
      return tokenDartString('"', e, p, false);
    },
    r: function(e, p) {
      var m = e.peek();
      return m == "'" || m == '"' ? tokenDartString(e.next(), e, p, true) : false;
    },
    "}": function(e, p) {
      return sizeInterpolationStack(p) > 0 ? (p.tokenize = popInterpolationStack(p), null) : false;
    },
    "/": function(e, p) {
      return e.eat("*") ? (p.tokenize = tokenNestedComment(1), p.tokenize(e, p)) : false;
    },
    token: function(e, p, m) {
      if (m == "variable" && RegExp("^[_$]*[A-Z][a-zA-Z0-9_$]*$", "g").test(e.current())) return "type";
    }
  }
});
export {
  objectiveC as a,
  squirrel as c,
  kotlin as i,
  csharp as n,
  objectiveCpp as o,
  dart as r,
  scala as s,
  clike as t
};
