1 |
- {"version":3,"file":"mode-tex-4ff812fd.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-tex.js"],"sourcesContent":["ace.define(\"ace/mode/tex_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){/*\n * tex_highlight_rules.js\n *\n * Copyright (C) 2009-11 by RStudio, Inc.\n *\n * The Initial Developer of the Original Code is\n * Ajax.org B.V.\n * Portions created by the Initial Developer are Copyright (C) 2010\n * the Initial Developer. All Rights Reserved.\n *\n * Distributed under the BSD license:\n *\n * Copyright (c) 2010, Ajax.org B.V.\n * All 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 met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of Ajax.org B.V. nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n *\n */\n\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar lang = require(\"../lib/lang\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar TexHighlightRules = function (textClass) {\n if (!textClass)\n textClass = \"text\";\n this.$rules = {\n \"start\": [\n {\n token: \"comment\",\n regex: \"%.*$\"\n }, {\n token: textClass,\n regex: \"\\\\\\\\[$&%#\\\\{\\\\}]\"\n }, {\n token: \"keyword\",\n regex: \"\\\\\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\\\b\",\n next: \"nospell\"\n }, {\n token: \"keyword\",\n regex: \"\\\\\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"[[({]\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"[\\\\])}]\"\n }, {\n token: textClass,\n regex: \"\\\\s+\"\n }\n ],\n \"nospell\": [\n {\n token: \"comment\",\n regex: \"%.*$\",\n next: \"start\"\n }, {\n token: \"nospell.\" + textClass,\n regex: \"\\\\\\\\[$&%#\\\\{\\\\}]\"\n }, {\n token: \"keyword\",\n regex: \"\\\\\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\\\b\"\n }, {\n token: \"keyword\",\n regex: \"\\\\\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])\",\n next: \"start\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"[[({]\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"[\\\\])]\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"}\",\n next: \"start\"\n }, {\n token: \"nospell.\" + textClass,\n regex: \"\\\\s+\"\n }, {\n token: \"nospell.\" + textClass,\n regex: \"\\\\w+\"\n }\n ]\n };\n};\noop.inherits(TexHighlightRules, TextHighlightRules);\nexports.TexHighlightRules = TexHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar MatchingBraceOutdent = function () { };\n(function () {\n this.checkOutdent = function (line, input) {\n if (!/^\\s+$/.test(line))\n return false;\n return /^\\s*\\}/.test(input);\n };\n this.autoOutdent = function (doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n if (!match)\n return 0;\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({ row: row, column: column });\n if (!openBracePos || openBracePos.row == row)\n return 0;\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column - 1), indent);\n };\n this.$getIndent = function (line) {\n return line.match(/^\\s*/)[0];\n };\n}).call(MatchingBraceOutdent.prototype);\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n\n});\n\nace.define(\"ace/mode/tex\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/text_highlight_rules\",\"ace/mode/tex_highlight_rules\",\"ace/mode/matching_brace_outdent\"], function(require, exports, module){/*\n * tex.js\n *\n * Copyright (C) 2009-11 by RStudio, Inc.\n *\n * The Initial Developer of the Original Code is\n * Ajax.org B.V.\n * Portions created by the Initial Developer are Copyright (C) 2010\n * the Initial Developer. All Rights Reserved.\n *\n * Distributed under the BSD license:\n *\n * Copyright (c) 2010, Ajax.org B.V.\n * All 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 met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of Ajax.org B.V. nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n *\n */\n\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar TexHighlightRules = require(\"./tex_highlight_rules\").TexHighlightRules;\nvar MatchingBraceOutdent = require(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar Mode = function (suppressHighlighting) {\n if (suppressHighlighting)\n this.HighlightRules = TextHighlightRules;\n else\n this.HighlightRules = TexHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \"%\";\n this.getNextLineIndent = function (state, line, tab) {\n return this.$getIndent(line);\n };\n this.allowAutoInsert = function () {\n return false;\n };\n this.$id = \"ace/mode/tex\";\n this.snippetFileId = \"ace/snippets/tex\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/tex\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","oop","TextHighlightRules","TexHighlightRules","textClass","Range","MatchingBraceOutdent","line","input","doc","row","match","column","openBracePos","indent","TextMode","Mode","suppressHighlighting","state","tab","m"],"mappings":"gaAAA,IAAI,OAAO,+BAA+B,CAAC,UAAU,UAAU,SAAS,cAAc,eAAe,+BAA+B,EAAG,SAASA,EAASC,EAASC,EAAO,CAsCzK,IAAIC,EAAMH,EAAQ,YAAY,EACnBA,EAAQ,aAAa,EAChC,IAAII,EAAqBJ,EAAQ,wBAAwB,EAAE,mBACvDK,EAAoB,SAAUC,EAAW,CACpCA,IACDA,EAAY,QAChB,KAAK,OAAS,CACV,MAAS,CACL,CACI,MAAO,UACP,MAAO,MACvB,EAAe,CACC,MAAOA,EACP,MAAO,kBACvB,EAAe,CACC,MAAO,UACP,MAAO,mMACP,KAAM,SACtB,EAAe,CACC,MAAO,UACP,MAAO,mCACvB,EAAe,CACC,MAAO,yBACP,MAAO,OACvB,EAAe,CACC,MAAO,yBACP,MAAO,SACvB,EAAe,CACC,MAAOA,EACP,MAAO,MACV,CACJ,EACD,QAAW,CACP,CACI,MAAO,UACP,MAAO,OACP,KAAM,OACtB,EAAe,CACC,MAAO,WAAaA,EACpB,MAAO,kBACvB,EAAe,CACC,MAAO,UACP,MAAO,kMACvB,EAAe,CACC,MAAO,UACP,MAAO,oCACP,KAAM,OACtB,EAAe,CACC,MAAO,yBACP,MAAO,OACvB,EAAe,CACC,MAAO,yBACP,MAAO,QACvB,EAAe,CACC,MAAO,yBACP,MAAO,IACP,KAAM,OACtB,EAAe,CACC,MAAO,WAAaA,EACpB,MAAO,MACvB,EAAe,CACC,MAAO,WAAaA,EACpB,MAAO,MACV,CACJ,CACT,CACA,EACAH,EAAI,SAASE,EAAmBD,CAAkB,EAClDH,EAAQ,kBAAoBI,CAE5B,CAAC,EAED,IAAI,OAAO,kCAAkC,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