Liferay.Loader.define("journal-web$codemirror@5.65.2/mode/stex/stex",["module","exports","require","../../lib/codemirror"],(function(t,e,n){var a,r=void 0;window;a=function(t){"use strict";t.defineMode("stex",(function(t,e){function pushCommand(t,e){t.cmdState.push(e)}function peekCommand(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function addPluginPattern(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var n={};function setState(t,e){t.f=e}function normal(t,e){var a;if(t.match(/^\\[a-zA-Z@]+/)){var r=t.current().slice(1);return pushCommand(e,a=new(a=n.hasOwnProperty(r)?n[r]:n.DEFAULT)),setState(e,beginParams),a.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return setState(e,(function(t,e){return inMathMode(t,e,"\\]")})),"keyword";if(t.match("\\("))return setState(e,(function(t,e){return inMathMode(t,e,"\\)")})),"keyword";if(t.match("$$"))return setState(e,(function(t,e){return inMathMode(t,e,"$$")})),"keyword";if(t.match("$"))return setState(e,(function(t,e){return inMathMode(t,e,"$")})),"keyword";var i=t.next();return"%"==i?(t.skipToEnd(),"comment"):"}"==i||"]"==i?(a=peekCommand(e))?(a.closeBracket(i),setState(e,beginParams),"bracket"):"error":"{"==i||"["==i?(pushCommand(e,a=new(a=n.DEFAULT)),"bracket"):/\d/.test(i)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(a=function getMostPowerful(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var a=e[n];if("DEFAULT"!=a.name)return a}return{styleIdentifier:function(){return null}}}(e)).name&&(a.argument=t.current()),a.styleIdentifier())}function inMathMode(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return setState(e,normal),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var a=t.next();return"{"==a||"}"==a||"["==a||"]"==a||"("==a||")"==a?"bracket":"%"==a?(t.skipToEnd(),"comment"):"error"}function beginParams(t,e){var n=t.peek();return"{"==n||"["==n?(peekCommand(e).openBracket(n),t.eat(n),setState(e,normal),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(setState(e,normal),function popCommand(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),normal(t,e))}return n.importmodule=addPluginPattern("importmodule","tag",["string","builtin"]),n.documentclass=addPluginPattern("documentclass","tag",["","atom"]),n.usepackage=addPluginPattern("usepackage","tag",["atom"]),n.begin=addPluginPattern("begin","tag",["atom"]),n.end=addPluginPattern("end","tag",["atom"]),n.label=addPluginPattern("label","tag",["atom"]),n.ref=addPluginPattern("ref","tag",["atom"]),n.eqref=addPluginPattern("eqref","tag",["atom"]),n.cite=addPluginPattern("cite","tag",["atom"]),n.bibitem=addPluginPattern("bibitem","tag",["atom"]),n.Bibitem=addPluginPattern("Bibitem","tag",["atom"]),n.RBibitem=addPluginPattern("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return inMathMode(t,e)}:normal}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=normal,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")},"object"==typeof e&&"object"==typeof t?a(n("../../lib/codemirror")):"function"==typeof r&&r.amd?r(["../../lib/codemirror"],a):a(CodeMirror)}));
//# sourceMappingURL=stex.js.map