1 |
- {"version":3,"file":"mode-space-ebb0b97b.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-space.js"],"sourcesContent":["ace.define(\"ace/mode/folding/coffee\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/fold_mode\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../../lib/oop\");\nvar BaseFoldMode = require(\"./fold_mode\").FoldMode;\nvar Range = require(\"../../range\").Range;\nvar FoldMode = exports.FoldMode = function () { };\noop.inherits(FoldMode, BaseFoldMode);\n(function () {\n this.getFoldWidgetRange = function (session, foldStyle, row) {\n var range = this.indentationBlock(session, row);\n if (range)\n return range;\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1 || line[startLevel] != \"#\")\n return;\n var startColumn = line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n while (++row < maxRow) {\n line = session.getLine(row);\n var level = line.search(re);\n if (level == -1)\n continue;\n if (line[level] != \"#\")\n break;\n endRow = row;\n }\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n this.getFoldWidget = function (session, foldStyle, row) {\n var line = session.getLine(row);\n var indent = line.search(/\\S/);\n var next = session.getLine(row + 1);\n var prev = session.getLine(row - 1);\n var prevIndent = prev.search(/\\S/);\n var nextIndent = next.search(/\\S/);\n if (indent == -1) {\n session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? \"start\" : \"\";\n return \"\";\n }\n if (prevIndent == -1) {\n if (indent == nextIndent && line[indent] == \"#\" && next[indent] == \"#\") {\n session.foldWidgets[row - 1] = \"\";\n session.foldWidgets[row + 1] = \"\";\n return \"start\";\n }\n }\n else if (prevIndent == indent && line[indent] == \"#\" && prev[indent] == \"#\") {\n if (session.getLine(row - 2).search(/\\S/) == -1) {\n session.foldWidgets[row - 1] = \"start\";\n session.foldWidgets[row + 1] = \"\";\n return \"\";\n }\n }\n if (prevIndent != -1 && prevIndent < indent)\n session.foldWidgets[row - 1] = \"start\";\n else\n session.foldWidgets[row - 1] = \"\";\n if (indent < nextIndent)\n return \"start\";\n else\n return \"\";\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/space_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar SpaceHighlightRules = function () {\n this.$rules = {\n \"start\": [\n {\n token: \"empty_line\",\n regex: / */,\n next: \"key\"\n },\n {\n token: \"empty_line\",\n regex: /$/,\n next: \"key\"\n }\n ],\n \"key\": [\n {\n token: \"variable\",\n regex: /\\S+/\n },\n {\n token: \"empty_line\",\n regex: /$/,\n next: \"start\"\n }, {\n token: \"keyword.operator\",\n regex: / /,\n next: \"value\"\n }\n ],\n \"value\": [\n {\n token: \"keyword.operator\",\n regex: /$/,\n next: \"start\"\n },\n {\n token: \"string\",\n regex: /[^$]/\n }\n ]\n };\n};\noop.inherits(SpaceHighlightRules, TextHighlightRules);\nexports.SpaceHighlightRules = SpaceHighlightRules;\n\n});\n\nace.define(\"ace/mode/space\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/folding/coffee\",\"ace/mode/space_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar FoldMode = require(\"./folding/coffee\").FoldMode;\nvar SpaceHighlightRules = require(\"./space_highlight_rules\").SpaceHighlightRules;\nvar Mode = function () {\n this.HighlightRules = SpaceHighlightRules;\n this.foldingRules = new FoldMode();\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.$id = \"ace/mode/space\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/space\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","oop","BaseFoldMode","Range","FoldMode","session","foldStyle","row","range","re","line","startLevel","startColumn","maxRow","startRow","endRow","level","endColumn","indent","next","prev","prevIndent","nextIndent","TextHighlightRules","SpaceHighlightRules","TextMode","Mode","m"],"mappings":"gaAAA,IAAI,OAAO,0BAA0B,CAAC,UAAU,UAAU,SAAS,cAAc,6BAA6B,WAAW,EAAG,SAASA,EAASC,EAASC,EAAO,CAC9J,IAAIC,EAAMH,EAAQ,eAAe,EAC7BI,EAAeJ,EAAQ,aAAa,EAAE,SACtCK,EAAQL,EAAQ,aAAa,EAAE,MAC/BM,EAAWL,EAAQ,SAAW,UAAY,CAAA,EAC9CE,EAAI,SAASG,EAAUF,CAAY,EAClC,UAAY,CACT,KAAK,mBAAqB,SAAUG,EAASC,EAAWC,EAAK,CACzD,IAAIC,EAAQ,KAAK,iBAAiBH,EAASE,CAAG,EAC9C,GAAIC,EACA,OAAOA,EACX,IAAIC,EAAK,KACLC,EAAOL,EAAQ,QAAQE,CAAG,EAC1BI,EAAaD,EAAK,OAAOD,CAAE,EAC/B,GAAI,EAAAE,GAAc,IAAMD,EAAKC,CAAU,GAAK,KAM5C,SAJIC,EAAcF,EAAK,OACnBG,EAASR,EAAQ,YACjBS,EAAWP,EACXQ,EAASR,EACN,EAAEA,EAAMM,GAAQ,CACnBH,EAAOL,EAAQ,QAAQE,CAAG,EAC1B,IAAIS,EAAQN,EAAK,OAAOD,CAAE,EAC1B,GAAIO,GAAS,GAEb,IAAIN,EAAKM,CAAK,GAAK,IACf,MACJD,EAASR,GAEb,GAAIQ,EAASD,EAAU,CACnB,IAAIG,EAAYZ,EAAQ,QAAQU,CAAM,EAAE,OACxC,OAAO,IAAIZ,EAAMW,EAAUF,EAAaG,EAAQE,CAAS,GAErE,EACI,KAAK,cAAgB,SAAUZ,EAASC,EAAWC,EAAK,CACpD,IAAIG,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