lex-xin hai 3 meses
pai
achega
f554635ae1
Modificáronse 100 ficheiros con 12164 adicións e 5238 borrados
  1. 16 15
      web/00155bd406dacc6f2d79b8de025719ac.js
  2. 18 19
      web/014f8e91bc4baf39175490216b0e3ae3.js
  3. 0 0
      web/01fd21b5525a03456f881515f1002134.js
  4. 0 0
      web/0242eebc51caa2b134602e86ed3be3cf.js
  5. 0 0
      web/028a3e5cd150f029676e21c0ba88f7e6.js
  6. 9 0
      web/039a0e6e22fee41c6f074e9745f20ff4.js
  7. 1342 0
      web/04295d4e4ab66991946700a8b6739bb2.js
  8. 1189 0
      web/042cd00db83d4da27c562621b4224fe6.js
  9. 9 4
      web/057c0c1a0dff072cbb9819e95cb739cf.js
  10. 0 0
      web/07312a5fd7bf0e4c902ae8a92d42a69a.js
  11. 549 78
      web/0758c6818ea6937527f8c3b851f26633.js
  12. 5 6
      web/086d94781c70156042f95d5fa61d995a.js
  13. 9 0
      web/08ead5ce2617fb6ce642b5ba343bd62c.js
  14. 4 5
      web/0ab8bd2c1e69b03bc24b70523a70e30a.js
  15. 45 0
      web/0b3587e0f3fd518d1ec22d14ba147660.js
  16. 7 7
      web/0cdc14741de08dc4af237c4e1124d661.js
  17. 3 3
      web/0ebb7559af3a19776ac2272fbbc77a11.js
  18. 0 0
      web/0ee3d8835fa32648b51c9a73bff3324e.js
  19. 0 0
      web/0faaa4d3cf56de624fb5dd12e7fa18c9.js
  20. 0 0
      web/11115bde71f6d8245d7cb05b89dbfbc1.js
  21. 4 4
      web/1136d59010460a6c7277688011fc86dc.js
  22. 640 169
      web/12aa8dcb12f8afbf93155fc5a1641b56.js
  23. 0 1963
      web/1694f12f2e48f4b28754c37fd132c501.js
  24. 184 172
      web/182aa449781ff6997bc12b8eb3611ccb.js
  25. 9 0
      web/182fa653555b8340835b3bf4f7192ae2.js
  26. 9 4
      web/188744ad64e26326b70337714cc840c8.js
  27. 87 42
      web/19f066c0bebc1c63ec7fc7cc1a63b1df.js
  28. 0 718
      web/1a9579dd339af1d6b57fcc888bb83393.js
  29. 2 2
      web/1ac4b99c62f756d61d25417728b2e5f8.js
  30. 14 15
      web/1b6f35b7d53ed37d0823a2081ab95fac.js
  31. 12 12
      web/1b8199f34db41b72375a9947d4ef84a4.js
  32. 0 0
      web/1cbff31b1abe2c3f9eb1113b4cfa5cb6.js
  33. 9 4
      web/1d051fbb1bd28c0b89641f417930f078.js
  34. 9 0
      web/1dda5460bcee9fb6faa67d22b6448454.js
  35. 9 0
      web/1e46a85215aeb52a8ed19cf62d1b3362.js
  36. 185 0
      web/207fa26d9d4b4c2d5af507fa6db04339.js
  37. 318 0
      web/20b085f014791c3916e38d818e76ef3c.js
  38. 7 7
      web/21888fda037b96f7d9c9261cbef5bbbc.js
  39. 183 196
      web/21cc809329a93d6f3d6a756d6dc1294c.js
  40. 446 0
      web/22e2ec10d48dca8a66c53f9a41271023.js
  41. 268 0
      web/238b48c537406ead43a4005567d5a013.js
  42. 0 0
      web/23da774e43bdbc0fee7d11009ee014b2.js
  43. 0 0
      web/251c1b0aa30bc78444e22999d6a2e6f1.js
  44. 9 0
      web/269bb81eeebec9d70536fede3f17dac5.js
  45. 0 0
      web/272c72bab8da763aef48ecb7934c9586.js
  46. 9 0
      web/278e460685ee8251b752215f592c0d7d.js
  47. 0 0
      web/279a2126957722bd396f011c41d616f2.js
  48. 13 14
      web/2818bca0cd2a7e31aa1a7d0698a1312b.js
  49. 30 0
      web/2863331c75e78da46cd0d6c9a0399846.js
  50. 179 170
      web/2984fab606909e16083d98c4581fd484.js
  51. 0 0
      web/2bf178d3af8ceb86a2c5588fa5b0434a.js
  52. 0 0
      web/2c48ebc44a87762b127d573fd4ed4d49.js
  53. 9 0
      web/2c6ae8805adc9206e70eb29818e71a4f.js
  54. 0 1
      web/2d0362619c6807297b4b207bad2940cd.js
  55. 18 18
      web/2df83568e34903d7d3e0051e3a95c459.js
  56. 0 46
      web/2f3af4250fd57142b0ffb0ed6bc553dc.js
  57. 25 18
      web/2fd1880f79d0f2ffb10daaf928266181.js
  58. 0 0
      web/30e3bb6a531e1c812558474a78d50e51.js
  59. 2 2
      web/30fe7e6ab4db8a6e472422e6037abcf6.js
  60. 5 5
      web/313a120714418a06223767f908e52a06.js
  61. 1 6
      web/32cea5ceeb0f16ead13364fac0c3214d.js
  62. 9 0
      web/33443ec129774bb1add5795cc8895137.js
  63. 3 3
      web/33b2bdaf684e9e4ad47970682aa5b00d.js
  64. 9 0
      web/33df99ab21a0e281c0626e261c1638bc.js
  65. 644 173
      web/34d0c1d6498eaae9c9c239d06f1e92d2.js
  66. 2 3
      web/35b519c2ce83bbe55e6ba35bd379db4e.js
  67. 0 0
      web/3687db9c0d3858c4315ffb5152198053.js
  68. 9 0
      web/3734f5f0d471b4551566c56c7149b602.js
  69. 551 81
      web/3772f2213ed93309a276da19e67b91e7.js
  70. 0 0
      web/3bbeadbf33a4c2c131ec271b9b103a59.js
  71. 179 170
      web/3c126add795585b0bcdab07451b9c398.js
  72. 15 11
      web/3c2688e4b9137acb04affdd5e0c154fa.js
  73. 222 66
      web/3ddb5ebdc00b5a39bd4aedae80e1e1fb.js
  74. 0 0
      web/3f043d654fe1e1895f0f2d65861e21aa.js
  75. 0 0
      web/41c9592c46bdb2ee5d35a45a28cdd46c.js
  76. 597 84
      web/4230d94dffffc413dbdb14542445c8f8.js
  77. 1 1
      web/443b217c1337c10d168828ffd8f93528.js
  78. 0 0
      web/48ef2bea2256bfb13400738d7be7025f.js
  79. 4 5
      web/49456231db02d9338914cee404f1b864.js
  80. 186 177
      web/49852db8b337fb8e781a58d82c81ead5.js
  81. 5 6
      web/4a02cfb7dd2f107d184dc23fce76eebb.js
  82. 0 0
      web/4ab40446885d7f476b5c21fd390b0e23.js
  83. 22 23
      web/4e79f5ab805c7bfe58091ad27689b35e.js
  84. 0 0
      web/4ee8da21e528c64675b310845a654de5.js
  85. 0 0
      web/50990da99a99a307711c6890db7397bd.js
  86. 644 173
      web/510e01f6ce0a27c064e2743e089ce335.js
  87. 124 0
      web/516ff4bf4f4debec0f60c3e3f3b13c24.js
  88. 0 0
      web/530deeb11db43fceba9bdf6054d0205e.js
  89. 0 0
      web/540ec89580e27e662f5b0b323d70fd95.js
  90. 0 0
      web/557dc611a621064762e5796567cbec28.js
  91. 1 1
      web/5589658498306bc6e9b1eaead4b2c222.js
  92. 0 0
      web/559d9b20c1df6eff138b007e57c157fa.js
  93. 550 285
      web/569c6845776ba1e46e8eb4b2ebe1b5e7.js
  94. 45 42
      web/573b79a51fa9a0e40000dd478d13f4d7.js
  95. 1 1
      web/59120b5217fb17fd60c30c7f393921f6.js
  96. 307 110
      web/59543cab15a42dfc13060f00cf904cb2.js
  97. 19 19
      web/59621f6df1f47f3cdbe959a670025c7b.js
  98. 1 1
      web/5b672566d0c18327a0da6515bd9035ab.js
  99. 1565 0
      web/5eaacd0f95f05f5feafe33dfc8bea5b5.js
  100. 549 78
      web/5ef2bfe2de79bf388f3ea6d19029d51e.js

+ 16 - 15
web/ae72f92a2ea2219a6a8c58e8ae557385.js → web/00155bd406dacc6f2d79b8de025719ac.js

@@ -1,20 +1,20 @@
 ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module){"use strict";
 var dom = require("../lib/dom");
 var lang = require("../lib/lang");
-var StatusBar = function (editor, parentNode) {
-    this.element = dom.createElement("div");
-    this.element.className = "ace_status-indicator";
-    this.element.style.cssText = "display: inline-block;";
-    parentNode.appendChild(this.element);
-    var statusUpdate = lang.delayedCall(function () {
-        this.updateStatus(editor);
-    }.bind(this)).schedule.bind(null, 100);
-    editor.on("changeStatus", statusUpdate);
-    editor.on("changeSelection", statusUpdate);
-    editor.on("keyboardActivity", statusUpdate);
-};
-(function () {
-    this.updateStatus = function (editor) {
+var StatusBar = /** @class */ (function () {
+    function StatusBar(editor, parentNode) {
+        this.element = dom.createElement("div");
+        this.element.className = "ace_status-indicator";
+        this.element.style.cssText = "display: inline-block;";
+        parentNode.appendChild(this.element);
+        var statusUpdate = lang.delayedCall(function () {
+            this.updateStatus(editor);
+        }.bind(this)).schedule.bind(null, 100);
+        editor.on("changeStatus", statusUpdate);
+        editor.on("changeSelection", statusUpdate);
+        editor.on("keyboardActivity", statusUpdate);
+    }
+    StatusBar.prototype.updateStatus = function (editor) {
         var status = [];
         function add(str, separator) {
             str && status.push(str, separator || "|");
@@ -34,7 +34,8 @@ var StatusBar = function (editor, parentNode) {
         status.pop();
         this.element.textContent = status.join("");
     };
-}).call(StatusBar.prototype);
+    return StatusBar;
+}());
 exports.StatusBar = StatusBar;
 
 });                (function() {

+ 18 - 19
web/cde6284f9404fcf0323362f4c28285bd.js → web/014f8e91bc4baf39175490216b0e3ae3.js

@@ -3,15 +3,15 @@ var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var DocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
-                token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
-            },
-            DocCommentHighlightRules.getTagRule(),
+        "start": [
             {
-                defaultToken: "comment.doc",
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
-            }]
+            }
+        ]
     };
 };
 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
@@ -23,14 +23,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
 };
 DocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
 DocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
@@ -66,24 +66,24 @@ var GolangHighlightRules = function () {
             },
             DocCommentHighlightRules.getStartRule("doc-start"),
             {
-                token: "comment.start",
+                token: "comment.start", // multi line comment
                 regex: "\\/\\*",
                 next: "comment"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: /"(?:[^"\\]|\\.)*?"/
             }, {
-                token: "string",
+                token: "string", // raw
                 regex: '`',
                 next: "bqstring"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // rune
                 regex: "'(?:[^\\'\uD800-\uDBFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|" + stringEscapeRe.replace('"', '') + ")'"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hex
                 regex: "0[xX][0-9a-fA-F]+\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
             }, {
                 token: ["keyword", "text", "entity.name.function"],
@@ -290,17 +290,16 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){var oop = require("../lib/oop");
+ace.define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules;
 var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
 var CStyleFoldMode = require("./folding/cstyle").FoldMode;
 var Mode = function () {
     this.HighlightRules = GolangHighlightRules;
     this.$outdent = new MatchingBraceOutdent();
     this.foldingRules = new CStyleFoldMode();
-    this.$behaviour = new CstyleBehaviour();
+    this.$behaviour = this.$defaultBehaviour;
 };
 oop.inherits(Mode, TextMode);
 (function () {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/01fd21b5525a03456f881515f1002134.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/0242eebc51caa2b134602e86ed3be3cf.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/028a3e5cd150f029676e21c0ba88f7e6.js


+ 9 - 0
web/039a0e6e22fee41c6f074e9745f20ff4.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/assembly_arm32"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1342 - 0
web/04295d4e4ab66991946700a8b6739bb2.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1189 - 0
web/042cd00db83d4da27c562621b4224fe6.js


+ 9 - 4
web/321d98b6707ed20d34818a7533713433.js → web/057c0c1a0dff072cbb9819e95cb739cf.js

@@ -70,10 +70,7 @@ var Range = require("../../range").Range;
 var FoldMode = exports.FoldMode = function () { };
 oop.inherits(FoldMode, BaseFoldMode);
 (function () {
-    this.getFoldWidgetRange = function (session, foldStyle, row) {
-        var range = this.indentationBlock(session, row);
-        if (range)
-            return range;
+    this.commentBlock = function (session, row) {
         var re = /\S/;
         var line = session.getLine(row);
         var startLevel = line.search(re);
@@ -97,6 +94,14 @@ oop.inherits(FoldMode, BaseFoldMode);
             return new Range(startRow, startColumn, endRow, endColumn);
         }
     };
+    this.getFoldWidgetRange = function (session, foldStyle, row) {
+        var range = this.indentationBlock(session, row);
+        if (range)
+            return range;
+        range = this.commentBlock(session, row);
+        if (range)
+            return range;
+    };
     this.getFoldWidget = function (session, foldStyle, row) {
         var line = session.getLine(row);
         var indent = line.search(/\S/);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/07312a5fd7bf0e4c902ae8a92d42a69a.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 549 - 78
web/0758c6818ea6937527f8c3b851f26633.js


+ 5 - 6
web/2218ddba12711e7e7f6aea96015bafa2.js → web/086d94781c70156042f95d5fa61d995a.js

@@ -145,13 +145,13 @@ var ShHighlightRules = function () {
                 token: "support.function",
                 regex: fileDescriptor
             }, {
-                token: "string",
+                token: "string", // ' string
                 start: "'", end: "'"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: floatNumber
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // integer
                 regex: integer + "\\b"
             }, {
                 token: keywordMapper,
@@ -316,17 +316,16 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module){"use strict";
+ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
 var Range = require("../range").Range;
 var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
 var Mode = function () {
     this.HighlightRules = ShHighlightRules;
     this.foldingRules = new CStyleFoldMode();
-    this.$behaviour = new CstyleBehaviour();
+    this.$behaviour = this.$defaultBehaviour;
 };
 oop.inherits(Mode, TextMode);
 (function () {

+ 9 - 0
web/08ead5ce2617fb6ce642b5ba343bd62c.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/bibtex"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

+ 4 - 5
web/73869ae87d1a0bf48fdcf5f45e86b070.js → web/0ab8bd2c1e69b03bc24b70523a70e30a.js

@@ -13,10 +13,10 @@ var JackHighlightRules = function () {
                 regex: "'",
                 next: "string1"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hex
                 regex: "-?0[xX][0-9a-fA-F]+\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: "(?:0|[-+]?[1-9][0-9]*)\\b"
             }, {
                 token: "constant.binary",
@@ -248,17 +248,16 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/jack",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jack_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+ace.define("ace/mode/jack",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jack_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var HighlightRules = require("./jack_highlight_rules").JackHighlightRules;
 var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
 var CStyleFoldMode = require("./folding/cstyle").FoldMode;
 var Mode = function () {
     this.HighlightRules = HighlightRules;
     this.$outdent = new MatchingBraceOutdent();
-    this.$behaviour = new CstyleBehaviour();
+    this.$behaviour = this.$defaultBehaviour;
     this.foldingRules = new CStyleFoldMode();
 };
 oop.inherits(Mode, TextMode);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 45 - 0
web/0b3587e0f3fd518d1ec22d14ba147660.js


+ 7 - 7
web/3cbddc141c4d2eb71e54fe3037547812.js → web/0cdc14741de08dc4af237c4e1124d661.js

@@ -499,15 +499,15 @@ var MushCodeRules = function () {
     this.$rules = {
         "start": [
             {
-                token: "variable",
+                token: "variable", // mush substitution register
                 regex: "%[0-9]{1}"
             },
             {
-                token: "variable",
+                token: "variable", // mush substitution register
                 regex: "%q[0-9A-Za-z]{1}"
             },
             {
-                token: "variable",
+                token: "variable", // mush special character register
                 regex: "%[a-zA-Z]{1}"
             },
             {
@@ -515,16 +515,16 @@ var MushCodeRules = function () {
                 regex: "%[a-z0-9-_]+"
             },
             {
-                token: "constant.numeric",
+                token: "constant.numeric", // imaginary
                 regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: floatNumber
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // long integer
                 regex: integer + "[lL]\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // integer
                 regex: integer + "\\b"
             }, {
                 token: keywordMapper,

+ 3 - 3
web/95722ce261fad0a28f370f9042ac8acd.js → web/0ebb7559af3a19776ac2272fbbc77a11.js

@@ -26,13 +26,13 @@ var CobolHighlightRules = function () {
                 token: "comment",
                 regex: "\\*.*$"
             }, {
-                token: "string",
+                token: "string", // " string
                 regex: '".*?"'
             }, {
-                token: "string",
+                token: "string", // ' string
                 regex: "'.*?'"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
             }, {
                 token: keywordMapper,

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/0ee3d8835fa32648b51c9a73bff3324e.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/0faaa4d3cf56de624fb5dd12e7fa18c9.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/11115bde71f6d8245d7cb05b89dbfbc1.js


+ 4 - 4
web/758c22ddcb0f7f798a0977e45b44e905.js → web/1136d59010460a6c7277688011fc86dc.js

@@ -70,7 +70,7 @@ var LuceneHighlightRules = function () {
             }, {
                 token: "string.regexp.end",
                 regex: "/[sxngimy]*",
-                next: "no_regex"
+                next: "start"
             }, {
                 token: "invalid",
                 regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
@@ -90,7 +90,7 @@ var LuceneHighlightRules = function () {
             }, {
                 token: "empty",
                 regex: "$",
-                next: "no_regex"
+                next: "start"
             }, {
                 defaultToken: "string.regexp"
             }
@@ -109,9 +109,9 @@ var LuceneHighlightRules = function () {
             }, {
                 token: "empty",
                 regex: "$",
-                next: "no_regex"
+                next: "start"
             }, {
-                defaultToken: "string.regexp.charachterclass"
+                defaultToken: "string.regexp.characterclass"
             }
         ]
     };

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 640 - 169
web/12aa8dcb12f8afbf93155fc5a1641b56.js


+ 0 - 1963
web/1694f12f2e48f4b28754c37fd132c501.js

@@ -1,1963 +0,0 @@
-ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"], function(require, exports, module){"use strict";
-var dom = require("./lib/dom");
-var oop = require("./lib/oop");
-var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var lang = require("./lib/lang");
-var Range = require("./range").Range;
-var RangeList = require("./range_list").RangeList;
-var HashHandler = require("./keyboard/hash_handler").HashHandler;
-var Tokenizer = require("./tokenizer").Tokenizer;
-var clipboard = require("./clipboard");
-var VARIABLES = {
-    CURRENT_WORD: function (editor) {
-        return editor.session.getTextRange(editor.session.getWordRange());
-    },
-    SELECTION: function (editor, name, indentation) {
-        var text = editor.session.getTextRange();
-        if (indentation)
-            return text.replace(/\n\r?([ \t]*\S)/g, "\n" + indentation + "$1");
-        return text;
-    },
-    CURRENT_LINE: function (editor) {
-        return editor.session.getLine(editor.getCursorPosition().row);
-    },
-    PREV_LINE: function (editor) {
-        return editor.session.getLine(editor.getCursorPosition().row - 1);
-    },
-    LINE_INDEX: function (editor) {
-        return editor.getCursorPosition().row;
-    },
-    LINE_NUMBER: function (editor) {
-        return editor.getCursorPosition().row + 1;
-    },
-    SOFT_TABS: function (editor) {
-        return editor.session.getUseSoftTabs() ? "YES" : "NO";
-    },
-    TAB_SIZE: function (editor) {
-        return editor.session.getTabSize();
-    },
-    CLIPBOARD: function (editor) {
-        return clipboard.getText && clipboard.getText();
-    },
-    FILENAME: function (editor) {
-        return /[^/\\]*$/.exec(this.FILEPATH(editor))[0];
-    },
-    FILENAME_BASE: function (editor) {
-        return /[^/\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\.[^.]*$/, "");
-    },
-    DIRECTORY: function (editor) {
-        return this.FILEPATH(editor).replace(/[^/\\]*$/, "");
-    },
-    FILEPATH: function (editor) { return "/not implemented.txt"; },
-    WORKSPACE_NAME: function () { return "Unknown"; },
-    FULLNAME: function () { return "Unknown"; },
-    BLOCK_COMMENT_START: function (editor) {
-        var mode = editor.session.$mode || {};
-        return mode.blockComment && mode.blockComment.start || "";
-    },
-    BLOCK_COMMENT_END: function (editor) {
-        var mode = editor.session.$mode || {};
-        return mode.blockComment && mode.blockComment.end || "";
-    },
-    LINE_COMMENT: function (editor) {
-        var mode = editor.session.$mode || {};
-        return mode.lineCommentStart || "";
-    },
-    CURRENT_YEAR: date.bind(null, { year: "numeric" }),
-    CURRENT_YEAR_SHORT: date.bind(null, { year: "2-digit" }),
-    CURRENT_MONTH: date.bind(null, { month: "numeric" }),
-    CURRENT_MONTH_NAME: date.bind(null, { month: "long" }),
-    CURRENT_MONTH_NAME_SHORT: date.bind(null, { month: "short" }),
-    CURRENT_DATE: date.bind(null, { day: "2-digit" }),
-    CURRENT_DAY_NAME: date.bind(null, { weekday: "long" }),
-    CURRENT_DAY_NAME_SHORT: date.bind(null, { weekday: "short" }),
-    CURRENT_HOUR: date.bind(null, { hour: "2-digit", hour12: false }),
-    CURRENT_MINUTE: date.bind(null, { minute: "2-digit" }),
-    CURRENT_SECOND: date.bind(null, { second: "2-digit" })
-};
-VARIABLES.SELECTED_TEXT = VARIABLES.SELECTION;
-function date(dateFormat) {
-    var str = new Date().toLocaleString("en-us", dateFormat);
-    return str.length == 1 ? "0" + str : str;
-}
-var SnippetManager = function () {
-    this.snippetMap = {};
-    this.snippetNameMap = {};
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.getTokenizer = function () {
-        return SnippetManager.$tokenizer || this.createTokenizer();
-    };
-    this.createTokenizer = function () {
-        function TabstopToken(str) {
-            str = str.substr(1);
-            if (/^\d+$/.test(str))
-                return [{ tabstopId: parseInt(str, 10) }];
-            return [{ text: str }];
-        }
-        function escape(ch) {
-            return "(?:[^\\\\" + ch + "]|\\\\.)";
-        }
-        var formatMatcher = {
-            regex: "/(" + escape("/") + "+)/",
-            onMatch: function (val, state, stack) {
-                var ts = stack[0];
-                ts.fmtString = true;
-                ts.guard = val.slice(1, -1);
-                ts.flag = "";
-                return "";
-            },
-            next: "formatString"
-        };
-        SnippetManager.$tokenizer = new Tokenizer({
-            start: [
-                { regex: /\\./, onMatch: function (val, state, stack) {
-                        var ch = val[1];
-                        if (ch == "}" && stack.length) {
-                            val = ch;
-                        }
-                        else if ("`$\\".indexOf(ch) != -1) {
-                            val = ch;
-                        }
-                        return [val];
-                    } },
-                { regex: /}/, onMatch: function (val, state, stack) {
-                        return [stack.length ? stack.shift() : val];
-                    } },
-                { regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken },
-                { regex: /\$\{[\dA-Z_a-z]+/, onMatch: function (str, state, stack) {
-                        var t = TabstopToken(str.substr(1));
-                        stack.unshift(t[0]);
-                        return t;
-                    }, next: "snippetVar" },
-                { regex: /\n/, token: "newline", merge: false }
-            ],
-            snippetVar: [
-                { regex: "\\|" + escape("\\|") + "*\\|", onMatch: function (val, state, stack) {
-                        var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function (operator) {
-                            return operator.length == 2 ? operator[1] : "\x00";
-                        }).split("\x00").map(function (value) {
-                            return { value: value };
-                        });
-                        stack[0].choices = choices;
-                        return [choices[0]];
-                    }, next: "start" },
-                formatMatcher,
-                { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start" }
-            ],
-            formatString: [
-                { regex: /:/, onMatch: function (val, state, stack) {
-                        if (stack.length && stack[0].expectElse) {
-                            stack[0].expectElse = false;
-                            stack[0].ifEnd = { elseEnd: stack[0] };
-                            return [stack[0].ifEnd];
-                        }
-                        return ":";
-                    } },
-                { regex: /\\./, onMatch: function (val, state, stack) {
-                        var ch = val[1];
-                        if (ch == "}" && stack.length)
-                            val = ch;
-                        else if ("`$\\".indexOf(ch) != -1)
-                            val = ch;
-                        else if (ch == "n")
-                            val = "\n";
-                        else if (ch == "t")
-                            val = "\t";
-                        else if ("ulULE".indexOf(ch) != -1)
-                            val = { changeCase: ch, local: ch > "a" };
-                        return [val];
-                    } },
-                { regex: "/\\w*}", onMatch: function (val, state, stack) {
-                        var next = stack.shift();
-                        if (next)
-                            next.flag = val.slice(1, -1);
-                        this.next = next && next.tabstopId ? "start" : "";
-                        return [next || val];
-                    }, next: "start" },
-                { regex: /\$(?:\d+|\w+)/, onMatch: function (val, state, stack) {
-                        return [{ text: val.slice(1) }];
-                    } },
-                { regex: /\${\w+/, onMatch: function (val, state, stack) {
-                        var token = { text: val.slice(2) };
-                        stack.unshift(token);
-                        return [token];
-                    }, next: "formatStringVar" },
-                { regex: /\n/, token: "newline", merge: false },
-                { regex: /}/, onMatch: function (val, state, stack) {
-                        var next = stack.shift();
-                        this.next = next && next.tabstopId ? "start" : "";
-                        return [next || val];
-                    }, next: "start" }
-            ],
-            formatStringVar: [
-                { regex: /:\/\w+}/, onMatch: function (val, state, stack) {
-                        var ts = stack[0];
-                        ts.formatFunction = val.slice(2, -1);
-                        return [stack.shift()];
-                    }, next: "formatString" },
-                formatMatcher,
-                { regex: /:[\?\-+]?/, onMatch: function (val, state, stack) {
-                        if (val[1] == "+")
-                            stack[0].ifEnd = stack[0];
-                        if (val[1] == "?")
-                            stack[0].expectElse = true;
-                    }, next: "formatString" },
-                { regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "formatString" }
-            ]
-        });
-        return SnippetManager.$tokenizer;
-    };
-    this.tokenizeTmSnippet = function (str, startState) {
-        return this.getTokenizer().getLineTokens(str, startState).tokens.map(function (x) {
-            return x.value || x;
-        });
-    };
-    this.getVariableValue = function (editor, name, indentation) {
-        if (/^\d+$/.test(name))
-            return (this.variables.__ || {})[name] || "";
-        if (/^[A-Z]\d+$/.test(name))
-            return (this.variables[name[0] + "__"] || {})[name.substr(1)] || "";
-        name = name.replace(/^TM_/, "");
-        if (!this.variables.hasOwnProperty(name))
-            return "";
-        var value = this.variables[name];
-        if (typeof value == "function")
-            value = this.variables[name](editor, name, indentation);
-        return value == null ? "" : value;
-    };
-    this.variables = VARIABLES;
-    this.tmStrFormat = function (str, ch, editor) {
-        if (!ch.fmt)
-            return str;
-        var flag = ch.flag || "";
-        var re = ch.guard;
-        re = new RegExp(re, flag.replace(/[^gim]/g, ""));
-        var fmtTokens = typeof ch.fmt == "string" ? this.tokenizeTmSnippet(ch.fmt, "formatString") : ch.fmt;
-        var _self = this;
-        var formatted = str.replace(re, function () {
-            var oldArgs = _self.variables.__;
-            _self.variables.__ = [].slice.call(arguments);
-            var fmtParts = _self.resolveVariables(fmtTokens, editor);
-            var gChangeCase = "E";
-            for (var i = 0; i < fmtParts.length; i++) {
-                var ch = fmtParts[i];
-                if (typeof ch == "object") {
-                    fmtParts[i] = "";
-                    if (ch.changeCase && ch.local) {
-                        var next = fmtParts[i + 1];
-                        if (next && typeof next == "string") {
-                            if (ch.changeCase == "u")
-                                fmtParts[i] = next[0].toUpperCase();
-                            else
-                                fmtParts[i] = next[0].toLowerCase();
-                            fmtParts[i + 1] = next.substr(1);
-                        }
-                    }
-                    else if (ch.changeCase) {
-                        gChangeCase = ch.changeCase;
-                    }
-                }
-                else if (gChangeCase == "U") {
-                    fmtParts[i] = ch.toUpperCase();
-                }
-                else if (gChangeCase == "L") {
-                    fmtParts[i] = ch.toLowerCase();
-                }
-            }
-            _self.variables.__ = oldArgs;
-            return fmtParts.join("");
-        });
-        return formatted;
-    };
-    this.tmFormatFunction = function (str, ch, editor) {
-        if (ch.formatFunction == "upcase")
-            return str.toUpperCase();
-        if (ch.formatFunction == "downcase")
-            return str.toLowerCase();
-        return str;
-    };
-    this.resolveVariables = function (snippet, editor) {
-        var result = [];
-        var indentation = "";
-        var afterNewLine = true;
-        for (var i = 0; i < snippet.length; i++) {
-            var ch = snippet[i];
-            if (typeof ch == "string") {
-                result.push(ch);
-                if (ch == "\n") {
-                    afterNewLine = true;
-                    indentation = "";
-                }
-                else if (afterNewLine) {
-                    indentation = /^\t*/.exec(ch)[0];
-                    afterNewLine = /\S/.test(ch);
-                }
-                continue;
-            }
-            if (!ch)
-                continue;
-            afterNewLine = false;
-            if (ch.fmtString) {
-                var j = snippet.indexOf(ch, i + 1);
-                if (j == -1)
-                    j = snippet.length;
-                ch.fmt = snippet.slice(i + 1, j);
-                i = j;
-            }
-            if (ch.text) {
-                var value = this.getVariableValue(editor, ch.text, indentation) + "";
-                if (ch.fmtString)
-                    value = this.tmStrFormat(value, ch, editor);
-                if (ch.formatFunction)
-                    value = this.tmFormatFunction(value, ch, editor);
-                if (value && !ch.ifEnd) {
-                    result.push(value);
-                    gotoNext(ch);
-                }
-                else if (!value && ch.ifEnd) {
-                    gotoNext(ch.ifEnd);
-                }
-            }
-            else if (ch.elseEnd) {
-                gotoNext(ch.elseEnd);
-            }
-            else if (ch.tabstopId != null) {
-                result.push(ch);
-            }
-            else if (ch.changeCase != null) {
-                result.push(ch);
-            }
-        }
-        function gotoNext(ch) {
-            var i1 = snippet.indexOf(ch, i + 1);
-            if (i1 != -1)
-                i = i1;
-        }
-        return result;
-    };
-    this.insertSnippetForSelection = function (editor, snippetText) {
-        var cursor = editor.getCursorPosition();
-        var line = editor.session.getLine(cursor.row);
-        var tabString = editor.session.getTabString();
-        var indentString = line.match(/^\s*/)[0];
-        if (cursor.column < indentString.length)
-            indentString = indentString.slice(0, cursor.column);
-        snippetText = snippetText.replace(/\r/g, "");
-        var tokens = this.tokenizeTmSnippet(snippetText);
-        tokens = this.resolveVariables(tokens, editor);
-        tokens = tokens.map(function (x) {
-            if (x == "\n")
-                return x + indentString;
-            if (typeof x == "string")
-                return x.replace(/\t/g, tabString);
-            return x;
-        });
-        var tabstops = [];
-        tokens.forEach(function (p, i) {
-            if (typeof p != "object")
-                return;
-            var id = p.tabstopId;
-            var ts = tabstops[id];
-            if (!ts) {
-                ts = tabstops[id] = [];
-                ts.index = id;
-                ts.value = "";
-                ts.parents = {};
-            }
-            if (ts.indexOf(p) !== -1)
-                return;
-            if (p.choices && !ts.choices)
-                ts.choices = p.choices;
-            ts.push(p);
-            var i1 = tokens.indexOf(p, i + 1);
-            if (i1 === -1)
-                return;
-            var value = tokens.slice(i + 1, i1);
-            var isNested = value.some(function (t) { return typeof t === "object"; });
-            if (isNested && !ts.value) {
-                ts.value = value;
-            }
-            else if (value.length && (!ts.value || typeof ts.value !== "string")) {
-                ts.value = value.join("");
-            }
-        });
-        tabstops.forEach(function (ts) { ts.length = 0; });
-        var expanding = {};
-        function copyValue(val) {
-            var copy = [];
-            for (var i = 0; i < val.length; i++) {
-                var p = val[i];
-                if (typeof p == "object") {
-                    if (expanding[p.tabstopId])
-                        continue;
-                    var j = val.lastIndexOf(p, i - 1);
-                    p = copy[j] || { tabstopId: p.tabstopId };
-                }
-                copy[i] = p;
-            }
-            return copy;
-        }
-        for (var i = 0; i < tokens.length; i++) {
-            var p = tokens[i];
-            if (typeof p != "object")
-                continue;
-            var id = p.tabstopId;
-            var ts = tabstops[id];
-            var i1 = tokens.indexOf(p, i + 1);
-            if (expanding[id]) {
-                if (expanding[id] === p) {
-                    delete expanding[id];
-                    Object.keys(expanding).forEach(function (parentId) {
-                        ts.parents[parentId] = true;
-                    });
-                }
-                continue;
-            }
-            expanding[id] = p;
-            var value = ts.value;
-            if (typeof value !== "string")
-                value = copyValue(value);
-            else if (p.fmt)
-                value = this.tmStrFormat(value, p, editor);
-            tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p));
-            if (ts.indexOf(p) === -1)
-                ts.push(p);
-        }
-        var row = 0, column = 0;
-        var text = "";
-        tokens.forEach(function (t) {
-            if (typeof t === "string") {
-                var lines = t.split("\n");
-                if (lines.length > 1) {
-                    column = lines[lines.length - 1].length;
-                    row += lines.length - 1;
-                }
-                else
-                    column += t.length;
-                text += t;
-            }
-            else if (t) {
-                if (!t.start)
-                    t.start = { row: row, column: column };
-                else
-                    t.end = { row: row, column: column };
-            }
-        });
-        var range = editor.getSelectionRange();
-        var end = editor.session.replace(range, text);
-        var tabstopManager = new TabstopManager(editor);
-        var selectionId = editor.inVirtualSelectionMode && editor.selection.index;
-        tabstopManager.addTabstops(tabstops, range.start, end, selectionId);
-    };
-    this.insertSnippet = function (editor, snippetText) {
-        var self = this;
-        if (editor.inVirtualSelectionMode)
-            return self.insertSnippetForSelection(editor, snippetText);
-        editor.forEachSelection(function () {
-            self.insertSnippetForSelection(editor, snippetText);
-        }, null, { keepOrder: true });
-        if (editor.tabstopManager)
-            editor.tabstopManager.tabNext();
-    };
-    this.$getScope = function (editor) {
-        var scope = editor.session.$mode.$id || "";
-        scope = scope.split("/").pop();
-        if (scope === "html" || scope === "php") {
-            if (scope === "php" && !editor.session.$mode.inlinePhp)
-                scope = "html";
-            var c = editor.getCursorPosition();
-            var state = editor.session.getState(c.row);
-            if (typeof state === "object") {
-                state = state[0];
-            }
-            if (state.substring) {
-                if (state.substring(0, 3) == "js-")
-                    scope = "javascript";
-                else if (state.substring(0, 4) == "css-")
-                    scope = "css";
-                else if (state.substring(0, 4) == "php-")
-                    scope = "php";
-            }
-        }
-        return scope;
-    };
-    this.getActiveScopes = function (editor) {
-        var scope = this.$getScope(editor);
-        var scopes = [scope];
-        var snippetMap = this.snippetMap;
-        if (snippetMap[scope] && snippetMap[scope].includeScopes) {
-            scopes.push.apply(scopes, snippetMap[scope].includeScopes);
-        }
-        scopes.push("_");
-        return scopes;
-    };
-    this.expandWithTab = function (editor, options) {
-        var self = this;
-        var result = editor.forEachSelection(function () {
-            return self.expandSnippetForSelection(editor, options);
-        }, null, { keepOrder: true });
-        if (result && editor.tabstopManager)
-            editor.tabstopManager.tabNext();
-        return result;
-    };
-    this.expandSnippetForSelection = function (editor, options) {
-        var cursor = editor.getCursorPosition();
-        var line = editor.session.getLine(cursor.row);
-        var before = line.substring(0, cursor.column);
-        var after = line.substr(cursor.column);
-        var snippetMap = this.snippetMap;
-        var snippet;
-        this.getActiveScopes(editor).some(function (scope) {
-            var snippets = snippetMap[scope];
-            if (snippets)
-                snippet = this.findMatchingSnippet(snippets, before, after);
-            return !!snippet;
-        }, this);
-        if (!snippet)
-            return false;
-        if (options && options.dryRun)
-            return true;
-        editor.session.doc.removeInLine(cursor.row, cursor.column - snippet.replaceBefore.length, cursor.column + snippet.replaceAfter.length);
-        this.variables.M__ = snippet.matchBefore;
-        this.variables.T__ = snippet.matchAfter;
-        this.insertSnippetForSelection(editor, snippet.content);
-        this.variables.M__ = this.variables.T__ = null;
-        return true;
-    };
-    this.findMatchingSnippet = function (snippetList, before, after) {
-        for (var i = snippetList.length; i--;) {
-            var s = snippetList[i];
-            if (s.startRe && !s.startRe.test(before))
-                continue;
-            if (s.endRe && !s.endRe.test(after))
-                continue;
-            if (!s.startRe && !s.endRe)
-                continue;
-            s.matchBefore = s.startRe ? s.startRe.exec(before) : [""];
-            s.matchAfter = s.endRe ? s.endRe.exec(after) : [""];
-            s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : "";
-            s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : "";
-            return s;
-        }
-    };
-    this.snippetMap = {};
-    this.snippetNameMap = {};
-    this.register = function (snippets, scope) {
-        var snippetMap = this.snippetMap;
-        var snippetNameMap = this.snippetNameMap;
-        var self = this;
-        if (!snippets)
-            snippets = [];
-        function wrapRegexp(src) {
-            if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
-                src = "(?:" + src + ")";
-            return src || "";
-        }
-        function guardedRegexp(re, guard, opening) {
-            re = wrapRegexp(re);
-            guard = wrapRegexp(guard);
-            if (opening) {
-                re = guard + re;
-                if (re && re[re.length - 1] != "$")
-                    re = re + "$";
-            }
-            else {
-                re = re + guard;
-                if (re && re[0] != "^")
-                    re = "^" + re;
-            }
-            return new RegExp(re);
-        }
-        function addSnippet(s) {
-            if (!s.scope)
-                s.scope = scope || "_";
-            scope = s.scope;
-            if (!snippetMap[scope]) {
-                snippetMap[scope] = [];
-                snippetNameMap[scope] = {};
-            }
-            var map = snippetNameMap[scope];
-            if (s.name) {
-                var old = map[s.name];
-                if (old)
-                    self.unregister(old);
-                map[s.name] = s;
-            }
-            snippetMap[scope].push(s);
-            if (s.prefix)
-                s.tabTrigger = s.prefix;
-            if (!s.content && s.body)
-                s.content = Array.isArray(s.body) ? s.body.join("\n") : s.body;
-            if (s.tabTrigger && !s.trigger) {
-                if (!s.guard && /^\w/.test(s.tabTrigger))
-                    s.guard = "\\b";
-                s.trigger = lang.escapeRegExp(s.tabTrigger);
-            }
-            if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard)
-                return;
-            s.startRe = guardedRegexp(s.trigger, s.guard, true);
-            s.triggerRe = new RegExp(s.trigger);
-            s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);
-            s.endTriggerRe = new RegExp(s.endTrigger);
-        }
-        if (Array.isArray(snippets)) {
-            snippets.forEach(addSnippet);
-        }
-        else {
-            Object.keys(snippets).forEach(function (key) {
-                addSnippet(snippets[key]);
-            });
-        }
-        this._signal("registerSnippets", { scope: scope });
-    };
-    this.unregister = function (snippets, scope) {
-        var snippetMap = this.snippetMap;
-        var snippetNameMap = this.snippetNameMap;
-        function removeSnippet(s) {
-            var nameMap = snippetNameMap[s.scope || scope];
-            if (nameMap && nameMap[s.name]) {
-                delete nameMap[s.name];
-                var map = snippetMap[s.scope || scope];
-                var i = map && map.indexOf(s);
-                if (i >= 0)
-                    map.splice(i, 1);
-            }
-        }
-        if (snippets.content)
-            removeSnippet(snippets);
-        else if (Array.isArray(snippets))
-            snippets.forEach(removeSnippet);
-    };
-    this.parseSnippetFile = function (str) {
-        str = str.replace(/\r/g, "");
-        var list = [], snippet = {};
-        var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
-        var m;
-        while (m = re.exec(str)) {
-            if (m[1]) {
-                try {
-                    snippet = JSON.parse(m[1]);
-                    list.push(snippet);
-                }
-                catch (e) { }
-            }
-            if (m[4]) {
-                snippet.content = m[4].replace(/^\t/gm, "");
-                list.push(snippet);
-                snippet = {};
-            }
-            else {
-                var key = m[2], val = m[3];
-                if (key == "regex") {
-                    var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g;
-                    snippet.guard = guardRe.exec(val)[1];
-                    snippet.trigger = guardRe.exec(val)[1];
-                    snippet.endTrigger = guardRe.exec(val)[1];
-                    snippet.endGuard = guardRe.exec(val)[1];
-                }
-                else if (key == "snippet") {
-                    snippet.tabTrigger = val.match(/^\S*/)[0];
-                    if (!snippet.name)
-                        snippet.name = val;
-                }
-                else if (key) {
-                    snippet[key] = val;
-                }
-            }
-        }
-        return list;
-    };
-    this.getSnippetByName = function (name, editor) {
-        var snippetMap = this.snippetNameMap;
-        var snippet;
-        this.getActiveScopes(editor).some(function (scope) {
-            var snippets = snippetMap[scope];
-            if (snippets)
-                snippet = snippets[name];
-            return !!snippet;
-        }, this);
-        return snippet;
-    };
-}).call(SnippetManager.prototype);
-var TabstopManager = function (editor) {
-    if (editor.tabstopManager)
-        return editor.tabstopManager;
-    editor.tabstopManager = this;
-    this.$onChange = this.onChange.bind(this);
-    this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule;
-    this.$onChangeSession = this.onChangeSession.bind(this);
-    this.$onAfterExec = this.onAfterExec.bind(this);
-    this.attach(editor);
-};
-(function () {
-    this.attach = function (editor) {
-        this.index = 0;
-        this.ranges = [];
-        this.tabstops = [];
-        this.$openTabstops = null;
-        this.selectedTabstop = null;
-        this.editor = editor;
-        this.editor.on("change", this.$onChange);
-        this.editor.on("changeSelection", this.$onChangeSelection);
-        this.editor.on("changeSession", this.$onChangeSession);
-        this.editor.commands.on("afterExec", this.$onAfterExec);
-        this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
-    };
-    this.detach = function () {
-        this.tabstops.forEach(this.removeTabstopMarkers, this);
-        this.ranges = null;
-        this.tabstops = null;
-        this.selectedTabstop = null;
-        this.editor.removeListener("change", this.$onChange);
-        this.editor.removeListener("changeSelection", this.$onChangeSelection);
-        this.editor.removeListener("changeSession", this.$onChangeSession);
-        this.editor.commands.removeListener("afterExec", this.$onAfterExec);
-        this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
-        this.editor.tabstopManager = null;
-        this.editor = null;
-    };
-    this.onChange = function (delta) {
-        var isRemove = delta.action[0] == "r";
-        var selectedTabstop = this.selectedTabstop || {};
-        var parents = selectedTabstop.parents || {};
-        var tabstops = (this.tabstops || []).slice();
-        for (var i = 0; i < tabstops.length; i++) {
-            var ts = tabstops[i];
-            var active = ts == selectedTabstop || parents[ts.index];
-            ts.rangeList.$bias = active ? 0 : 1;
-            if (delta.action == "remove" && ts !== selectedTabstop) {
-                var parentActive = ts.parents && ts.parents[selectedTabstop.index];
-                var startIndex = ts.rangeList.pointIndex(delta.start, parentActive);
-                startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1;
-                var endIndex = ts.rangeList.pointIndex(delta.end, parentActive);
-                endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1;
-                var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex);
-                for (var j = 0; j < toRemove.length; j++)
-                    this.removeRange(toRemove[j]);
-            }
-            ts.rangeList.$onChange(delta);
-        }
-        var session = this.editor.session;
-        if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue())
-            this.detach();
-    };
-    this.updateLinkedFields = function () {
-        var ts = this.selectedTabstop;
-        if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked)
-            return;
-        this.$inChange = true;
-        var session = this.editor.session;
-        var text = session.getTextRange(ts.firstNonLinked);
-        for (var i = 0; i < ts.length; i++) {
-            var range = ts[i];
-            if (!range.linked)
-                continue;
-            var original = range.original;
-            var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor);
-            session.replace(range, fmt);
-        }
-        this.$inChange = false;
-    };
-    this.onAfterExec = function (e) {
-        if (e.command && !e.command.readOnly)
-            this.updateLinkedFields();
-    };
-    this.onChangeSelection = function () {
-        if (!this.editor)
-            return;
-        var lead = this.editor.selection.lead;
-        var anchor = this.editor.selection.anchor;
-        var isEmpty = this.editor.selection.isEmpty();
-        for (var i = 0; i < this.ranges.length; i++) {
-            if (this.ranges[i].linked)
-                continue;
-            var containsLead = this.ranges[i].contains(lead.row, lead.column);
-            var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column);
-            if (containsLead && containsAnchor)
-                return;
-        }
-        this.detach();
-    };
-    this.onChangeSession = function () {
-        this.detach();
-    };
-    this.tabNext = function (dir) {
-        var max = this.tabstops.length;
-        var index = this.index + (dir || 1);
-        index = Math.min(Math.max(index, 1), max);
-        if (index == max)
-            index = 0;
-        this.selectTabstop(index);
-        if (index === 0)
-            this.detach();
-    };
-    this.selectTabstop = function (index) {
-        this.$openTabstops = null;
-        var ts = this.tabstops[this.index];
-        if (ts)
-            this.addTabstopMarkers(ts);
-        this.index = index;
-        ts = this.tabstops[this.index];
-        if (!ts || !ts.length)
-            return;
-        this.selectedTabstop = ts;
-        var range = ts.firstNonLinked || ts;
-        if (ts.choices)
-            range.cursor = range.start;
-        if (!this.editor.inVirtualSelectionMode) {
-            var sel = this.editor.multiSelect;
-            sel.toSingleRange(range);
-            for (var i = 0; i < ts.length; i++) {
-                if (ts.hasLinkedRanges && ts[i].linked)
-                    continue;
-                sel.addRange(ts[i].clone(), true);
-            }
-        }
-        else {
-            this.editor.selection.fromOrientedRange(range);
-        }
-        this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
-        if (this.selectedTabstop && this.selectedTabstop.choices)
-            this.editor.execCommand("startAutocomplete", { matches: this.selectedTabstop.choices });
-    };
-    this.addTabstops = function (tabstops, start, end) {
-        var useLink = this.useLink || !this.editor.getOption("enableMultiselect");
-        if (!this.$openTabstops)
-            this.$openTabstops = [];
-        if (!tabstops[0]) {
-            var p = Range.fromPoints(end, end);
-            moveRelative(p.start, start);
-            moveRelative(p.end, start);
-            tabstops[0] = [p];
-            tabstops[0].index = 0;
-        }
-        var i = this.index;
-        var arg = [i + 1, 0];
-        var ranges = this.ranges;
-        tabstops.forEach(function (ts, index) {
-            var dest = this.$openTabstops[index] || ts;
-            for (var i = 0; i < ts.length; i++) {
-                var p = ts[i];
-                var range = Range.fromPoints(p.start, p.end || p.start);
-                movePoint(range.start, start);
-                movePoint(range.end, start);
-                range.original = p;
-                range.tabstop = dest;
-                ranges.push(range);
-                if (dest != ts)
-                    dest.unshift(range);
-                else
-                    dest[i] = range;
-                if (p.fmtString || (dest.firstNonLinked && useLink)) {
-                    range.linked = true;
-                    dest.hasLinkedRanges = true;
-                }
-                else if (!dest.firstNonLinked)
-                    dest.firstNonLinked = range;
-            }
-            if (!dest.firstNonLinked)
-                dest.hasLinkedRanges = false;
-            if (dest === ts) {
-                arg.push(dest);
-                this.$openTabstops[index] = dest;
-            }
-            this.addTabstopMarkers(dest);
-            dest.rangeList = dest.rangeList || new RangeList();
-            dest.rangeList.$bias = 0;
-            dest.rangeList.addList(dest);
-        }, this);
-        if (arg.length > 2) {
-            if (this.tabstops.length)
-                arg.push(arg.splice(2, 1)[0]);
-            this.tabstops.splice.apply(this.tabstops, arg);
-        }
-    };
-    this.addTabstopMarkers = function (ts) {
-        var session = this.editor.session;
-        ts.forEach(function (range) {
-            if (!range.markerId)
-                range.markerId = session.addMarker(range, "ace_snippet-marker", "text");
-        });
-    };
-    this.removeTabstopMarkers = function (ts) {
-        var session = this.editor.session;
-        ts.forEach(function (range) {
-            session.removeMarker(range.markerId);
-            range.markerId = null;
-        });
-    };
-    this.removeRange = function (range) {
-        var i = range.tabstop.indexOf(range);
-        if (i != -1)
-            range.tabstop.splice(i, 1);
-        i = this.ranges.indexOf(range);
-        if (i != -1)
-            this.ranges.splice(i, 1);
-        i = range.tabstop.rangeList.ranges.indexOf(range);
-        if (i != -1)
-            range.tabstop.splice(i, 1);
-        this.editor.session.removeMarker(range.markerId);
-        if (!range.tabstop.length) {
-            i = this.tabstops.indexOf(range.tabstop);
-            if (i != -1)
-                this.tabstops.splice(i, 1);
-            if (!this.tabstops.length)
-                this.detach();
-        }
-    };
-    this.keyboardHandler = new HashHandler();
-    this.keyboardHandler.bindKeys({
-        "Tab": function (editor) {
-            if (exports.snippetManager && exports.snippetManager.expandWithTab(editor))
-                return;
-            editor.tabstopManager.tabNext(1);
-            editor.renderer.scrollCursorIntoView();
-        },
-        "Shift-Tab": function (editor) {
-            editor.tabstopManager.tabNext(-1);
-            editor.renderer.scrollCursorIntoView();
-        },
-        "Esc": function (editor) {
-            editor.tabstopManager.detach();
-        }
-    });
-}).call(TabstopManager.prototype);
-var movePoint = function (point, diff) {
-    if (point.row == 0)
-        point.column += diff.column;
-    point.row += diff.row;
-};
-var moveRelative = function (point, start) {
-    if (point.row == start.row)
-        point.column -= start.column;
-    point.row -= start.row;
-};
-dom.importCssString("\n.ace_snippet-marker {\n    -moz-box-sizing: border-box;\n    box-sizing: border-box;\n    background: rgba(194, 193, 208, 0.09);\n    border: 1px dotted rgba(211, 208, 235, 0.62);\n    position: absolute;\n}", "snippets.css", false);
-exports.snippetManager = new SnippetManager();
-var Editor = require("./editor").Editor;
-(function () {
-    this.insertSnippet = function (content, options) {
-        return exports.snippetManager.insertSnippet(this, content, options);
-    };
-    this.expandSnippet = function (options) {
-        return exports.snippetManager.expandWithTab(this, options);
-    };
-}).call(Editor.prototype);
-
-});
-
-ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module){"use strict";
-var Renderer = require("../virtual_renderer").VirtualRenderer;
-var Editor = require("../editor").Editor;
-var Range = require("../range").Range;
-var event = require("../lib/event");
-var lang = require("../lib/lang");
-var dom = require("../lib/dom");
-var $singleLineEditor = function (el) {
-    var renderer = new Renderer(el);
-    renderer.$maxLines = 4;
-    var editor = new Editor(renderer);
-    editor.setHighlightActiveLine(false);
-    editor.setShowPrintMargin(false);
-    editor.renderer.setShowGutter(false);
-    editor.renderer.setHighlightGutterLine(false);
-    editor.$mouseHandler.$focusTimeout = 0;
-    editor.$highlightTagPending = true;
-    return editor;
-};
-var AcePopup = function (parentNode) {
-    var el = dom.createElement("div");
-    var popup = new $singleLineEditor(el);
-    if (parentNode)
-        parentNode.appendChild(el);
-    el.style.display = "none";
-    popup.renderer.content.style.cursor = "default";
-    popup.renderer.setStyle("ace_autocomplete");
-    popup.setOption("displayIndentGuides", false);
-    popup.setOption("dragDelay", 150);
-    var noop = function () { };
-    popup.focus = noop;
-    popup.$isFocused = true;
-    popup.renderer.$cursorLayer.restartTimer = noop;
-    popup.renderer.$cursorLayer.element.style.opacity = 0;
-    popup.renderer.$maxLines = 8;
-    popup.renderer.$keepTextAreaAtCursor = false;
-    popup.setHighlightActiveLine(false);
-    popup.session.highlight("");
-    popup.session.$searchHighlight.clazz = "ace_highlight-marker";
-    popup.on("mousedown", function (e) {
-        var pos = e.getDocumentPosition();
-        popup.selection.moveToPosition(pos);
-        selectionMarker.start.row = selectionMarker.end.row = pos.row;
-        e.stop();
-    });
-    var lastMouseEvent;
-    var hoverMarker = new Range(-1, 0, -1, Infinity);
-    var selectionMarker = new Range(-1, 0, -1, Infinity);
-    selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine");
-    popup.setSelectOnHover = function (val) {
-        if (!val) {
-            hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine");
-        }
-        else if (hoverMarker.id) {
-            popup.session.removeMarker(hoverMarker.id);
-            hoverMarker.id = null;
-        }
-    };
-    popup.setSelectOnHover(false);
-    popup.on("mousemove", function (e) {
-        if (!lastMouseEvent) {
-            lastMouseEvent = e;
-            return;
-        }
-        if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) {
-            return;
-        }
-        lastMouseEvent = e;
-        lastMouseEvent.scrollTop = popup.renderer.scrollTop;
-        var row = lastMouseEvent.getDocumentPosition().row;
-        if (hoverMarker.start.row != row) {
-            if (!hoverMarker.id)
-                popup.setRow(row);
-            setHoverMarker(row);
-        }
-    });
-    popup.renderer.on("beforeRender", function () {
-        if (lastMouseEvent && hoverMarker.start.row != -1) {
-            lastMouseEvent.$pos = null;
-            var row = lastMouseEvent.getDocumentPosition().row;
-            if (!hoverMarker.id)
-                popup.setRow(row);
-            setHoverMarker(row, true);
-        }
-    });
-    popup.renderer.on("afterRender", function () {
-        var row = popup.getRow();
-        var t = popup.renderer.$textLayer;
-        var selected = t.element.childNodes[row - t.config.firstRow];
-        if (selected !== t.selectedNode && t.selectedNode)
-            dom.removeCssClass(t.selectedNode, "ace_selected");
-        t.selectedNode = selected;
-        if (selected)
-            dom.addCssClass(selected, "ace_selected");
-    });
-    var hideHoverMarker = function () { setHoverMarker(-1); };
-    var setHoverMarker = function (row, suppressRedraw) {
-        if (row !== hoverMarker.start.row) {
-            hoverMarker.start.row = hoverMarker.end.row = row;
-            if (!suppressRedraw)
-                popup.session._emit("changeBackMarker");
-            popup._emit("changeHoverMarker");
-        }
-    };
-    popup.getHoveredRow = function () {
-        return hoverMarker.start.row;
-    };
-    event.addListener(popup.container, "mouseout", hideHoverMarker);
-    popup.on("hide", hideHoverMarker);
-    popup.on("changeSelection", hideHoverMarker);
-    popup.session.doc.getLength = function () {
-        return popup.data.length;
-    };
-    popup.session.doc.getLine = function (i) {
-        var data = popup.data[i];
-        if (typeof data == "string")
-            return data;
-        return (data && data.value) || "";
-    };
-    var bgTokenizer = popup.session.bgTokenizer;
-    bgTokenizer.$tokenizeRow = function (row) {
-        var data = popup.data[row];
-        var tokens = [];
-        if (!data)
-            return tokens;
-        if (typeof data == "string")
-            data = { value: data };
-        var caption = data.caption || data.value || data.name;
-        function addToken(value, className) {
-            value && tokens.push({
-                type: (data.className || "") + (className || ""),
-                value: value
-            });
-        }
-        var lower = caption.toLowerCase();
-        var filterText = (popup.filterText || "").toLowerCase();
-        var lastIndex = 0;
-        var lastI = 0;
-        for (var i = 0; i <= filterText.length; i++) {
-            if (i != lastI && (data.matchMask & (1 << i) || i == filterText.length)) {
-                var sub = filterText.slice(lastI, i);
-                lastI = i;
-                var index = lower.indexOf(sub, lastIndex);
-                if (index == -1)
-                    continue;
-                addToken(caption.slice(lastIndex, index), "");
-                lastIndex = index + sub.length;
-                addToken(caption.slice(index, lastIndex), "completion-highlight");
-            }
-        }
-        addToken(caption.slice(lastIndex, caption.length), "");
-        if (data.meta)
-            tokens.push({ type: "completion-meta", value: data.meta });
-        if (data.message)
-            tokens.push({ type: "completion-message", value: data.message });
-        return tokens;
-    };
-    bgTokenizer.$updateOnChange = noop;
-    bgTokenizer.start = noop;
-    popup.session.$computeWidth = function () {
-        return this.screenWidth = 0;
-    };
-    popup.isOpen = false;
-    popup.isTopdown = false;
-    popup.autoSelect = true;
-    popup.filterText = "";
-    popup.data = [];
-    popup.setData = function (list, filterText) {
-        popup.filterText = filterText || "";
-        popup.setValue(lang.stringRepeat("\n", list.length), -1);
-        popup.data = list || [];
-        popup.setRow(0);
-    };
-    popup.getData = function (row) {
-        return popup.data[row];
-    };
-    popup.getRow = function () {
-        return selectionMarker.start.row;
-    };
-    popup.setRow = function (line) {
-        line = Math.max(this.autoSelect ? 0 : -1, Math.min(this.data.length, line));
-        if (selectionMarker.start.row != line) {
-            popup.selection.clearSelection();
-            selectionMarker.start.row = selectionMarker.end.row = line || 0;
-            popup.session._emit("changeBackMarker");
-            popup.moveCursorTo(line || 0, 0);
-            if (popup.isOpen)
-                popup._signal("select");
-        }
-    };
-    popup.on("changeSelection", function () {
-        if (popup.isOpen)
-            popup.setRow(popup.selection.lead.row);
-        popup.renderer.scrollCursorIntoView();
-    });
-    popup.hide = function () {
-        this.container.style.display = "none";
-        this._signal("hide");
-        popup.isOpen = false;
-    };
-    popup.show = function (pos, lineHeight, topdownOnly) {
-        var el = this.container;
-        var screenHeight = window.innerHeight;
-        var screenWidth = window.innerWidth;
-        var renderer = this.renderer;
-        var maxH = renderer.$maxLines * lineHeight * 1.4;
-        var top = pos.top + this.$borderSize;
-        var allowTopdown = top > screenHeight / 2 && !topdownOnly;
-        if (allowTopdown && top + lineHeight + maxH > screenHeight) {
-            renderer.$maxPixelHeight = top - 2 * this.$borderSize;
-            el.style.top = "";
-            el.style.bottom = screenHeight - top + "px";
-            popup.isTopdown = false;
-        }
-        else {
-            top += lineHeight;
-            renderer.$maxPixelHeight = screenHeight - top - 0.2 * lineHeight;
-            el.style.top = top + "px";
-            el.style.bottom = "";
-            popup.isTopdown = true;
-        }
-        el.style.display = "";
-        var left = pos.left;
-        if (left + el.offsetWidth > screenWidth)
-            left = screenWidth - el.offsetWidth;
-        el.style.left = left + "px";
-        this._signal("show");
-        lastMouseEvent = null;
-        popup.isOpen = true;
-    };
-    popup.goTo = function (where) {
-        var row = this.getRow();
-        var max = this.session.getLength() - 1;
-        switch (where) {
-            case "up":
-                row = row <= 0 ? max : row - 1;
-                break;
-            case "down":
-                row = row >= max ? -1 : row + 1;
-                break;
-            case "start":
-                row = 0;
-                break;
-            case "end":
-                row = max;
-                break;
-        }
-        this.setRow(row);
-    };
-    popup.getTextLeftOffset = function () {
-        return this.$borderSize + this.renderer.$padding + this.$imageSize;
-    };
-    popup.$imageSize = 0;
-    popup.$borderSize = 1;
-    return popup;
-};
-dom.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n    background-color: #CAD6FA;\n    z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n    background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n    border: 1px solid #abbffe;\n    margin-top: -1px;\n    background: rgba(233,233,253,0.4);\n    position: absolute;\n    z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n    border: 1px solid rgba(109, 150, 13, 0.8);\n    background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n    opacity: 0.5;\n    margin: 0.9em;\n}\n.ace_completion-message {\n    color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n    color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n    color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n    width: 300px;\n    z-index: 200000;\n    border: 1px lightgray solid;\n    position: fixed;\n    box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n    line-height: 1.4;\n    background: #fefefe;\n    color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n    border: 1px #484747 solid;\n    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n    line-height: 1.4;\n    background: #25282c;\n    color: #c1c1c1;\n}", "autocompletion.css", false);
-exports.AcePopup = AcePopup;
-exports.$singleLineEditor = $singleLineEditor;
-
-});
-
-ace.define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module){"use strict";
-exports.parForEach = function (array, fn, callback) {
-    var completed = 0;
-    var arLength = array.length;
-    if (arLength === 0)
-        callback();
-    for (var i = 0; i < arLength; i++) {
-        fn(array[i], function (result, err) {
-            completed++;
-            if (completed === arLength)
-                callback(result, err);
-        });
-    }
-};
-var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;
-exports.retrievePrecedingIdentifier = function (text, pos, regex) {
-    regex = regex || ID_REGEX;
-    var buf = [];
-    for (var i = pos - 1; i >= 0; i--) {
-        if (regex.test(text[i]))
-            buf.push(text[i]);
-        else
-            break;
-    }
-    return buf.reverse().join("");
-};
-exports.retrieveFollowingIdentifier = function (text, pos, regex) {
-    regex = regex || ID_REGEX;
-    var buf = [];
-    for (var i = pos; i < text.length; i++) {
-        if (regex.test(text[i]))
-            buf.push(text[i]);
-        else
-            break;
-    }
-    return buf;
-};
-exports.getCompletionPrefix = function (editor) {
-    var pos = editor.getCursorPosition();
-    var line = editor.session.getLine(pos.row);
-    var prefix;
-    editor.completers.forEach(function (completer) {
-        if (completer.identifierRegexps) {
-            completer.identifierRegexps.forEach(function (identifierRegex) {
-                if (!prefix && identifierRegex)
-                    prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex);
-            }.bind(this));
-        }
-    }.bind(this));
-    return prefix || this.retrievePrecedingIdentifier(line, pos.column);
-};
-
-});
-
-ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"], function(require, exports, module){"use strict";
-var HashHandler = require("./keyboard/hash_handler").HashHandler;
-var AcePopup = require("./autocomplete/popup").AcePopup;
-var util = require("./autocomplete/util");
-var lang = require("./lib/lang");
-var dom = require("./lib/dom");
-var snippetManager = require("./snippets").snippetManager;
-var config = require("./config");
-var Autocomplete = function () {
-    this.autoInsert = false;
-    this.autoSelect = true;
-    this.exactMatch = false;
-    this.gatherCompletionsId = 0;
-    this.keyboardHandler = new HashHandler();
-    this.keyboardHandler.bindKeys(this.commands);
-    this.blurListener = this.blurListener.bind(this);
-    this.changeListener = this.changeListener.bind(this);
-    this.mousedownListener = this.mousedownListener.bind(this);
-    this.mousewheelListener = this.mousewheelListener.bind(this);
-    this.changeTimer = lang.delayedCall(function () {
-        this.updateCompletions(true);
-    }.bind(this));
-    this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50);
-};
-(function () {
-    this.$init = function () {
-        this.popup = new AcePopup(document.body || document.documentElement);
-        this.popup.on("click", function (e) {
-            this.insertMatch();
-            e.stop();
-        }.bind(this));
-        this.popup.focus = this.editor.focus.bind(this.editor);
-        this.popup.on("show", this.tooltipTimer.bind(null, null));
-        this.popup.on("select", this.tooltipTimer.bind(null, null));
-        this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null));
-        return this.popup;
-    };
-    this.getPopup = function () {
-        return this.popup || this.$init();
-    };
-    this.openPopup = function (editor, prefix, keepPopupPosition) {
-        if (!this.popup)
-            this.$init();
-        this.popup.autoSelect = this.autoSelect;
-        this.popup.setData(this.completions.filtered, this.completions.filterText);
-        editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
-        var renderer = editor.renderer;
-        this.popup.setRow(this.autoSelect ? 0 : -1);
-        if (!keepPopupPosition) {
-            this.popup.setTheme(editor.getTheme());
-            this.popup.setFontSize(editor.getFontSize());
-            var lineHeight = renderer.layerConfig.lineHeight;
-            var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
-            pos.left -= this.popup.getTextLeftOffset();
-            var rect = editor.container.getBoundingClientRect();
-            pos.top += rect.top - renderer.layerConfig.offset;
-            pos.left += rect.left - editor.renderer.scrollLeft;
-            pos.left += renderer.gutterWidth;
-            this.popup.show(pos, lineHeight);
-        }
-        else if (keepPopupPosition && !prefix) {
-            this.detach();
-        }
-        this.changeTimer.cancel();
-    };
-    this.detach = function () {
-        this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
-        this.editor.off("changeSelection", this.changeListener);
-        this.editor.off("blur", this.blurListener);
-        this.editor.off("mousedown", this.mousedownListener);
-        this.editor.off("mousewheel", this.mousewheelListener);
-        this.changeTimer.cancel();
-        this.hideDocTooltip();
-        this.gatherCompletionsId += 1;
-        if (this.popup && this.popup.isOpen)
-            this.popup.hide();
-        if (this.base)
-            this.base.detach();
-        this.activated = false;
-        this.completions = this.base = null;
-    };
-    this.changeListener = function (e) {
-        var cursor = this.editor.selection.lead;
-        if (cursor.row != this.base.row || cursor.column < this.base.column) {
-            this.detach();
-        }
-        if (this.activated)
-            this.changeTimer.schedule();
-        else
-            this.detach();
-    };
-    this.blurListener = function (e) {
-        var el = document.activeElement;
-        var text = this.editor.textInput.getElement();
-        var fromTooltip = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget);
-        var container = this.popup && this.popup.container;
-        if (el != text && el.parentNode != container && !fromTooltip
-            && el != this.tooltipNode && e.relatedTarget != text) {
-            this.detach();
-        }
-    };
-    this.mousedownListener = function (e) {
-        this.detach();
-    };
-    this.mousewheelListener = function (e) {
-        this.detach();
-    };
-    this.goTo = function (where) {
-        this.popup.goTo(where);
-    };
-    this.insertMatch = function (data, options) {
-        if (!data)
-            data = this.popup.getData(this.popup.getRow());
-        if (!data)
-            return false;
-        var completions = this.completions;
-        this.editor.startOperation({ command: { name: "insertMatch" } });
-        if (data.completer && data.completer.insertMatch) {
-            data.completer.insertMatch(this.editor, data);
-        }
-        else {
-            if (!completions)
-                return false;
-            if (completions.filterText) {
-                var ranges = this.editor.selection.getAllRanges();
-                for (var i = 0, range; range = ranges[i]; i++) {
-                    range.start.column -= completions.filterText.length;
-                    this.editor.session.remove(range);
-                }
-            }
-            if (data.snippet)
-                snippetManager.insertSnippet(this.editor, data.snippet);
-            else
-                this.editor.execCommand("insertstring", data.value || data);
-        }
-        if (this.completions == completions)
-            this.detach();
-        this.editor.endOperation();
-    };
-    this.commands = {
-        "Up": function (editor) { editor.completer.goTo("up"); },
-        "Down": function (editor) { editor.completer.goTo("down"); },
-        "Ctrl-Up|Ctrl-Home": function (editor) { editor.completer.goTo("start"); },
-        "Ctrl-Down|Ctrl-End": function (editor) { editor.completer.goTo("end"); },
-        "Esc": function (editor) { editor.completer.detach(); },
-        "Return": function (editor) { return editor.completer.insertMatch(); },
-        "Shift-Return": function (editor) { editor.completer.insertMatch(null, { deleteSuffix: true }); },
-        "Tab": function (editor) {
-            var result = editor.completer.insertMatch();
-            if (!result && !editor.tabstopManager)
-                editor.completer.goTo("down");
-            else
-                return result;
-        },
-        "PageUp": function (editor) { editor.completer.popup.gotoPageUp(); },
-        "PageDown": function (editor) { editor.completer.popup.gotoPageDown(); }
-    };
-    this.gatherCompletions = function (editor, callback) {
-        var session = editor.getSession();
-        var pos = editor.getCursorPosition();
-        var prefix = util.getCompletionPrefix(editor);
-        this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length);
-        this.base.$insertRight = true;
-        var matches = [];
-        var total = editor.completers.length;
-        editor.completers.forEach(function (completer, i) {
-            completer.getCompletions(editor, session, pos, prefix, function (err, results) {
-                if (!err && results)
-                    matches = matches.concat(results);
-                callback(null, {
-                    prefix: util.getCompletionPrefix(editor),
-                    matches: matches,
-                    finished: (--total === 0)
-                });
-            });
-        });
-        return true;
-    };
-    this.showPopup = function (editor, options) {
-        if (this.editor)
-            this.detach();
-        this.activated = true;
-        this.editor = editor;
-        if (editor.completer != this) {
-            if (editor.completer)
-                editor.completer.detach();
-            editor.completer = this;
-        }
-        editor.on("changeSelection", this.changeListener);
-        editor.on("blur", this.blurListener);
-        editor.on("mousedown", this.mousedownListener);
-        editor.on("mousewheel", this.mousewheelListener);
-        this.updateCompletions(false, options);
-    };
-    this.updateCompletions = function (keepPopupPosition, options) {
-        if (keepPopupPosition && this.base && this.completions) {
-            var pos = this.editor.getCursorPosition();
-            var prefix = this.editor.session.getTextRange({ start: this.base, end: pos });
-            if (prefix == this.completions.filterText)
-                return;
-            this.completions.setFilter(prefix);
-            if (!this.completions.filtered.length)
-                return this.detach();
-            if (this.completions.filtered.length == 1
-                && this.completions.filtered[0].value == prefix
-                && !this.completions.filtered[0].snippet)
-                return this.detach();
-            this.openPopup(this.editor, prefix, keepPopupPosition);
-            return;
-        }
-        if (options && options.matches) {
-            var pos = this.editor.getSelectionRange().start;
-            this.base = this.editor.session.doc.createAnchor(pos.row, pos.column);
-            this.base.$insertRight = true;
-            this.completions = new FilteredList(options.matches);
-            return this.openPopup(this.editor, "", keepPopupPosition);
-        }
-        var _id = this.gatherCompletionsId;
-        var detachIfFinished = function (results) {
-            if (!results.finished)
-                return;
-            return this.detach();
-        }.bind(this);
-        var processResults = function (results) {
-            var prefix = results.prefix;
-            var matches = results.matches;
-            this.completions = new FilteredList(matches);
-            if (this.exactMatch)
-                this.completions.exactMatch = true;
-            this.completions.setFilter(prefix);
-            var filtered = this.completions.filtered;
-            if (!filtered.length)
-                return detachIfFinished(results);
-            if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet)
-                return detachIfFinished(results);
-            if (this.autoInsert && filtered.length == 1 && results.finished)
-                return this.insertMatch(filtered[0]);
-            this.openPopup(this.editor, prefix, keepPopupPosition);
-        }.bind(this);
-        var isImmediate = true;
-        var immediateResults = null;
-        this.gatherCompletions(this.editor, function (err, results) {
-            var prefix = results.prefix;
-            var matches = results && results.matches;
-            if (!matches || !matches.length)
-                return detachIfFinished(results);
-            if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId)
-                return;
-            if (isImmediate) {
-                immediateResults = results;
-                return;
-            }
-            processResults(results);
-        }.bind(this));
-        isImmediate = false;
-        if (immediateResults) {
-            var results = immediateResults;
-            immediateResults = null;
-            processResults(results);
-        }
-    };
-    this.cancelContextMenu = function () {
-        this.editor.$mouseHandler.cancelContextMenu();
-    };
-    this.updateDocTooltip = function () {
-        var popup = this.popup;
-        var all = popup.data;
-        var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]);
-        var doc = null;
-        if (!selected || !this.editor || !this.popup.isOpen)
-            return this.hideDocTooltip();
-        this.editor.completers.some(function (completer) {
-            if (completer.getDocTooltip)
-                doc = completer.getDocTooltip(selected);
-            return doc;
-        });
-        if (!doc && typeof selected != "string")
-            doc = selected;
-        if (typeof doc == "string")
-            doc = { docText: doc };
-        if (!doc || !(doc.docHTML || doc.docText))
-            return this.hideDocTooltip();
-        this.showDocTooltip(doc);
-    };
-    this.showDocTooltip = function (item) {
-        if (!this.tooltipNode) {
-            this.tooltipNode = dom.createElement("div");
-            this.tooltipNode.className = "ace_tooltip ace_doc-tooltip";
-            this.tooltipNode.style.margin = 0;
-            this.tooltipNode.style.pointerEvents = "auto";
-            this.tooltipNode.tabIndex = -1;
-            this.tooltipNode.onblur = this.blurListener.bind(this);
-            this.tooltipNode.onclick = this.onTooltipClick.bind(this);
-        }
-        var tooltipNode = this.tooltipNode;
-        if (item.docHTML) {
-            tooltipNode.innerHTML = item.docHTML;
-        }
-        else if (item.docText) {
-            tooltipNode.textContent = item.docText;
-        }
-        if (!tooltipNode.parentNode)
-            document.body.appendChild(tooltipNode);
-        var popup = this.popup;
-        var rect = popup.container.getBoundingClientRect();
-        tooltipNode.style.top = popup.container.style.top;
-        tooltipNode.style.bottom = popup.container.style.bottom;
-        tooltipNode.style.display = "block";
-        if (window.innerWidth - rect.right < 320) {
-            if (rect.left < 320) {
-                if (popup.isTopdown) {
-                    tooltipNode.style.top = rect.bottom + "px";
-                    tooltipNode.style.left = rect.left + "px";
-                    tooltipNode.style.right = "";
-                    tooltipNode.style.bottom = "";
-                }
-                else {
-                    tooltipNode.style.top = popup.container.offsetTop - tooltipNode.offsetHeight + "px";
-                    tooltipNode.style.left = rect.left + "px";
-                    tooltipNode.style.right = "";
-                    tooltipNode.style.bottom = "";
-                }
-            }
-            else {
-                tooltipNode.style.right = window.innerWidth - rect.left + "px";
-                tooltipNode.style.left = "";
-            }
-        }
-        else {
-            tooltipNode.style.left = (rect.right + 1) + "px";
-            tooltipNode.style.right = "";
-        }
-    };
-    this.hideDocTooltip = function () {
-        this.tooltipTimer.cancel();
-        if (!this.tooltipNode)
-            return;
-        var el = this.tooltipNode;
-        if (!this.editor.isFocused() && document.activeElement == el)
-            this.editor.focus();
-        this.tooltipNode = null;
-        if (el.parentNode)
-            el.parentNode.removeChild(el);
-    };
-    this.onTooltipClick = function (e) {
-        var a = e.target;
-        while (a && a != this.tooltipNode) {
-            if (a.nodeName == "A" && a.href) {
-                a.rel = "noreferrer";
-                a.target = "_blank";
-                break;
-            }
-            a = a.parentNode;
-        }
-    };
-    this.destroy = function () {
-        this.detach();
-        if (this.popup) {
-            this.popup.destroy();
-            var el = this.popup.container;
-            if (el && el.parentNode)
-                el.parentNode.removeChild(el);
-        }
-        if (this.editor && this.editor.completer == this)
-            this.editor.completer == null;
-        this.popup = null;
-    };
-}).call(Autocomplete.prototype);
-Autocomplete.for = function (editor) {
-    if (editor.completer) {
-        return editor.completer;
-    }
-    if (config.get("sharedPopups")) {
-        if (!Autocomplete.$shared)
-            Autocomplete.$sharedInstance = new Autocomplete();
-        editor.completer = Autocomplete.$sharedInstance;
-    }
-    else {
-        editor.completer = new Autocomplete();
-        editor.once("destroy", function (e, editor) {
-            editor.completer.destroy();
-        });
-    }
-    return editor.completer;
-};
-Autocomplete.startCommand = {
-    name: "startAutocomplete",
-    exec: function (editor, options) {
-        var completer = Autocomplete.for(editor);
-        completer.autoInsert = false;
-        completer.autoSelect = true;
-        completer.showPopup(editor, options);
-        completer.cancelContextMenu();
-    },
-    bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space"
-};
-var FilteredList = function (array, filterText) {
-    this.all = array;
-    this.filtered = array;
-    this.filterText = filterText || "";
-    this.exactMatch = false;
-};
-(function () {
-    this.setFilter = function (str) {
-        if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0)
-            var matches = this.filtered;
-        else
-            var matches = this.all;
-        this.filterText = str;
-        matches = this.filterCompletions(matches, this.filterText);
-        matches = matches.sort(function (a, b) {
-            return b.exactMatch - a.exactMatch || b.$score - a.$score
-                || (a.caption || a.value).localeCompare(b.caption || b.value);
-        });
-        var prev = null;
-        matches = matches.filter(function (item) {
-            var caption = item.snippet || item.caption || item.value;
-            if (caption === prev)
-                return false;
-            prev = caption;
-            return true;
-        });
-        this.filtered = matches;
-    };
-    this.filterCompletions = function (items, needle) {
-        var results = [];
-        var upper = needle.toUpperCase();
-        var lower = needle.toLowerCase();
-        loop: for (var i = 0, item; item = items[i]; i++) {
-            var caption = item.caption || item.value || item.snippet;
-            if (!caption)
-                continue;
-            var lastIndex = -1;
-            var matchMask = 0;
-            var penalty = 0;
-            var index, distance;
-            if (this.exactMatch) {
-                if (needle !== caption.substr(0, needle.length))
-                    continue loop;
-            }
-            else {
-                var fullMatchIndex = caption.toLowerCase().indexOf(lower);
-                if (fullMatchIndex > -1) {
-                    penalty = fullMatchIndex;
-                }
-                else {
-                    for (var j = 0; j < needle.length; j++) {
-                        var i1 = caption.indexOf(lower[j], lastIndex + 1);
-                        var i2 = caption.indexOf(upper[j], lastIndex + 1);
-                        index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2;
-                        if (index < 0)
-                            continue loop;
-                        distance = index - lastIndex - 1;
-                        if (distance > 0) {
-                            if (lastIndex === -1)
-                                penalty += 10;
-                            penalty += distance;
-                            matchMask = matchMask | (1 << j);
-                        }
-                        lastIndex = index;
-                    }
-                }
-            }
-            item.matchMask = matchMask;
-            item.exactMatch = penalty ? 0 : 1;
-            item.$score = (item.score || 0) - penalty;
-            results.push(item);
-        }
-        return results;
-    };
-}).call(FilteredList.prototype);
-exports.Autocomplete = Autocomplete;
-exports.FilteredList = FilteredList;
-
-});
-
-ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module){var Range = require("../range").Range;
-var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;
-function getWordIndex(doc, pos) {
-    var textBefore = doc.getTextRange(Range.fromPoints({ row: 0, column: 0 }, pos));
-    return textBefore.split(splitRegex).length - 1;
-}
-function wordDistance(doc, pos) {
-    var prefixPos = getWordIndex(doc, pos);
-    var words = doc.getValue().split(splitRegex);
-    var wordScores = Object.create(null);
-    var currentWord = words[prefixPos];
-    words.forEach(function (word, idx) {
-        if (!word || word === currentWord)
-            return;
-        var distance = Math.abs(prefixPos - idx);
-        var score = words.length - distance;
-        if (wordScores[word]) {
-            wordScores[word] = Math.max(score, wordScores[word]);
-        }
-        else {
-            wordScores[word] = score;
-        }
-    });
-    return wordScores;
-}
-exports.getCompletions = function (editor, session, pos, prefix, callback) {
-    var wordScore = wordDistance(session, pos);
-    var wordList = Object.keys(wordScore);
-    callback(null, wordList.map(function (word) {
-        return {
-            caption: word,
-            value: word,
-            score: wordScore[word],
-            meta: "local"
-        };
-    }));
-};
-
-});
-
-ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module){"use strict";
-var snippetManager = require("../snippets").snippetManager;
-var Autocomplete = require("../autocomplete").Autocomplete;
-var config = require("../config");
-var lang = require("../lib/lang");
-var util = require("../autocomplete/util");
-var textCompleter = require("../autocomplete/text_completer");
-var keyWordCompleter = {
-    getCompletions: function (editor, session, pos, prefix, callback) {
-        if (session.$mode.completer) {
-            return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback);
-        }
-        var state = editor.session.getState(pos.row);
-        var completions = session.$mode.getCompletions(state, session, pos, prefix);
-        callback(null, completions);
-    }
-};
-var transformSnippetTooltip = function (str) {
-    var record = {};
-    return str.replace(/\${(\d+)(:(.*?))?}/g, function (_, p1, p2, p3) {
-        return (record[p1] = p3 || '');
-    }).replace(/\$(\d+?)/g, function (_, p1) {
-        return record[p1];
-    });
-};
-var snippetCompleter = {
-    getCompletions: function (editor, session, pos, prefix, callback) {
-        var scopes = [];
-        var token = session.getTokenAt(pos.row, pos.column);
-        if (token && token.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/))
-            scopes.push('html-tag');
-        else
-            scopes = snippetManager.getActiveScopes(editor);
-        var snippetMap = snippetManager.snippetMap;
-        var completions = [];
-        scopes.forEach(function (scope) {
-            var snippets = snippetMap[scope] || [];
-            for (var i = snippets.length; i--;) {
-                var s = snippets[i];
-                var caption = s.name || s.tabTrigger;
-                if (!caption)
-                    continue;
-                completions.push({
-                    caption: caption,
-                    snippet: s.content,
-                    meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet",
-                    type: "snippet"
-                });
-            }
-        }, this);
-        callback(null, completions);
-    },
-    getDocTooltip: function (item) {
-        if (item.type == "snippet" && !item.docHTML) {
-            item.docHTML = [
-                "<b>", lang.escapeHTML(item.caption), "</b>", "<hr></hr>",
-                lang.escapeHTML(transformSnippetTooltip(item.snippet))
-            ].join("");
-        }
-    }
-};
-var completers = [snippetCompleter, textCompleter, keyWordCompleter];
-exports.setCompleters = function (val) {
-    completers.length = 0;
-    if (val)
-        completers.push.apply(completers, val);
-};
-exports.addCompleter = function (completer) {
-    completers.push(completer);
-};
-exports.textCompleter = textCompleter;
-exports.keyWordCompleter = keyWordCompleter;
-exports.snippetCompleter = snippetCompleter;
-var expandSnippet = {
-    name: "expandSnippet",
-    exec: function (editor) {
-        return snippetManager.expandWithTab(editor);
-    },
-    bindKey: "Tab"
-};
-var onChangeMode = function (e, editor) {
-    loadSnippetsForMode(editor.session.$mode);
-};
-var loadSnippetsForMode = function (mode) {
-    if (typeof mode == "string")
-        mode = config.$modes[mode];
-    if (!mode)
-        return;
-    if (!snippetManager.files)
-        snippetManager.files = {};
-    loadSnippetFile(mode.$id, mode.snippetFileId);
-    if (mode.modes)
-        mode.modes.forEach(loadSnippetsForMode);
-};
-var loadSnippetFile = function (id, snippetFilePath) {
-    if (!snippetFilePath || !id || snippetManager.files[id])
-        return;
-    snippetManager.files[id] = {};
-    config.loadModule(snippetFilePath, function (m) {
-        if (!m)
-            return;
-        snippetManager.files[id] = m;
-        if (!m.snippets && m.snippetText)
-            m.snippets = snippetManager.parseSnippetFile(m.snippetText);
-        snippetManager.register(m.snippets || [], m.scope);
-        if (m.includeScopes) {
-            snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes;
-            m.includeScopes.forEach(function (x) {
-                loadSnippetsForMode("ace/mode/" + x);
-            });
-        }
-    });
-};
-var doLiveAutocomplete = function (e) {
-    var editor = e.editor;
-    var hasCompleter = editor.completer && editor.completer.activated;
-    if (e.command.name === "backspace") {
-        if (hasCompleter && !util.getCompletionPrefix(editor))
-            editor.completer.detach();
-    }
-    else if (e.command.name === "insertstring") {
-        var prefix = util.getCompletionPrefix(editor);
-        if (prefix && !hasCompleter) {
-            var completer = Autocomplete.for(editor);
-            completer.autoInsert = false;
-            completer.showPopup(editor);
-        }
-    }
-};
-var Editor = require("../editor").Editor;
-require("../config").defineOptions(Editor.prototype, "editor", {
-    enableBasicAutocompletion: {
-        set: function (val) {
-            if (val) {
-                if (!this.completers)
-                    this.completers = Array.isArray(val) ? val : completers;
-                this.commands.addCommand(Autocomplete.startCommand);
-            }
-            else {
-                this.commands.removeCommand(Autocomplete.startCommand);
-            }
-        },
-        value: false
-    },
-    enableLiveAutocompletion: {
-        set: function (val) {
-            if (val) {
-                if (!this.completers)
-                    this.completers = Array.isArray(val) ? val : completers;
-                this.commands.on('afterExec', doLiveAutocomplete);
-            }
-            else {
-                this.commands.removeListener('afterExec', doLiveAutocomplete);
-            }
-        },
-        value: false
-    },
-    enableSnippets: {
-        set: function (val) {
-            if (val) {
-                this.commands.addCommand(expandSnippet);
-                this.on("changeMode", onChangeMode);
-                onChangeMode(null, this);
-            }
-            else {
-                this.commands.removeCommand(expandSnippet);
-                this.off("changeMode", onChangeMode);
-            }
-        },
-        value: false
-    }
-});
-
-});                (function() {
-                    ace.require(["ace/ext/language_tools"], function(m) {
-                        if (typeof module == "object" && typeof exports == "object" && module) {
-                            module.exports = m;
-                        }
-                    });
-                })();
-            

+ 184 - 172
web/d5452f10ffab904fba74ca2956dc9532.js → web/182aa449781ff6997bc12b8eb3611ccb.js

@@ -240,6 +240,27 @@ exports.implement = function (proto, mixin) {
 
 });
 
+ace.define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {
+    if (typeof obj !== "object" || !obj)
+        return obj;
+    var copy;
+    if (Array.isArray(obj)) {
+        copy = [];
+        for (var key = 0; key < obj.length; key++) {
+            copy[key] = deepCopy(obj[key]);
+        }
+        return copy;
+    }
+    if (Object.prototype.toString.call(obj) !== "[object Object]")
+        return obj;
+    copy = {};
+    for (var key in obj)
+        copy[key] = deepCopy(obj[key]);
+    return copy;
+};
+
+});
+
 ace.define("ace/lib/lang",[], function(require, exports, module){"use strict";
 exports.last = function (a) {
     return a[a.length - 1];
@@ -282,24 +303,7 @@ exports.copyArray = function (array) {
     }
     return copy;
 };
-exports.deepCopy = function deepCopy(obj) {
-    if (typeof obj !== "object" || !obj)
-        return obj;
-    var copy;
-    if (Array.isArray(obj)) {
-        copy = [];
-        for (var key = 0; key < obj.length; key++) {
-            copy[key] = deepCopy(obj[key]);
-        }
-        return copy;
-    }
-    if (Object.prototype.toString.call(obj) !== "[object Object]")
-        return obj;
-    copy = {};
-    for (var key in obj)
-        copy[key] = deepCopy(obj[key]);
-    return copy;
-};
+exports.deepCopy = require("./deep_copy").deepCopy;
 exports.arrayToMap = function (arr) {
     var map = {};
     for (var i = 0; i < arr.length; i++) {
@@ -392,6 +396,18 @@ exports.delayedCall = function (fcn, defaultTimeout) {
     };
     return _self;
 };
+exports.supportsLookbehind = function () {
+    try {
+        new RegExp('(?<=.)');
+    }
+    catch (e) {
+        return false;
+    }
+    return true;
+};
+exports.skipEmptyMatch = function (line, last, supportsUnicodeFlag) {
+    return supportsUnicodeFlag && line.codePointAt(last) > 0xffff ? 2 : 1;
+};
 
 });
 
@@ -568,34 +584,31 @@ exports.EventEmitter = EventEmitter;
 });
 
 ace.define("ace/range",[], function(require, exports, module){"use strict";
-var comparePoints = function (p1, p2) {
-    return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function (startRow, startColumn, endRow, endColumn) {
-    this.start = {
-        row: startRow,
-        column: startColumn
-    };
-    this.end = {
-        row: endRow,
-        column: endColumn
-    };
-};
-(function () {
-    this.isEqual = function (range) {
+var Range = /** @class */ (function () {
+    function Range(startRow, startColumn, endRow, endColumn) {
+        this.start = {
+            row: startRow,
+            column: startColumn
+        };
+        this.end = {
+            row: endRow,
+            column: endColumn
+        };
+    }
+    Range.prototype.isEqual = function (range) {
         return this.start.row === range.start.row &&
             this.end.row === range.end.row &&
             this.start.column === range.start.column &&
             this.end.column === range.end.column;
     };
-    this.toString = function () {
+    Range.prototype.toString = function () {
         return ("Range: [" + this.start.row + "/" + this.start.column +
             "] -> [" + this.end.row + "/" + this.end.column + "]");
     };
-    this.contains = function (row, column) {
+    Range.prototype.contains = function (row, column) {
         return this.compare(row, column) == 0;
     };
-    this.compareRange = function (range) {
+    Range.prototype.compareRange = function (range) {
         var cmp, end = range.end, start = range.start;
         cmp = this.compare(end.row, end.column);
         if (cmp == 1) {
@@ -626,23 +639,23 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             }
         }
     };
-    this.comparePoint = function (p) {
+    Range.prototype.comparePoint = function (p) {
         return this.compare(p.row, p.column);
     };
-    this.containsRange = function (range) {
+    Range.prototype.containsRange = function (range) {
         return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
     };
-    this.intersects = function (range) {
+    Range.prototype.intersects = function (range) {
         var cmp = this.compareRange(range);
         return (cmp == -1 || cmp == 0 || cmp == 1);
     };
-    this.isEnd = function (row, column) {
+    Range.prototype.isEnd = function (row, column) {
         return this.end.row == row && this.end.column == column;
     };
-    this.isStart = function (row, column) {
+    Range.prototype.isStart = function (row, column) {
         return this.start.row == row && this.start.column == column;
     };
-    this.setStart = function (row, column) {
+    Range.prototype.setStart = function (row, column) {
         if (typeof row == "object") {
             this.start.column = row.column;
             this.start.row = row.row;
@@ -652,7 +665,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.start.column = column;
         }
     };
-    this.setEnd = function (row, column) {
+    Range.prototype.setEnd = function (row, column) {
         if (typeof row == "object") {
             this.end.column = row.column;
             this.end.row = row.row;
@@ -662,7 +675,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.end.column = column;
         }
     };
-    this.inside = function (row, column) {
+    Range.prototype.inside = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column) || this.isStart(row, column)) {
                 return false;
@@ -673,7 +686,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideStart = function (row, column) {
+    Range.prototype.insideStart = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column)) {
                 return false;
@@ -684,7 +697,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideEnd = function (row, column) {
+    Range.prototype.insideEnd = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isStart(row, column)) {
                 return false;
@@ -695,7 +708,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.compare = function (row, column) {
+    Range.prototype.compare = function (row, column) {
         if (!this.isMultiLine()) {
             if (row === this.start.row) {
                 return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
@@ -711,7 +724,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return column <= this.end.column ? 0 : 1;
         return 0;
     };
-    this.compareStart = function (row, column) {
+    Range.prototype.compareStart = function (row, column) {
         if (this.start.row == row && this.start.column == column) {
             return -1;
         }
@@ -719,7 +732,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareEnd = function (row, column) {
+    Range.prototype.compareEnd = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -727,7 +740,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareInside = function (row, column) {
+    Range.prototype.compareInside = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -738,7 +751,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.clipRows = function (firstRow, lastRow) {
+    Range.prototype.clipRows = function (firstRow, lastRow) {
         if (this.end.row > lastRow)
             var end = { row: lastRow + 1, column: 0 };
         else if (this.end.row < firstRow)
@@ -749,7 +762,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var start = { row: firstRow, column: 0 };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.extend = function (row, column) {
+    Range.prototype.extend = function (row, column) {
         var cmp = this.compare(row, column);
         if (cmp == 0)
             return this;
@@ -759,37 +772,37 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var end = { row: row, column: column };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.isEmpty = function () {
+    Range.prototype.isEmpty = function () {
         return (this.start.row === this.end.row && this.start.column === this.end.column);
     };
-    this.isMultiLine = function () {
+    Range.prototype.isMultiLine = function () {
         return (this.start.row !== this.end.row);
     };
-    this.clone = function () {
+    Range.prototype.clone = function () {
         return Range.fromPoints(this.start, this.end);
     };
-    this.collapseRows = function () {
+    Range.prototype.collapseRows = function () {
         if (this.end.column == 0)
             return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);
         else
             return new Range(this.start.row, 0, this.end.row, 0);
     };
-    this.toScreenRange = function (session) {
+    Range.prototype.toScreenRange = function (session) {
         var screenPosStart = session.documentToScreenPosition(this.start);
         var screenPosEnd = session.documentToScreenPosition(this.end);
         return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);
     };
-    this.moveBy = function (row, column) {
+    Range.prototype.moveBy = function (row, column) {
         this.start.row += row;
         this.start.column += column;
         this.end.row += row;
         this.end.column += column;
     };
-}).call(Range.prototype);
+    return Range;
+}());
 Range.fromPoints = function (start, end) {
     return new Range(start.row, start.column, end.row, end.column);
 };
-Range.comparePoints = comparePoints;
 Range.comparePoints = function (p1, p2) {
     return p1.row - p2.row || p1.column - p2.column;
 };
@@ -800,24 +813,22 @@ exports.Range = Range;
 ace.define("ace/anchor",[], function(require, exports, module){"use strict";
 var oop = require("./lib/oop");
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Anchor = exports.Anchor = function (doc, row, column) {
-    this.$onChange = this.onChange.bind(this);
-    this.attach(doc);
-    if (typeof column == "undefined")
-        this.setPosition(row.row, row.column);
-    else
-        this.setPosition(row, column);
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.getPosition = function () {
+var Anchor = /** @class */ (function () {
+    function Anchor(doc, row, column) {
+        this.$onChange = this.onChange.bind(this);
+        this.attach(doc);
+        if (typeof row != "number")
+            this.setPosition(row.row, row.column);
+        else
+            this.setPosition(row, column);
+    }
+    Anchor.prototype.getPosition = function () {
         return this.$clipPositionToDocument(this.row, this.column);
     };
-    this.getDocument = function () {
+    Anchor.prototype.getDocument = function () {
         return this.document;
     };
-    this.$insertRight = false;
-    this.onChange = function (delta) {
+    Anchor.prototype.onChange = function (delta) {
         if (delta.start.row == delta.end.row && delta.start.row != this.row)
             return;
         if (delta.start.row > this.row)
@@ -825,34 +836,7 @@ var Anchor = exports.Anchor = function (doc, row, column) {
         var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);
         this.setPosition(point.row, point.column, true);
     };
-    function $pointsInOrder(point1, point2, equalPointsInOrder) {
-        var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
-        return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
-    }
-    function $getTransformedPoint(delta, point, moveIfEqual) {
-        var deltaIsInsert = delta.action == "insert";
-        var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
-        var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
-        var deltaStart = delta.start;
-        var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
-        if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
-            return {
-                row: point.row,
-                column: point.column
-            };
-        }
-        if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
-            return {
-                row: point.row + deltaRowShift,
-                column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
-            };
-        }
-        return {
-            row: deltaStart.row,
-            column: deltaStart.column
-        };
-    }
-    this.setPosition = function (row, column, noClip) {
+    Anchor.prototype.setPosition = function (row, column, noClip) {
         var pos;
         if (noClip) {
             pos = {
@@ -876,14 +860,14 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             value: pos
         });
     };
-    this.detach = function () {
+    Anchor.prototype.detach = function () {
         this.document.off("change", this.$onChange);
     };
-    this.attach = function (doc) {
+    Anchor.prototype.attach = function (doc) {
         this.document = doc || this.document;
         this.document.on("change", this.$onChange);
     };
-    this.$clipPositionToDocument = function (row, column) {
+    Anchor.prototype.$clipPositionToDocument = function (row, column) {
         var pos = {};
         if (row >= this.document.getLength()) {
             pos.row = Math.max(0, this.document.getLength() - 1);
@@ -901,7 +885,38 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             pos.column = 0;
         return pos;
     };
-}).call(Anchor.prototype);
+    return Anchor;
+}());
+Anchor.prototype.$insertRight = false;
+oop.implement(Anchor.prototype, EventEmitter);
+function $pointsInOrder(point1, point2, equalPointsInOrder) {
+    var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+    return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+}
+function $getTransformedPoint(delta, point, moveIfEqual) {
+    var deltaIsInsert = delta.action == "insert";
+    var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+    var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+    var deltaStart = delta.start;
+    var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+    if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+        return {
+            row: point.row,
+            column: point.column
+        };
+    }
+    if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+        return {
+            row: point.row + deltaRowShift,
+            column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+        };
+    }
+    return {
+        row: deltaStart.row,
+        column: deltaStart.column
+    };
+}
+exports.Anchor = Anchor;
 
 });
 
@@ -911,47 +926,36 @@ var applyDelta = require("./apply_delta").applyDelta;
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
 var Range = require("./range").Range;
 var Anchor = require("./anchor").Anchor;
-var Document = function (textOrLines) {
-    this.$lines = [""];
-    if (textOrLines.length === 0) {
+var Document = /** @class */ (function () {
+    function Document(textOrLines) {
         this.$lines = [""];
+        if (textOrLines.length === 0) {
+            this.$lines = [""];
+        }
+        else if (Array.isArray(textOrLines)) {
+            this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
+        }
+        else {
+            this.insert({ row: 0, column: 0 }, textOrLines);
+        }
     }
-    else if (Array.isArray(textOrLines)) {
-        this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
-    }
-    else {
-        this.insert({ row: 0, column: 0 }, textOrLines);
-    }
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.setValue = function (text) {
+    Document.prototype.setValue = function (text) {
         var len = this.getLength() - 1;
         this.remove(new Range(0, 0, len, this.getLine(len).length));
-        this.insert({ row: 0, column: 0 }, text);
+        this.insert({ row: 0, column: 0 }, text || "");
     };
-    this.getValue = function () {
+    Document.prototype.getValue = function () {
         return this.getAllLines().join(this.getNewLineCharacter());
     };
-    this.createAnchor = function (row, column) {
+    Document.prototype.createAnchor = function (row, column) {
         return new Anchor(this, row, column);
     };
-    if ("aaa".split(/a/).length === 0) {
-        this.$split = function (text) {
-            return text.replace(/\r\n|\r/g, "\n").split("\n");
-        };
-    }
-    else {
-        this.$split = function (text) {
-            return text.split(/\r\n|\r|\n/);
-        };
-    }
-    this.$detectNewLine = function (text) {
+    Document.prototype.$detectNewLine = function (text) {
         var match = text.match(/^.*?(\r\n|\r|\n)/m);
         this.$autoNewLine = match ? match[1] : "\n";
         this._signal("changeNewLineMode");
     };
-    this.getNewLineCharacter = function () {
+    Document.prototype.getNewLineCharacter = function () {
         switch (this.$newLineMode) {
             case "windows":
                 return "\r\n";
@@ -961,36 +965,34 @@ var Document = function (textOrLines) {
                 return this.$autoNewLine || "\n";
         }
     };
-    this.$autoNewLine = "";
-    this.$newLineMode = "auto";
-    this.setNewLineMode = function (newLineMode) {
+    Document.prototype.setNewLineMode = function (newLineMode) {
         if (this.$newLineMode === newLineMode)
             return;
         this.$newLineMode = newLineMode;
         this._signal("changeNewLineMode");
     };
-    this.getNewLineMode = function () {
+    Document.prototype.getNewLineMode = function () {
         return this.$newLineMode;
     };
-    this.isNewLine = function (text) {
+    Document.prototype.isNewLine = function (text) {
         return (text == "\r\n" || text == "\r" || text == "\n");
     };
-    this.getLine = function (row) {
+    Document.prototype.getLine = function (row) {
         return this.$lines[row] || "";
     };
-    this.getLines = function (firstRow, lastRow) {
+    Document.prototype.getLines = function (firstRow, lastRow) {
         return this.$lines.slice(firstRow, lastRow + 1);
     };
-    this.getAllLines = function () {
+    Document.prototype.getAllLines = function () {
         return this.getLines(0, this.getLength());
     };
-    this.getLength = function () {
+    Document.prototype.getLength = function () {
         return this.$lines.length;
     };
-    this.getTextRange = function (range) {
+    Document.prototype.getTextRange = function (range) {
         return this.getLinesForRange(range).join(this.getNewLineCharacter());
     };
-    this.getLinesForRange = function (range) {
+    Document.prototype.getLinesForRange = function (range) {
         var lines;
         if (range.start.row === range.end.row) {
             lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
@@ -1004,24 +1006,24 @@ var Document = function (textOrLines) {
         }
         return lines;
     };
-    this.insertLines = function (row, lines) {
+    Document.prototype.insertLines = function (row, lines) {
         console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
         return this.insertFullLines(row, lines);
     };
-    this.removeLines = function (firstRow, lastRow) {
+    Document.prototype.removeLines = function (firstRow, lastRow) {
         console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
         return this.removeFullLines(firstRow, lastRow);
     };
-    this.insertNewLine = function (position) {
+    Document.prototype.insertNewLine = function (position) {
         console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
         return this.insertMergedLines(position, ["", ""]);
     };
-    this.insert = function (position, text) {
+    Document.prototype.insert = function (position, text) {
         if (this.getLength() <= 1)
             this.$detectNewLine(text);
         return this.insertMergedLines(position, this.$split(text));
     };
-    this.insertInLine = function (position, text) {
+    Document.prototype.insertInLine = function (position, text) {
         var start = this.clippedPos(position.row, position.column);
         var end = this.pos(position.row, position.column + text.length);
         this.applyDelta({
@@ -1032,7 +1034,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(end);
     };
-    this.clippedPos = function (row, column) {
+    Document.prototype.clippedPos = function (row, column) {
         var length = this.getLength();
         if (row === undefined) {
             row = length;
@@ -1050,13 +1052,13 @@ var Document = function (textOrLines) {
         column = Math.min(Math.max(column, 0), line.length);
         return { row: row, column: column };
     };
-    this.clonePos = function (pos) {
+    Document.prototype.clonePos = function (pos) {
         return { row: pos.row, column: pos.column };
     };
-    this.pos = function (row, column) {
+    Document.prototype.pos = function (row, column) {
         return { row: row, column: column };
     };
-    this.$clipPosition = function (position) {
+    Document.prototype.$clipPosition = function (position) {
         var length = this.getLength();
         if (position.row >= length) {
             position.row = Math.max(0, length - 1);
@@ -1068,7 +1070,7 @@ var Document = function (textOrLines) {
         }
         return position;
     };
-    this.insertFullLines = function (row, lines) {
+    Document.prototype.insertFullLines = function (row, lines) {
         row = Math.min(Math.max(row, 0), this.getLength());
         var column = 0;
         if (row < this.getLength()) {
@@ -1082,7 +1084,7 @@ var Document = function (textOrLines) {
         }
         this.insertMergedLines({ row: row, column: column }, lines);
     };
-    this.insertMergedLines = function (position, lines) {
+    Document.prototype.insertMergedLines = function (position, lines) {
         var start = this.clippedPos(position.row, position.column);
         var end = {
             row: start.row + lines.length - 1,
@@ -1096,7 +1098,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(end);
     };
-    this.remove = function (range) {
+    Document.prototype.remove = function (range) {
         var start = this.clippedPos(range.start.row, range.start.column);
         var end = this.clippedPos(range.end.row, range.end.column);
         this.applyDelta({
@@ -1107,7 +1109,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(start);
     };
-    this.removeInLine = function (row, startColumn, endColumn) {
+    Document.prototype.removeInLine = function (row, startColumn, endColumn) {
         var start = this.clippedPos(row, startColumn);
         var end = this.clippedPos(row, endColumn);
         this.applyDelta({
@@ -1118,7 +1120,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(start);
     };
-    this.removeFullLines = function (firstRow, lastRow) {
+    Document.prototype.removeFullLines = function (firstRow, lastRow) {
         firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
         lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
         var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
@@ -1137,7 +1139,7 @@ var Document = function (textOrLines) {
         });
         return deletedLines;
     };
-    this.removeNewLine = function (row) {
+    Document.prototype.removeNewLine = function (row) {
         if (row < this.getLength() - 1 && row >= 0) {
             this.applyDelta({
                 start: this.pos(row, this.getLine(row).length),
@@ -1147,7 +1149,7 @@ var Document = function (textOrLines) {
             });
         }
     };
-    this.replace = function (range, text) {
+    Document.prototype.replace = function (range, text) {
         if (!(range instanceof Range))
             range = Range.fromPoints(range.start, range.end);
         if (text.length === 0 && range.isEmpty())
@@ -1164,17 +1166,17 @@ var Document = function (textOrLines) {
         }
         return end;
     };
-    this.applyDeltas = function (deltas) {
+    Document.prototype.applyDeltas = function (deltas) {
         for (var i = 0; i < deltas.length; i++) {
             this.applyDelta(deltas[i]);
         }
     };
-    this.revertDeltas = function (deltas) {
+    Document.prototype.revertDeltas = function (deltas) {
         for (var i = deltas.length - 1; i >= 0; i--) {
             this.revertDelta(deltas[i]);
         }
     };
-    this.applyDelta = function (delta, doNotValidate) {
+    Document.prototype.applyDelta = function (delta, doNotValidate) {
         var isInsert = delta.action == "insert";
         if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
             : !Range.comparePoints(delta.start, delta.end)) {
@@ -1188,14 +1190,14 @@ var Document = function (textOrLines) {
             this._signal("change", delta);
         }
     };
-    this.$safeApplyDelta = function (delta) {
+    Document.prototype.$safeApplyDelta = function (delta) {
         var docLength = this.$lines.length;
         if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
             || delta.action == "insert" && delta.start.row <= docLength) {
             this.applyDelta(delta);
         }
     };
-    this.$splitAndapplyLargeDelta = function (delta, MAX) {
+    Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {
         var lines = delta.lines;
         var l = lines.length - MAX + 1;
         var row = delta.start.row;
@@ -1216,7 +1218,7 @@ var Document = function (textOrLines) {
         delta.start.column = column;
         this.applyDelta(delta, true);
     };
-    this.revertDelta = function (delta) {
+    Document.prototype.revertDelta = function (delta) {
         this.$safeApplyDelta({
             start: this.clonePos(delta.start),
             end: this.clonePos(delta.end),
@@ -1224,7 +1226,7 @@ var Document = function (textOrLines) {
             lines: delta.lines.slice()
         });
     };
-    this.indexToPosition = function (index, startRow) {
+    Document.prototype.indexToPosition = function (index, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         for (var i = startRow || 0, l = lines.length; i < l; i++) {
@@ -1234,7 +1236,7 @@ var Document = function (textOrLines) {
         }
         return { row: l - 1, column: index + lines[l - 1].length + newlineLength };
     };
-    this.positionToIndex = function (pos, startRow) {
+    Document.prototype.positionToIndex = function (pos, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         var index = 0;
@@ -1243,7 +1245,14 @@ var Document = function (textOrLines) {
             index += lines[i].length + newlineLength;
         return index + pos.column;
     };
-}).call(Document.prototype);
+    Document.prototype.$split = function (text) {
+        return text.split(/\r\n|\r|\n/);
+    };
+    return Document;
+}());
+Document.prototype.$autoNewLine = "";
+Document.prototype.$newLineMode = "auto";
+oop.implement(Document.prototype, EventEmitter);
 exports.Document = Document;
 
 });
@@ -1462,7 +1471,7 @@ function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
 						errorHandler.warning('unclosed xml attribute');
 					}
 				}
-				appendElement(el,domBuilder,parseStack);
+				appendElement(el,domBuilder,parseStack,errorHandler);
 				
 				
 				if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
@@ -1626,7 +1635,7 @@ function parseElementStartPart(source,start,el,entityReplacer,errorHandler){
 		p++;
 	}
 }
-function appendElement(el,domBuilder,parseStack){
+function appendElement(el,domBuilder,parseStack,errorHandler){
 	var tagName = el.tagName;
 	var localNSMap = null;
 	var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
@@ -1677,6 +1686,9 @@ function appendElement(el,domBuilder,parseStack){
 		localName = el.localName = tagName;
 	}
 	var ns = el.uri = currentNSMap[prefix || ''];
+	if (prefix && !ns) {
+		errorHandler.error('unexpected namespace ' + prefix);
+	}
 	domBuilder.startElement(ns,localName,tagName,el);
 	if(el.closed){
 		domBuilder.endElement(ns,localName,tagName);

+ 9 - 0
web/182fa653555b8340835b3bf4f7192ae2.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/plsql"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

+ 9 - 4
web/931d2d4721a07dc0cef85cc83d1dd6db.js → web/188744ad64e26326b70337714cc840c8.js

@@ -5,10 +5,7 @@ var Range = require("../../range").Range;
 var FoldMode = exports.FoldMode = function () { };
 oop.inherits(FoldMode, BaseFoldMode);
 (function () {
-    this.getFoldWidgetRange = function (session, foldStyle, row) {
-        var range = this.indentationBlock(session, row);
-        if (range)
-            return range;
+    this.commentBlock = function (session, row) {
         var re = /\S/;
         var line = session.getLine(row);
         var startLevel = line.search(re);
@@ -32,6 +29,14 @@ oop.inherits(FoldMode, BaseFoldMode);
             return new Range(startRow, startColumn, endRow, endColumn);
         }
     };
+    this.getFoldWidgetRange = function (session, foldStyle, row) {
+        var range = this.indentationBlock(session, row);
+        if (range)
+            return range;
+        range = this.commentBlock(session, row);
+        if (range)
+            return range;
+    };
     this.getFoldWidget = function (session, foldStyle, row) {
         var line = session.getLine(row);
         var indent = line.search(/\S/);

+ 87 - 42
web/95a23ada6ec60a233048280a7b7792b2.js → web/19f066c0bebc1c63ec7fc7cc1a63b1df.js

@@ -72,25 +72,28 @@ function getModeForPath(path) {
     }
     return mode;
 }
-var Mode = function (name, caption, extensions) {
-    this.name = name;
-    this.caption = caption;
-    this.mode = "ace/mode/" + name;
-    this.extensions = extensions;
-    var re;
-    if (/\^/.test(extensions)) {
-        re = extensions.replace(/\|(\^)?/g, function (a, b) {
-            return "$|" + (b ? "^" : "^.*\\.");
-        }) + "$";
-    }
-    else {
-        re = "^.*\\.(" + extensions + ")$";
+var Mode = /** @class */ (function () {
+    function Mode(name, caption, extensions) {
+        this.name = name;
+        this.caption = caption;
+        this.mode = "ace/mode/" + name;
+        this.extensions = extensions;
+        var re;
+        if (/\^/.test(extensions)) {
+            re = extensions.replace(/\|(\^)?/g, function (a, b) {
+                return "$|" + (b ? "^" : "^.*\\.");
+            }) + "$";
+        }
+        else {
+            re = "\\.(" + extensions + ")$";
+        }
+        this.extRe = new RegExp(re, "gi");
     }
-    this.extRe = new RegExp(re, "gi");
-};
-Mode.prototype.supportsFile = function (filename) {
-    return filename.match(this.extRe);
-};
+    Mode.prototype.supportsFile = function (filename) {
+        return filename.match(this.extRe);
+    };
+    return Mode;
+}());
 var supportedModes = {
     ABAP: ["abap"],
     ABC: ["abc"],
@@ -102,26 +105,33 @@ var supportedModes = {
     AQL: ["aql"],
     AsciiDoc: ["asciidoc|adoc"],
     ASL: ["dsl|asl|asl.json"],
+    Assembly_ARM32: ["s"],
     Assembly_x86: ["asm|a"],
+    Astro: ["astro"],
     AutoHotKey: ["ahk"],
     BatchFile: ["bat|cmd"],
+    Basic: ["bas|bak"],
+    BibTeX: ["bib"],
     C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
     C9Search: ["c9search_results"],
     Cirru: ["cirru|cr"],
     Clojure: ["clj|cljs"],
     Cobol: ["CBL|COB"],
     coffee: ["coffee|cf|cson|^Cakefile"],
-    ColdFusion: ["cfm"],
+    ColdFusion: ["cfm|cfc"],
     Crystal: ["cr"],
     CSharp: ["cs"],
     Csound_Document: ["csd"],
     Csound_Orchestra: ["orc"],
     Csound_Score: ["sco"],
     CSS: ["css"],
+    CSV: ["csv"],
     Curly: ["curly"],
+    Cuttlefish: ["conf"],
     D: ["d|di"],
     Dart: ["dart"],
     Diff: ["diff|patch"],
+    Django: ["djt|html.djt|dj.html|djhtml"],
     Dockerfile: ["^Dockerfile"],
     Dot: ["dot"],
     Drools: ["drl"],
@@ -131,6 +141,7 @@ var supportedModes = {
     Elixir: ["ex|exs"],
     Elm: ["elm"],
     Erlang: ["erl|hrl"],
+    Flix: ["flix"],
     Forth: ["frt|fs|ldr|fth|4th"],
     Fortran: ["f|f90"],
     FSharp: ["fsi|fs|ml|mli|fsx|fsscript"],
@@ -150,7 +161,7 @@ var supportedModes = {
     Haskell_Cabal: ["cabal"],
     haXe: ["hx"],
     Hjson: ["hjson"],
-    HTML: ["html|htm|xhtml|vue|we|wpy"],
+    HTML: ["html|htm|xhtml|we|wpy"],
     HTML_Elixir: ["eex|html.eex"],
     HTML_Ruby: ["erb|rhtml|html.erb"],
     INI: ["ini|conf|cfg|prefs"],
@@ -159,7 +170,8 @@ var supportedModes = {
     Jack: ["jack"],
     Jade: ["jade|pug"],
     Java: ["java"],
-    JavaScript: ["js|jsm|jsx|cjs|mjs"],
+    JavaScript: ["js|jsm|cjs|mjs"],
+    JEXL: ["jexl"],
     JSON: ["json"],
     JSON5: ["json5"],
     JSONiq: ["jq"],
@@ -176,6 +188,7 @@ var supportedModes = {
     LiveScript: ["ls"],
     Log: ["log"],
     LogiQL: ["logic|lql"],
+    Logtalk: ["lgt"],
     LSL: ["lsl"],
     Lua: ["lua"],
     LuaPage: ["lp"],
@@ -191,6 +204,7 @@ var supportedModes = {
     MIXAL: ["mixal"],
     MUSHCode: ["mc|mush"],
     MySQL: ["mysql"],
+    Nasal: ["nas"],
     Nginx: ["nginx|conf"],
     Nim: ["nim"],
     Nix: ["nix"],
@@ -198,19 +212,22 @@ var supportedModes = {
     Nunjucks: ["nunjucks|nunjs|nj|njk"],
     ObjectiveC: ["m|mm"],
     OCaml: ["ml|mli"],
+    Odin: ["odin"],
     PartiQL: ["partiql|pql"],
     Pascal: ["pas|p"],
     Perl: ["pl|pm"],
     pgSQL: ["pgsql"],
-    PHP_Laravel_blade: ["blade.php"],
     PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
+    PHP_Laravel_blade: ["blade.php"],
     Pig: ["pig"],
+    PLSQL: ["plsql"],
     Powershell: ["ps1"],
     Praat: ["praat|praatscript|psc|proc"],
     Prisma: ["prisma"],
     Prolog: ["plg|prolog"],
     Properties: ["properties"],
     Protobuf: ["proto"],
+    PRQL: ["prql"],
     Puppet: ["epp|pp"],
     Python: ["py"],
     QML: ["qml"],
@@ -239,6 +256,7 @@ var supportedModes = {
     snippets: ["snippets"],
     Soy_Template: ["soy"],
     Space: ["space"],
+    SPARQL: ["rq"],
     SQL: ["sql"],
     SQLServer: ["sqlserver"],
     Stylus: ["styl|stylus"],
@@ -250,21 +268,24 @@ var supportedModes = {
     Text: ["txt"],
     Textile: ["textile"],
     Toml: ["toml"],
+    TSV: ["tsv"],
     TSX: ["tsx"],
+    Turtle: ["ttl"],
     Twig: ["twig|swig"],
-    Typescript: ["ts|typescript|str"],
+    Typescript: ["ts|mts|cts|typescript|str"],
     Vala: ["vala"],
     VBScript: ["vbs|vb"],
     Velocity: ["vm"],
     Verilog: ["v|vh|sv|svh"],
     VHDL: ["vhd|vhdl"],
     Visualforce: ["vfp|component|page"],
+    Vue: ["vue"],
     Wollok: ["wlk|wpgm|wtest"],
     XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
     XQuery: ["xq"],
     YAML: ["yaml|yml"],
     Zeek: ["zeek|bro"],
-    Django: ["html"]
+    Zig: ["zig"]
 };
 var nameOverrides = {
     ObjectiveC: "Objective-C",
@@ -314,7 +335,8 @@ var themeData = [
     ["Dawn"],
     ["Dreamweaver"],
     ["Eclipse"],
-    ["GitHub"],
+    ["GitHub Light Default"],
+    ["GitHub (Legacy)", "github", "light"],
     ["IPlastic"],
     ["Solarized Light"],
     ["TextMate"],
@@ -323,6 +345,7 @@ var themeData = [
     ["Kuroir"],
     ["KatzenMilch"],
     ["SQL Server", "sqlserver", "light"],
+    ["CloudEditor", "cloud_editor", "light"],
     ["Ambiance", "ambiance", "dark"],
     ["Chaos", "chaos", "dark"],
     ["Clouds Midnight", "clouds_midnight", "dark"],
@@ -346,7 +369,9 @@ var themeData = [
     ["Tomorrow Night Bright", "tomorrow_night_bright", "dark"],
     ["Tomorrow Night 80s", "tomorrow_night_eighties", "dark"],
     ["Twilight", "twilight", "dark"],
-    ["Vibrant Ink", "vibrant_ink", "dark"]
+    ["Vibrant Ink", "vibrant_ink", "dark"],
+    ["GitHub Dark", "github_dark", "dark"],
+    ["CloudEditor Dark", "cloud_editor_dark", "dark"]
 ];
 exports.themesByName = {};
 exports.themes = themeData.map(function (data) {
@@ -484,6 +509,9 @@ var optionGroups = {
         "Show Indent Guides": {
             path: "displayIndentGuides"
         },
+        "Highlight Indent Guides": {
+            path: "highlightIndentGuides"
+        },
         "Persistent HScrollbar": {
             path: "hScrollBarAlwaysVisible"
         },
@@ -546,24 +574,39 @@ var optionGroups = {
         },
         "Live Autocompletion": {
             path: "enableLiveAutocompletion"
+        },
+        "Custom scrollbar": {
+            path: "customScrollbar"
+        },
+        "Use SVG gutter icons": {
+            path: "useSvgGutterIcons"
+        },
+        "Annotations for folded lines": {
+            path: "showFoldedAnnotations"
+        },
+        "Keyboard Accessibility Mode": {
+            path: "enableKeyboardAccessibility"
+        },
+        "Gutter tooltip follows mouse": {
+            path: "tooltipFollowsMouse",
+            defaultValue: true
         }
     }
 };
-var OptionPanel = function (editor, element) {
-    this.editor = editor;
-    this.container = element || document.createElement("div");
-    this.groups = [];
-    this.options = {};
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.add = function (config) {
+var OptionPanel = /** @class */ (function () {
+    function OptionPanel(editor, element) {
+        this.editor = editor;
+        this.container = element || document.createElement("div");
+        this.groups = [];
+        this.options = {};
+    }
+    OptionPanel.prototype.add = function (config) {
         if (config.Main)
             oop.mixin(optionGroups.Main, config.Main);
         if (config.More)
             oop.mixin(optionGroups.More, config.More);
     };
-    this.render = function () {
+    OptionPanel.prototype.render = function () {
         this.container.innerHTML = "";
         buildDom(["table", { role: "presentation", id: "controls" },
             this.renderOptionGroup(optionGroups.Main),
@@ -575,7 +618,7 @@ var OptionPanel = function (editor, element) {
             ["tr", null, ["td", { colspan: 2 }, "version " + config.version]]
         ], this.container);
     };
-    this.renderOptionGroup = function (group) {
+    OptionPanel.prototype.renderOptionGroup = function (group) {
         return Object.keys(group).map(function (key, i) {
             var item = group[key];
             if (!item.position)
@@ -589,7 +632,7 @@ var OptionPanel = function (editor, element) {
             return this.renderOption(item.label, item);
         }, this);
     };
-    this.renderOptionControl = function (key, option) {
+    OptionPanel.prototype.renderOptionControl = function (key, option) {
         var self = this;
         if (Array.isArray(option)) {
             return option.map(function (x) {
@@ -676,7 +719,7 @@ var OptionPanel = function (editor, element) {
         }
         return control;
     };
-    this.renderOption = function (key, option) {
+    OptionPanel.prototype.renderOption = function (key, option) {
         if (option.path && !option.onchange && !this.editor.$options[option.path])
             return;
         var path = Array.isArray(option) ? option[0].path : option.path;
@@ -688,7 +731,7 @@ var OptionPanel = function (editor, element) {
                 ["label", { for: safeKey, id: safeId }, key]
             ], ["td", control]];
     };
-    this.setOption = function (option, value) {
+    OptionPanel.prototype.setOption = function (option, value) {
         if (typeof option == "string")
             option = this.options[option];
         if (value == "false")
@@ -707,12 +750,14 @@ var OptionPanel = function (editor, element) {
             this.editor.setOption(option.path, value);
         this._signal("setOption", { name: option.path, value: value });
     };
-    this.getOption = function (option) {
+    OptionPanel.prototype.getOption = function (option) {
         if (option.getValue)
             return option.getValue();
         return this.editor.getOption(option.path);
     };
-}).call(OptionPanel.prototype);
+    return OptionPanel;
+}());
+oop.implement(OptionPanel.prototype, EventEmitter);
 exports.OptionPanel = OptionPanel;
 
 });                (function() {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 718
web/1a9579dd339af1d6b57fcc888bb83393.js


+ 2 - 2
web/c856709d8ff07b9e3a72f0fd736437a5.js → web/1ac4b99c62f756d61d25417728b2e5f8.js

@@ -34,11 +34,11 @@ var LispHighlightRules = function () {
                     regex: "(\\*)(\\S*)(\\*)"
                 },
                 {
-                    token: "constant.numeric",
+                    token: "constant.numeric", // hex
                     regex: "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
                 },
                 {
-                    token: "constant.numeric",
+                    token: "constant.numeric", // float
                     regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
                 },
                 {

+ 14 - 15
web/6373ffeee52d7649fd4d155b198644b2.js → web/1b6f35b7d53ed37d0823a2081ab95fac.js

@@ -3,15 +3,15 @@ var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var DocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
-                token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
-            },
-            DocCommentHighlightRules.getTagRule(),
+        "start": [
             {
-                defaultToken: "comment.doc",
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
-            }]
+            }
+        ]
     };
 };
 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
@@ -23,14 +23,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
 };
 DocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
 DocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
@@ -98,7 +98,7 @@ var ApexHighlightRules = function () {
             },
             DocCommentHighlightRules.getStartRule("doc-start"),
             {
-                token: "comment",
+                token: "comment", // multi line comment
                 regex: /\/\*/,
                 next: [
                     DocCommentHighlightRules.getTagRule(),
@@ -139,7 +139,7 @@ var ApexHighlightRules = function () {
                 regex: "`#%",
                 token: "error.invalid"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: /[+-]?\d+(?:(?:\.\d*)?(?:[LlDdEe][+-]?\d+)?)\b|\.\d+[LlDdEe]/
             }, {
                 token: "keyword.operator",
@@ -372,18 +372,17 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/apex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apex_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module){/* caption: Apex; extensions: apex,cls,trigger,tgr */
+ace.define("ace/mode/apex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apex_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/* caption: Apex; extensions: apex,cls,trigger,tgr */
 "use strict";
 var oop = require("../lib/oop");
 var TextMode = require("../mode/text").Mode;
 var ApexHighlightRules = require("./apex_highlight_rules").ApexHighlightRules;
 var FoldMode = require("../mode/folding/cstyle").FoldMode;
-var CstyleBehaviour = require("../mode/behaviour/cstyle").CstyleBehaviour;
 function ApexMode() {
     TextMode.call(this);
     this.HighlightRules = ApexHighlightRules;
     this.foldingRules = new FoldMode();
-    this.$behaviour = new CstyleBehaviour();
+    this.$behaviour = this.$defaultBehaviour;
 }
 oop.inherits(ApexMode, TextMode);
 ApexMode.prototype.lineCommentStart = "//";

+ 12 - 12
web/8e158f69acdb73029247c5a269a566df.js → web/1b8199f34db41b72375a9947d4ef84a4.js

@@ -32,15 +32,15 @@ var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var DocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
-                token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
-            },
-            DocCommentHighlightRules.getTagRule(),
+        "start": [
             {
-                defaultToken: "comment.doc",
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
-            }]
+            }
+        ]
     };
 };
 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
@@ -52,14 +52,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
 };
 DocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
 DocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
@@ -85,7 +85,7 @@ var DotHighlightRules = function () {
                 token: "comment",
                 regex: /#.*$/
             }, {
-                token: "comment",
+                token: "comment", // multi line comment
                 merge: true,
                 regex: /\/\*/,
                 next: "comment"
@@ -132,7 +132,7 @@ var DotHighlightRules = function () {
         ],
         "comment": [
             {
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\*\\/",
                 next: "start"
             }, {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/1cbff31b1abe2c3f9eb1113b4cfa5cb6.js


+ 9 - 4
web/be964ce7cf6d2902db61ade8f9cd0860.js → web/1d051fbb1bd28c0b89641f417930f078.js

@@ -95,10 +95,7 @@ var Range = require("../../range").Range;
 var FoldMode = exports.FoldMode = function () { };
 oop.inherits(FoldMode, BaseFoldMode);
 (function () {
-    this.getFoldWidgetRange = function (session, foldStyle, row) {
-        var range = this.indentationBlock(session, row);
-        if (range)
-            return range;
+    this.commentBlock = function (session, row) {
         var re = /\S/;
         var line = session.getLine(row);
         var startLevel = line.search(re);
@@ -122,6 +119,14 @@ oop.inherits(FoldMode, BaseFoldMode);
             return new Range(startRow, startColumn, endRow, endColumn);
         }
     };
+    this.getFoldWidgetRange = function (session, foldStyle, row) {
+        var range = this.indentationBlock(session, row);
+        if (range)
+            return range;
+        range = this.commentBlock(session, row);
+        if (range)
+            return range;
+    };
     this.getFoldWidget = function (session, foldStyle, row) {
         var line = session.getLine(row);
         var indent = line.search(/\S/);

+ 9 - 0
web/1dda5460bcee9fb6faa67d22b6448454.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/basic"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

+ 9 - 0
web/1e46a85215aeb52a8ed19cf62d1b3362.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/flix"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

+ 185 - 0
web/207fa26d9d4b4c2d5af507fa6db04339.js

@@ -0,0 +1,185 @@
+ace.define("ace/mode/assembly_arm32_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var AssemblyARM32HighlightRules = function () {
+    this.$rules = {
+        start: [
+            {
+                token: 'keyword.control.assembly',
+                regex: '\\b(?:cpsid|cpsie|cps|setend|(?:srs|rfe)(?:ia|ib|da|db|fd|ed|fa|ea)|bkpt|nop|pld|cdp2|mrc2|mrrc2|mcr2|mcrr2|ldc2|stc2|(?:add|adc|sub|sbc|rsb|rsc|mul|mla|umull|umlal|smull|smlal|mvn|and|eor|orr|bic)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?s?|(?:(?:q|qd)?(?:add|sub)|umaal|smul(?:b|t)(?:b|t)|smulw(?:b|t)|smla(?:b|t)(?:b|t)|smlaw(?:b|t)|smlal(?:b|t)(?:b|t)|smuadx?|smladx?|smlaldx?|smusdx?|smlsdx?|smlsldx?|smmulr?|smmlar?|smmlsr?|mia|miaph|mia(?:b|t)(?:b|t)|clz|(?:s|q|sh|u|uq|uh)(?:add16|sub16|add8|sub8|addsubx|subaddx)|usad8|usada8|mrs|msr|mra|mar|cpy|tst|teq|cmp|cmn|ssat|ssat16|usat|usat16|pkhbt|pkhtb|sxth|sxtb16|sxtb|uxth|uxtb16|uxtb|sxtah|sxtab16|sxtab|uxtah|uxtab16|uxtab|rev|rev16|revsh|sel|b|bl|bx|blx|bxj|swi|svc|ldrex|strex|cdp|mrc|mrrc|mcr|mcrr|ldc|stc)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?|ldr(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:t|b|bt|sb|h|sh|d)?|str(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:t|b|bt|h|d)?|(?:ldm|stm)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:ia|ib|da|db|fd|ed|fa|ea)|swp(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?b?|mov(?:t|w)?)\\b',
+                caseInsensitive: true
+            },
+            {
+                token: 'variable.parameter.register.assembly',
+                regex: '\\b(?:r0|r1|r2|r3|r4|r5|r6|r7|r8|r9|r10|r11|r12|r13|r14|r15|fp|ip|sp|lr|pc|cpsr|spsr|c|f|s|x|lsl|lsr|asr|ror|rrx)\\b',
+                caseInsensitive: true
+            },
+            {
+                token: 'constant.character.hexadecimal.assembly',
+                regex: '#0x[A-F0-9]+',
+                caseInsensitive: true
+            },
+            {
+                token: 'constant.character.decimal.assembly',
+                regex: '#[0-9]+'
+            },
+            {
+                token: 'string.assembly',
+                regex: /'([^\\']|\\.)*'/
+            },
+            {
+                token: 'string.assembly',
+                regex: /"([^\\"]|\\.)*"/
+            },
+            {
+                token: 'support.function.directive.assembly',
+                regex: '(?:\.section|\.global|\.text|\.asciz|\.asciiz|\.ascii|\.align|\.byte|\.end|\.data|\.equ|\.extern|\.include)'
+            },
+            {
+                token: 'entity.name.function.assembly',
+                regex: '^\\s*%%[\\w.]+?:$'
+            },
+            {
+                token: 'entity.name.function.assembly',
+                regex: '^\\s*%\\$[\\w.]+?:$'
+            },
+            {
+                token: 'entity.name.function.assembly',
+                regex: '^[\\w.]+?:'
+            },
+            {
+                token: 'entity.name.function.assembly',
+                regex: '^[\\w.]+?\\b'
+            },
+            {
+                token: 'comment.assembly',
+                regex: '\\/\\*', next: 'comment'
+            },
+            {
+                token: 'comment.assembly',
+                regex: '(?:;|//|@).*$'
+            }
+        ],
+        comment: [
+            {
+                token: 'comment.assembly',
+                regex: '\\*\\/', next: 'start'
+            },
+            {
+                defaultToken: 'comment'
+            }
+        ]
+    };
+    this.normalizeRules();
+};
+AssemblyARM32HighlightRules.metaData = { fileTypes: ['s'],
+    name: 'Assembly ARM32',
+    scopeName: 'source.assembly' };
+oop.inherits(AssemblyARM32HighlightRules, TextHighlightRules);
+exports.AssemblyARM32HighlightRules = AssemblyARM32HighlightRules;
+
+});
+
+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";
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+var FoldMode = exports.FoldMode = function () { };
+oop.inherits(FoldMode, BaseFoldMode);
+(function () {
+    this.commentBlock = function (session, row) {
+        var re = /\S/;
+        var line = session.getLine(row);
+        var startLevel = line.search(re);
+        if (startLevel == -1 || line[startLevel] != "#")
+            return;
+        var startColumn = line.length;
+        var maxRow = session.getLength();
+        var startRow = row;
+        var endRow = row;
+        while (++row < maxRow) {
+            line = session.getLine(row);
+            var level = line.search(re);
+            if (level == -1)
+                continue;
+            if (line[level] != "#")
+                break;
+            endRow = row;
+        }
+        if (endRow > startRow) {
+            var endColumn = session.getLine(endRow).length;
+            return new Range(startRow, startColumn, endRow, endColumn);
+        }
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row) {
+        var range = this.indentationBlock(session, row);
+        if (range)
+            return range;
+        range = this.commentBlock(session, row);
+        if (range)
+            return range;
+    };
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var line = session.getLine(row);
+        var indent = line.search(/\S/);
+        var next = session.getLine(row + 1);
+        var prev = session.getLine(row - 1);
+        var prevIndent = prev.search(/\S/);
+        var nextIndent = next.search(/\S/);
+        if (indent == -1) {
+            session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : "";
+            return "";
+        }
+        if (prevIndent == -1) {
+            if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+                session.foldWidgets[row - 1] = "";
+                session.foldWidgets[row + 1] = "";
+                return "start";
+            }
+        }
+        else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+            if (session.getLine(row - 2).search(/\S/) == -1) {
+                session.foldWidgets[row - 1] = "start";
+                session.foldWidgets[row + 1] = "";
+                return "";
+            }
+        }
+        if (prevIndent != -1 && prevIndent < indent)
+            session.foldWidgets[row - 1] = "start";
+        else
+            session.foldWidgets[row - 1] = "";
+        if (indent < nextIndent)
+            return "start";
+        else
+            return "";
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/assembly_arm32",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_arm32_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AssemblyARM32HighlightRules = require("./assembly_arm32_highlight_rules").AssemblyARM32HighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+var Mode = function () {
+    this.HighlightRules = AssemblyARM32HighlightRules;
+    this.foldingRules = new FoldMode();
+    this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+(function () {
+    this.lineCommentStart = [";"];
+    this.blockComment = { start: "/*", end: "*/" };
+    this.$id = "ace/mode/assembly_arm32";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+
+});                (function() {
+                    ace.require(["ace/mode/assembly_arm32"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

+ 318 - 0
web/20b085f014791c3916e38d818e76ef3c.js

@@ -0,0 +1,318 @@
+ace.define("ace/mode/bibtex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var BibTeXHighlightRules = function () {
+    this.$rules = {
+        start: [
+            {
+                token: "comment",
+                regex: /@Comment\{/,
+                stateName: "bibtexComment",
+                push: [
+                    {
+                        token: "comment",
+                        regex: /}/,
+                        next: "pop"
+                    }, {
+                        token: "comment",
+                        regex: /\{/,
+                        push: "bibtexComment"
+                    }, {
+                        defaultToken: "comment"
+                    }
+                ]
+            }, {
+                token: [
+                    "keyword", "text", "paren.lparen", "text", "variable", "text", "keyword.operator"
+                ],
+                regex: /(@String)(\s*)(\{)(\s*)([a-zA-Z]*)(\s*)(=)/,
+                push: [
+                    {
+                        token: "paren.rparen",
+                        regex: /\}/,
+                        next: "pop"
+                    }, {
+                        include: "#misc"
+                    }, {
+                        defaultToken: "text"
+                    }
+                ]
+            }, {
+                token: [
+                    "keyword", "text", "paren.lparen", "text", "variable", "text", "keyword.operator"
+                ],
+                regex: /(@String)(\s*)(\()(\s*)([a-zA-Z]*)(\s*)(=)/,
+                push: [
+                    {
+                        token: "paren.rparen",
+                        regex: /\)/,
+                        next: "pop"
+                    }, {
+                        include: "#misc"
+                    }, {
+                        defaultToken: "text"
+                    }
+                ]
+            }, {
+                token: [
+                    "keyword", "text", "paren.lparen"
+                ],
+                regex: /(@preamble)(\s*)(\()/,
+                push: [
+                    {
+                        token: "paren.rparen",
+                        regex: /\)/,
+                        next: "pop"
+                    }, {
+                        include: "#misc"
+                    }, {
+                        defaultToken: "text"
+                    }
+                ]
+            }, {
+                token: [
+                    "keyword", "text", "paren.lparen"
+                ],
+                regex: /(@preamble)(\s*)(\{)/,
+                push: [
+                    {
+                        token: "paren.rparen",
+                        regex: /\}/,
+                        next: "pop"
+                    }, {
+                        include: "#misc"
+                    }, {
+                        defaultToken: "text"
+                    }
+                ]
+            }, {
+                token: [
+                    "keyword", "text", "paren.lparen", "text", "support.class"
+                ],
+                regex: /(@[a-zA-Z]+)(\s*)(\{)(\s*)([\w-]+)/,
+                push: [
+                    {
+                        token: "paren.rparen",
+                        regex: /\}/,
+                        next: "pop"
+                    }, {
+                        token: [
+                            "variable", "text", "keyword.operator"
+                        ],
+                        regex: /([a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\[\]\^\_\`\|]+)(\s*)(=)/,
+                        push: [
+                            {
+                                token: "text",
+                                regex: /(?=[,}])/,
+                                next: "pop"
+                            }, {
+                                include: "#misc"
+                            }, {
+                                include: "#integer"
+                            }, {
+                                defaultToken: "text"
+                            }
+                        ]
+                    }, {
+                        token: "punctuation",
+                        regex: /,/
+                    }, {
+                        defaultToken: "text"
+                    }
+                ]
+            }, {
+                defaultToken: "comment"
+            }
+        ],
+        "#integer": [
+            {
+                token: "constant.numeric.bibtex",
+                regex: /\d+/
+            }
+        ],
+        "#misc": [
+            {
+                token: "string",
+                regex: /"/,
+                push: "#string_quotes"
+            }, {
+                token: "paren.lparen",
+                regex: /\{/,
+                push: "#string_braces"
+            }, {
+                token: "keyword.operator",
+                regex: /#/
+            }
+        ],
+        "#string_braces": [
+            {
+                token: "paren.rparen",
+                regex: /\}/,
+                next: "pop"
+            }, {
+                token: "invalid.illegal",
+                regex: /@/
+            }, {
+                include: "#misc"
+            }, {
+                defaultToken: "string"
+            }
+        ],
+        "#string_quotes": [
+            {
+                token: "string",
+                regex: /"/,
+                next: "pop"
+            }, {
+                include: "#misc"
+            }, {
+                defaultToken: "string"
+            }
+        ]
+    };
+    this.normalizeRules();
+};
+oop.inherits(BibTeXHighlightRules, TextHighlightRules);
+exports.BibTeXHighlightRules = BibTeXHighlightRules;
+
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var FoldMode = exports.FoldMode = function (commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
+        this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
+    }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+(function () {
+    this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
+    this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
+    this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
+    this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+    this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+    this._getFoldWidgetBase = this.getFoldWidget;
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var line = session.getLine(row);
+        if (this.singleLineBlockCommentRe.test(line)) {
+            if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+                return "";
+        }
+        var fw = this._getFoldWidgetBase(session, foldStyle, row);
+        if (!fw && this.startRegionRe.test(line))
+            return "start"; // lineCommentRegionStart
+        return fw;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
+        var line = session.getLine(row);
+        if (this.startRegionRe.test(line))
+            return this.getCommentRegionBlock(session, line, row);
+        var match = line.match(this.foldingStartMarker);
+        if (match) {
+            var i = match.index;
+            if (match[1])
+                return this.openingBracketBlock(session, match[1], row, i);
+            var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+            if (range && !range.isMultiLine()) {
+                if (forceMultiline) {
+                    range = this.getSectionRange(session, row);
+                }
+                else if (foldStyle != "all")
+                    range = null;
+            }
+            return range;
+        }
+        if (foldStyle === "markbegin")
+            return;
+        var match = line.match(this.foldingStopMarker);
+        if (match) {
+            var i = match.index + match[0].length;
+            if (match[1])
+                return this.closingBracketBlock(session, match[1], row, i);
+            return session.getCommentFoldRange(row, i, -1);
+        }
+    };
+    this.getSectionRange = function (session, row) {
+        var line = session.getLine(row);
+        var startIndent = line.search(/\S/);
+        var startRow = row;
+        var startColumn = line.length;
+        row = row + 1;
+        var endRow = row;
+        var maxRow = session.getLength();
+        while (++row < maxRow) {
+            line = session.getLine(row);
+            var indent = line.search(/\S/);
+            if (indent === -1)
+                continue;
+            if (startIndent > indent)
+                break;
+            var subRange = this.getFoldWidgetRange(session, "all", row);
+            if (subRange) {
+                if (subRange.start.row <= startRow) {
+                    break;
+                }
+                else if (subRange.isMultiLine()) {
+                    row = subRange.end.row;
+                }
+                else if (startIndent == indent) {
+                    break;
+                }
+            }
+            endRow = row;
+        }
+        return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+    };
+    this.getCommentRegionBlock = function (session, line, row) {
+        var startColumn = line.search(/\s*$/);
+        var maxRow = session.getLength();
+        var startRow = row;
+        var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+        var depth = 1;
+        while (++row < maxRow) {
+            line = session.getLine(row);
+            var m = re.exec(line);
+            if (!m)
+                continue;
+            if (m[1])
+                depth--;
+            else
+                depth++;
+            if (!depth)
+                break;
+        }
+        var endRow = row;
+        if (endRow > startRow) {
+            return new Range(startRow, startColumn, endRow, line.length);
+        }
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/bibtex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bibtex_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var BibTeXHighlightRules = require("./bibtex_highlight_rules").BibTeXHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+var Mode = function () {
+    this.HighlightRules = BibTeXHighlightRules;
+    this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+(function () {
+    this.$id = "ace/mode/bibtex";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+
+});                (function() {
+                    ace.require(["ace/mode/bibtex"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

+ 7 - 7
web/3078a3b7f66272ada3e5d065827dfceb.js → web/21888fda037b96f7d9c9261cbef5bbbc.js

@@ -135,14 +135,14 @@ var TclHighlightRules = function () {
                 token: "text",
                 regex: /\\(?:["{}\[\]$\\])/
             }, {
-                token: "text",
+                token: "text", // last value before command
                 regex: '^|[^{][;][^}]|[/\r/]',
                 next: "commandItem"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
             }, {
-                token: "string",
+                token: "string", // multi line """ string start
                 regex: '[ ]*["]',
                 next: "qqstring"
             }, {
@@ -180,7 +180,7 @@ var TclHighlightRules = function () {
                 regex: "#.*$",
                 next: "start"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
             }, {
                 token: "variable.instance",
@@ -233,17 +233,17 @@ var TclHighlightRules = function () {
         ],
         "variable": [
             {
-                token: "variable.instance",
+                token: "variable.instance", // variable tcl
                 regex: "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?",
                 next: "start"
             }, {
-                token: "variable.instance",
+                token: "variable.instance", // variable tcl with braces
                 regex: "{?[a-zA-Z_\\d]+}?",
                 next: "start"
             }
         ],
         "qqstring": [{
-                token: "string",
+                token: "string", // multi line """ string end
                 regex: '(?:[^\\\\]|\\\\.)*?["]',
                 next: "start"
             }, {

+ 183 - 196
web/4f296c337cb73bd82d9b213741292103.js → web/21cc809329a93d6f3d6a756d6dc1294c.js

@@ -413,34 +413,31 @@ exports.EventEmitter = EventEmitter;
 });
 
 ace.define("ace/range",[], function(require, exports, module){"use strict";
-var comparePoints = function (p1, p2) {
-    return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function (startRow, startColumn, endRow, endColumn) {
-    this.start = {
-        row: startRow,
-        column: startColumn
-    };
-    this.end = {
-        row: endRow,
-        column: endColumn
-    };
-};
-(function () {
-    this.isEqual = function (range) {
+var Range = /** @class */ (function () {
+    function Range(startRow, startColumn, endRow, endColumn) {
+        this.start = {
+            row: startRow,
+            column: startColumn
+        };
+        this.end = {
+            row: endRow,
+            column: endColumn
+        };
+    }
+    Range.prototype.isEqual = function (range) {
         return this.start.row === range.start.row &&
             this.end.row === range.end.row &&
             this.start.column === range.start.column &&
             this.end.column === range.end.column;
     };
-    this.toString = function () {
+    Range.prototype.toString = function () {
         return ("Range: [" + this.start.row + "/" + this.start.column +
             "] -> [" + this.end.row + "/" + this.end.column + "]");
     };
-    this.contains = function (row, column) {
+    Range.prototype.contains = function (row, column) {
         return this.compare(row, column) == 0;
     };
-    this.compareRange = function (range) {
+    Range.prototype.compareRange = function (range) {
         var cmp, end = range.end, start = range.start;
         cmp = this.compare(end.row, end.column);
         if (cmp == 1) {
@@ -471,23 +468,23 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             }
         }
     };
-    this.comparePoint = function (p) {
+    Range.prototype.comparePoint = function (p) {
         return this.compare(p.row, p.column);
     };
-    this.containsRange = function (range) {
+    Range.prototype.containsRange = function (range) {
         return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
     };
-    this.intersects = function (range) {
+    Range.prototype.intersects = function (range) {
         var cmp = this.compareRange(range);
         return (cmp == -1 || cmp == 0 || cmp == 1);
     };
-    this.isEnd = function (row, column) {
+    Range.prototype.isEnd = function (row, column) {
         return this.end.row == row && this.end.column == column;
     };
-    this.isStart = function (row, column) {
+    Range.prototype.isStart = function (row, column) {
         return this.start.row == row && this.start.column == column;
     };
-    this.setStart = function (row, column) {
+    Range.prototype.setStart = function (row, column) {
         if (typeof row == "object") {
             this.start.column = row.column;
             this.start.row = row.row;
@@ -497,7 +494,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.start.column = column;
         }
     };
-    this.setEnd = function (row, column) {
+    Range.prototype.setEnd = function (row, column) {
         if (typeof row == "object") {
             this.end.column = row.column;
             this.end.row = row.row;
@@ -507,7 +504,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.end.column = column;
         }
     };
-    this.inside = function (row, column) {
+    Range.prototype.inside = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column) || this.isStart(row, column)) {
                 return false;
@@ -518,7 +515,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideStart = function (row, column) {
+    Range.prototype.insideStart = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column)) {
                 return false;
@@ -529,7 +526,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideEnd = function (row, column) {
+    Range.prototype.insideEnd = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isStart(row, column)) {
                 return false;
@@ -540,7 +537,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.compare = function (row, column) {
+    Range.prototype.compare = function (row, column) {
         if (!this.isMultiLine()) {
             if (row === this.start.row) {
                 return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
@@ -556,7 +553,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return column <= this.end.column ? 0 : 1;
         return 0;
     };
-    this.compareStart = function (row, column) {
+    Range.prototype.compareStart = function (row, column) {
         if (this.start.row == row && this.start.column == column) {
             return -1;
         }
@@ -564,7 +561,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareEnd = function (row, column) {
+    Range.prototype.compareEnd = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -572,7 +569,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareInside = function (row, column) {
+    Range.prototype.compareInside = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -583,7 +580,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.clipRows = function (firstRow, lastRow) {
+    Range.prototype.clipRows = function (firstRow, lastRow) {
         if (this.end.row > lastRow)
             var end = { row: lastRow + 1, column: 0 };
         else if (this.end.row < firstRow)
@@ -594,7 +591,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var start = { row: firstRow, column: 0 };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.extend = function (row, column) {
+    Range.prototype.extend = function (row, column) {
         var cmp = this.compare(row, column);
         if (cmp == 0)
             return this;
@@ -604,37 +601,37 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var end = { row: row, column: column };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.isEmpty = function () {
+    Range.prototype.isEmpty = function () {
         return (this.start.row === this.end.row && this.start.column === this.end.column);
     };
-    this.isMultiLine = function () {
+    Range.prototype.isMultiLine = function () {
         return (this.start.row !== this.end.row);
     };
-    this.clone = function () {
+    Range.prototype.clone = function () {
         return Range.fromPoints(this.start, this.end);
     };
-    this.collapseRows = function () {
+    Range.prototype.collapseRows = function () {
         if (this.end.column == 0)
             return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);
         else
             return new Range(this.start.row, 0, this.end.row, 0);
     };
-    this.toScreenRange = function (session) {
+    Range.prototype.toScreenRange = function (session) {
         var screenPosStart = session.documentToScreenPosition(this.start);
         var screenPosEnd = session.documentToScreenPosition(this.end);
         return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);
     };
-    this.moveBy = function (row, column) {
+    Range.prototype.moveBy = function (row, column) {
         this.start.row += row;
         this.start.column += column;
         this.end.row += row;
         this.end.column += column;
     };
-}).call(Range.prototype);
+    return Range;
+}());
 Range.fromPoints = function (start, end) {
     return new Range(start.row, start.column, end.row, end.column);
 };
-Range.comparePoints = comparePoints;
 Range.comparePoints = function (p1, p2) {
     return p1.row - p2.row || p1.column - p2.column;
 };
@@ -645,24 +642,22 @@ exports.Range = Range;
 ace.define("ace/anchor",[], function(require, exports, module){"use strict";
 var oop = require("./lib/oop");
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Anchor = exports.Anchor = function (doc, row, column) {
-    this.$onChange = this.onChange.bind(this);
-    this.attach(doc);
-    if (typeof column == "undefined")
-        this.setPosition(row.row, row.column);
-    else
-        this.setPosition(row, column);
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.getPosition = function () {
+var Anchor = /** @class */ (function () {
+    function Anchor(doc, row, column) {
+        this.$onChange = this.onChange.bind(this);
+        this.attach(doc);
+        if (typeof row != "number")
+            this.setPosition(row.row, row.column);
+        else
+            this.setPosition(row, column);
+    }
+    Anchor.prototype.getPosition = function () {
         return this.$clipPositionToDocument(this.row, this.column);
     };
-    this.getDocument = function () {
+    Anchor.prototype.getDocument = function () {
         return this.document;
     };
-    this.$insertRight = false;
-    this.onChange = function (delta) {
+    Anchor.prototype.onChange = function (delta) {
         if (delta.start.row == delta.end.row && delta.start.row != this.row)
             return;
         if (delta.start.row > this.row)
@@ -670,34 +665,7 @@ var Anchor = exports.Anchor = function (doc, row, column) {
         var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);
         this.setPosition(point.row, point.column, true);
     };
-    function $pointsInOrder(point1, point2, equalPointsInOrder) {
-        var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
-        return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
-    }
-    function $getTransformedPoint(delta, point, moveIfEqual) {
-        var deltaIsInsert = delta.action == "insert";
-        var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
-        var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
-        var deltaStart = delta.start;
-        var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
-        if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
-            return {
-                row: point.row,
-                column: point.column
-            };
-        }
-        if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
-            return {
-                row: point.row + deltaRowShift,
-                column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
-            };
-        }
-        return {
-            row: deltaStart.row,
-            column: deltaStart.column
-        };
-    }
-    this.setPosition = function (row, column, noClip) {
+    Anchor.prototype.setPosition = function (row, column, noClip) {
         var pos;
         if (noClip) {
             pos = {
@@ -721,14 +689,14 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             value: pos
         });
     };
-    this.detach = function () {
+    Anchor.prototype.detach = function () {
         this.document.off("change", this.$onChange);
     };
-    this.attach = function (doc) {
+    Anchor.prototype.attach = function (doc) {
         this.document = doc || this.document;
         this.document.on("change", this.$onChange);
     };
-    this.$clipPositionToDocument = function (row, column) {
+    Anchor.prototype.$clipPositionToDocument = function (row, column) {
         var pos = {};
         if (row >= this.document.getLength()) {
             pos.row = Math.max(0, this.document.getLength() - 1);
@@ -746,7 +714,38 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             pos.column = 0;
         return pos;
     };
-}).call(Anchor.prototype);
+    return Anchor;
+}());
+Anchor.prototype.$insertRight = false;
+oop.implement(Anchor.prototype, EventEmitter);
+function $pointsInOrder(point1, point2, equalPointsInOrder) {
+    var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+    return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+}
+function $getTransformedPoint(delta, point, moveIfEqual) {
+    var deltaIsInsert = delta.action == "insert";
+    var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+    var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+    var deltaStart = delta.start;
+    var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+    if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+        return {
+            row: point.row,
+            column: point.column
+        };
+    }
+    if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+        return {
+            row: point.row + deltaRowShift,
+            column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+        };
+    }
+    return {
+        row: deltaStart.row,
+        column: deltaStart.column
+    };
+}
+exports.Anchor = Anchor;
 
 });
 
@@ -756,47 +755,36 @@ var applyDelta = require("./apply_delta").applyDelta;
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
 var Range = require("./range").Range;
 var Anchor = require("./anchor").Anchor;
-var Document = function (textOrLines) {
-    this.$lines = [""];
-    if (textOrLines.length === 0) {
+var Document = /** @class */ (function () {
+    function Document(textOrLines) {
         this.$lines = [""];
+        if (textOrLines.length === 0) {
+            this.$lines = [""];
+        }
+        else if (Array.isArray(textOrLines)) {
+            this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
+        }
+        else {
+            this.insert({ row: 0, column: 0 }, textOrLines);
+        }
     }
-    else if (Array.isArray(textOrLines)) {
-        this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
-    }
-    else {
-        this.insert({ row: 0, column: 0 }, textOrLines);
-    }
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.setValue = function (text) {
+    Document.prototype.setValue = function (text) {
         var len = this.getLength() - 1;
         this.remove(new Range(0, 0, len, this.getLine(len).length));
-        this.insert({ row: 0, column: 0 }, text);
+        this.insert({ row: 0, column: 0 }, text || "");
     };
-    this.getValue = function () {
+    Document.prototype.getValue = function () {
         return this.getAllLines().join(this.getNewLineCharacter());
     };
-    this.createAnchor = function (row, column) {
+    Document.prototype.createAnchor = function (row, column) {
         return new Anchor(this, row, column);
     };
-    if ("aaa".split(/a/).length === 0) {
-        this.$split = function (text) {
-            return text.replace(/\r\n|\r/g, "\n").split("\n");
-        };
-    }
-    else {
-        this.$split = function (text) {
-            return text.split(/\r\n|\r|\n/);
-        };
-    }
-    this.$detectNewLine = function (text) {
+    Document.prototype.$detectNewLine = function (text) {
         var match = text.match(/^.*?(\r\n|\r|\n)/m);
         this.$autoNewLine = match ? match[1] : "\n";
         this._signal("changeNewLineMode");
     };
-    this.getNewLineCharacter = function () {
+    Document.prototype.getNewLineCharacter = function () {
         switch (this.$newLineMode) {
             case "windows":
                 return "\r\n";
@@ -806,36 +794,34 @@ var Document = function (textOrLines) {
                 return this.$autoNewLine || "\n";
         }
     };
-    this.$autoNewLine = "";
-    this.$newLineMode = "auto";
-    this.setNewLineMode = function (newLineMode) {
+    Document.prototype.setNewLineMode = function (newLineMode) {
         if (this.$newLineMode === newLineMode)
             return;
         this.$newLineMode = newLineMode;
         this._signal("changeNewLineMode");
     };
-    this.getNewLineMode = function () {
+    Document.prototype.getNewLineMode = function () {
         return this.$newLineMode;
     };
-    this.isNewLine = function (text) {
+    Document.prototype.isNewLine = function (text) {
         return (text == "\r\n" || text == "\r" || text == "\n");
     };
-    this.getLine = function (row) {
+    Document.prototype.getLine = function (row) {
         return this.$lines[row] || "";
     };
-    this.getLines = function (firstRow, lastRow) {
+    Document.prototype.getLines = function (firstRow, lastRow) {
         return this.$lines.slice(firstRow, lastRow + 1);
     };
-    this.getAllLines = function () {
+    Document.prototype.getAllLines = function () {
         return this.getLines(0, this.getLength());
     };
-    this.getLength = function () {
+    Document.prototype.getLength = function () {
         return this.$lines.length;
     };
-    this.getTextRange = function (range) {
+    Document.prototype.getTextRange = function (range) {
         return this.getLinesForRange(range).join(this.getNewLineCharacter());
     };
-    this.getLinesForRange = function (range) {
+    Document.prototype.getLinesForRange = function (range) {
         var lines;
         if (range.start.row === range.end.row) {
             lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
@@ -849,24 +835,24 @@ var Document = function (textOrLines) {
         }
         return lines;
     };
-    this.insertLines = function (row, lines) {
+    Document.prototype.insertLines = function (row, lines) {
         console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
         return this.insertFullLines(row, lines);
     };
-    this.removeLines = function (firstRow, lastRow) {
+    Document.prototype.removeLines = function (firstRow, lastRow) {
         console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
         return this.removeFullLines(firstRow, lastRow);
     };
-    this.insertNewLine = function (position) {
+    Document.prototype.insertNewLine = function (position) {
         console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
         return this.insertMergedLines(position, ["", ""]);
     };
-    this.insert = function (position, text) {
+    Document.prototype.insert = function (position, text) {
         if (this.getLength() <= 1)
             this.$detectNewLine(text);
         return this.insertMergedLines(position, this.$split(text));
     };
-    this.insertInLine = function (position, text) {
+    Document.prototype.insertInLine = function (position, text) {
         var start = this.clippedPos(position.row, position.column);
         var end = this.pos(position.row, position.column + text.length);
         this.applyDelta({
@@ -877,7 +863,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(end);
     };
-    this.clippedPos = function (row, column) {
+    Document.prototype.clippedPos = function (row, column) {
         var length = this.getLength();
         if (row === undefined) {
             row = length;
@@ -895,13 +881,13 @@ var Document = function (textOrLines) {
         column = Math.min(Math.max(column, 0), line.length);
         return { row: row, column: column };
     };
-    this.clonePos = function (pos) {
+    Document.prototype.clonePos = function (pos) {
         return { row: pos.row, column: pos.column };
     };
-    this.pos = function (row, column) {
+    Document.prototype.pos = function (row, column) {
         return { row: row, column: column };
     };
-    this.$clipPosition = function (position) {
+    Document.prototype.$clipPosition = function (position) {
         var length = this.getLength();
         if (position.row >= length) {
             position.row = Math.max(0, length - 1);
@@ -913,7 +899,7 @@ var Document = function (textOrLines) {
         }
         return position;
     };
-    this.insertFullLines = function (row, lines) {
+    Document.prototype.insertFullLines = function (row, lines) {
         row = Math.min(Math.max(row, 0), this.getLength());
         var column = 0;
         if (row < this.getLength()) {
@@ -927,7 +913,7 @@ var Document = function (textOrLines) {
         }
         this.insertMergedLines({ row: row, column: column }, lines);
     };
-    this.insertMergedLines = function (position, lines) {
+    Document.prototype.insertMergedLines = function (position, lines) {
         var start = this.clippedPos(position.row, position.column);
         var end = {
             row: start.row + lines.length - 1,
@@ -941,7 +927,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(end);
     };
-    this.remove = function (range) {
+    Document.prototype.remove = function (range) {
         var start = this.clippedPos(range.start.row, range.start.column);
         var end = this.clippedPos(range.end.row, range.end.column);
         this.applyDelta({
@@ -952,7 +938,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(start);
     };
-    this.removeInLine = function (row, startColumn, endColumn) {
+    Document.prototype.removeInLine = function (row, startColumn, endColumn) {
         var start = this.clippedPos(row, startColumn);
         var end = this.clippedPos(row, endColumn);
         this.applyDelta({
@@ -963,7 +949,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(start);
     };
-    this.removeFullLines = function (firstRow, lastRow) {
+    Document.prototype.removeFullLines = function (firstRow, lastRow) {
         firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
         lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
         var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
@@ -982,7 +968,7 @@ var Document = function (textOrLines) {
         });
         return deletedLines;
     };
-    this.removeNewLine = function (row) {
+    Document.prototype.removeNewLine = function (row) {
         if (row < this.getLength() - 1 && row >= 0) {
             this.applyDelta({
                 start: this.pos(row, this.getLine(row).length),
@@ -992,7 +978,7 @@ var Document = function (textOrLines) {
             });
         }
     };
-    this.replace = function (range, text) {
+    Document.prototype.replace = function (range, text) {
         if (!(range instanceof Range))
             range = Range.fromPoints(range.start, range.end);
         if (text.length === 0 && range.isEmpty())
@@ -1009,17 +995,17 @@ var Document = function (textOrLines) {
         }
         return end;
     };
-    this.applyDeltas = function (deltas) {
+    Document.prototype.applyDeltas = function (deltas) {
         for (var i = 0; i < deltas.length; i++) {
             this.applyDelta(deltas[i]);
         }
     };
-    this.revertDeltas = function (deltas) {
+    Document.prototype.revertDeltas = function (deltas) {
         for (var i = deltas.length - 1; i >= 0; i--) {
             this.revertDelta(deltas[i]);
         }
     };
-    this.applyDelta = function (delta, doNotValidate) {
+    Document.prototype.applyDelta = function (delta, doNotValidate) {
         var isInsert = delta.action == "insert";
         if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
             : !Range.comparePoints(delta.start, delta.end)) {
@@ -1033,14 +1019,14 @@ var Document = function (textOrLines) {
             this._signal("change", delta);
         }
     };
-    this.$safeApplyDelta = function (delta) {
+    Document.prototype.$safeApplyDelta = function (delta) {
         var docLength = this.$lines.length;
         if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
             || delta.action == "insert" && delta.start.row <= docLength) {
             this.applyDelta(delta);
         }
     };
-    this.$splitAndapplyLargeDelta = function (delta, MAX) {
+    Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {
         var lines = delta.lines;
         var l = lines.length - MAX + 1;
         var row = delta.start.row;
@@ -1061,7 +1047,7 @@ var Document = function (textOrLines) {
         delta.start.column = column;
         this.applyDelta(delta, true);
     };
-    this.revertDelta = function (delta) {
+    Document.prototype.revertDelta = function (delta) {
         this.$safeApplyDelta({
             start: this.clonePos(delta.start),
             end: this.clonePos(delta.end),
@@ -1069,7 +1055,7 @@ var Document = function (textOrLines) {
             lines: delta.lines.slice()
         });
     };
-    this.indexToPosition = function (index, startRow) {
+    Document.prototype.indexToPosition = function (index, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         for (var i = startRow || 0, l = lines.length; i < l; i++) {
@@ -1079,7 +1065,7 @@ var Document = function (textOrLines) {
         }
         return { row: l - 1, column: index + lines[l - 1].length + newlineLength };
     };
-    this.positionToIndex = function (pos, startRow) {
+    Document.prototype.positionToIndex = function (pos, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         var index = 0;
@@ -1088,11 +1074,39 @@ var Document = function (textOrLines) {
             index += lines[i].length + newlineLength;
         return index + pos.column;
     };
-}).call(Document.prototype);
+    Document.prototype.$split = function (text) {
+        return text.split(/\r\n|\r|\n/);
+    };
+    return Document;
+}());
+Document.prototype.$autoNewLine = "";
+Document.prototype.$newLineMode = "auto";
+oop.implement(Document.prototype, EventEmitter);
 exports.Document = Document;
 
 });
 
+ace.define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {
+    if (typeof obj !== "object" || !obj)
+        return obj;
+    var copy;
+    if (Array.isArray(obj)) {
+        copy = [];
+        for (var key = 0; key < obj.length; key++) {
+            copy[key] = deepCopy(obj[key]);
+        }
+        return copy;
+    }
+    if (Object.prototype.toString.call(obj) !== "[object Object]")
+        return obj;
+    copy = {};
+    for (var key in obj)
+        copy[key] = deepCopy(obj[key]);
+    return copy;
+};
+
+});
+
 ace.define("ace/lib/lang",[], function(require, exports, module){"use strict";
 exports.last = function (a) {
     return a[a.length - 1];
@@ -1135,24 +1149,7 @@ exports.copyArray = function (array) {
     }
     return copy;
 };
-exports.deepCopy = function deepCopy(obj) {
-    if (typeof obj !== "object" || !obj)
-        return obj;
-    var copy;
-    if (Array.isArray(obj)) {
-        copy = [];
-        for (var key = 0; key < obj.length; key++) {
-            copy[key] = deepCopy(obj[key]);
-        }
-        return copy;
-    }
-    if (Object.prototype.toString.call(obj) !== "[object Object]")
-        return obj;
-    copy = {};
-    for (var key in obj)
-        copy[key] = deepCopy(obj[key]);
-    return copy;
-};
+exports.deepCopy = require("./deep_copy").deepCopy;
 exports.arrayToMap = function (arr) {
     var map = {};
     for (var i = 0; i < arr.length; i++) {
@@ -1245,6 +1242,18 @@ exports.delayedCall = function (fcn, defaultTimeout) {
     };
     return _self;
 };
+exports.supportsLookbehind = function () {
+    try {
+        new RegExp('(?<=.)');
+    }
+    catch (e) {
+        return false;
+    }
+    return true;
+};
+exports.skipEmptyMatch = function (line, last, supportsUnicodeFlag) {
+    return supportsUnicodeFlag && line.codePointAt(last) > 0xffff ? 2 : 1;
+};
 
 });
 
@@ -4532,29 +4541,7 @@ function resolveJavascriptFunction(data) {
 }
 
 function constructJavascriptFunction(data) {
-
-  var source = '(' + data + ')',
-      ast    = esprima.parse(source, { range: true }),
-      params = [],
-      body;
-
-  if (ast.type                    !== 'Program'             ||
-      ast.body.length             !== 1                     ||
-      ast.body[0].type            !== 'ExpressionStatement' ||
-      (ast.body[0].expression.type !== 'ArrowFunctionExpression' &&
-        ast.body[0].expression.type !== 'FunctionExpression')) {
-    throw new Error('Failed to resolve function');
-  }
-
-  ast.body[0].expression.params.forEach(function (param) {
-    params.push(param.name);
-  });
-
-  body = ast.body[0].expression.body.range;
-  if (ast.body[0].expression.body.type === 'BlockStatement') {
-    return new Function(params, source.slice(body[0] + 1, body[1] - 1));
-  }
-  return new Function(params, 'return ' + source.slice(body[0], body[1]));
+  return function() {}
 }
 
 function representJavascriptFunction(object /*, style*/) {
@@ -5814,10 +5801,10 @@ oop.inherits(YamlWorker, Mirror);
                 _this.sender.emit("annotate", errors);
                 return;
             }
-
+            var markDefined = !!error.mark;
             errors.push({
-                row: error.mark.line,
-                column: error.mark.column,
+                row: markDefined ? error.mark.line : 0,
+                column: markDefined ? error.mark.column : 0,
                 text: error.reason,
                 type: 'error',
                 raw: error

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 446 - 0
web/22e2ec10d48dca8a66c53f9a41271023.js


+ 268 - 0
web/238b48c537406ead43a4005567d5a013.js

@@ -0,0 +1,268 @@
+ace.define("ace/mode/plsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of Ajax.org B.V. nor the
+ *       names of its contributors may be used to endorse or promote products
+ *       derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var plsqlHighlightRules = function () {
+    var keywords = ("all|alter|and|any|array|arrow|as|asc|at|begin|between|by|case|check|clusters|cluster|colauth|columns|compress|connect|crash|create|cross|current|database|declare|default|delete|desc|distinct|drop|else|end|exception|exclusive|exists|fetch|form|for|foreign|from|goto|grant|group|having|identified|if|in|inner|indexes|index|insert|intersect|into|is|join|key|left|like|lock|minus|mode|natural|nocompress|not|nowait|null|of|on|option|or|order,overlaps|outer|primary|prior|procedure|public|range|record|references|resource|revoke|right|select|share|size|sql|start|subtype|tabauth|table|then|to|type|union|unique|update|use|values|view|views|when|where|with");
+    var builtinConstants = ("true|false");
+    var builtinFunctions = ("abs|acos|add_months|ascii|asciistr|asin|atan|atan2|avg|bfilename|bin_to_num|bitand|cardinality|case|cast|ceil|chartorowid|chr|coalesce|compose|concat|convert|corr|cos|cosh|count|covar_pop|covar_samp|cume_dist|current_date|current_timestamp|dbtimezone|decode|decompose|dense_rank|dump|empty_blob|empty_clob|exp|extract|first_value|floor|from_tz|greatest|group_id|hextoraw|initcap|instr|instr2|instr4|instrb|instrc|lag|last_day|last_value|lead|least|length|length2|length4|lengthb|lengthc|listagg|ln|lnnvl|localtimestamp|log|lower|lpad|ltrim|max|median|min|mod|months_between|nanvl|nchr|new_time|next_day|nth_value|nullif|numtodsinterval|numtoyminterval|nvl|nvl2|power|rank|rawtohex|regexp_count|regexp_instr|regexp_replace|regexp_substr|remainder|replace|round|rownum|rpad|rtrim|sessiontimezone|sign|sin|sinh|soundex|sqrt|stddev|substr|sum|sys_context|sysdate|systimestamp|tan|tanh|to_char|to_clob|to_date|to_dsinterval|to_lob|to_multi_byte|to_nclob|to_number|to_single_byte|to_timestamp|to_timestamp_tz|to_yminterval|translate|trim|trunc|tz_offset|uid|upper|user|userenv|var_pop|var_samp|variance|vsize");
+    var dataTypes = ("char|nchar|nvarchar2|varchar2|long|raw|" +
+        "number|numeric|float|dec|decimal|integer|int|smallint|real|double|precision|" +
+        "date|timestamp|interval|year|day|" +
+        "bfile|blob|clob|nclob|" +
+        "rowid|urowid");
+    var keywordMapper = this.createKeywordMapper({
+        "support.function": builtinFunctions,
+        "keyword": keywords,
+        "constant.language": builtinConstants,
+        "storage.type": dataTypes
+    }, "identifier", true);
+    this.$rules = {
+        "start": [{
+                token: "comment",
+                regex: "--.*$"
+            }, {
+                token: "comment",
+                start: "/\\*",
+                end: "\\*/"
+            }, {
+                token: "string", // " string
+                regex: '".*?"'
+            }, {
+                token: "string", // ' string
+                regex: "'.*?'"
+            }, {
+                token: "constant.numeric", // float
+                regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+            }, {
+                token: keywordMapper,
+                regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+            }, {
+                token: "keyword.operator",
+                regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+            }, {
+                token: "paren.lparen",
+                regex: "[\\(]"
+            }, {
+                token: "paren.rparen",
+                regex: "[\\)]"
+            }, {
+                token: "text",
+                regex: "\\s+"
+            }]
+    };
+    this.normalizeRules();
+};
+oop.inherits(plsqlHighlightRules, TextHighlightRules);
+exports.plsqlHighlightRules = plsqlHighlightRules;
+
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var FoldMode = exports.FoldMode = function (commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
+        this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
+    }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+(function () {
+    this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
+    this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
+    this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
+    this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+    this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+    this._getFoldWidgetBase = this.getFoldWidget;
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var line = session.getLine(row);
+        if (this.singleLineBlockCommentRe.test(line)) {
+            if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+                return "";
+        }
+        var fw = this._getFoldWidgetBase(session, foldStyle, row);
+        if (!fw && this.startRegionRe.test(line))
+            return "start"; // lineCommentRegionStart
+        return fw;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
+        var line = session.getLine(row);
+        if (this.startRegionRe.test(line))
+            return this.getCommentRegionBlock(session, line, row);
+        var match = line.match(this.foldingStartMarker);
+        if (match) {
+            var i = match.index;
+            if (match[1])
+                return this.openingBracketBlock(session, match[1], row, i);
+            var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+            if (range && !range.isMultiLine()) {
+                if (forceMultiline) {
+                    range = this.getSectionRange(session, row);
+                }
+                else if (foldStyle != "all")
+                    range = null;
+            }
+            return range;
+        }
+        if (foldStyle === "markbegin")
+            return;
+        var match = line.match(this.foldingStopMarker);
+        if (match) {
+            var i = match.index + match[0].length;
+            if (match[1])
+                return this.closingBracketBlock(session, match[1], row, i);
+            return session.getCommentFoldRange(row, i, -1);
+        }
+    };
+    this.getSectionRange = function (session, row) {
+        var line = session.getLine(row);
+        var startIndent = line.search(/\S/);
+        var startRow = row;
+        var startColumn = line.length;
+        row = row + 1;
+        var endRow = row;
+        var maxRow = session.getLength();
+        while (++row < maxRow) {
+            line = session.getLine(row);
+            var indent = line.search(/\S/);
+            if (indent === -1)
+                continue;
+            if (startIndent > indent)
+                break;
+            var subRange = this.getFoldWidgetRange(session, "all", row);
+            if (subRange) {
+                if (subRange.start.row <= startRow) {
+                    break;
+                }
+                else if (subRange.isMultiLine()) {
+                    row = subRange.end.row;
+                }
+                else if (startIndent == indent) {
+                    break;
+                }
+            }
+            endRow = row;
+        }
+        return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+    };
+    this.getCommentRegionBlock = function (session, line, row) {
+        var startColumn = line.search(/\s*$/);
+        var maxRow = session.getLength();
+        var startRow = row;
+        var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+        var depth = 1;
+        while (++row < maxRow) {
+            line = session.getLine(row);
+            var m = re.exec(line);
+            if (!m)
+                continue;
+            if (m[1])
+                depth--;
+            else
+                depth++;
+            if (!depth)
+                break;
+        }
+        var endRow = row;
+        if (endRow > startRow) {
+            return new Range(startRow, startColumn, endRow, line.length);
+        }
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./cstyle").FoldMode;
+var FoldMode = exports.FoldMode = function () { };
+oop.inherits(FoldMode, BaseFoldMode);
+(function () {
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/plsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/plsql_highlight_rules","ace/mode/folding/sql"], function(require, exports, module){/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of Ajax.org B.V. nor the
+ *       names of its contributors may be used to endorse or promote products
+ *       derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+"use strict";
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PLSqlHighlightRules = require("./plsql_highlight_rules").plsqlHighlightRules;
+var FoldMode = require("./folding/sql").FoldMode;
+var Mode = function () {
+    this.HighlightRules = PLSqlHighlightRules;
+    this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+(function () {
+    this.lineCommentStart = "--";
+    this.blockComment = { start: "/*", end: "*/" };
+    this.$id = "ace/mode/plsql";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+
+});                (function() {
+                    ace.require(["ace/mode/plsql"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/23da774e43bdbc0fee7d11009ee014b2.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/251c1b0aa30bc78444e22999d6a2e6f1.js


+ 9 - 0
web/269bb81eeebec9d70536fede3f17dac5.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/nasal"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/272c72bab8da763aef48ecb7934c9586.js


+ 9 - 0
web/278e460685ee8251b752215f592c0d7d.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/tsv"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/279a2126957722bd396f011c41d616f2.js


+ 13 - 14
web/a7da972483728415ac8f250f02083cd8.js → web/2818bca0cd2a7e31aa1a7d0698a1312b.js

@@ -3,15 +3,15 @@ var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var DocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
-                token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
-            },
-            DocCommentHighlightRules.getTagRule(),
+        "start": [
             {
-                defaultToken: "comment.doc",
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
-            }]
+            }
+        ]
     };
 };
 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
@@ -23,14 +23,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
 };
 DocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
 DocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
@@ -121,7 +121,7 @@ var SwiftHighlightRules = function () {
     function comments() {
         return [{
                 token: "comment",
-                regex: "\\/\\/(?=.)",
+                regex: /\/\//,
                 next: [
                     DocCommentHighlightRules.getTagRule(),
                     { token: "comment", regex: "$|^", next: "start" },
@@ -191,6 +191,7 @@ var SwiftHighlightRules = function () {
 };
 oop.inherits(SwiftHighlightRules, TextHighlightRules);
 exports.HighlightRules = SwiftHighlightRules;
+exports.SwiftHighlightRules = SwiftHighlightRules;
 
 });
 
@@ -310,19 +311,17 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/swift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/swift_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){/*
+ace.define("ace/mode/swift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/swift_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/*
   THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
 */
 "use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var HighlightRules = require("./swift_highlight_rules").HighlightRules;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
 var FoldMode = require("./folding/cstyle").FoldMode;
 var Mode = function () {
     this.HighlightRules = HighlightRules;
     this.foldingRules = new FoldMode();
-    this.$behaviour = new CstyleBehaviour();
     this.$behaviour = this.$defaultBehaviour;
 };
 oop.inherits(Mode, TextMode);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 30 - 0
web/2863331c75e78da46cd0d6c9a0399846.js


+ 179 - 170
web/67e7ef82b1bcaad6e9deb96f27845809.js → web/2984fab606909e16083d98c4581fd484.js

@@ -413,34 +413,31 @@ exports.EventEmitter = EventEmitter;
 });
 
 ace.define("ace/range",[], function(require, exports, module){"use strict";
-var comparePoints = function (p1, p2) {
-    return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function (startRow, startColumn, endRow, endColumn) {
-    this.start = {
-        row: startRow,
-        column: startColumn
-    };
-    this.end = {
-        row: endRow,
-        column: endColumn
-    };
-};
-(function () {
-    this.isEqual = function (range) {
+var Range = /** @class */ (function () {
+    function Range(startRow, startColumn, endRow, endColumn) {
+        this.start = {
+            row: startRow,
+            column: startColumn
+        };
+        this.end = {
+            row: endRow,
+            column: endColumn
+        };
+    }
+    Range.prototype.isEqual = function (range) {
         return this.start.row === range.start.row &&
             this.end.row === range.end.row &&
             this.start.column === range.start.column &&
             this.end.column === range.end.column;
     };
-    this.toString = function () {
+    Range.prototype.toString = function () {
         return ("Range: [" + this.start.row + "/" + this.start.column +
             "] -> [" + this.end.row + "/" + this.end.column + "]");
     };
-    this.contains = function (row, column) {
+    Range.prototype.contains = function (row, column) {
         return this.compare(row, column) == 0;
     };
-    this.compareRange = function (range) {
+    Range.prototype.compareRange = function (range) {
         var cmp, end = range.end, start = range.start;
         cmp = this.compare(end.row, end.column);
         if (cmp == 1) {
@@ -471,23 +468,23 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             }
         }
     };
-    this.comparePoint = function (p) {
+    Range.prototype.comparePoint = function (p) {
         return this.compare(p.row, p.column);
     };
-    this.containsRange = function (range) {
+    Range.prototype.containsRange = function (range) {
         return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
     };
-    this.intersects = function (range) {
+    Range.prototype.intersects = function (range) {
         var cmp = this.compareRange(range);
         return (cmp == -1 || cmp == 0 || cmp == 1);
     };
-    this.isEnd = function (row, column) {
+    Range.prototype.isEnd = function (row, column) {
         return this.end.row == row && this.end.column == column;
     };
-    this.isStart = function (row, column) {
+    Range.prototype.isStart = function (row, column) {
         return this.start.row == row && this.start.column == column;
     };
-    this.setStart = function (row, column) {
+    Range.prototype.setStart = function (row, column) {
         if (typeof row == "object") {
             this.start.column = row.column;
             this.start.row = row.row;
@@ -497,7 +494,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.start.column = column;
         }
     };
-    this.setEnd = function (row, column) {
+    Range.prototype.setEnd = function (row, column) {
         if (typeof row == "object") {
             this.end.column = row.column;
             this.end.row = row.row;
@@ -507,7 +504,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.end.column = column;
         }
     };
-    this.inside = function (row, column) {
+    Range.prototype.inside = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column) || this.isStart(row, column)) {
                 return false;
@@ -518,7 +515,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideStart = function (row, column) {
+    Range.prototype.insideStart = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column)) {
                 return false;
@@ -529,7 +526,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideEnd = function (row, column) {
+    Range.prototype.insideEnd = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isStart(row, column)) {
                 return false;
@@ -540,7 +537,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.compare = function (row, column) {
+    Range.prototype.compare = function (row, column) {
         if (!this.isMultiLine()) {
             if (row === this.start.row) {
                 return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
@@ -556,7 +553,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return column <= this.end.column ? 0 : 1;
         return 0;
     };
-    this.compareStart = function (row, column) {
+    Range.prototype.compareStart = function (row, column) {
         if (this.start.row == row && this.start.column == column) {
             return -1;
         }
@@ -564,7 +561,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareEnd = function (row, column) {
+    Range.prototype.compareEnd = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -572,7 +569,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareInside = function (row, column) {
+    Range.prototype.compareInside = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -583,7 +580,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.clipRows = function (firstRow, lastRow) {
+    Range.prototype.clipRows = function (firstRow, lastRow) {
         if (this.end.row > lastRow)
             var end = { row: lastRow + 1, column: 0 };
         else if (this.end.row < firstRow)
@@ -594,7 +591,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var start = { row: firstRow, column: 0 };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.extend = function (row, column) {
+    Range.prototype.extend = function (row, column) {
         var cmp = this.compare(row, column);
         if (cmp == 0)
             return this;
@@ -604,37 +601,37 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var end = { row: row, column: column };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.isEmpty = function () {
+    Range.prototype.isEmpty = function () {
         return (this.start.row === this.end.row && this.start.column === this.end.column);
     };
-    this.isMultiLine = function () {
+    Range.prototype.isMultiLine = function () {
         return (this.start.row !== this.end.row);
     };
-    this.clone = function () {
+    Range.prototype.clone = function () {
         return Range.fromPoints(this.start, this.end);
     };
-    this.collapseRows = function () {
+    Range.prototype.collapseRows = function () {
         if (this.end.column == 0)
             return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);
         else
             return new Range(this.start.row, 0, this.end.row, 0);
     };
-    this.toScreenRange = function (session) {
+    Range.prototype.toScreenRange = function (session) {
         var screenPosStart = session.documentToScreenPosition(this.start);
         var screenPosEnd = session.documentToScreenPosition(this.end);
         return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);
     };
-    this.moveBy = function (row, column) {
+    Range.prototype.moveBy = function (row, column) {
         this.start.row += row;
         this.start.column += column;
         this.end.row += row;
         this.end.column += column;
     };
-}).call(Range.prototype);
+    return Range;
+}());
 Range.fromPoints = function (start, end) {
     return new Range(start.row, start.column, end.row, end.column);
 };
-Range.comparePoints = comparePoints;
 Range.comparePoints = function (p1, p2) {
     return p1.row - p2.row || p1.column - p2.column;
 };
@@ -645,24 +642,22 @@ exports.Range = Range;
 ace.define("ace/anchor",[], function(require, exports, module){"use strict";
 var oop = require("./lib/oop");
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Anchor = exports.Anchor = function (doc, row, column) {
-    this.$onChange = this.onChange.bind(this);
-    this.attach(doc);
-    if (typeof column == "undefined")
-        this.setPosition(row.row, row.column);
-    else
-        this.setPosition(row, column);
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.getPosition = function () {
+var Anchor = /** @class */ (function () {
+    function Anchor(doc, row, column) {
+        this.$onChange = this.onChange.bind(this);
+        this.attach(doc);
+        if (typeof row != "number")
+            this.setPosition(row.row, row.column);
+        else
+            this.setPosition(row, column);
+    }
+    Anchor.prototype.getPosition = function () {
         return this.$clipPositionToDocument(this.row, this.column);
     };
-    this.getDocument = function () {
+    Anchor.prototype.getDocument = function () {
         return this.document;
     };
-    this.$insertRight = false;
-    this.onChange = function (delta) {
+    Anchor.prototype.onChange = function (delta) {
         if (delta.start.row == delta.end.row && delta.start.row != this.row)
             return;
         if (delta.start.row > this.row)
@@ -670,34 +665,7 @@ var Anchor = exports.Anchor = function (doc, row, column) {
         var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);
         this.setPosition(point.row, point.column, true);
     };
-    function $pointsInOrder(point1, point2, equalPointsInOrder) {
-        var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
-        return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
-    }
-    function $getTransformedPoint(delta, point, moveIfEqual) {
-        var deltaIsInsert = delta.action == "insert";
-        var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
-        var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
-        var deltaStart = delta.start;
-        var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
-        if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
-            return {
-                row: point.row,
-                column: point.column
-            };
-        }
-        if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
-            return {
-                row: point.row + deltaRowShift,
-                column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
-            };
-        }
-        return {
-            row: deltaStart.row,
-            column: deltaStart.column
-        };
-    }
-    this.setPosition = function (row, column, noClip) {
+    Anchor.prototype.setPosition = function (row, column, noClip) {
         var pos;
         if (noClip) {
             pos = {
@@ -721,14 +689,14 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             value: pos
         });
     };
-    this.detach = function () {
+    Anchor.prototype.detach = function () {
         this.document.off("change", this.$onChange);
     };
-    this.attach = function (doc) {
+    Anchor.prototype.attach = function (doc) {
         this.document = doc || this.document;
         this.document.on("change", this.$onChange);
     };
-    this.$clipPositionToDocument = function (row, column) {
+    Anchor.prototype.$clipPositionToDocument = function (row, column) {
         var pos = {};
         if (row >= this.document.getLength()) {
             pos.row = Math.max(0, this.document.getLength() - 1);
@@ -746,7 +714,38 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             pos.column = 0;
         return pos;
     };
-}).call(Anchor.prototype);
+    return Anchor;
+}());
+Anchor.prototype.$insertRight = false;
+oop.implement(Anchor.prototype, EventEmitter);
+function $pointsInOrder(point1, point2, equalPointsInOrder) {
+    var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+    return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+}
+function $getTransformedPoint(delta, point, moveIfEqual) {
+    var deltaIsInsert = delta.action == "insert";
+    var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+    var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+    var deltaStart = delta.start;
+    var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+    if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+        return {
+            row: point.row,
+            column: point.column
+        };
+    }
+    if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+        return {
+            row: point.row + deltaRowShift,
+            column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+        };
+    }
+    return {
+        row: deltaStart.row,
+        column: deltaStart.column
+    };
+}
+exports.Anchor = Anchor;
 
 });
 
@@ -756,47 +755,36 @@ var applyDelta = require("./apply_delta").applyDelta;
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
 var Range = require("./range").Range;
 var Anchor = require("./anchor").Anchor;
-var Document = function (textOrLines) {
-    this.$lines = [""];
-    if (textOrLines.length === 0) {
+var Document = /** @class */ (function () {
+    function Document(textOrLines) {
         this.$lines = [""];
+        if (textOrLines.length === 0) {
+            this.$lines = [""];
+        }
+        else if (Array.isArray(textOrLines)) {
+            this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
+        }
+        else {
+            this.insert({ row: 0, column: 0 }, textOrLines);
+        }
     }
-    else if (Array.isArray(textOrLines)) {
-        this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
-    }
-    else {
-        this.insert({ row: 0, column: 0 }, textOrLines);
-    }
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.setValue = function (text) {
+    Document.prototype.setValue = function (text) {
         var len = this.getLength() - 1;
         this.remove(new Range(0, 0, len, this.getLine(len).length));
-        this.insert({ row: 0, column: 0 }, text);
+        this.insert({ row: 0, column: 0 }, text || "");
     };
-    this.getValue = function () {
+    Document.prototype.getValue = function () {
         return this.getAllLines().join(this.getNewLineCharacter());
     };
-    this.createAnchor = function (row, column) {
+    Document.prototype.createAnchor = function (row, column) {
         return new Anchor(this, row, column);
     };
-    if ("aaa".split(/a/).length === 0) {
-        this.$split = function (text) {
-            return text.replace(/\r\n|\r/g, "\n").split("\n");
-        };
-    }
-    else {
-        this.$split = function (text) {
-            return text.split(/\r\n|\r|\n/);
-        };
-    }
-    this.$detectNewLine = function (text) {
+    Document.prototype.$detectNewLine = function (text) {
         var match = text.match(/^.*?(\r\n|\r|\n)/m);
         this.$autoNewLine = match ? match[1] : "\n";
         this._signal("changeNewLineMode");
     };
-    this.getNewLineCharacter = function () {
+    Document.prototype.getNewLineCharacter = function () {
         switch (this.$newLineMode) {
             case "windows":
                 return "\r\n";
@@ -806,36 +794,34 @@ var Document = function (textOrLines) {
                 return this.$autoNewLine || "\n";
         }
     };
-    this.$autoNewLine = "";
-    this.$newLineMode = "auto";
-    this.setNewLineMode = function (newLineMode) {
+    Document.prototype.setNewLineMode = function (newLineMode) {
         if (this.$newLineMode === newLineMode)
             return;
         this.$newLineMode = newLineMode;
         this._signal("changeNewLineMode");
     };
-    this.getNewLineMode = function () {
+    Document.prototype.getNewLineMode = function () {
         return this.$newLineMode;
     };
-    this.isNewLine = function (text) {
+    Document.prototype.isNewLine = function (text) {
         return (text == "\r\n" || text == "\r" || text == "\n");
     };
-    this.getLine = function (row) {
+    Document.prototype.getLine = function (row) {
         return this.$lines[row] || "";
     };
-    this.getLines = function (firstRow, lastRow) {
+    Document.prototype.getLines = function (firstRow, lastRow) {
         return this.$lines.slice(firstRow, lastRow + 1);
     };
-    this.getAllLines = function () {
+    Document.prototype.getAllLines = function () {
         return this.getLines(0, this.getLength());
     };
-    this.getLength = function () {
+    Document.prototype.getLength = function () {
         return this.$lines.length;
     };
-    this.getTextRange = function (range) {
+    Document.prototype.getTextRange = function (range) {
         return this.getLinesForRange(range).join(this.getNewLineCharacter());
     };
-    this.getLinesForRange = function (range) {
+    Document.prototype.getLinesForRange = function (range) {
         var lines;
         if (range.start.row === range.end.row) {
             lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
@@ -849,24 +835,24 @@ var Document = function (textOrLines) {
         }
         return lines;
     };
-    this.insertLines = function (row, lines) {
+    Document.prototype.insertLines = function (row, lines) {
         console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
         return this.insertFullLines(row, lines);
     };
-    this.removeLines = function (firstRow, lastRow) {
+    Document.prototype.removeLines = function (firstRow, lastRow) {
         console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
         return this.removeFullLines(firstRow, lastRow);
     };
-    this.insertNewLine = function (position) {
+    Document.prototype.insertNewLine = function (position) {
         console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
         return this.insertMergedLines(position, ["", ""]);
     };
-    this.insert = function (position, text) {
+    Document.prototype.insert = function (position, text) {
         if (this.getLength() <= 1)
             this.$detectNewLine(text);
         return this.insertMergedLines(position, this.$split(text));
     };
-    this.insertInLine = function (position, text) {
+    Document.prototype.insertInLine = function (position, text) {
         var start = this.clippedPos(position.row, position.column);
         var end = this.pos(position.row, position.column + text.length);
         this.applyDelta({
@@ -877,7 +863,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(end);
     };
-    this.clippedPos = function (row, column) {
+    Document.prototype.clippedPos = function (row, column) {
         var length = this.getLength();
         if (row === undefined) {
             row = length;
@@ -895,13 +881,13 @@ var Document = function (textOrLines) {
         column = Math.min(Math.max(column, 0), line.length);
         return { row: row, column: column };
     };
-    this.clonePos = function (pos) {
+    Document.prototype.clonePos = function (pos) {
         return { row: pos.row, column: pos.column };
     };
-    this.pos = function (row, column) {
+    Document.prototype.pos = function (row, column) {
         return { row: row, column: column };
     };
-    this.$clipPosition = function (position) {
+    Document.prototype.$clipPosition = function (position) {
         var length = this.getLength();
         if (position.row >= length) {
             position.row = Math.max(0, length - 1);
@@ -913,7 +899,7 @@ var Document = function (textOrLines) {
         }
         return position;
     };
-    this.insertFullLines = function (row, lines) {
+    Document.prototype.insertFullLines = function (row, lines) {
         row = Math.min(Math.max(row, 0), this.getLength());
         var column = 0;
         if (row < this.getLength()) {
@@ -927,7 +913,7 @@ var Document = function (textOrLines) {
         }
         this.insertMergedLines({ row: row, column: column }, lines);
     };
-    this.insertMergedLines = function (position, lines) {
+    Document.prototype.insertMergedLines = function (position, lines) {
         var start = this.clippedPos(position.row, position.column);
         var end = {
             row: start.row + lines.length - 1,
@@ -941,7 +927,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(end);
     };
-    this.remove = function (range) {
+    Document.prototype.remove = function (range) {
         var start = this.clippedPos(range.start.row, range.start.column);
         var end = this.clippedPos(range.end.row, range.end.column);
         this.applyDelta({
@@ -952,7 +938,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(start);
     };
-    this.removeInLine = function (row, startColumn, endColumn) {
+    Document.prototype.removeInLine = function (row, startColumn, endColumn) {
         var start = this.clippedPos(row, startColumn);
         var end = this.clippedPos(row, endColumn);
         this.applyDelta({
@@ -963,7 +949,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(start);
     };
-    this.removeFullLines = function (firstRow, lastRow) {
+    Document.prototype.removeFullLines = function (firstRow, lastRow) {
         firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
         lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
         var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
@@ -982,7 +968,7 @@ var Document = function (textOrLines) {
         });
         return deletedLines;
     };
-    this.removeNewLine = function (row) {
+    Document.prototype.removeNewLine = function (row) {
         if (row < this.getLength() - 1 && row >= 0) {
             this.applyDelta({
                 start: this.pos(row, this.getLine(row).length),
@@ -992,7 +978,7 @@ var Document = function (textOrLines) {
             });
         }
     };
-    this.replace = function (range, text) {
+    Document.prototype.replace = function (range, text) {
         if (!(range instanceof Range))
             range = Range.fromPoints(range.start, range.end);
         if (text.length === 0 && range.isEmpty())
@@ -1009,17 +995,17 @@ var Document = function (textOrLines) {
         }
         return end;
     };
-    this.applyDeltas = function (deltas) {
+    Document.prototype.applyDeltas = function (deltas) {
         for (var i = 0; i < deltas.length; i++) {
             this.applyDelta(deltas[i]);
         }
     };
-    this.revertDeltas = function (deltas) {
+    Document.prototype.revertDeltas = function (deltas) {
         for (var i = deltas.length - 1; i >= 0; i--) {
             this.revertDelta(deltas[i]);
         }
     };
-    this.applyDelta = function (delta, doNotValidate) {
+    Document.prototype.applyDelta = function (delta, doNotValidate) {
         var isInsert = delta.action == "insert";
         if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
             : !Range.comparePoints(delta.start, delta.end)) {
@@ -1033,14 +1019,14 @@ var Document = function (textOrLines) {
             this._signal("change", delta);
         }
     };
-    this.$safeApplyDelta = function (delta) {
+    Document.prototype.$safeApplyDelta = function (delta) {
         var docLength = this.$lines.length;
         if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
             || delta.action == "insert" && delta.start.row <= docLength) {
             this.applyDelta(delta);
         }
     };
-    this.$splitAndapplyLargeDelta = function (delta, MAX) {
+    Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {
         var lines = delta.lines;
         var l = lines.length - MAX + 1;
         var row = delta.start.row;
@@ -1061,7 +1047,7 @@ var Document = function (textOrLines) {
         delta.start.column = column;
         this.applyDelta(delta, true);
     };
-    this.revertDelta = function (delta) {
+    Document.prototype.revertDelta = function (delta) {
         this.$safeApplyDelta({
             start: this.clonePos(delta.start),
             end: this.clonePos(delta.end),
@@ -1069,7 +1055,7 @@ var Document = function (textOrLines) {
             lines: delta.lines.slice()
         });
     };
-    this.indexToPosition = function (index, startRow) {
+    Document.prototype.indexToPosition = function (index, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         for (var i = startRow || 0, l = lines.length; i < l; i++) {
@@ -1079,7 +1065,7 @@ var Document = function (textOrLines) {
         }
         return { row: l - 1, column: index + lines[l - 1].length + newlineLength };
     };
-    this.positionToIndex = function (pos, startRow) {
+    Document.prototype.positionToIndex = function (pos, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         var index = 0;
@@ -1088,11 +1074,39 @@ var Document = function (textOrLines) {
             index += lines[i].length + newlineLength;
         return index + pos.column;
     };
-}).call(Document.prototype);
+    Document.prototype.$split = function (text) {
+        return text.split(/\r\n|\r|\n/);
+    };
+    return Document;
+}());
+Document.prototype.$autoNewLine = "";
+Document.prototype.$newLineMode = "auto";
+oop.implement(Document.prototype, EventEmitter);
 exports.Document = Document;
 
 });
 
+ace.define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {
+    if (typeof obj !== "object" || !obj)
+        return obj;
+    var copy;
+    if (Array.isArray(obj)) {
+        copy = [];
+        for (var key = 0; key < obj.length; key++) {
+            copy[key] = deepCopy(obj[key]);
+        }
+        return copy;
+    }
+    if (Object.prototype.toString.call(obj) !== "[object Object]")
+        return obj;
+    copy = {};
+    for (var key in obj)
+        copy[key] = deepCopy(obj[key]);
+    return copy;
+};
+
+});
+
 ace.define("ace/lib/lang",[], function(require, exports, module){"use strict";
 exports.last = function (a) {
     return a[a.length - 1];
@@ -1135,24 +1149,7 @@ exports.copyArray = function (array) {
     }
     return copy;
 };
-exports.deepCopy = function deepCopy(obj) {
-    if (typeof obj !== "object" || !obj)
-        return obj;
-    var copy;
-    if (Array.isArray(obj)) {
-        copy = [];
-        for (var key = 0; key < obj.length; key++) {
-            copy[key] = deepCopy(obj[key]);
-        }
-        return copy;
-    }
-    if (Object.prototype.toString.call(obj) !== "[object Object]")
-        return obj;
-    copy = {};
-    for (var key in obj)
-        copy[key] = deepCopy(obj[key]);
-    return copy;
-};
+exports.deepCopy = require("./deep_copy").deepCopy;
 exports.arrayToMap = function (arr) {
     var map = {};
     for (var i = 0; i < arr.length; i++) {
@@ -1245,6 +1242,18 @@ exports.delayedCall = function (fcn, defaultTimeout) {
     };
     return _self;
 };
+exports.supportsLookbehind = function () {
+    try {
+        new RegExp('(?<=.)');
+    }
+    catch (e) {
+        return false;
+    }
+    return true;
+};
+exports.skipEmptyMatch = function (line, last, supportsUnicodeFlag) {
+    return supportsUnicodeFlag && line.codePointAt(last) > 0xffff ? 2 : 1;
+};
 
 });
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/2bf178d3af8ceb86a2c5588fa5b0434a.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/2c48ebc44a87762b127d573fd4ed4d49.js


+ 9 - 0
web/2c6ae8805adc9206e70eb29818e71a4f.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/vue"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
web/2d0362619c6807297b4b207bad2940cd.js


+ 18 - 18
web/49a6772f0e4c0ad12d9475bef3ec1dd4.js → web/2df83568e34903d7d3e0051e3a95c459.js

@@ -3,15 +3,15 @@ var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var DocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
-                token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
-            },
-            DocCommentHighlightRules.getTagRule(),
+        "start": [
             {
-                defaultToken: "comment.doc",
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
-            }]
+            }
+        ]
     };
 };
 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
@@ -23,14 +23,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
 };
 DocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
 DocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
@@ -88,7 +88,7 @@ var DHighlightRules = function () {
             },
             DocCommentHighlightRules.getStartRule("doc-start"),
             {
-                token: "comment",
+                token: "comment", // multi line comment
                 regex: "\\/\\*",
                 next: "star-comment"
             }, {
@@ -113,15 +113,15 @@ var DHighlightRules = function () {
                 regex: 'q"(?:[a-zA-Z_]+)$',
                 next: 'identifier-heredoc-string'
             }, {
-                token: "string",
+                token: "string", // multi line string start
                 regex: '[xr]?"',
                 next: "quote-string"
             }, {
-                token: "string",
+                token: "string", // multi line string start
                 regex: '[xr]?`',
                 next: "backtick-string"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: "[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?"
             }, {
                 token: ["keyword", "text", "paren.lparen"],
@@ -140,10 +140,10 @@ var DHighlightRules = function () {
                 token: ["keyword", "text", "variable.storage", "text"],
                 regex: "(alias|typedef)(\\s*)(" + identifierRe + ")(\\s*)"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hex
                 regex: "0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: "[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b"
             }, {
                 token: "entity.other.attribute-name",
@@ -170,7 +170,7 @@ var DHighlightRules = function () {
         ],
         "star-comment": [
             {
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\*\\/",
                 next: "start"
             }, {
@@ -179,7 +179,7 @@ var DHighlightRules = function () {
         ],
         "plus-comment": [
             {
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\+\\/",
                 next: "start"
             }, {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 46
web/2f3af4250fd57142b0ffb0ed6bc553dc.js


+ 25 - 18
web/0db77d70de73132c7e5979bf8e82f047.js → web/2fd1880f79d0f2ffb10daaf928266181.js

@@ -3,15 +3,15 @@ var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var DocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
-                token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
-            },
-            DocCommentHighlightRules.getTagRule(),
+        "start": [
             {
-                defaultToken: "comment.doc",
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
-            }]
+            }
+        ]
     };
 };
 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
@@ -23,14 +23,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
 };
 DocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
 DocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
@@ -65,20 +65,20 @@ var scryptHighlightRules = function () {
             },
             DocCommentHighlightRules.getStartRule("doc-start"),
             {
-                token: "comment",
+                token: "comment", // multi line comment
                 regex: "\\/\\*",
                 next: "comment"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hex
                 regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/
             }, {
                 token: "constant.language.boolean",
@@ -144,7 +144,7 @@ var scryptHighlightRules = function () {
         ],
         "comment": [
             {
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\*\\/",
                 next: "start"
             }, {
@@ -287,12 +287,19 @@ var FoldMode = require("./folding/cstyle").FoldMode;
 var Mode = function () {
     this.HighlightRules = scryptHighlightRules;
     this.foldingRules = new FoldMode();
+    this.$behaviour = this.$defaultBehaviour;
 };
 oop.inherits(Mode, TextMode);
 (function () {
     this.lineCommentStart = "//";
-    this.blockComment = { start: "/*", end: "*/" };
-    this.$quotes = { '"': '"', "'": "'" };
+    this.blockComment = {
+        start: "/*",
+        end: "*/"
+    };
+    this.$quotes = {
+        '"': '"',
+        "'": "'"
+    };
     this.createWorker = function (session) {
         return null;
     };

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/30e3bb6a531e1c812558474a78d50e51.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
web/30fe7e6ab4db8a6e472422e6037abcf6.js


+ 5 - 5
web/1c396939d503de7cc34ff9e809ed92ee.js → web/313a120714418a06223767f908e52a06.js

@@ -68,7 +68,7 @@ var LuaHighlightRules = function () {
                         regex: /\]=*\]/,
                         next: "start"
                     }, {
-                        defaultToken: "comment"
+                        defaultToken: "comment.body"
                     }
                 ]
             },
@@ -104,16 +104,16 @@ var LuaHighlightRules = function () {
                 ]
             },
             {
-                token: "string",
+                token: "string", // " string
                 regex: '"(?:[^\\\\]|\\\\.)*?"'
             }, {
-                token: "string",
+                token: "string", // ' string
                 regex: "'(?:[^\\\\]|\\\\.)*?'"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: floatNumber
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // integer
                 regex: integer + "\\b"
             }, {
                 token: keywordMapper,

+ 1 - 6
web/f2cbfaebd00ef55ea3d48ff5acaeb844.js → web/32cea5ceeb0f16ead13364fac0c3214d.js

@@ -1,5 +1,4 @@
-ace.define("ace/ext/code_lens",["require","exports","module","ace/line_widgets","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"], function(require, exports, module){"use strict";
-var LineWidgets = require("../line_widgets").LineWidgets;
+ace.define("ace/ext/code_lens",["require","exports","module","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"], function(require, exports, module){"use strict";
 var event = require("../lib/event");
 var lang = require("../lib/lang");
 var dom = require("../lib/dom");
@@ -121,10 +120,6 @@ function attachToEditor(editor) {
         var session = editor.session;
         if (!session)
             return;
-        if (!session.widgetManager) {
-            session.widgetManager = new LineWidgets(session);
-            session.widgetManager.attach(editor);
-        }
         var providersToWaitNum = editor.codeLensProviders.length;
         var lenses = [];
         editor.codeLensProviders.forEach(function (provider) {

+ 9 - 0
web/33443ec129774bb1add5795cc8895137.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/jexl"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

+ 3 - 3
web/60d06d7e01bd491fa7376e70f9859545.js → web/33b2bdaf684e9e4ad47970682aa5b00d.js

@@ -28,11 +28,11 @@ var GherkinHighlightRules = function () {
                 token: "keyword",
                 regex: "\\*"
             }, {
-                token: "string",
+                token: "string", // multi line """ string start
                 regex: '"{3}',
                 next: "qqstring3"
             }, {
-                token: "string",
+                token: "string", // " string
                 regex: '"',
                 next: "qqstring"
             }, {
@@ -65,7 +65,7 @@ var GherkinHighlightRules = function () {
                 token: "constant.language.escape",
                 regex: stringEscape
             }, {
-                token: "string",
+                token: "string", // multi line """ string end
                 regex: '"{3}',
                 next: "start"
             }, {

+ 9 - 0
web/33df99ab21a0e281c0626e261c1638bc.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/odin"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 644 - 173
web/34d0c1d6498eaae9c9c239d06f1e92d2.js


+ 2 - 3
web/5a2b4fb5ab9db07fc3a8acae381d32d8.js → web/35b519c2ce83bbe55e6ba35bd379db4e.js

@@ -414,19 +414,18 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/kotlin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){/*
+ace.define("ace/mode/kotlin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module){/*
   THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
 */
 "use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var KotlinHighlightRules = require("./kotlin_highlight_rules").KotlinHighlightRules;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
 var FoldMode = require("./folding/cstyle").FoldMode;
 var Mode = function () {
     this.HighlightRules = KotlinHighlightRules;
     this.foldingRules = new FoldMode();
-    this.$behaviour = new CstyleBehaviour();
+    this.$behaviour = this.$defaultBehaviour;
 };
 oop.inherits(Mode, TextMode);
 (function () {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/3687db9c0d3858c4315ffb5152198053.js


+ 9 - 0
web/3734f5f0d471b4551566c56c7149b602.js

@@ -0,0 +1,9 @@
+
+;                (function() {
+                    ace.require(["ace/snippets/astro"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

+ 551 - 81
web/babd776205dca0c3000492c68ed0d49b.js → web/3772f2213ed93309a276da19e67b91e7.js

@@ -1,52 +1,134 @@
-ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var DocCommentHighlightRules = function () {
+var JsDocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
+        "start": [
+            {
+                token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
+                regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
+                        regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
+                        next: "pop"
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "lparen.doc"],
+                regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
+                    + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
+                    + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
+                    + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
+                    + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@access\\s+(?:private|public|protected)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
+            }, {
                 token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
+                regex: "@\\w+(?=\\s|$)"
             },
-            DocCommentHighlightRules.getTagRule(),
+            JsDocCommentHighlightRules.getTagRule(),
             {
-                defaultToken: "comment.doc",
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
+            }
+        ],
+        "doc-syntax": [{
+                token: "operator.doc",
+                regex: /[|:]/
+            }, {
+                token: "paren.doc",
+                regex: /[\[\]]/
             }]
     };
+    this.normalizeRules();
 };
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-DocCommentHighlightRules.getTagRule = function (start) {
+oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
+JsDocCommentHighlightRules.getTagRule = function (start) {
     return {
         token: "comment.doc.tag.storage.type",
         regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
     };
 };
-DocCommentHighlightRules.getStartRule = function (start) {
+JsDocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
-DocCommentHighlightRules.getEndRule = function (start) {
+JsDocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
 };
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
+exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
 
 });
 
-ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
 var JavaScriptHighlightRules = function (options) {
-    var keywordMapper = this.createKeywordMapper({
-        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+    var keywords = {
+        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
             "Namespace|QName|XML|XMLList|" + // E4X
             "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
             "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
@@ -55,17 +137,18 @@ var JavaScriptHighlightRules = function (options) {
             "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
             "isNaN|parseFloat|parseInt|" +
             "JSON|Math|" + // Other
-            "this|arguments|prototype|window|document",
+            "this|arguments|prototype|window|document", // Pseudo
         "keyword": "const|yield|import|get|set|async|await|" +
-            "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+            "break|case|catch|continue|default|delete|do|else|finally|for|" +
             "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
             "__parent__|__count__|escape|unescape|with|__proto__|" +
-            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
         "storage.type": "const|let|var|function",
         "constant.language": "null|Infinity|NaN|undefined",
         "support.function": "alert",
         "constant.language.boolean": "true|false"
-    }, "identifier");
+    };
+    var keywordMapper = this.createKeywordMapper(keywords, "identifier");
     var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
     var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
         "u[0-9a-fA-F]{4}|" + // unicode
@@ -74,10 +157,16 @@ var JavaScriptHighlightRules = function (options) {
         "3[0-7][0-7]?|" + // oct
         "[4-7][0-7]?|" + //oct
         ".)";
+    var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
+    var functionCallStartRule = {
+        token: ["identifier", "text", "paren.lparen"],
+        regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
+    };
     this.$rules = {
         "no_regex": [
             DocCommentHighlightRules.getStartRule("doc-start"),
             comments("no_regex"),
+            functionCallStartRule,
             {
                 token: "string",
                 regex: "'(?=.)",
@@ -87,58 +176,36 @@ var JavaScriptHighlightRules = function (options) {
                 regex: '"(?=.)',
                 next: "qqstring"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hexadecimal, octal and binary
                 regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // decimal integers and floats
                 regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
             }, {
                 token: [
-                    "storage.type", "punctuation.operator", "support.function",
-                    "punctuation.operator", "entity.name.function", "text", "keyword.operator"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text", "storage.type", "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
                     "entity.name.function", "text", "keyword.operator", "text", "storage.type",
-                    "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
                     "entity.name.function", "text", "punctuation.operator",
-                    "text", "storage.type", "text", "paren.lparen"
+                    "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "text", "text", "storage.type", "text", "paren.lparen"
+                    "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "keyword",
@@ -148,11 +215,11 @@ var JavaScriptHighlightRules = function (options) {
                 regex: "(?:" + kwBeforeRe + ")\\b",
                 next: "start"
             }, {
-                token: ["support.constant"],
+                token: "support.constant",
                 regex: /that\b/
             }, {
                 token: ["storage.type", "punctuation.operator", "support.function.firebug"],
-                regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+                regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
             }, {
                 token: keywordMapper,
                 regex: identifierRe
@@ -188,19 +255,29 @@ var JavaScriptHighlightRules = function (options) {
                 token: "text",
                 regex: "\\s+"
             }, {
+                token: "keyword.operator",
+                regex: /=/
+            }, {
+                token: [
+                    "storage.type", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex: anonymousFunctionRe + "(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
                 token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "punctuation.operator",
                 regex: /[.](?![.])/
             }, {
                 token: "support.function",
-                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+                regex: "prototype"
+            }, {
+                token: "support.function",
+                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
             }, {
                 token: "support.function.dom",
                 regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
@@ -281,13 +358,67 @@ var JavaScriptHighlightRules = function (options) {
                 defaultToken: "string.regexp.charachterclass"
             }
         ],
+        "default_parameter": [
+            {
+                token: "string",
+                regex: "'(?=.)",
+                push: [
+                    {
+                        token: "string",
+                        regex: "'|$",
+                        next: "pop"
+                    }, {
+                        include: "qstring"
+                    }
+                ]
+            }, {
+                token: "string",
+                regex: '"(?=.)',
+                push: [
+                    {
+                        token: "string",
+                        regex: '"|$',
+                        next: "pop"
+                    }, {
+                        include: "qqstring"
+                    }
+                ]
+            }, {
+                token: "constant.language",
+                regex: "null|Infinity|NaN|undefined"
+            }, {
+                token: "constant.numeric", // hexadecimal, octal and binary
+                regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+            }, {
+                token: "constant.numeric", // decimal integers and floats
+                regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
+            }, {
+                token: "punctuation.operator",
+                regex: ",",
+                next: "function_arguments"
+            }, {
+                token: "text",
+                regex: "\\s+"
+            }, {
+                token: "punctuation.operator",
+                regex: "$"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
         "function_arguments": [
+            comments("function_arguments"),
             {
                 token: "variable.parameter",
                 regex: identifierRe
             }, {
                 token: "punctuation.operator",
-                regex: "[, ]+"
+                regex: ","
+            }, {
+                token: "text",
+                regex: "\\s+"
             }, {
                 token: "punctuation.operator",
                 regex: "$"
@@ -363,6 +494,32 @@ var JavaScriptHighlightRules = function (options) {
                 }, {
                     defaultToken: "string.quasi"
                 }]
+        }, {
+            token: ["variable.parameter", "text"],
+            regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
+        }, {
+            token: "paren.lparen",
+            regex: "(\\()(?=[^\\(]+\\s*=>)",
+            next: "function_arguments"
+        }, {
+            token: "variable.language",
+            regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
+        });
+        this.$rules["function_arguments"].unshift({
+            token: "keyword.operator",
+            regex: "=",
+            next: "default_parameter"
+        }, {
+            token: "keyword.operator",
+            regex: "\\.{3}"
+        });
+        this.$rules["property"].unshift({
+            token: "support.function",
+            regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
+                + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
+        }, {
+            token: "constant.language",
+            regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
         });
         if (!options || options.jsx != false)
             JSX.call(this);
@@ -400,7 +557,7 @@ function JSX() {
                     value: val.substr(offset)
                 }];
         },
-        regex: "</?" + tagRegex + "",
+        regex: "</?(?:" + tagRegex + "|(?=>))",
         next: "jsxAttributes",
         nextState: "jsx"
     };
@@ -413,8 +570,7 @@ function JSX() {
     this.$rules.jsx = [
         jsxJsRule,
         jsxTag,
-        { include: "reference" },
-        { defaultToken: "string" }
+        { include: "reference" }, { defaultToken: "string.xml" }
     ];
     this.$rules.jsxAttributes = [{
             token: "meta.tag.punctuation.tag-close.xml",
@@ -474,7 +630,7 @@ function JSX() {
 function comments(next) {
     return [
         {
-            token: "comment",
+            token: "comment", // multi line comment
             regex: /\/\*/,
             next: [
                 DocCommentHighlightRules.getTagRule(),
@@ -525,6 +681,293 @@ exports.MatchingBraceOutdent = MatchingBraceOutdent;
 
 });
 
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+function is(token, type) {
+    return token && token.type.lastIndexOf(type + ".xml") > -1;
+}
+var XmlBehaviour = function () {
+    this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+        if (text == '"' || text == "'") {
+            var quote = text;
+            var selected = session.doc.getTextRange(editor.getSelectionRange());
+            if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: quote + selected + quote,
+                    selection: false
+                };
+            }
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+                return {
+                    text: "",
+                    selection: [1, 1]
+                };
+            }
+            if (!token)
+                token = iterator.stepBackward();
+            if (!token)
+                return;
+            while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+                token = iterator.stepBackward();
+            }
+            var rightSpace = !rightChar || rightChar.match(/\s/);
+            if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+                return {
+                    text: quote + quote,
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+    this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == selected) {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+    this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+                return;
+            if (is(token, "reference.attribute-value"))
+                return;
+            if (is(token, "attribute-value")) {
+                var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
+                if (position.column < tokenEndColumn)
+                    return;
+                if (position.column == tokenEndColumn) {
+                    var nextToken = iterator.stepForward();
+                    if (nextToken && is(nextToken, "attribute-value"))
+                        return;
+                    iterator.stepBackward();
+                }
+            }
+            if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
+                return;
+            while (!is(token, "tag-name")) {
+                token = iterator.stepBackward();
+                if (token.value == "<") {
+                    token = iterator.stepForward();
+                    break;
+                }
+            }
+            var tokenRow = iterator.getCurrentTokenRow();
+            var tokenColumn = iterator.getCurrentTokenColumn();
+            if (is(iterator.stepBackward(), "end-tag-open"))
+                return;
+            var element = token.value;
+            if (tokenRow == position.row)
+                element = element.substring(0, position.column - tokenColumn);
+            if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
+                return;
+            return {
+                text: ">" + "</" + element + ">",
+                selection: [1, 1]
+            };
+        }
+    });
+    this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+        if (text == "\n") {
+            var cursor = editor.getCursorPosition();
+            var line = session.getLine(cursor.row);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
+                if (token.value == "/>")
+                    return;
+                while (token && token.type.indexOf("tag-name") === -1) {
+                    token = iterator.stepBackward();
+                }
+                if (!token) {
+                    return;
+                }
+                var tag = token.value;
+                var row = iterator.getCurrentTokenRow();
+                token = iterator.stepBackward();
+                if (!token || token.type.indexOf("end-tag") !== -1) {
+                    return;
+                }
+                if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
+                    var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
+                    var line = session.getLine(row);
+                    var nextIndent = this.$getIndent(line);
+                    var indent = nextIndent + session.getTabString();
+                    if (nextToken && nextToken.value === "</") {
+                        return {
+                            text: "\n" + indent + "\n" + nextIndent,
+                            selection: [1, indent.length, 1, indent.length]
+                        };
+                    }
+                    else {
+                        return {
+                            text: "\n" + indent
+                        };
+                    }
+                }
+            }
+        }
+    });
+};
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
+
+});
+
+ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var JavaScriptBehaviour = function () {
+    var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
+    this.addBehaviours(xmlBehaviours);
+    this.inherit(CstyleBehaviour);
+    this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token)
+                return;
+            if (token.value == '<') {
+                return {
+                    text: "></>",
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+};
+oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
+exports.JavaScriptBehaviour = JavaScriptBehaviour;
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
+    BaseFoldMode.call(this);
+    this.voidElements = voidElements || {};
+    this.optionalEndTags = oop.mixin({}, this.voidElements);
+    if (optionalEndTags)
+        oop.mixin(this.optionalEndTags, optionalEndTags);
+};
+oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function () {
+    this.tagName = "";
+    this.closing = false;
+    this.selfClosing = false;
+    this.start = { row: 0, column: 0 };
+    this.end = { row: 0, column: 0 };
+};
+function is(token, type) {
+    return token && token.type && token.type.lastIndexOf(type + ".xml") > -1;
+}
+(function () {
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var tag = this._getFirstTagInLine(session, row);
+        if (!tag)
+            return this.getCommentFoldWidget(session, row);
+        if (tag.closing || (!tag.tagName && tag.selfClosing))
+            return foldStyle === "markbeginend" ? "end" : "";
+        if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+            return "";
+        if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+            return "";
+        return "start";
+    };
+    this.getCommentFoldWidget = function (session, row) {
+        if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+            return "start";
+        return "";
+    };
+    this._getFirstTagInLine = function (session, row) {
+        var tokens = session.getTokens(row);
+        var tag = new Tag();
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            if (is(token, "tag-open")) {
+                tag.end.column = tag.start.column + token.value.length;
+                tag.closing = is(token, "end-tag-open");
+                token = tokens[++i];
+                if (!token)
+                    return null;
+                tag.tagName = token.value;
+                if (token.value === "") { //skip empty tag name token for fragment
+                    token = tokens[++i];
+                    if (!token)
+                        return null;
+                    tag.tagName = token.value;
+                }
+                tag.end.column += token.value.length;
+                for (i++; i < tokens.length; i++) {
+                    token = tokens[i];
+                    tag.end.column += token.value.length;
+                    if (is(token, "tag-close")) {
+                        tag.selfClosing = token.value == '/>';
+                        break;
+                    }
+                }
+                return tag;
+            }
+            else if (is(token, "tag-close")) {
+                tag.selfClosing = token.value == '/>';
+                return tag;
+            }
+            tag.start.column += token.value.length;
+        }
+        return null;
+    };
+    this._findEndTagInLine = function (session, row, tagName, startColumn) {
+        var tokens = session.getTokens(row);
+        var column = 0;
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            column += token.value.length;
+            if (column < startColumn - 1)
+                continue;
+            if (is(token, "end-tag-open")) {
+                token = tokens[i + 1];
+                if (is(token, "tag-name") && token.value === "") {
+                    token = tokens[i + 2];
+                }
+                if (token && token.value == tagName)
+                    return true;
+            }
+        }
+        return false;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row) {
+        var firstTag = this._getFirstTagInLine(session, row);
+        if (!firstTag) {
+            return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
+        }
+        var tags = session.getMatchingTags({ row: row, column: 0 });
+        if (tags) {
+            return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
+        }
+    };
+}).call(FoldMode.prototype);
+
+});
+
 ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
 var oop = require("../../lib/oop");
 var Range = require("../../range").Range;
@@ -641,25 +1084,60 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var XmlFoldMode = require("./xml").FoldMode;
+var CFoldMode = require("./cstyle").FoldMode;
+var FoldMode = exports.FoldMode = function (commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
+        this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
+    }
+    this.xmlFoldMode = new XmlFoldMode();
+};
+oop.inherits(FoldMode, CFoldMode);
+(function () {
+    this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
+    this.getFoldWidgetBase = this.getFoldWidget;
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var fw = this.getFoldWidgetBase(session, foldStyle, row);
+        if (!fw) {
+            return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
+        }
+        return fw;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
+        var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
+        if (range)
+            return range;
+        return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
 var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
 var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
+var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
 var Mode = function () {
     this.HighlightRules = JavaScriptHighlightRules;
     this.$outdent = new MatchingBraceOutdent();
-    this.$behaviour = new CstyleBehaviour();
-    this.foldingRules = new CStyleFoldMode();
+    this.$behaviour = new JavaScriptBehaviour();
+    this.foldingRules = new JavaScriptFoldMode();
 };
 oop.inherits(Mode, TextMode);
 (function () {
     this.lineCommentStart = "//";
     this.blockComment = { start: "/*", end: "*/" };
     this.$quotes = { '"': '"', "'": "'", "`": "`" };
+    this.$pairQuotesAfter = {
+        "`": /\w/
+    };
     this.getNextLineIndent = function (state, line, tab) {
         var indent = this.$getIndent(line);
         var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
@@ -678,13 +1156,6 @@ oop.inherits(Mode, TextMode);
             if (endState == "start" || endState == "no_regex") {
                 return "";
             }
-            var match = line.match(/^\s*(\/?)\*/);
-            if (match) {
-                if (match[1]) {
-                    indent += " ";
-                }
-                indent += "* ";
-            }
         }
         return indent;
     };
@@ -749,20 +1220,19 @@ exports.TypeScriptHighlightRules = TypeScriptHighlightRules;
 
 });
 
-ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module){/*
+ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module){/*
   THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
 */
 "use strict";
 var oop = require("../lib/oop");
 var jsMode = require("./javascript").Mode;
 var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
 var CStyleFoldMode = require("./folding/cstyle").FoldMode;
 var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
 var Mode = function () {
     this.HighlightRules = TypeScriptHighlightRules;
     this.$outdent = new MatchingBraceOutdent();
-    this.$behaviour = new CstyleBehaviour();
+    this.$behaviour = this.$defaultBehaviour;
     this.foldingRules = new CStyleFoldMode();
 };
 oop.inherits(Mode, jsMode);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/3bbeadbf33a4c2c131ec271b9b103a59.js


+ 179 - 170
web/96be495858529d5ff33b6705332e0840.js → web/3c126add795585b0bcdab07451b9c398.js

@@ -413,34 +413,31 @@ exports.EventEmitter = EventEmitter;
 });
 
 ace.define("ace/range",[], function(require, exports, module){"use strict";
-var comparePoints = function (p1, p2) {
-    return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function (startRow, startColumn, endRow, endColumn) {
-    this.start = {
-        row: startRow,
-        column: startColumn
-    };
-    this.end = {
-        row: endRow,
-        column: endColumn
-    };
-};
-(function () {
-    this.isEqual = function (range) {
+var Range = /** @class */ (function () {
+    function Range(startRow, startColumn, endRow, endColumn) {
+        this.start = {
+            row: startRow,
+            column: startColumn
+        };
+        this.end = {
+            row: endRow,
+            column: endColumn
+        };
+    }
+    Range.prototype.isEqual = function (range) {
         return this.start.row === range.start.row &&
             this.end.row === range.end.row &&
             this.start.column === range.start.column &&
             this.end.column === range.end.column;
     };
-    this.toString = function () {
+    Range.prototype.toString = function () {
         return ("Range: [" + this.start.row + "/" + this.start.column +
             "] -> [" + this.end.row + "/" + this.end.column + "]");
     };
-    this.contains = function (row, column) {
+    Range.prototype.contains = function (row, column) {
         return this.compare(row, column) == 0;
     };
-    this.compareRange = function (range) {
+    Range.prototype.compareRange = function (range) {
         var cmp, end = range.end, start = range.start;
         cmp = this.compare(end.row, end.column);
         if (cmp == 1) {
@@ -471,23 +468,23 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             }
         }
     };
-    this.comparePoint = function (p) {
+    Range.prototype.comparePoint = function (p) {
         return this.compare(p.row, p.column);
     };
-    this.containsRange = function (range) {
+    Range.prototype.containsRange = function (range) {
         return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
     };
-    this.intersects = function (range) {
+    Range.prototype.intersects = function (range) {
         var cmp = this.compareRange(range);
         return (cmp == -1 || cmp == 0 || cmp == 1);
     };
-    this.isEnd = function (row, column) {
+    Range.prototype.isEnd = function (row, column) {
         return this.end.row == row && this.end.column == column;
     };
-    this.isStart = function (row, column) {
+    Range.prototype.isStart = function (row, column) {
         return this.start.row == row && this.start.column == column;
     };
-    this.setStart = function (row, column) {
+    Range.prototype.setStart = function (row, column) {
         if (typeof row == "object") {
             this.start.column = row.column;
             this.start.row = row.row;
@@ -497,7 +494,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.start.column = column;
         }
     };
-    this.setEnd = function (row, column) {
+    Range.prototype.setEnd = function (row, column) {
         if (typeof row == "object") {
             this.end.column = row.column;
             this.end.row = row.row;
@@ -507,7 +504,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.end.column = column;
         }
     };
-    this.inside = function (row, column) {
+    Range.prototype.inside = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column) || this.isStart(row, column)) {
                 return false;
@@ -518,7 +515,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideStart = function (row, column) {
+    Range.prototype.insideStart = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column)) {
                 return false;
@@ -529,7 +526,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideEnd = function (row, column) {
+    Range.prototype.insideEnd = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isStart(row, column)) {
                 return false;
@@ -540,7 +537,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.compare = function (row, column) {
+    Range.prototype.compare = function (row, column) {
         if (!this.isMultiLine()) {
             if (row === this.start.row) {
                 return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
@@ -556,7 +553,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return column <= this.end.column ? 0 : 1;
         return 0;
     };
-    this.compareStart = function (row, column) {
+    Range.prototype.compareStart = function (row, column) {
         if (this.start.row == row && this.start.column == column) {
             return -1;
         }
@@ -564,7 +561,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareEnd = function (row, column) {
+    Range.prototype.compareEnd = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -572,7 +569,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareInside = function (row, column) {
+    Range.prototype.compareInside = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -583,7 +580,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.clipRows = function (firstRow, lastRow) {
+    Range.prototype.clipRows = function (firstRow, lastRow) {
         if (this.end.row > lastRow)
             var end = { row: lastRow + 1, column: 0 };
         else if (this.end.row < firstRow)
@@ -594,7 +591,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var start = { row: firstRow, column: 0 };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.extend = function (row, column) {
+    Range.prototype.extend = function (row, column) {
         var cmp = this.compare(row, column);
         if (cmp == 0)
             return this;
@@ -604,37 +601,37 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var end = { row: row, column: column };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.isEmpty = function () {
+    Range.prototype.isEmpty = function () {
         return (this.start.row === this.end.row && this.start.column === this.end.column);
     };
-    this.isMultiLine = function () {
+    Range.prototype.isMultiLine = function () {
         return (this.start.row !== this.end.row);
     };
-    this.clone = function () {
+    Range.prototype.clone = function () {
         return Range.fromPoints(this.start, this.end);
     };
-    this.collapseRows = function () {
+    Range.prototype.collapseRows = function () {
         if (this.end.column == 0)
             return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);
         else
             return new Range(this.start.row, 0, this.end.row, 0);
     };
-    this.toScreenRange = function (session) {
+    Range.prototype.toScreenRange = function (session) {
         var screenPosStart = session.documentToScreenPosition(this.start);
         var screenPosEnd = session.documentToScreenPosition(this.end);
         return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);
     };
-    this.moveBy = function (row, column) {
+    Range.prototype.moveBy = function (row, column) {
         this.start.row += row;
         this.start.column += column;
         this.end.row += row;
         this.end.column += column;
     };
-}).call(Range.prototype);
+    return Range;
+}());
 Range.fromPoints = function (start, end) {
     return new Range(start.row, start.column, end.row, end.column);
 };
-Range.comparePoints = comparePoints;
 Range.comparePoints = function (p1, p2) {
     return p1.row - p2.row || p1.column - p2.column;
 };
@@ -645,24 +642,22 @@ exports.Range = Range;
 ace.define("ace/anchor",[], function(require, exports, module){"use strict";
 var oop = require("./lib/oop");
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Anchor = exports.Anchor = function (doc, row, column) {
-    this.$onChange = this.onChange.bind(this);
-    this.attach(doc);
-    if (typeof column == "undefined")
-        this.setPosition(row.row, row.column);
-    else
-        this.setPosition(row, column);
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.getPosition = function () {
+var Anchor = /** @class */ (function () {
+    function Anchor(doc, row, column) {
+        this.$onChange = this.onChange.bind(this);
+        this.attach(doc);
+        if (typeof row != "number")
+            this.setPosition(row.row, row.column);
+        else
+            this.setPosition(row, column);
+    }
+    Anchor.prototype.getPosition = function () {
         return this.$clipPositionToDocument(this.row, this.column);
     };
-    this.getDocument = function () {
+    Anchor.prototype.getDocument = function () {
         return this.document;
     };
-    this.$insertRight = false;
-    this.onChange = function (delta) {
+    Anchor.prototype.onChange = function (delta) {
         if (delta.start.row == delta.end.row && delta.start.row != this.row)
             return;
         if (delta.start.row > this.row)
@@ -670,34 +665,7 @@ var Anchor = exports.Anchor = function (doc, row, column) {
         var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);
         this.setPosition(point.row, point.column, true);
     };
-    function $pointsInOrder(point1, point2, equalPointsInOrder) {
-        var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
-        return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
-    }
-    function $getTransformedPoint(delta, point, moveIfEqual) {
-        var deltaIsInsert = delta.action == "insert";
-        var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
-        var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
-        var deltaStart = delta.start;
-        var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
-        if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
-            return {
-                row: point.row,
-                column: point.column
-            };
-        }
-        if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
-            return {
-                row: point.row + deltaRowShift,
-                column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
-            };
-        }
-        return {
-            row: deltaStart.row,
-            column: deltaStart.column
-        };
-    }
-    this.setPosition = function (row, column, noClip) {
+    Anchor.prototype.setPosition = function (row, column, noClip) {
         var pos;
         if (noClip) {
             pos = {
@@ -721,14 +689,14 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             value: pos
         });
     };
-    this.detach = function () {
+    Anchor.prototype.detach = function () {
         this.document.off("change", this.$onChange);
     };
-    this.attach = function (doc) {
+    Anchor.prototype.attach = function (doc) {
         this.document = doc || this.document;
         this.document.on("change", this.$onChange);
     };
-    this.$clipPositionToDocument = function (row, column) {
+    Anchor.prototype.$clipPositionToDocument = function (row, column) {
         var pos = {};
         if (row >= this.document.getLength()) {
             pos.row = Math.max(0, this.document.getLength() - 1);
@@ -746,7 +714,38 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             pos.column = 0;
         return pos;
     };
-}).call(Anchor.prototype);
+    return Anchor;
+}());
+Anchor.prototype.$insertRight = false;
+oop.implement(Anchor.prototype, EventEmitter);
+function $pointsInOrder(point1, point2, equalPointsInOrder) {
+    var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+    return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+}
+function $getTransformedPoint(delta, point, moveIfEqual) {
+    var deltaIsInsert = delta.action == "insert";
+    var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+    var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+    var deltaStart = delta.start;
+    var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+    if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+        return {
+            row: point.row,
+            column: point.column
+        };
+    }
+    if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+        return {
+            row: point.row + deltaRowShift,
+            column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+        };
+    }
+    return {
+        row: deltaStart.row,
+        column: deltaStart.column
+    };
+}
+exports.Anchor = Anchor;
 
 });
 
@@ -756,47 +755,36 @@ var applyDelta = require("./apply_delta").applyDelta;
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
 var Range = require("./range").Range;
 var Anchor = require("./anchor").Anchor;
-var Document = function (textOrLines) {
-    this.$lines = [""];
-    if (textOrLines.length === 0) {
+var Document = /** @class */ (function () {
+    function Document(textOrLines) {
         this.$lines = [""];
+        if (textOrLines.length === 0) {
+            this.$lines = [""];
+        }
+        else if (Array.isArray(textOrLines)) {
+            this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
+        }
+        else {
+            this.insert({ row: 0, column: 0 }, textOrLines);
+        }
     }
-    else if (Array.isArray(textOrLines)) {
-        this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
-    }
-    else {
-        this.insert({ row: 0, column: 0 }, textOrLines);
-    }
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.setValue = function (text) {
+    Document.prototype.setValue = function (text) {
         var len = this.getLength() - 1;
         this.remove(new Range(0, 0, len, this.getLine(len).length));
-        this.insert({ row: 0, column: 0 }, text);
+        this.insert({ row: 0, column: 0 }, text || "");
     };
-    this.getValue = function () {
+    Document.prototype.getValue = function () {
         return this.getAllLines().join(this.getNewLineCharacter());
     };
-    this.createAnchor = function (row, column) {
+    Document.prototype.createAnchor = function (row, column) {
         return new Anchor(this, row, column);
     };
-    if ("aaa".split(/a/).length === 0) {
-        this.$split = function (text) {
-            return text.replace(/\r\n|\r/g, "\n").split("\n");
-        };
-    }
-    else {
-        this.$split = function (text) {
-            return text.split(/\r\n|\r|\n/);
-        };
-    }
-    this.$detectNewLine = function (text) {
+    Document.prototype.$detectNewLine = function (text) {
         var match = text.match(/^.*?(\r\n|\r|\n)/m);
         this.$autoNewLine = match ? match[1] : "\n";
         this._signal("changeNewLineMode");
     };
-    this.getNewLineCharacter = function () {
+    Document.prototype.getNewLineCharacter = function () {
         switch (this.$newLineMode) {
             case "windows":
                 return "\r\n";
@@ -806,36 +794,34 @@ var Document = function (textOrLines) {
                 return this.$autoNewLine || "\n";
         }
     };
-    this.$autoNewLine = "";
-    this.$newLineMode = "auto";
-    this.setNewLineMode = function (newLineMode) {
+    Document.prototype.setNewLineMode = function (newLineMode) {
         if (this.$newLineMode === newLineMode)
             return;
         this.$newLineMode = newLineMode;
         this._signal("changeNewLineMode");
     };
-    this.getNewLineMode = function () {
+    Document.prototype.getNewLineMode = function () {
         return this.$newLineMode;
     };
-    this.isNewLine = function (text) {
+    Document.prototype.isNewLine = function (text) {
         return (text == "\r\n" || text == "\r" || text == "\n");
     };
-    this.getLine = function (row) {
+    Document.prototype.getLine = function (row) {
         return this.$lines[row] || "";
     };
-    this.getLines = function (firstRow, lastRow) {
+    Document.prototype.getLines = function (firstRow, lastRow) {
         return this.$lines.slice(firstRow, lastRow + 1);
     };
-    this.getAllLines = function () {
+    Document.prototype.getAllLines = function () {
         return this.getLines(0, this.getLength());
     };
-    this.getLength = function () {
+    Document.prototype.getLength = function () {
         return this.$lines.length;
     };
-    this.getTextRange = function (range) {
+    Document.prototype.getTextRange = function (range) {
         return this.getLinesForRange(range).join(this.getNewLineCharacter());
     };
-    this.getLinesForRange = function (range) {
+    Document.prototype.getLinesForRange = function (range) {
         var lines;
         if (range.start.row === range.end.row) {
             lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
@@ -849,24 +835,24 @@ var Document = function (textOrLines) {
         }
         return lines;
     };
-    this.insertLines = function (row, lines) {
+    Document.prototype.insertLines = function (row, lines) {
         console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
         return this.insertFullLines(row, lines);
     };
-    this.removeLines = function (firstRow, lastRow) {
+    Document.prototype.removeLines = function (firstRow, lastRow) {
         console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
         return this.removeFullLines(firstRow, lastRow);
     };
-    this.insertNewLine = function (position) {
+    Document.prototype.insertNewLine = function (position) {
         console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
         return this.insertMergedLines(position, ["", ""]);
     };
-    this.insert = function (position, text) {
+    Document.prototype.insert = function (position, text) {
         if (this.getLength() <= 1)
             this.$detectNewLine(text);
         return this.insertMergedLines(position, this.$split(text));
     };
-    this.insertInLine = function (position, text) {
+    Document.prototype.insertInLine = function (position, text) {
         var start = this.clippedPos(position.row, position.column);
         var end = this.pos(position.row, position.column + text.length);
         this.applyDelta({
@@ -877,7 +863,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(end);
     };
-    this.clippedPos = function (row, column) {
+    Document.prototype.clippedPos = function (row, column) {
         var length = this.getLength();
         if (row === undefined) {
             row = length;
@@ -895,13 +881,13 @@ var Document = function (textOrLines) {
         column = Math.min(Math.max(column, 0), line.length);
         return { row: row, column: column };
     };
-    this.clonePos = function (pos) {
+    Document.prototype.clonePos = function (pos) {
         return { row: pos.row, column: pos.column };
     };
-    this.pos = function (row, column) {
+    Document.prototype.pos = function (row, column) {
         return { row: row, column: column };
     };
-    this.$clipPosition = function (position) {
+    Document.prototype.$clipPosition = function (position) {
         var length = this.getLength();
         if (position.row >= length) {
             position.row = Math.max(0, length - 1);
@@ -913,7 +899,7 @@ var Document = function (textOrLines) {
         }
         return position;
     };
-    this.insertFullLines = function (row, lines) {
+    Document.prototype.insertFullLines = function (row, lines) {
         row = Math.min(Math.max(row, 0), this.getLength());
         var column = 0;
         if (row < this.getLength()) {
@@ -927,7 +913,7 @@ var Document = function (textOrLines) {
         }
         this.insertMergedLines({ row: row, column: column }, lines);
     };
-    this.insertMergedLines = function (position, lines) {
+    Document.prototype.insertMergedLines = function (position, lines) {
         var start = this.clippedPos(position.row, position.column);
         var end = {
             row: start.row + lines.length - 1,
@@ -941,7 +927,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(end);
     };
-    this.remove = function (range) {
+    Document.prototype.remove = function (range) {
         var start = this.clippedPos(range.start.row, range.start.column);
         var end = this.clippedPos(range.end.row, range.end.column);
         this.applyDelta({
@@ -952,7 +938,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(start);
     };
-    this.removeInLine = function (row, startColumn, endColumn) {
+    Document.prototype.removeInLine = function (row, startColumn, endColumn) {
         var start = this.clippedPos(row, startColumn);
         var end = this.clippedPos(row, endColumn);
         this.applyDelta({
@@ -963,7 +949,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(start);
     };
-    this.removeFullLines = function (firstRow, lastRow) {
+    Document.prototype.removeFullLines = function (firstRow, lastRow) {
         firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
         lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
         var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
@@ -982,7 +968,7 @@ var Document = function (textOrLines) {
         });
         return deletedLines;
     };
-    this.removeNewLine = function (row) {
+    Document.prototype.removeNewLine = function (row) {
         if (row < this.getLength() - 1 && row >= 0) {
             this.applyDelta({
                 start: this.pos(row, this.getLine(row).length),
@@ -992,7 +978,7 @@ var Document = function (textOrLines) {
             });
         }
     };
-    this.replace = function (range, text) {
+    Document.prototype.replace = function (range, text) {
         if (!(range instanceof Range))
             range = Range.fromPoints(range.start, range.end);
         if (text.length === 0 && range.isEmpty())
@@ -1009,17 +995,17 @@ var Document = function (textOrLines) {
         }
         return end;
     };
-    this.applyDeltas = function (deltas) {
+    Document.prototype.applyDeltas = function (deltas) {
         for (var i = 0; i < deltas.length; i++) {
             this.applyDelta(deltas[i]);
         }
     };
-    this.revertDeltas = function (deltas) {
+    Document.prototype.revertDeltas = function (deltas) {
         for (var i = deltas.length - 1; i >= 0; i--) {
             this.revertDelta(deltas[i]);
         }
     };
-    this.applyDelta = function (delta, doNotValidate) {
+    Document.prototype.applyDelta = function (delta, doNotValidate) {
         var isInsert = delta.action == "insert";
         if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
             : !Range.comparePoints(delta.start, delta.end)) {
@@ -1033,14 +1019,14 @@ var Document = function (textOrLines) {
             this._signal("change", delta);
         }
     };
-    this.$safeApplyDelta = function (delta) {
+    Document.prototype.$safeApplyDelta = function (delta) {
         var docLength = this.$lines.length;
         if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
             || delta.action == "insert" && delta.start.row <= docLength) {
             this.applyDelta(delta);
         }
     };
-    this.$splitAndapplyLargeDelta = function (delta, MAX) {
+    Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {
         var lines = delta.lines;
         var l = lines.length - MAX + 1;
         var row = delta.start.row;
@@ -1061,7 +1047,7 @@ var Document = function (textOrLines) {
         delta.start.column = column;
         this.applyDelta(delta, true);
     };
-    this.revertDelta = function (delta) {
+    Document.prototype.revertDelta = function (delta) {
         this.$safeApplyDelta({
             start: this.clonePos(delta.start),
             end: this.clonePos(delta.end),
@@ -1069,7 +1055,7 @@ var Document = function (textOrLines) {
             lines: delta.lines.slice()
         });
     };
-    this.indexToPosition = function (index, startRow) {
+    Document.prototype.indexToPosition = function (index, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         for (var i = startRow || 0, l = lines.length; i < l; i++) {
@@ -1079,7 +1065,7 @@ var Document = function (textOrLines) {
         }
         return { row: l - 1, column: index + lines[l - 1].length + newlineLength };
     };
-    this.positionToIndex = function (pos, startRow) {
+    Document.prototype.positionToIndex = function (pos, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         var index = 0;
@@ -1088,11 +1074,39 @@ var Document = function (textOrLines) {
             index += lines[i].length + newlineLength;
         return index + pos.column;
     };
-}).call(Document.prototype);
+    Document.prototype.$split = function (text) {
+        return text.split(/\r\n|\r|\n/);
+    };
+    return Document;
+}());
+Document.prototype.$autoNewLine = "";
+Document.prototype.$newLineMode = "auto";
+oop.implement(Document.prototype, EventEmitter);
 exports.Document = Document;
 
 });
 
+ace.define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {
+    if (typeof obj !== "object" || !obj)
+        return obj;
+    var copy;
+    if (Array.isArray(obj)) {
+        copy = [];
+        for (var key = 0; key < obj.length; key++) {
+            copy[key] = deepCopy(obj[key]);
+        }
+        return copy;
+    }
+    if (Object.prototype.toString.call(obj) !== "[object Object]")
+        return obj;
+    copy = {};
+    for (var key in obj)
+        copy[key] = deepCopy(obj[key]);
+    return copy;
+};
+
+});
+
 ace.define("ace/lib/lang",[], function(require, exports, module){"use strict";
 exports.last = function (a) {
     return a[a.length - 1];
@@ -1135,24 +1149,7 @@ exports.copyArray = function (array) {
     }
     return copy;
 };
-exports.deepCopy = function deepCopy(obj) {
-    if (typeof obj !== "object" || !obj)
-        return obj;
-    var copy;
-    if (Array.isArray(obj)) {
-        copy = [];
-        for (var key = 0; key < obj.length; key++) {
-            copy[key] = deepCopy(obj[key]);
-        }
-        return copy;
-    }
-    if (Object.prototype.toString.call(obj) !== "[object Object]")
-        return obj;
-    copy = {};
-    for (var key in obj)
-        copy[key] = deepCopy(obj[key]);
-    return copy;
-};
+exports.deepCopy = require("./deep_copy").deepCopy;
 exports.arrayToMap = function (arr) {
     var map = {};
     for (var i = 0; i < arr.length; i++) {
@@ -1245,6 +1242,18 @@ exports.delayedCall = function (fcn, defaultTimeout) {
     };
     return _self;
 };
+exports.supportsLookbehind = function () {
+    try {
+        new RegExp('(?<=.)');
+    }
+    catch (e) {
+        return false;
+    }
+    return true;
+};
+exports.skipEmptyMatch = function (line, last, supportsUnicodeFlag) {
+    return supportsUnicodeFlag && line.codePointAt(last) > 0xffff ? 2 : 1;
+};
 
 });
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 15 - 11
web/3c2688e4b9137acb04affdd5e0c154fa.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 222 - 66
web/3ddb5ebdc00b5a39bd4aedae80e1e1fb.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/3f043d654fe1e1895f0f2d65861e21aa.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/41c9592c46bdb2ee5d35a45a28cdd46c.js


+ 597 - 84
web/56bff18ca344ddb0c3429e4bc6643480.js → web/4230d94dffffc413dbdb14542445c8f8.js

@@ -1,52 +1,134 @@
-ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var DocCommentHighlightRules = function () {
+var JsDocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
+        "start": [
+            {
+                token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
+                regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
+                        regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
+                        next: "pop"
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "lparen.doc"],
+                regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
+                    + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
+                    + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
+                    + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
+                    + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@access\\s+(?:private|public|protected)"
+            }, {
                 token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
+                regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
             },
-            DocCommentHighlightRules.getTagRule(),
+            JsDocCommentHighlightRules.getTagRule(),
             {
-                defaultToken: "comment.doc",
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
+            }
+        ],
+        "doc-syntax": [{
+                token: "operator.doc",
+                regex: /[|:]/
+            }, {
+                token: "paren.doc",
+                regex: /[\[\]]/
             }]
     };
+    this.normalizeRules();
 };
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-DocCommentHighlightRules.getTagRule = function (start) {
+oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
+JsDocCommentHighlightRules.getTagRule = function (start) {
     return {
         token: "comment.doc.tag.storage.type",
         regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
     };
 };
-DocCommentHighlightRules.getStartRule = function (start) {
+JsDocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
-DocCommentHighlightRules.getEndRule = function (start) {
+JsDocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
 };
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
+exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
 
 });
 
-ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
 var JavaScriptHighlightRules = function (options) {
-    var keywordMapper = this.createKeywordMapper({
-        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+    var keywords = {
+        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
             "Namespace|QName|XML|XMLList|" + // E4X
             "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
             "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
@@ -55,17 +137,18 @@ var JavaScriptHighlightRules = function (options) {
             "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
             "isNaN|parseFloat|parseInt|" +
             "JSON|Math|" + // Other
-            "this|arguments|prototype|window|document",
+            "this|arguments|prototype|window|document", // Pseudo
         "keyword": "const|yield|import|get|set|async|await|" +
-            "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+            "break|case|catch|continue|default|delete|do|else|finally|for|" +
             "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
             "__parent__|__count__|escape|unescape|with|__proto__|" +
-            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
         "storage.type": "const|let|var|function",
         "constant.language": "null|Infinity|NaN|undefined",
         "support.function": "alert",
         "constant.language.boolean": "true|false"
-    }, "identifier");
+    };
+    var keywordMapper = this.createKeywordMapper(keywords, "identifier");
     var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
     var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
         "u[0-9a-fA-F]{4}|" + // unicode
@@ -74,10 +157,16 @@ var JavaScriptHighlightRules = function (options) {
         "3[0-7][0-7]?|" + // oct
         "[4-7][0-7]?|" + //oct
         ".)";
+    var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
+    var functionCallStartRule = {
+        token: ["identifier", "text", "paren.lparen"],
+        regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
+    };
     this.$rules = {
         "no_regex": [
             DocCommentHighlightRules.getStartRule("doc-start"),
             comments("no_regex"),
+            functionCallStartRule,
             {
                 token: "string",
                 regex: "'(?=.)",
@@ -87,58 +176,36 @@ var JavaScriptHighlightRules = function (options) {
                 regex: '"(?=.)',
                 next: "qqstring"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hexadecimal, octal and binary
                 regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // decimal integers and floats
                 regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
             }, {
                 token: [
-                    "storage.type", "punctuation.operator", "support.function",
-                    "punctuation.operator", "entity.name.function", "text", "keyword.operator"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text", "storage.type", "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
                     "entity.name.function", "text", "keyword.operator", "text", "storage.type",
-                    "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
                     "entity.name.function", "text", "punctuation.operator",
-                    "text", "storage.type", "text", "paren.lparen"
+                    "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "text", "text", "storage.type", "text", "paren.lparen"
+                    "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "keyword",
@@ -148,11 +215,11 @@ var JavaScriptHighlightRules = function (options) {
                 regex: "(?:" + kwBeforeRe + ")\\b",
                 next: "start"
             }, {
-                token: ["support.constant"],
+                token: "support.constant",
                 regex: /that\b/
             }, {
                 token: ["storage.type", "punctuation.operator", "support.function.firebug"],
-                regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+                regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
             }, {
                 token: keywordMapper,
                 regex: identifierRe
@@ -188,19 +255,29 @@ var JavaScriptHighlightRules = function (options) {
                 token: "text",
                 regex: "\\s+"
             }, {
+                token: "keyword.operator",
+                regex: /=/
+            }, {
+                token: [
+                    "storage.type", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex: anonymousFunctionRe + "(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
                 token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "punctuation.operator",
                 regex: /[.](?![.])/
             }, {
                 token: "support.function",
-                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+                regex: "prototype"
+            }, {
+                token: "support.function",
+                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
             }, {
                 token: "support.function.dom",
                 regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
@@ -281,13 +358,67 @@ var JavaScriptHighlightRules = function (options) {
                 defaultToken: "string.regexp.charachterclass"
             }
         ],
+        "default_parameter": [
+            {
+                token: "string",
+                regex: "'(?=.)",
+                push: [
+                    {
+                        token: "string",
+                        regex: "'|$",
+                        next: "pop"
+                    }, {
+                        include: "qstring"
+                    }
+                ]
+            }, {
+                token: "string",
+                regex: '"(?=.)',
+                push: [
+                    {
+                        token: "string",
+                        regex: '"|$',
+                        next: "pop"
+                    }, {
+                        include: "qqstring"
+                    }
+                ]
+            }, {
+                token: "constant.language",
+                regex: "null|Infinity|NaN|undefined"
+            }, {
+                token: "constant.numeric", // hexadecimal, octal and binary
+                regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+            }, {
+                token: "constant.numeric", // decimal integers and floats
+                regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
+            }, {
+                token: "punctuation.operator",
+                regex: ",",
+                next: "function_arguments"
+            }, {
+                token: "text",
+                regex: "\\s+"
+            }, {
+                token: "punctuation.operator",
+                regex: "$"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
         "function_arguments": [
+            comments("function_arguments"),
             {
                 token: "variable.parameter",
                 regex: identifierRe
             }, {
                 token: "punctuation.operator",
-                regex: "[, ]+"
+                regex: ","
+            }, {
+                token: "text",
+                regex: "\\s+"
             }, {
                 token: "punctuation.operator",
                 regex: "$"
@@ -363,6 +494,32 @@ var JavaScriptHighlightRules = function (options) {
                 }, {
                     defaultToken: "string.quasi"
                 }]
+        }, {
+            token: ["variable.parameter", "text"],
+            regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
+        }, {
+            token: "paren.lparen",
+            regex: "(\\()(?=[^\\(]+\\s*=>)",
+            next: "function_arguments"
+        }, {
+            token: "variable.language",
+            regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
+        });
+        this.$rules["function_arguments"].unshift({
+            token: "keyword.operator",
+            regex: "=",
+            next: "default_parameter"
+        }, {
+            token: "keyword.operator",
+            regex: "\\.{3}"
+        });
+        this.$rules["property"].unshift({
+            token: "support.function",
+            regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
+                + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
+        }, {
+            token: "constant.language",
+            regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
         });
         if (!options || options.jsx != false)
             JSX.call(this);
@@ -400,7 +557,7 @@ function JSX() {
                     value: val.substr(offset)
                 }];
         },
-        regex: "</?" + tagRegex + "",
+        regex: "</?(?:" + tagRegex + "|(?=>))",
         next: "jsxAttributes",
         nextState: "jsx"
     };
@@ -413,8 +570,7 @@ function JSX() {
     this.$rules.jsx = [
         jsxJsRule,
         jsxTag,
-        { include: "reference" },
-        { defaultToken: "string" }
+        { include: "reference" }, { defaultToken: "string.xml" }
     ];
     this.$rules.jsxAttributes = [{
             token: "meta.tag.punctuation.tag-close.xml",
@@ -474,7 +630,7 @@ function JSX() {
 function comments(next) {
     return [
         {
-            token: "comment",
+            token: "comment", // multi line comment
             regex: /\/\*/,
             next: [
                 DocCommentHighlightRules.getTagRule(),
@@ -525,6 +681,293 @@ exports.MatchingBraceOutdent = MatchingBraceOutdent;
 
 });
 
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+function is(token, type) {
+    return token && token.type.lastIndexOf(type + ".xml") > -1;
+}
+var XmlBehaviour = function () {
+    this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+        if (text == '"' || text == "'") {
+            var quote = text;
+            var selected = session.doc.getTextRange(editor.getSelectionRange());
+            if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: quote + selected + quote,
+                    selection: false
+                };
+            }
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+                return {
+                    text: "",
+                    selection: [1, 1]
+                };
+            }
+            if (!token)
+                token = iterator.stepBackward();
+            if (!token)
+                return;
+            while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+                token = iterator.stepBackward();
+            }
+            var rightSpace = !rightChar || rightChar.match(/\s/);
+            if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+                return {
+                    text: quote + quote,
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+    this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == selected) {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+    this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+                return;
+            if (is(token, "reference.attribute-value"))
+                return;
+            if (is(token, "attribute-value")) {
+                var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
+                if (position.column < tokenEndColumn)
+                    return;
+                if (position.column == tokenEndColumn) {
+                    var nextToken = iterator.stepForward();
+                    if (nextToken && is(nextToken, "attribute-value"))
+                        return;
+                    iterator.stepBackward();
+                }
+            }
+            if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
+                return;
+            while (!is(token, "tag-name")) {
+                token = iterator.stepBackward();
+                if (token.value == "<") {
+                    token = iterator.stepForward();
+                    break;
+                }
+            }
+            var tokenRow = iterator.getCurrentTokenRow();
+            var tokenColumn = iterator.getCurrentTokenColumn();
+            if (is(iterator.stepBackward(), "end-tag-open"))
+                return;
+            var element = token.value;
+            if (tokenRow == position.row)
+                element = element.substring(0, position.column - tokenColumn);
+            if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
+                return;
+            return {
+                text: ">" + "</" + element + ">",
+                selection: [1, 1]
+            };
+        }
+    });
+    this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+        if (text == "\n") {
+            var cursor = editor.getCursorPosition();
+            var line = session.getLine(cursor.row);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
+                if (token.value == "/>")
+                    return;
+                while (token && token.type.indexOf("tag-name") === -1) {
+                    token = iterator.stepBackward();
+                }
+                if (!token) {
+                    return;
+                }
+                var tag = token.value;
+                var row = iterator.getCurrentTokenRow();
+                token = iterator.stepBackward();
+                if (!token || token.type.indexOf("end-tag") !== -1) {
+                    return;
+                }
+                if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
+                    var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
+                    var line = session.getLine(row);
+                    var nextIndent = this.$getIndent(line);
+                    var indent = nextIndent + session.getTabString();
+                    if (nextToken && nextToken.value === "</") {
+                        return {
+                            text: "\n" + indent + "\n" + nextIndent,
+                            selection: [1, indent.length, 1, indent.length]
+                        };
+                    }
+                    else {
+                        return {
+                            text: "\n" + indent
+                        };
+                    }
+                }
+            }
+        }
+    });
+};
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
+
+});
+
+ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var JavaScriptBehaviour = function () {
+    var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
+    this.addBehaviours(xmlBehaviours);
+    this.inherit(CstyleBehaviour);
+    this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token)
+                return;
+            if (token.value == '<') {
+                return {
+                    text: "></>",
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+};
+oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
+exports.JavaScriptBehaviour = JavaScriptBehaviour;
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
+    BaseFoldMode.call(this);
+    this.voidElements = voidElements || {};
+    this.optionalEndTags = oop.mixin({}, this.voidElements);
+    if (optionalEndTags)
+        oop.mixin(this.optionalEndTags, optionalEndTags);
+};
+oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function () {
+    this.tagName = "";
+    this.closing = false;
+    this.selfClosing = false;
+    this.start = { row: 0, column: 0 };
+    this.end = { row: 0, column: 0 };
+};
+function is(token, type) {
+    return token && token.type && token.type.lastIndexOf(type + ".xml") > -1;
+}
+(function () {
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var tag = this._getFirstTagInLine(session, row);
+        if (!tag)
+            return this.getCommentFoldWidget(session, row);
+        if (tag.closing || (!tag.tagName && tag.selfClosing))
+            return foldStyle === "markbeginend" ? "end" : "";
+        if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+            return "";
+        if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+            return "";
+        return "start";
+    };
+    this.getCommentFoldWidget = function (session, row) {
+        if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+            return "start";
+        return "";
+    };
+    this._getFirstTagInLine = function (session, row) {
+        var tokens = session.getTokens(row);
+        var tag = new Tag();
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            if (is(token, "tag-open")) {
+                tag.end.column = tag.start.column + token.value.length;
+                tag.closing = is(token, "end-tag-open");
+                token = tokens[++i];
+                if (!token)
+                    return null;
+                tag.tagName = token.value;
+                if (token.value === "") { //skip empty tag name token for fragment
+                    token = tokens[++i];
+                    if (!token)
+                        return null;
+                    tag.tagName = token.value;
+                }
+                tag.end.column += token.value.length;
+                for (i++; i < tokens.length; i++) {
+                    token = tokens[i];
+                    tag.end.column += token.value.length;
+                    if (is(token, "tag-close")) {
+                        tag.selfClosing = token.value == '/>';
+                        break;
+                    }
+                }
+                return tag;
+            }
+            else if (is(token, "tag-close")) {
+                tag.selfClosing = token.value == '/>';
+                return tag;
+            }
+            tag.start.column += token.value.length;
+        }
+        return null;
+    };
+    this._findEndTagInLine = function (session, row, tagName, startColumn) {
+        var tokens = session.getTokens(row);
+        var column = 0;
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            column += token.value.length;
+            if (column < startColumn - 1)
+                continue;
+            if (is(token, "end-tag-open")) {
+                token = tokens[i + 1];
+                if (is(token, "tag-name") && token.value === "") {
+                    token = tokens[i + 2];
+                }
+                if (token && token.value == tagName)
+                    return true;
+            }
+        }
+        return false;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row) {
+        var firstTag = this._getFirstTagInLine(session, row);
+        if (!firstTag) {
+            return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
+        }
+        var tags = session.getMatchingTags({ row: row, column: 0 });
+        if (tags) {
+            return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
+        }
+    };
+}).call(FoldMode.prototype);
+
+});
+
 ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
 var oop = require("../../lib/oop");
 var Range = require("../../range").Range;
@@ -641,25 +1084,60 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var XmlFoldMode = require("./xml").FoldMode;
+var CFoldMode = require("./cstyle").FoldMode;
+var FoldMode = exports.FoldMode = function (commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
+        this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
+    }
+    this.xmlFoldMode = new XmlFoldMode();
+};
+oop.inherits(FoldMode, CFoldMode);
+(function () {
+    this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
+    this.getFoldWidgetBase = this.getFoldWidget;
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var fw = this.getFoldWidgetBase(session, foldStyle, row);
+        if (!fw) {
+            return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
+        }
+        return fw;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
+        var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
+        if (range)
+            return range;
+        return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
 var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
 var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
+var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
 var Mode = function () {
     this.HighlightRules = JavaScriptHighlightRules;
     this.$outdent = new MatchingBraceOutdent();
-    this.$behaviour = new CstyleBehaviour();
-    this.foldingRules = new CStyleFoldMode();
+    this.$behaviour = new JavaScriptBehaviour();
+    this.foldingRules = new JavaScriptFoldMode();
 };
 oop.inherits(Mode, TextMode);
 (function () {
     this.lineCommentStart = "//";
     this.blockComment = { start: "/*", end: "*/" };
     this.$quotes = { '"': '"', "'": "'", "`": "`" };
+    this.$pairQuotesAfter = {
+        "`": /\w/
+    };
     this.getNextLineIndent = function (state, line, tab) {
         var indent = this.$getIndent(line);
         var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
@@ -678,13 +1156,6 @@ oop.inherits(Mode, TextMode);
             if (endState == "start" || endState == "no_regex") {
                 return "";
             }
-            var match = line.match(/^\s*(\/?)\*/);
-            if (match) {
-                if (match[1]) {
-                    indent += " ";
-                }
-                indent += "* ";
-            }
         }
         return indent;
     };
@@ -712,6 +1183,47 @@ exports.Mode = Mode;
 
 });
 
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var DocCommentHighlightRules = function () {
+    this.$rules = {
+        "start": [
+            {
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
+                caseInsensitive: true
+            }
+        ]
+    };
+};
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+DocCommentHighlightRules.getTagRule = function (start) {
+    return {
+        token: "comment.doc.tag.storage.type",
+        regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+    };
+};
+DocCommentHighlightRules.getStartRule = function (start) {
+    return {
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
+        next: start
+    };
+};
+DocCommentHighlightRules.getEndRule = function (start) {
+    return {
+        token: "comment.doc", // closing comment
+        regex: "\\*\\/",
+        next: start
+    };
+};
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
 ace.define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
@@ -766,7 +1278,7 @@ var GroovyHighlightRules = function () {
             },
             DocCommentHighlightRules.getStartRule("doc-start"),
             {
-                token: "comment",
+                token: "comment", // multi line comment
                 regex: "\\/\\*",
                 next: "comment"
             }, {
@@ -781,16 +1293,16 @@ var GroovyHighlightRules = function () {
                 regex: "'''",
                 next: "qstring"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hex
                 regex: "0[xX][0-9a-fA-F]+\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
             }, {
                 token: "constant.language.boolean",
@@ -814,7 +1326,7 @@ var GroovyHighlightRules = function () {
         ],
         "comment": [
             {
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\*\\/",
                 next: "start"
             }, {
@@ -868,6 +1380,7 @@ var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRu
 var Mode = function () {
     JavaScriptMode.call(this);
     this.HighlightRules = GroovyHighlightRules;
+    this.$behaviour = this.$defaultBehaviour;
 };
 oop.inherits(Mode, JavaScriptMode);
 (function () {

+ 1 - 1
web/26fa04eabe6ca96832d5652350a2fb46.js → web/443b217c1337c10d168828ffd8f93528.js

@@ -120,7 +120,7 @@ var C9SearchHighlightRules = function () {
                 next: "numbers"
             },
             {
-                token: "string",
+                token: "string", // single line
                 regex: "^\\S:?[^:]+",
                 next: "numbers"
             }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/48ef2bea2256bfb13400738d7be7025f.js


+ 4 - 5
web/81246b2b17fe13310d0eb40a0a0f50ed.js → web/49456231db02d9338914cee404f1b864.js

@@ -2085,11 +2085,10 @@ exports.Lexer = function(Tokenizer, Rules) {
 
 });
 
-ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module){"use strict";
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
 var oop = require("../../lib/oop");
 var Behaviour = require("../behaviour").Behaviour;
 var TokenIterator = require("../../token_iterator").TokenIterator;
-var lang = require("../../lib/lang");
 function is(token, type) {
     return token && token.type.lastIndexOf(type + ".xml") > -1;
 }
@@ -2178,7 +2177,7 @@ var XmlBehaviour = function () {
             var element = token.value;
             if (tokenRow == position.row)
                 element = element.substring(0, position.column - tokenColumn);
-            if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+            if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
                 return;
             return {
                 text: ">" + "</" + element + ">",
@@ -2192,7 +2191,7 @@ var XmlBehaviour = function () {
             var line = session.getLine(cursor.row);
             var iterator = new TokenIterator(session, cursor.row, cursor.column);
             var token = iterator.getCurrentToken();
-            if (token && token.type.indexOf("tag-close") !== -1) {
+            if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
                 if (token.value == "/>")
                     return;
                 while (token && token.type.indexOf("tag-name") === -1) {
@@ -2207,7 +2206,7 @@ var XmlBehaviour = function () {
                 if (!token || token.type.indexOf("end-tag") !== -1) {
                     return;
                 }
-                if (this.voidElements && !this.voidElements[tag]) {
+                if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
                     var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
                     var line = session.getLine(row);
                     var nextIndent = this.$getIndent(line);

+ 186 - 177
web/bc3effd35a7b338254ae3ef8eb593ced.js → web/49852db8b337fb8e781a58d82c81ead5.js

@@ -413,34 +413,31 @@ exports.EventEmitter = EventEmitter;
 });
 
 ace.define("ace/range",[], function(require, exports, module){"use strict";
-var comparePoints = function (p1, p2) {
-    return p1.row - p2.row || p1.column - p2.column;
-};
-var Range = function (startRow, startColumn, endRow, endColumn) {
-    this.start = {
-        row: startRow,
-        column: startColumn
-    };
-    this.end = {
-        row: endRow,
-        column: endColumn
-    };
-};
-(function () {
-    this.isEqual = function (range) {
+var Range = /** @class */ (function () {
+    function Range(startRow, startColumn, endRow, endColumn) {
+        this.start = {
+            row: startRow,
+            column: startColumn
+        };
+        this.end = {
+            row: endRow,
+            column: endColumn
+        };
+    }
+    Range.prototype.isEqual = function (range) {
         return this.start.row === range.start.row &&
             this.end.row === range.end.row &&
             this.start.column === range.start.column &&
             this.end.column === range.end.column;
     };
-    this.toString = function () {
+    Range.prototype.toString = function () {
         return ("Range: [" + this.start.row + "/" + this.start.column +
             "] -> [" + this.end.row + "/" + this.end.column + "]");
     };
-    this.contains = function (row, column) {
+    Range.prototype.contains = function (row, column) {
         return this.compare(row, column) == 0;
     };
-    this.compareRange = function (range) {
+    Range.prototype.compareRange = function (range) {
         var cmp, end = range.end, start = range.start;
         cmp = this.compare(end.row, end.column);
         if (cmp == 1) {
@@ -471,23 +468,23 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             }
         }
     };
-    this.comparePoint = function (p) {
+    Range.prototype.comparePoint = function (p) {
         return this.compare(p.row, p.column);
     };
-    this.containsRange = function (range) {
+    Range.prototype.containsRange = function (range) {
         return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
     };
-    this.intersects = function (range) {
+    Range.prototype.intersects = function (range) {
         var cmp = this.compareRange(range);
         return (cmp == -1 || cmp == 0 || cmp == 1);
     };
-    this.isEnd = function (row, column) {
+    Range.prototype.isEnd = function (row, column) {
         return this.end.row == row && this.end.column == column;
     };
-    this.isStart = function (row, column) {
+    Range.prototype.isStart = function (row, column) {
         return this.start.row == row && this.start.column == column;
     };
-    this.setStart = function (row, column) {
+    Range.prototype.setStart = function (row, column) {
         if (typeof row == "object") {
             this.start.column = row.column;
             this.start.row = row.row;
@@ -497,7 +494,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.start.column = column;
         }
     };
-    this.setEnd = function (row, column) {
+    Range.prototype.setEnd = function (row, column) {
         if (typeof row == "object") {
             this.end.column = row.column;
             this.end.row = row.row;
@@ -507,7 +504,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             this.end.column = column;
         }
     };
-    this.inside = function (row, column) {
+    Range.prototype.inside = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column) || this.isStart(row, column)) {
                 return false;
@@ -518,7 +515,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideStart = function (row, column) {
+    Range.prototype.insideStart = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isEnd(row, column)) {
                 return false;
@@ -529,7 +526,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.insideEnd = function (row, column) {
+    Range.prototype.insideEnd = function (row, column) {
         if (this.compare(row, column) == 0) {
             if (this.isStart(row, column)) {
                 return false;
@@ -540,7 +537,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
         }
         return false;
     };
-    this.compare = function (row, column) {
+    Range.prototype.compare = function (row, column) {
         if (!this.isMultiLine()) {
             if (row === this.start.row) {
                 return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
@@ -556,7 +553,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return column <= this.end.column ? 0 : 1;
         return 0;
     };
-    this.compareStart = function (row, column) {
+    Range.prototype.compareStart = function (row, column) {
         if (this.start.row == row && this.start.column == column) {
             return -1;
         }
@@ -564,7 +561,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareEnd = function (row, column) {
+    Range.prototype.compareEnd = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -572,7 +569,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.compareInside = function (row, column) {
+    Range.prototype.compareInside = function (row, column) {
         if (this.end.row == row && this.end.column == column) {
             return 1;
         }
@@ -583,7 +580,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             return this.compare(row, column);
         }
     };
-    this.clipRows = function (firstRow, lastRow) {
+    Range.prototype.clipRows = function (firstRow, lastRow) {
         if (this.end.row > lastRow)
             var end = { row: lastRow + 1, column: 0 };
         else if (this.end.row < firstRow)
@@ -594,7 +591,7 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var start = { row: firstRow, column: 0 };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.extend = function (row, column) {
+    Range.prototype.extend = function (row, column) {
         var cmp = this.compare(row, column);
         if (cmp == 0)
             return this;
@@ -604,37 +601,37 @@ var Range = function (startRow, startColumn, endRow, endColumn) {
             var end = { row: row, column: column };
         return Range.fromPoints(start || this.start, end || this.end);
     };
-    this.isEmpty = function () {
+    Range.prototype.isEmpty = function () {
         return (this.start.row === this.end.row && this.start.column === this.end.column);
     };
-    this.isMultiLine = function () {
+    Range.prototype.isMultiLine = function () {
         return (this.start.row !== this.end.row);
     };
-    this.clone = function () {
+    Range.prototype.clone = function () {
         return Range.fromPoints(this.start, this.end);
     };
-    this.collapseRows = function () {
+    Range.prototype.collapseRows = function () {
         if (this.end.column == 0)
             return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0);
         else
             return new Range(this.start.row, 0, this.end.row, 0);
     };
-    this.toScreenRange = function (session) {
+    Range.prototype.toScreenRange = function (session) {
         var screenPosStart = session.documentToScreenPosition(this.start);
         var screenPosEnd = session.documentToScreenPosition(this.end);
         return new Range(screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column);
     };
-    this.moveBy = function (row, column) {
+    Range.prototype.moveBy = function (row, column) {
         this.start.row += row;
         this.start.column += column;
         this.end.row += row;
         this.end.column += column;
     };
-}).call(Range.prototype);
+    return Range;
+}());
 Range.fromPoints = function (start, end) {
     return new Range(start.row, start.column, end.row, end.column);
 };
-Range.comparePoints = comparePoints;
 Range.comparePoints = function (p1, p2) {
     return p1.row - p2.row || p1.column - p2.column;
 };
@@ -645,24 +642,22 @@ exports.Range = Range;
 ace.define("ace/anchor",[], function(require, exports, module){"use strict";
 var oop = require("./lib/oop");
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
-var Anchor = exports.Anchor = function (doc, row, column) {
-    this.$onChange = this.onChange.bind(this);
-    this.attach(doc);
-    if (typeof column == "undefined")
-        this.setPosition(row.row, row.column);
-    else
-        this.setPosition(row, column);
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.getPosition = function () {
+var Anchor = /** @class */ (function () {
+    function Anchor(doc, row, column) {
+        this.$onChange = this.onChange.bind(this);
+        this.attach(doc);
+        if (typeof row != "number")
+            this.setPosition(row.row, row.column);
+        else
+            this.setPosition(row, column);
+    }
+    Anchor.prototype.getPosition = function () {
         return this.$clipPositionToDocument(this.row, this.column);
     };
-    this.getDocument = function () {
+    Anchor.prototype.getDocument = function () {
         return this.document;
     };
-    this.$insertRight = false;
-    this.onChange = function (delta) {
+    Anchor.prototype.onChange = function (delta) {
         if (delta.start.row == delta.end.row && delta.start.row != this.row)
             return;
         if (delta.start.row > this.row)
@@ -670,34 +665,7 @@ var Anchor = exports.Anchor = function (doc, row, column) {
         var point = $getTransformedPoint(delta, { row: this.row, column: this.column }, this.$insertRight);
         this.setPosition(point.row, point.column, true);
     };
-    function $pointsInOrder(point1, point2, equalPointsInOrder) {
-        var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
-        return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
-    }
-    function $getTransformedPoint(delta, point, moveIfEqual) {
-        var deltaIsInsert = delta.action == "insert";
-        var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
-        var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
-        var deltaStart = delta.start;
-        var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
-        if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
-            return {
-                row: point.row,
-                column: point.column
-            };
-        }
-        if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
-            return {
-                row: point.row + deltaRowShift,
-                column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
-            };
-        }
-        return {
-            row: deltaStart.row,
-            column: deltaStart.column
-        };
-    }
-    this.setPosition = function (row, column, noClip) {
+    Anchor.prototype.setPosition = function (row, column, noClip) {
         var pos;
         if (noClip) {
             pos = {
@@ -721,14 +689,14 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             value: pos
         });
     };
-    this.detach = function () {
+    Anchor.prototype.detach = function () {
         this.document.off("change", this.$onChange);
     };
-    this.attach = function (doc) {
+    Anchor.prototype.attach = function (doc) {
         this.document = doc || this.document;
         this.document.on("change", this.$onChange);
     };
-    this.$clipPositionToDocument = function (row, column) {
+    Anchor.prototype.$clipPositionToDocument = function (row, column) {
         var pos = {};
         if (row >= this.document.getLength()) {
             pos.row = Math.max(0, this.document.getLength() - 1);
@@ -746,7 +714,38 @@ var Anchor = exports.Anchor = function (doc, row, column) {
             pos.column = 0;
         return pos;
     };
-}).call(Anchor.prototype);
+    return Anchor;
+}());
+Anchor.prototype.$insertRight = false;
+oop.implement(Anchor.prototype, EventEmitter);
+function $pointsInOrder(point1, point2, equalPointsInOrder) {
+    var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+    return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+}
+function $getTransformedPoint(delta, point, moveIfEqual) {
+    var deltaIsInsert = delta.action == "insert";
+    var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+    var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+    var deltaStart = delta.start;
+    var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+    if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+        return {
+            row: point.row,
+            column: point.column
+        };
+    }
+    if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+        return {
+            row: point.row + deltaRowShift,
+            column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+        };
+    }
+    return {
+        row: deltaStart.row,
+        column: deltaStart.column
+    };
+}
+exports.Anchor = Anchor;
 
 });
 
@@ -756,47 +755,36 @@ var applyDelta = require("./apply_delta").applyDelta;
 var EventEmitter = require("./lib/event_emitter").EventEmitter;
 var Range = require("./range").Range;
 var Anchor = require("./anchor").Anchor;
-var Document = function (textOrLines) {
-    this.$lines = [""];
-    if (textOrLines.length === 0) {
+var Document = /** @class */ (function () {
+    function Document(textOrLines) {
         this.$lines = [""];
+        if (textOrLines.length === 0) {
+            this.$lines = [""];
+        }
+        else if (Array.isArray(textOrLines)) {
+            this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
+        }
+        else {
+            this.insert({ row: 0, column: 0 }, textOrLines);
+        }
     }
-    else if (Array.isArray(textOrLines)) {
-        this.insertMergedLines({ row: 0, column: 0 }, textOrLines);
-    }
-    else {
-        this.insert({ row: 0, column: 0 }, textOrLines);
-    }
-};
-(function () {
-    oop.implement(this, EventEmitter);
-    this.setValue = function (text) {
+    Document.prototype.setValue = function (text) {
         var len = this.getLength() - 1;
         this.remove(new Range(0, 0, len, this.getLine(len).length));
-        this.insert({ row: 0, column: 0 }, text);
+        this.insert({ row: 0, column: 0 }, text || "");
     };
-    this.getValue = function () {
+    Document.prototype.getValue = function () {
         return this.getAllLines().join(this.getNewLineCharacter());
     };
-    this.createAnchor = function (row, column) {
+    Document.prototype.createAnchor = function (row, column) {
         return new Anchor(this, row, column);
     };
-    if ("aaa".split(/a/).length === 0) {
-        this.$split = function (text) {
-            return text.replace(/\r\n|\r/g, "\n").split("\n");
-        };
-    }
-    else {
-        this.$split = function (text) {
-            return text.split(/\r\n|\r|\n/);
-        };
-    }
-    this.$detectNewLine = function (text) {
+    Document.prototype.$detectNewLine = function (text) {
         var match = text.match(/^.*?(\r\n|\r|\n)/m);
         this.$autoNewLine = match ? match[1] : "\n";
         this._signal("changeNewLineMode");
     };
-    this.getNewLineCharacter = function () {
+    Document.prototype.getNewLineCharacter = function () {
         switch (this.$newLineMode) {
             case "windows":
                 return "\r\n";
@@ -806,36 +794,34 @@ var Document = function (textOrLines) {
                 return this.$autoNewLine || "\n";
         }
     };
-    this.$autoNewLine = "";
-    this.$newLineMode = "auto";
-    this.setNewLineMode = function (newLineMode) {
+    Document.prototype.setNewLineMode = function (newLineMode) {
         if (this.$newLineMode === newLineMode)
             return;
         this.$newLineMode = newLineMode;
         this._signal("changeNewLineMode");
     };
-    this.getNewLineMode = function () {
+    Document.prototype.getNewLineMode = function () {
         return this.$newLineMode;
     };
-    this.isNewLine = function (text) {
+    Document.prototype.isNewLine = function (text) {
         return (text == "\r\n" || text == "\r" || text == "\n");
     };
-    this.getLine = function (row) {
+    Document.prototype.getLine = function (row) {
         return this.$lines[row] || "";
     };
-    this.getLines = function (firstRow, lastRow) {
+    Document.prototype.getLines = function (firstRow, lastRow) {
         return this.$lines.slice(firstRow, lastRow + 1);
     };
-    this.getAllLines = function () {
+    Document.prototype.getAllLines = function () {
         return this.getLines(0, this.getLength());
     };
-    this.getLength = function () {
+    Document.prototype.getLength = function () {
         return this.$lines.length;
     };
-    this.getTextRange = function (range) {
+    Document.prototype.getTextRange = function (range) {
         return this.getLinesForRange(range).join(this.getNewLineCharacter());
     };
-    this.getLinesForRange = function (range) {
+    Document.prototype.getLinesForRange = function (range) {
         var lines;
         if (range.start.row === range.end.row) {
             lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
@@ -849,24 +835,24 @@ var Document = function (textOrLines) {
         }
         return lines;
     };
-    this.insertLines = function (row, lines) {
+    Document.prototype.insertLines = function (row, lines) {
         console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
         return this.insertFullLines(row, lines);
     };
-    this.removeLines = function (firstRow, lastRow) {
+    Document.prototype.removeLines = function (firstRow, lastRow) {
         console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
         return this.removeFullLines(firstRow, lastRow);
     };
-    this.insertNewLine = function (position) {
+    Document.prototype.insertNewLine = function (position) {
         console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
         return this.insertMergedLines(position, ["", ""]);
     };
-    this.insert = function (position, text) {
+    Document.prototype.insert = function (position, text) {
         if (this.getLength() <= 1)
             this.$detectNewLine(text);
         return this.insertMergedLines(position, this.$split(text));
     };
-    this.insertInLine = function (position, text) {
+    Document.prototype.insertInLine = function (position, text) {
         var start = this.clippedPos(position.row, position.column);
         var end = this.pos(position.row, position.column + text.length);
         this.applyDelta({
@@ -877,7 +863,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(end);
     };
-    this.clippedPos = function (row, column) {
+    Document.prototype.clippedPos = function (row, column) {
         var length = this.getLength();
         if (row === undefined) {
             row = length;
@@ -895,13 +881,13 @@ var Document = function (textOrLines) {
         column = Math.min(Math.max(column, 0), line.length);
         return { row: row, column: column };
     };
-    this.clonePos = function (pos) {
+    Document.prototype.clonePos = function (pos) {
         return { row: pos.row, column: pos.column };
     };
-    this.pos = function (row, column) {
+    Document.prototype.pos = function (row, column) {
         return { row: row, column: column };
     };
-    this.$clipPosition = function (position) {
+    Document.prototype.$clipPosition = function (position) {
         var length = this.getLength();
         if (position.row >= length) {
             position.row = Math.max(0, length - 1);
@@ -913,7 +899,7 @@ var Document = function (textOrLines) {
         }
         return position;
     };
-    this.insertFullLines = function (row, lines) {
+    Document.prototype.insertFullLines = function (row, lines) {
         row = Math.min(Math.max(row, 0), this.getLength());
         var column = 0;
         if (row < this.getLength()) {
@@ -927,7 +913,7 @@ var Document = function (textOrLines) {
         }
         this.insertMergedLines({ row: row, column: column }, lines);
     };
-    this.insertMergedLines = function (position, lines) {
+    Document.prototype.insertMergedLines = function (position, lines) {
         var start = this.clippedPos(position.row, position.column);
         var end = {
             row: start.row + lines.length - 1,
@@ -941,7 +927,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(end);
     };
-    this.remove = function (range) {
+    Document.prototype.remove = function (range) {
         var start = this.clippedPos(range.start.row, range.start.column);
         var end = this.clippedPos(range.end.row, range.end.column);
         this.applyDelta({
@@ -952,7 +938,7 @@ var Document = function (textOrLines) {
         });
         return this.clonePos(start);
     };
-    this.removeInLine = function (row, startColumn, endColumn) {
+    Document.prototype.removeInLine = function (row, startColumn, endColumn) {
         var start = this.clippedPos(row, startColumn);
         var end = this.clippedPos(row, endColumn);
         this.applyDelta({
@@ -963,7 +949,7 @@ var Document = function (textOrLines) {
         }, true);
         return this.clonePos(start);
     };
-    this.removeFullLines = function (firstRow, lastRow) {
+    Document.prototype.removeFullLines = function (firstRow, lastRow) {
         firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
         lastRow = Math.min(Math.max(0, lastRow), this.getLength() - 1);
         var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
@@ -982,7 +968,7 @@ var Document = function (textOrLines) {
         });
         return deletedLines;
     };
-    this.removeNewLine = function (row) {
+    Document.prototype.removeNewLine = function (row) {
         if (row < this.getLength() - 1 && row >= 0) {
             this.applyDelta({
                 start: this.pos(row, this.getLine(row).length),
@@ -992,7 +978,7 @@ var Document = function (textOrLines) {
             });
         }
     };
-    this.replace = function (range, text) {
+    Document.prototype.replace = function (range, text) {
         if (!(range instanceof Range))
             range = Range.fromPoints(range.start, range.end);
         if (text.length === 0 && range.isEmpty())
@@ -1009,17 +995,17 @@ var Document = function (textOrLines) {
         }
         return end;
     };
-    this.applyDeltas = function (deltas) {
+    Document.prototype.applyDeltas = function (deltas) {
         for (var i = 0; i < deltas.length; i++) {
             this.applyDelta(deltas[i]);
         }
     };
-    this.revertDeltas = function (deltas) {
+    Document.prototype.revertDeltas = function (deltas) {
         for (var i = deltas.length - 1; i >= 0; i--) {
             this.revertDelta(deltas[i]);
         }
     };
-    this.applyDelta = function (delta, doNotValidate) {
+    Document.prototype.applyDelta = function (delta, doNotValidate) {
         var isInsert = delta.action == "insert";
         if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
             : !Range.comparePoints(delta.start, delta.end)) {
@@ -1033,14 +1019,14 @@ var Document = function (textOrLines) {
             this._signal("change", delta);
         }
     };
-    this.$safeApplyDelta = function (delta) {
+    Document.prototype.$safeApplyDelta = function (delta) {
         var docLength = this.$lines.length;
         if (delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
             || delta.action == "insert" && delta.start.row <= docLength) {
             this.applyDelta(delta);
         }
     };
-    this.$splitAndapplyLargeDelta = function (delta, MAX) {
+    Document.prototype.$splitAndapplyLargeDelta = function (delta, MAX) {
         var lines = delta.lines;
         var l = lines.length - MAX + 1;
         var row = delta.start.row;
@@ -1061,7 +1047,7 @@ var Document = function (textOrLines) {
         delta.start.column = column;
         this.applyDelta(delta, true);
     };
-    this.revertDelta = function (delta) {
+    Document.prototype.revertDelta = function (delta) {
         this.$safeApplyDelta({
             start: this.clonePos(delta.start),
             end: this.clonePos(delta.end),
@@ -1069,7 +1055,7 @@ var Document = function (textOrLines) {
             lines: delta.lines.slice()
         });
     };
-    this.indexToPosition = function (index, startRow) {
+    Document.prototype.indexToPosition = function (index, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         for (var i = startRow || 0, l = lines.length; i < l; i++) {
@@ -1079,7 +1065,7 @@ var Document = function (textOrLines) {
         }
         return { row: l - 1, column: index + lines[l - 1].length + newlineLength };
     };
-    this.positionToIndex = function (pos, startRow) {
+    Document.prototype.positionToIndex = function (pos, startRow) {
         var lines = this.$lines || this.getAllLines();
         var newlineLength = this.getNewLineCharacter().length;
         var index = 0;
@@ -1088,11 +1074,39 @@ var Document = function (textOrLines) {
             index += lines[i].length + newlineLength;
         return index + pos.column;
     };
-}).call(Document.prototype);
+    Document.prototype.$split = function (text) {
+        return text.split(/\r\n|\r|\n/);
+    };
+    return Document;
+}());
+Document.prototype.$autoNewLine = "";
+Document.prototype.$newLineMode = "auto";
+oop.implement(Document.prototype, EventEmitter);
 exports.Document = Document;
 
 });
 
+ace.define("ace/lib/deep_copy",[], function(require, exports, module){exports.deepCopy = function deepCopy(obj) {
+    if (typeof obj !== "object" || !obj)
+        return obj;
+    var copy;
+    if (Array.isArray(obj)) {
+        copy = [];
+        for (var key = 0; key < obj.length; key++) {
+            copy[key] = deepCopy(obj[key]);
+        }
+        return copy;
+    }
+    if (Object.prototype.toString.call(obj) !== "[object Object]")
+        return obj;
+    copy = {};
+    for (var key in obj)
+        copy[key] = deepCopy(obj[key]);
+    return copy;
+};
+
+});
+
 ace.define("ace/lib/lang",[], function(require, exports, module){"use strict";
 exports.last = function (a) {
     return a[a.length - 1];
@@ -1135,24 +1149,7 @@ exports.copyArray = function (array) {
     }
     return copy;
 };
-exports.deepCopy = function deepCopy(obj) {
-    if (typeof obj !== "object" || !obj)
-        return obj;
-    var copy;
-    if (Array.isArray(obj)) {
-        copy = [];
-        for (var key = 0; key < obj.length; key++) {
-            copy[key] = deepCopy(obj[key]);
-        }
-        return copy;
-    }
-    if (Object.prototype.toString.call(obj) !== "[object Object]")
-        return obj;
-    copy = {};
-    for (var key in obj)
-        copy[key] = deepCopy(obj[key]);
-    return copy;
-};
+exports.deepCopy = require("./deep_copy").deepCopy;
 exports.arrayToMap = function (arr) {
     var map = {};
     for (var i = 0; i < arr.length; i++) {
@@ -1245,6 +1242,18 @@ exports.delayedCall = function (fcn, defaultTimeout) {
     };
     return _self;
 };
+exports.supportsLookbehind = function () {
+    try {
+        new RegExp('(?<=.)');
+    }
+    catch (e) {
+        return false;
+    }
+    return true;
+};
+exports.skipEmptyMatch = function (line, last, supportsUnicodeFlag) {
+    return supportsUnicodeFlag && line.codePointAt(last) > 0xffff ? 2 : 1;
+};
 
 });
 
@@ -1762,10 +1771,6 @@ ace.define("ace/mode/php/php",[], function (require, exports, module) {
 						re: /^match\b/i
 					},
 					{
-						value: PHP.Constants.T_NAMESPACE,
-						re: /^namespace\b/i
-					},
-					{
 						value: PHP.Constants.T_NEW,
 						re: /^new\b/i
 					},
@@ -2070,15 +2075,19 @@ ace.define("ace/mode/php/php",[], function (require, exports, module) {
 					},
 					{
 						value: PHP.Constants.T_NAME_FULLY_QUALIFIED,
-						re: /^\\App\\Namespace/
+						re: /^\\\w+(?:\\\w+)*/
 					},
 					{
 						value: PHP.Constants.T_NAME_QUALIFIED,
-						re: /^App\\Namespace/
+						re: /^\w+\\\w+(?:\\\w+)*/
 					},
 					{
 						value: PHP.Constants.T_NAME_RELATIVE,
-						re: /^namespace\\Namespace/
+						re: /^namespace\\\w+(?:\\\w+)*/
+					},
+					{
+						value: PHP.Constants.T_NAMESPACE,
+						re: /^namespace\b/i
 					},
 					{
 						value: PHP.Constants.T_ATTRIBUTE,

+ 5 - 6
web/cc14b072276b7c5f264efe205d06956f.js → web/4a02cfb7dd2f107d184dc23fce76eebb.js

@@ -145,13 +145,13 @@ var ShHighlightRules = function () {
                 token: "support.function",
                 regex: fileDescriptor
             }, {
-                token: "string",
+                token: "string", // ' string
                 start: "'", end: "'"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: floatNumber
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // integer
                 regex: integer + "\\b"
             }, {
                 token: keywordMapper,
@@ -316,17 +316,16 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module){"use strict";
+ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
 var Range = require("../range").Range;
 var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
 var Mode = function () {
     this.HighlightRules = ShHighlightRules;
     this.foldingRules = new CStyleFoldMode();
-    this.$behaviour = new CstyleBehaviour();
+    this.$behaviour = this.$defaultBehaviour;
 };
 oop.inherits(Mode, TextMode);
 (function () {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/4ab40446885d7f476b5c21fd390b0e23.js


+ 22 - 23
web/f4acea05f1f36de4fb003f20f7799de6.js → web/4e79f5ab805c7bfe58091ad27689b35e.js

@@ -3,15 +3,15 @@ var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var DocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
-                token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
-            },
-            DocCommentHighlightRules.getTagRule(),
+        "start": [
             {
-                defaultToken: "comment.doc",
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
-            }]
+            }
+        ]
     };
 };
 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
@@ -23,14 +23,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
 };
 DocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
 DocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
@@ -58,34 +58,34 @@ var scadHighlightRules = function () {
             },
             DocCommentHighlightRules.getStartRule("start"),
             {
-                token: "comment",
+                token: "comment", // multi line comment
                 regex: "\\/\\*",
                 next: "comment"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
             }, {
-                token: "string",
+                token: "string", // multi line string start
                 regex: '["].*\\\\$',
                 next: "qqstring"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
             }, {
-                token: "string",
+                token: "string", // multi line string start
                 regex: "['].*\\\\$",
                 next: "qstring"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hex
                 regex: "0[xX][0-9a-fA-F]+\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
             }, {
-                token: "constant",
+                token: "constant", // <CONSTANT>
                 regex: "<[a-zA-Z0-9.]+>"
             }, {
-                token: "keyword",
+                token: "keyword", // pre-compiler directivs
                 regex: "(?:use|include)"
             }, {
                 token: keywordMapper,
@@ -106,7 +106,7 @@ var scadHighlightRules = function () {
         ],
         "comment": [
             {
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\*\\/",
                 next: "start"
             }, {
@@ -286,17 +286,16 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+ace.define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules;
 var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
 var CStyleFoldMode = require("./folding/cstyle").FoldMode;
 var Mode = function () {
     this.HighlightRules = scadHighlightRules;
     this.$outdent = new MatchingBraceOutdent();
-    this.$behaviour = new CstyleBehaviour();
+    this.$behaviour = this.$defaultBehaviour;
     this.foldingRules = new CStyleFoldMode();
 };
 oop.inherits(Mode, TextMode);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/4ee8da21e528c64675b310845a654de5.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/50990da99a99a307711c6890db7397bd.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 644 - 173
web/510e01f6ce0a27c064e2743e089ce335.js


+ 124 - 0
web/516ff4bf4f4debec0f60c3e3f3b13c24.js

@@ -0,0 +1,124 @@
+ace.define("ace/mode/csv_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var CsvHighlightRules = function () {
+    TextHighlightRules.call(this);
+};
+oop.inherits(CsvHighlightRules, TextHighlightRules);
+exports.CsvHighlightRules = CsvHighlightRules;
+
+});
+
+ace.define("ace/mode/csv",["require","exports","module","ace/lib/oop","ace/mode/text","ace/lib/lang","ace/mode/csv_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var escapeRegExp = require("../lib/lang").escapeRegExp;
+var CsvHighlightRules = require("./csv_highlight_rules").CsvHighlightRules;
+var Mode = function (options) {
+    this.HighlightRules = CsvHighlightRules;
+    if (!options)
+        options = {};
+    var separatorRegex = [options.splitter || ",", options.quote || '"']
+        .map(escapeRegExp).join("|");
+    this.$tokenizer = {
+        getLineTokens: function (line, state, row) {
+            return tokenizeCsv(line, state, this.options);
+        },
+        options: {
+            quotes: options.quote || '"',
+            separatorRegex: new RegExp("(" + separatorRegex + ")"),
+            spliter: options.splitter || ","
+        },
+        states: {},
+    };
+    this.$highlightRules = new this.HighlightRules();
+};
+oop.inherits(Mode, TextMode);
+(function () {
+    this.getTokenizer = function () {
+        return this.$tokenizer;
+    };
+    this.$id = "ace/mode/csv";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+var classNames = ["keyword", "text", "string", "string.regex", "variable", "constant.numeric"];
+function tokenizeCsv(line, state, options) {
+    var result = [];
+    var parts = line.split(options.separatorRegex);
+    var spliter = options.spliter;
+    var quote = options.quote || '"';
+    var stateParts = (state || "start").split("-");
+    var column = parseInt(stateParts[1]) || 0;
+    var inString = stateParts[0] == 'string';
+    var atColumnStart = !inString;
+    for (var i = 0; i < parts.length; i++) {
+        var value = parts[i];
+        if (value) {
+            var isSeparator = false;
+            if (value == spliter && !inString) {
+                column++;
+                atColumnStart = true;
+                isSeparator = true;
+            }
+            else if (value == quote) {
+                if (atColumnStart) {
+                    inString = true;
+                    atColumnStart = false;
+                }
+                else if (inString) {
+                    if (parts[i + 1] == '' && parts[i + 2] == quote) {
+                        value = quote + quote;
+                        i += 2;
+                    }
+                    else {
+                        inString = false;
+                    }
+                }
+            }
+            else {
+                atColumnStart = false;
+            }
+            result.push({
+                value: value,
+                type: classNames[column % classNames.length] + ".csv_" + column + (isSeparator ? ".csv_separator" : "")
+            });
+        }
+    }
+    return { tokens: result, state: inString ? "string-" + column : "start" };
+}
+
+});
+
+ace.define("ace/mode/tsv_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var TsvHighlightRules = function () {
+    TextHighlightRules.call(this);
+};
+oop.inherits(TsvHighlightRules, TextHighlightRules);
+exports.TsvHighlightRules = TsvHighlightRules;
+
+});
+
+ace.define("ace/mode/tsv",["require","exports","module","ace/mode/csv","ace/mode/tsv_highlight_rules"], function(require, exports, module){"use strict";
+var CSVMode = require("./csv").Mode;
+var TsvHighlightRules = require("./tsv_highlight_rules").TsvHighlightRules;
+var Mode = function (options) {
+    var mode = new CSVMode({
+        splitter: "\t",
+        quote: '"'
+    });
+    mode.HighlightRules = TsvHighlightRules;
+    mode.$id = "ace/mode/tsv";
+    return mode;
+};
+exports.Mode = Mode;
+
+});                (function() {
+                    ace.require(["ace/mode/tsv"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/530deeb11db43fceba9bdf6054d0205e.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/540ec89580e27e662f5b0b323d70fd95.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/557dc611a621064762e5796567cbec28.js


+ 1 - 1
web/81c815664e53f84459fe8c5d6d1023a6.js → web/5589658498306bc6e9b1eaead4b2c222.js

@@ -38,7 +38,7 @@ var MIPSHighlightRules = function () {
                 regex: /\bsyscall\b/,
                 comment: "Other"
             }, {
-                token: "string",
+                token: "string", // character
                 regex: "(?:'\")(?:" + escapeRe + "|.)?(?:'\")"
             }, {
                 token: "string.start",

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/559d9b20c1df6eff138b007e57c157fa.js


+ 550 - 285
web/7f7a44adc9e1a2d9871f4fa1682f4bca.js → web/569c6845776ba1e46e8eb4b2ebe1b5e7.js

@@ -1,52 +1,134 @@
-ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var DocCommentHighlightRules = function () {
+var JsDocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
+        "start": [
+            {
+                token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
+                regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
+                        regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
+                        next: "pop"
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "lparen.doc"],
+                regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
+                    + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
+                    + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
+                    + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
+                    + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
+            }, {
                 token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
+                regex: "@access\\s+(?:private|public|protected)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
             },
-            DocCommentHighlightRules.getTagRule(),
+            JsDocCommentHighlightRules.getTagRule(),
             {
-                defaultToken: "comment.doc",
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
+            }
+        ],
+        "doc-syntax": [{
+                token: "operator.doc",
+                regex: /[|:]/
+            }, {
+                token: "paren.doc",
+                regex: /[\[\]]/
             }]
     };
+    this.normalizeRules();
 };
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-DocCommentHighlightRules.getTagRule = function (start) {
+oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
+JsDocCommentHighlightRules.getTagRule = function (start) {
     return {
         token: "comment.doc.tag.storage.type",
         regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
     };
 };
-DocCommentHighlightRules.getStartRule = function (start) {
+JsDocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
-DocCommentHighlightRules.getEndRule = function (start) {
+JsDocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
 };
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
+exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
 
 });
 
-ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
 var JavaScriptHighlightRules = function (options) {
-    var keywordMapper = this.createKeywordMapper({
-        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+    var keywords = {
+        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
             "Namespace|QName|XML|XMLList|" + // E4X
             "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
             "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
@@ -55,17 +137,18 @@ var JavaScriptHighlightRules = function (options) {
             "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
             "isNaN|parseFloat|parseInt|" +
             "JSON|Math|" + // Other
-            "this|arguments|prototype|window|document",
+            "this|arguments|prototype|window|document", // Pseudo
         "keyword": "const|yield|import|get|set|async|await|" +
-            "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+            "break|case|catch|continue|default|delete|do|else|finally|for|" +
             "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
             "__parent__|__count__|escape|unescape|with|__proto__|" +
-            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
         "storage.type": "const|let|var|function",
         "constant.language": "null|Infinity|NaN|undefined",
         "support.function": "alert",
         "constant.language.boolean": "true|false"
-    }, "identifier");
+    };
+    var keywordMapper = this.createKeywordMapper(keywords, "identifier");
     var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
     var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
         "u[0-9a-fA-F]{4}|" + // unicode
@@ -74,10 +157,16 @@ var JavaScriptHighlightRules = function (options) {
         "3[0-7][0-7]?|" + // oct
         "[4-7][0-7]?|" + //oct
         ".)";
+    var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
+    var functionCallStartRule = {
+        token: ["identifier", "text", "paren.lparen"],
+        regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
+    };
     this.$rules = {
         "no_regex": [
             DocCommentHighlightRules.getStartRule("doc-start"),
             comments("no_regex"),
+            functionCallStartRule,
             {
                 token: "string",
                 regex: "'(?=.)",
@@ -87,58 +176,36 @@ var JavaScriptHighlightRules = function (options) {
                 regex: '"(?=.)',
                 next: "qqstring"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hexadecimal, octal and binary
                 regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // decimal integers and floats
                 regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
             }, {
                 token: [
-                    "storage.type", "punctuation.operator", "support.function",
-                    "punctuation.operator", "entity.name.function", "text", "keyword.operator"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text", "storage.type", "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
                     "entity.name.function", "text", "keyword.operator", "text", "storage.type",
-                    "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
                     "entity.name.function", "text", "punctuation.operator",
-                    "text", "storage.type", "text", "paren.lparen"
+                    "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "text", "text", "storage.type", "text", "paren.lparen"
+                    "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "keyword",
@@ -148,11 +215,11 @@ var JavaScriptHighlightRules = function (options) {
                 regex: "(?:" + kwBeforeRe + ")\\b",
                 next: "start"
             }, {
-                token: ["support.constant"],
+                token: "support.constant",
                 regex: /that\b/
             }, {
                 token: ["storage.type", "punctuation.operator", "support.function.firebug"],
-                regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+                regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
             }, {
                 token: keywordMapper,
                 regex: identifierRe
@@ -188,19 +255,29 @@ var JavaScriptHighlightRules = function (options) {
                 token: "text",
                 regex: "\\s+"
             }, {
+                token: "keyword.operator",
+                regex: /=/
+            }, {
+                token: [
+                    "storage.type", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex: anonymousFunctionRe + "(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
                 token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "punctuation.operator",
                 regex: /[.](?![.])/
             }, {
                 token: "support.function",
-                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+                regex: "prototype"
+            }, {
+                token: "support.function",
+                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
             }, {
                 token: "support.function.dom",
                 regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
@@ -281,13 +358,67 @@ var JavaScriptHighlightRules = function (options) {
                 defaultToken: "string.regexp.charachterclass"
             }
         ],
+        "default_parameter": [
+            {
+                token: "string",
+                regex: "'(?=.)",
+                push: [
+                    {
+                        token: "string",
+                        regex: "'|$",
+                        next: "pop"
+                    }, {
+                        include: "qstring"
+                    }
+                ]
+            }, {
+                token: "string",
+                regex: '"(?=.)',
+                push: [
+                    {
+                        token: "string",
+                        regex: '"|$',
+                        next: "pop"
+                    }, {
+                        include: "qqstring"
+                    }
+                ]
+            }, {
+                token: "constant.language",
+                regex: "null|Infinity|NaN|undefined"
+            }, {
+                token: "constant.numeric", // hexadecimal, octal and binary
+                regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+            }, {
+                token: "constant.numeric", // decimal integers and floats
+                regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
+            }, {
+                token: "punctuation.operator",
+                regex: ",",
+                next: "function_arguments"
+            }, {
+                token: "text",
+                regex: "\\s+"
+            }, {
+                token: "punctuation.operator",
+                regex: "$"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
         "function_arguments": [
+            comments("function_arguments"),
             {
                 token: "variable.parameter",
                 regex: identifierRe
             }, {
                 token: "punctuation.operator",
-                regex: "[, ]+"
+                regex: ","
+            }, {
+                token: "text",
+                regex: "\\s+"
             }, {
                 token: "punctuation.operator",
                 regex: "$"
@@ -363,6 +494,32 @@ var JavaScriptHighlightRules = function (options) {
                 }, {
                     defaultToken: "string.quasi"
                 }]
+        }, {
+            token: ["variable.parameter", "text"],
+            regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
+        }, {
+            token: "paren.lparen",
+            regex: "(\\()(?=[^\\(]+\\s*=>)",
+            next: "function_arguments"
+        }, {
+            token: "variable.language",
+            regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
+        });
+        this.$rules["function_arguments"].unshift({
+            token: "keyword.operator",
+            regex: "=",
+            next: "default_parameter"
+        }, {
+            token: "keyword.operator",
+            regex: "\\.{3}"
+        });
+        this.$rules["property"].unshift({
+            token: "support.function",
+            regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
+                + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
+        }, {
+            token: "constant.language",
+            regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
         });
         if (!options || options.jsx != false)
             JSX.call(this);
@@ -400,7 +557,7 @@ function JSX() {
                     value: val.substr(offset)
                 }];
         },
-        regex: "</?" + tagRegex + "",
+        regex: "</?(?:" + tagRegex + "|(?=>))",
         next: "jsxAttributes",
         nextState: "jsx"
     };
@@ -413,8 +570,7 @@ function JSX() {
     this.$rules.jsx = [
         jsxJsRule,
         jsxTag,
-        { include: "reference" },
-        { defaultToken: "string" }
+        { include: "reference" }, { defaultToken: "string.xml" }
     ];
     this.$rules.jsxAttributes = [{
             token: "meta.tag.punctuation.tag-close.xml",
@@ -474,7 +630,7 @@ function JSX() {
 function comments(next) {
     return [
         {
-            token: "comment",
+            token: "comment", // multi line comment
             regex: /\/\*/,
             next: [
                 DocCommentHighlightRules.getTagRule(),
@@ -525,6 +681,293 @@ exports.MatchingBraceOutdent = MatchingBraceOutdent;
 
 });
 
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+function is(token, type) {
+    return token && token.type.lastIndexOf(type + ".xml") > -1;
+}
+var XmlBehaviour = function () {
+    this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+        if (text == '"' || text == "'") {
+            var quote = text;
+            var selected = session.doc.getTextRange(editor.getSelectionRange());
+            if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: quote + selected + quote,
+                    selection: false
+                };
+            }
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+                return {
+                    text: "",
+                    selection: [1, 1]
+                };
+            }
+            if (!token)
+                token = iterator.stepBackward();
+            if (!token)
+                return;
+            while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+                token = iterator.stepBackward();
+            }
+            var rightSpace = !rightChar || rightChar.match(/\s/);
+            if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+                return {
+                    text: quote + quote,
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+    this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == selected) {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+    this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+                return;
+            if (is(token, "reference.attribute-value"))
+                return;
+            if (is(token, "attribute-value")) {
+                var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
+                if (position.column < tokenEndColumn)
+                    return;
+                if (position.column == tokenEndColumn) {
+                    var nextToken = iterator.stepForward();
+                    if (nextToken && is(nextToken, "attribute-value"))
+                        return;
+                    iterator.stepBackward();
+                }
+            }
+            if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
+                return;
+            while (!is(token, "tag-name")) {
+                token = iterator.stepBackward();
+                if (token.value == "<") {
+                    token = iterator.stepForward();
+                    break;
+                }
+            }
+            var tokenRow = iterator.getCurrentTokenRow();
+            var tokenColumn = iterator.getCurrentTokenColumn();
+            if (is(iterator.stepBackward(), "end-tag-open"))
+                return;
+            var element = token.value;
+            if (tokenRow == position.row)
+                element = element.substring(0, position.column - tokenColumn);
+            if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
+                return;
+            return {
+                text: ">" + "</" + element + ">",
+                selection: [1, 1]
+            };
+        }
+    });
+    this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+        if (text == "\n") {
+            var cursor = editor.getCursorPosition();
+            var line = session.getLine(cursor.row);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
+                if (token.value == "/>")
+                    return;
+                while (token && token.type.indexOf("tag-name") === -1) {
+                    token = iterator.stepBackward();
+                }
+                if (!token) {
+                    return;
+                }
+                var tag = token.value;
+                var row = iterator.getCurrentTokenRow();
+                token = iterator.stepBackward();
+                if (!token || token.type.indexOf("end-tag") !== -1) {
+                    return;
+                }
+                if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
+                    var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
+                    var line = session.getLine(row);
+                    var nextIndent = this.$getIndent(line);
+                    var indent = nextIndent + session.getTabString();
+                    if (nextToken && nextToken.value === "</") {
+                        return {
+                            text: "\n" + indent + "\n" + nextIndent,
+                            selection: [1, indent.length, 1, indent.length]
+                        };
+                    }
+                    else {
+                        return {
+                            text: "\n" + indent
+                        };
+                    }
+                }
+            }
+        }
+    });
+};
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
+
+});
+
+ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var JavaScriptBehaviour = function () {
+    var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
+    this.addBehaviours(xmlBehaviours);
+    this.inherit(CstyleBehaviour);
+    this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token)
+                return;
+            if (token.value == '<') {
+                return {
+                    text: "></>",
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+};
+oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
+exports.JavaScriptBehaviour = JavaScriptBehaviour;
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
+    BaseFoldMode.call(this);
+    this.voidElements = voidElements || {};
+    this.optionalEndTags = oop.mixin({}, this.voidElements);
+    if (optionalEndTags)
+        oop.mixin(this.optionalEndTags, optionalEndTags);
+};
+oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function () {
+    this.tagName = "";
+    this.closing = false;
+    this.selfClosing = false;
+    this.start = { row: 0, column: 0 };
+    this.end = { row: 0, column: 0 };
+};
+function is(token, type) {
+    return token && token.type && token.type.lastIndexOf(type + ".xml") > -1;
+}
+(function () {
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var tag = this._getFirstTagInLine(session, row);
+        if (!tag)
+            return this.getCommentFoldWidget(session, row);
+        if (tag.closing || (!tag.tagName && tag.selfClosing))
+            return foldStyle === "markbeginend" ? "end" : "";
+        if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+            return "";
+        if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+            return "";
+        return "start";
+    };
+    this.getCommentFoldWidget = function (session, row) {
+        if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+            return "start";
+        return "";
+    };
+    this._getFirstTagInLine = function (session, row) {
+        var tokens = session.getTokens(row);
+        var tag = new Tag();
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            if (is(token, "tag-open")) {
+                tag.end.column = tag.start.column + token.value.length;
+                tag.closing = is(token, "end-tag-open");
+                token = tokens[++i];
+                if (!token)
+                    return null;
+                tag.tagName = token.value;
+                if (token.value === "") { //skip empty tag name token for fragment
+                    token = tokens[++i];
+                    if (!token)
+                        return null;
+                    tag.tagName = token.value;
+                }
+                tag.end.column += token.value.length;
+                for (i++; i < tokens.length; i++) {
+                    token = tokens[i];
+                    tag.end.column += token.value.length;
+                    if (is(token, "tag-close")) {
+                        tag.selfClosing = token.value == '/>';
+                        break;
+                    }
+                }
+                return tag;
+            }
+            else if (is(token, "tag-close")) {
+                tag.selfClosing = token.value == '/>';
+                return tag;
+            }
+            tag.start.column += token.value.length;
+        }
+        return null;
+    };
+    this._findEndTagInLine = function (session, row, tagName, startColumn) {
+        var tokens = session.getTokens(row);
+        var column = 0;
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            column += token.value.length;
+            if (column < startColumn - 1)
+                continue;
+            if (is(token, "end-tag-open")) {
+                token = tokens[i + 1];
+                if (is(token, "tag-name") && token.value === "") {
+                    token = tokens[i + 2];
+                }
+                if (token && token.value == tagName)
+                    return true;
+            }
+        }
+        return false;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row) {
+        var firstTag = this._getFirstTagInLine(session, row);
+        if (!firstTag) {
+            return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
+        }
+        var tags = session.getMatchingTags({ row: row, column: 0 });
+        if (tags) {
+            return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
+        }
+    };
+}).call(FoldMode.prototype);
+
+});
+
 ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
 var oop = require("../../lib/oop");
 var Range = require("../../range").Range;
@@ -641,25 +1084,60 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var XmlFoldMode = require("./xml").FoldMode;
+var CFoldMode = require("./cstyle").FoldMode;
+var FoldMode = exports.FoldMode = function (commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
+        this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
+    }
+    this.xmlFoldMode = new XmlFoldMode();
+};
+oop.inherits(FoldMode, CFoldMode);
+(function () {
+    this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
+    this.getFoldWidgetBase = this.getFoldWidget;
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var fw = this.getFoldWidgetBase(session, foldStyle, row);
+        if (!fw) {
+            return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
+        }
+        return fw;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
+        var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
+        if (range)
+            return range;
+        return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
 var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
 var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
+var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
 var Mode = function () {
     this.HighlightRules = JavaScriptHighlightRules;
     this.$outdent = new MatchingBraceOutdent();
-    this.$behaviour = new CstyleBehaviour();
-    this.foldingRules = new CStyleFoldMode();
+    this.$behaviour = new JavaScriptBehaviour();
+    this.foldingRules = new JavaScriptFoldMode();
 };
 oop.inherits(Mode, TextMode);
 (function () {
     this.lineCommentStart = "//";
     this.blockComment = { start: "/*", end: "*/" };
     this.$quotes = { '"': '"', "'": "'", "`": "`" };
+    this.$pairQuotesAfter = {
+        "`": /\w/
+    };
     this.getNextLineIndent = function (state, line, tab) {
         var indent = this.$getIndent(line);
         var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
@@ -678,13 +1156,6 @@ oop.inherits(Mode, TextMode);
             if (endState == "start" || endState == "no_regex") {
                 return "";
             }
-            var match = line.match(/^\s*(\/?)\*/);
-            if (match) {
-                if (match[1]) {
-                    indent += " ";
-                }
-                indent += "* ";
-            }
         }
         return indent;
     };
@@ -710,214 +1181,8 @@ oop.inherits(Mode, TextMode);
 }).call(Mode.prototype);
 exports.Mode = Mode;
 
-});
-
-ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
-var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var JavaHighlightRules = function () {
-    var keywords = ("abstract|continue|for|new|switch|" +
-        "assert|default|goto|package|synchronized|" +
-        "boolean|do|if|private|this|" +
-        "break|double|implements|protected|throw|" +
-        "byte|else|import|public|throws|" +
-        "case|enum|instanceof|return|transient|" +
-        "catch|extends|int|short|try|" +
-        "char|final|interface|static|void|" +
-        "class|finally|long|strictfp|volatile|" +
-        "const|float|native|super|while|" +
-        "var");
-    var buildinConstants = ("null|Infinity|NaN|undefined");
-    var langClasses = ("AbstractMethodError|AssertionError|ClassCircularityError|" +
-        "ClassFormatError|Deprecated|EnumConstantNotPresentException|" +
-        "ExceptionInInitializerError|IllegalAccessError|" +
-        "IllegalThreadStateException|InstantiationError|InternalError|" +
-        "NegativeArraySizeException|NoSuchFieldError|Override|Process|" +
-        "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|" +
-        "SuppressWarnings|TypeNotPresentException|UnknownError|" +
-        "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|" +
-        "InstantiationException|IndexOutOfBoundsException|" +
-        "ArrayIndexOutOfBoundsException|CloneNotSupportedException|" +
-        "NoSuchFieldException|IllegalArgumentException|NumberFormatException|" +
-        "SecurityException|Void|InheritableThreadLocal|IllegalStateException|" +
-        "InterruptedException|NoSuchMethodException|IllegalAccessException|" +
-        "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|" +
-        "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|" +
-        "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|" +
-        "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|" +
-        "Character|Boolean|StackTraceElement|Appendable|StringBuffer|" +
-        "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|" +
-        "StackOverflowError|OutOfMemoryError|VirtualMachineError|" +
-        "ArrayStoreException|ClassCastException|LinkageError|" +
-        "NoClassDefFoundError|ClassNotFoundException|RuntimeException|" +
-        "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|" +
-        "Cloneable|Class|CharSequence|Comparable|String|Object");
-    var keywordMapper = this.createKeywordMapper({
-        "variable.language": "this",
-        "keyword": keywords,
-        "constant.language": buildinConstants,
-        "support.function": langClasses
-    }, "identifier");
-    this.$rules = {
-        "start": [
-            {
-                token: "comment",
-                regex: "\\/\\/.*$"
-            },
-            DocCommentHighlightRules.getStartRule("doc-start"),
-            {
-                token: "comment",
-                regex: "\\/\\*",
-                next: "comment"
-            }, {
-                token: "string",
-                regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
-            }, {
-                token: "string",
-                regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
-            }, {
-                token: "constant.numeric",
-                regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
-            }, {
-                token: "constant.numeric",
-                regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/
-            }, {
-                token: "constant.language.boolean",
-                regex: "(?:true|false)\\b"
-            }, {
-                regex: "(open(?:\\s+))?module(?=\\s*\\w)",
-                token: "keyword",
-                next: [{
-                        regex: "{",
-                        token: "paren.lparen",
-                        next: [{
-                                regex: "}",
-                                token: "paren.rparen",
-                                next: "start"
-                            }, {
-                                regex: "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b",
-                                token: "keyword"
-                            }]
-                    }, {
-                        token: "text",
-                        regex: "\\s+"
-                    }, {
-                        token: "identifier",
-                        regex: "\\w+"
-                    }, {
-                        token: "punctuation.operator",
-                        regex: "."
-                    }, {
-                        token: "text",
-                        regex: "\\s+"
-                    }, {
-                        regex: "",
-                        next: "start"
-                    }]
-            }, {
-                token: keywordMapper,
-                regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
-            }, {
-                token: "keyword.operator",
-                regex: "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
-            }, {
-                token: "lparen",
-                regex: "[[({]"
-            }, {
-                token: "rparen",
-                regex: "[\\])}]"
-            }, {
-                token: "text",
-                regex: "\\s+"
-            }
-        ],
-        "comment": [
-            {
-                token: "comment",
-                regex: "\\*\\/",
-                next: "start"
-            }, {
-                defaultToken: "comment"
-            }
-        ]
-    };
-    this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]);
-    this.normalizeRules();
-};
-oop.inherits(JavaHighlightRules, TextHighlightRules);
-exports.JavaHighlightRules = JavaHighlightRules;
-
-});
-
-ace.define("ace/mode/folding/java",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range"], function(require, exports, module){"use strict";
-var oop = require("../../lib/oop");
-var CStyleFoldMode = require("./cstyle").FoldMode;
-var Range = require("../../range").Range;
-var FoldMode = exports.FoldMode = function () { };
-oop.inherits(FoldMode, CStyleFoldMode);
-(function () {
-    this.importRegex = /^import /;
-    this.getCStyleFoldWidget = this.getFoldWidget;
-    this.getFoldWidget = function (session, foldStyle, row) {
-        if (foldStyle === "markbegin") {
-            var line = session.getLine(row);
-            if (this.importRegex.test(line)) {
-                if (row == 0 || !this.importRegex.test(session.getLine(row - 1)))
-                    return "start";
-            }
-        }
-        return this.getCStyleFoldWidget(session, foldStyle, row);
-    };
-    this.getCstyleFoldWidgetRange = this.getFoldWidgetRange;
-    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
-        var line = session.getLine(row);
-        var match = line.match(this.importRegex);
-        if (!match || foldStyle !== "markbegin")
-            return this.getCstyleFoldWidgetRange(session, foldStyle, row, forceMultiline);
-        var startColumn = match[0].length;
-        var maxRow = session.getLength();
-        var startRow = row;
-        var endRow = row;
-        while (++row < maxRow) {
-            var line = session.getLine(row);
-            if (line.match(/^\s*$/))
-                continue;
-            if (!line.match(this.importRegex))
-                break;
-            endRow = row;
-        }
-        if (endRow > startRow) {
-            var endColumn = session.getLine(endRow).length;
-            return new Range(startRow, startColumn, endRow, endColumn);
-        }
-    };
-}).call(FoldMode.prototype);
-
-});
-
-ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules","ace/mode/folding/java"], function(require, exports, module){"use strict";
-var oop = require("../lib/oop");
-var JavaScriptMode = require("./javascript").Mode;
-var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
-var JavaFoldMode = require("./folding/java").FoldMode;
-var Mode = function () {
-    JavaScriptMode.call(this);
-    this.HighlightRules = JavaHighlightRules;
-    this.foldingRules = new JavaFoldMode();
-};
-oop.inherits(Mode, JavaScriptMode);
-(function () {
-    this.createWorker = function (session) {
-        return null;
-    };
-    this.$id = "ace/mode/java";
-    this.snippetFileId = "ace/snippets/java";
-}).call(Mode.prototype);
-exports.Mode = Mode;
-
 });                (function() {
-                    ace.require(["ace/mode/java"], function(m) {
+                    ace.require(["ace/mode/javascript"], function(m) {
                         if (typeof module == "object" && typeof exports == "object" && module) {
                             module.exports = m;
                         }

+ 45 - 42
web/0bb7acf5bee94a874690e9d25e8d58df.js → web/573b79a51fa9a0e40000dd478d13f4d7.js

@@ -1,52 +1,55 @@
-ace.define("ace/ext/static.css",["require","exports","module"], function(require, exports, module){module.exports = ".ace_static_highlight {\n    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;\n    font-size: 12px;\n    white-space: pre-wrap\n}\n\n.ace_static_highlight .ace_gutter {\n    width: 2em;\n    text-align: right;\n    padding: 0 3px 0 0;\n    margin-right: 3px;\n    contain: none;\n}\n\n.ace_static_highlight.ace_show_gutter .ace_line {\n    padding-left: 2.6em;\n}\n\n.ace_static_highlight .ace_line { position: relative; }\n\n.ace_static_highlight .ace_gutter-cell {\n    -moz-user-select: -moz-none;\n    -khtml-user-select: none;\n    -webkit-user-select: none;\n    user-select: none;\n    top: 0;\n    bottom: 0;\n    left: 0;\n    position: absolute;\n}\n\n\n.ace_static_highlight .ace_gutter-cell:before {\n    content: counter(ace_line, decimal);\n    counter-increment: ace_line;\n}\n.ace_static_highlight {\n    counter-reset: ace_line;\n}\n";
+ace.define("ace/ext/static-css",["require","exports","module"], function(require, exports, module){module.exports = ".ace_static_highlight {\n    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', 'Droid Sans Mono', monospace;\n    font-size: 12px;\n    white-space: pre-wrap\n}\n\n.ace_static_highlight .ace_gutter {\n    width: 2em;\n    text-align: right;\n    padding: 0 3px 0 0;\n    margin-right: 3px;\n    contain: none;\n}\n\n.ace_static_highlight.ace_show_gutter .ace_line {\n    padding-left: 2.6em;\n}\n\n.ace_static_highlight .ace_line { position: relative; }\n\n.ace_static_highlight .ace_gutter-cell {\n    -moz-user-select: -moz-none;\n    -khtml-user-select: none;\n    -webkit-user-select: none;\n    user-select: none;\n    top: 0;\n    bottom: 0;\n    left: 0;\n    position: absolute;\n}\n\n\n.ace_static_highlight .ace_gutter-cell:before {\n    content: counter(ace_line, decimal);\n    counter-increment: ace_line;\n}\n.ace_static_highlight {\n    counter-reset: ace_line;\n}\n";
 
 });
 
-ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/ext/static.css","ace/config","ace/lib/dom","ace/lib/lang"], function(require, exports, module){"use strict";
+ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/ext/static-css","ace/config","ace/lib/dom","ace/lib/lang"], function(require, exports, module){"use strict";
 var EditSession = require("../edit_session").EditSession;
 var TextLayer = require("../layer/text").Text;
-var baseStyles = require("./static.css");
+var baseStyles = require("./static-css");
 var config = require("../config");
 var dom = require("../lib/dom");
 var escapeHTML = require("../lib/lang").escapeHTML;
-function Element(type) {
-    this.type = type;
-    this.style = {};
-    this.textContent = "";
-}
-Element.prototype.cloneNode = function () {
-    return this;
-};
-Element.prototype.appendChild = function (child) {
-    this.textContent += child.toString();
-};
-Element.prototype.toString = function () {
-    var stringBuilder = [];
-    if (this.type != "fragment") {
-        stringBuilder.push("<", this.type);
-        if (this.className)
-            stringBuilder.push(" class='", this.className, "'");
-        var styleStr = [];
-        for (var key in this.style) {
-            styleStr.push(key, ":", this.style[key]);
-        }
-        if (styleStr.length)
-            stringBuilder.push(" style='", styleStr.join(""), "'");
-        stringBuilder.push(">");
-    }
-    if (this.textContent) {
-        stringBuilder.push(this.textContent);
+var Element = /** @class */ (function () {
+    function Element(type) { this.className;
+        this.type = type;
+        this.style = {};
+        this.textContent = "";
     }
-    if (this.type != "fragment") {
-        stringBuilder.push("</", this.type, ">");
-    }
-    return stringBuilder.join("");
-};
+    Element.prototype.cloneNode = function () {
+        return this;
+    };
+    Element.prototype.appendChild = function (child) {
+        this.textContent += child.toString();
+    };
+    Element.prototype.toString = function () {
+        var stringBuilder = [];
+        if (this.type != "fragment") {
+            stringBuilder.push("<", this.type);
+            if (this.className)
+                stringBuilder.push(" class='", this.className, "'");
+            var styleStr = [];
+            for (var key in this.style) {
+                styleStr.push(key, ":", this.style[key]);
+            }
+            if (styleStr.length)
+                stringBuilder.push(" style='", styleStr.join(""), "'");
+            stringBuilder.push(">");
+        }
+        if (this.textContent) {
+            stringBuilder.push(this.textContent);
+        }
+        if (this.type != "fragment") {
+            stringBuilder.push("</", this.type, ">");
+        }
+        return stringBuilder.join("");
+    };
+    return Element;
+}());
 var simpleDom = {
-    createTextNode: function (textContent, element) {
+    createTextNode: function (/** @type {string} */ textContent, /** @type {any} */ element) {
         return escapeHTML(textContent);
     },
-    createElement: function (type) {
+    createElement: function (/** @type {string} */ type) {
         return new Element(type);
     },
     createFragment: function () {
@@ -85,7 +88,7 @@ var highlight = function (el, opts, callback) {
             data = data.trim();
     }
     highlight.render(data, mode, theme, opts.firstLineNumber, !opts.showGutter, function (highlighted) {
-        dom.importCssString(highlighted.css, "ace_highlight");
+        dom.importCssString(highlighted.css, "ace_highlight", true);
         el.innerHTML = highlighted.html;
         var container = el.firstChild.firstChild;
         for (var i = 0; i < nodes.length; i += 2) {
@@ -115,14 +118,14 @@ highlight.render = function (input, mode, theme, lineStart, disableGutter, callb
     if (typeof mode == "string") {
         waiting++;
         config.loadModule(['mode', mode], function (m) {
-            if (!modeCache[mode] || modeOptions)
-                modeCache[mode] = new m.Mode(modeOptions);
-            mode = modeCache[mode];
+            if (!modeCache[ /**@type{string}*/(mode)] || modeOptions)
+                modeCache[ /**@type{string}*/(mode)] = new m.Mode(modeOptions);
+            mode = modeCache[ /**@type{string}*/(mode)];
             --waiting || done();
         });
     }
     function done() {
-        var result = highlight.renderSync(input, mode, theme, lineStart, disableGutter);
+        var result = highlight.renderSync(input, mode, /**@type{Theme}*/ (theme), lineStart, disableGutter);
         return callback ? callback(result) : result;
     }
     return --waiting || done();

+ 1 - 1
web/4b99ec9b42e080ec2d769ea4971ea76c.js → web/59120b5217fb17fd60c30c7f393921f6.js

@@ -8,7 +8,7 @@ var GitignoreHighlightRules = function () {
                 token: "comment",
                 regex: /^\s*#.*$/
             }, {
-                token: "keyword",
+                token: "keyword", // negated patterns
                 regex: /^\s*!.*$/
             }
         ]

+ 307 - 110
web/5d605211079d045169a9ac70f8aa0356.js → web/59543cab15a42dfc13060f00cf904cb2.js

@@ -3,15 +3,15 @@ var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var DocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
-                token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
-            },
-            DocCommentHighlightRules.getTagRule(),
+        "start": [
             {
-                defaultToken: "comment.doc",
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
-            }]
+            }
+        ]
     };
 };
 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
@@ -23,14 +23,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
 };
 DocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
 DocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
@@ -83,24 +83,24 @@ var PerlHighlightRules = function () {
                 token: "string.regexp",
                 regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
             }, {
-                token: "string",
+                token: "string", // multi line string start
                 regex: '["].*\\\\$',
                 next: "qqstring"
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
             }, {
-                token: "string",
+                token: "string", // multi line string start
                 regex: "['].*\\\\$",
                 next: "qstring"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hex
                 regex: "0x[0-9a-fA-F]+\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
             }, {
                 token: keywordMapper,
@@ -207,19 +207,19 @@ var PythonHighlightRules = function () {
                 token: "comment",
                 regex: "#.*$"
             }, {
-                token: "string",
+                token: "string", // multi line """ string start
                 regex: strPre + '"{3}',
                 next: "qqstring3"
             }, {
-                token: "string",
+                token: "string", // " string
                 regex: strPre + '"(?=.)',
                 next: "qqstring"
             }, {
-                token: "string",
+                token: "string", // multi line ''' string start
                 regex: strPre + "'{3}",
                 next: "qstring3"
             }, {
-                token: "string",
+                token: "string", // ' string
                 regex: strPre + "'(?=.)",
                 next: "qstring"
             }, {
@@ -295,7 +295,7 @@ var PythonHighlightRules = function () {
                 token: "constant.language.escape",
                 regex: stringEscape
             }, {
-                token: "string",
+                token: "string", // multi line """ string end
                 regex: '"{3}',
                 next: "start"
             }, {
@@ -305,7 +305,7 @@ var PythonHighlightRules = function () {
                 token: "constant.language.escape",
                 regex: stringEscape
             }, {
-                token: "string",
+                token: "string", // multi line ''' string end
                 regex: "'{3}",
                 next: "start"
             }, {
@@ -340,14 +340,14 @@ var PythonHighlightRules = function () {
                 defaultToken: "string"
             }],
         "rawqqstring3": [{
-                token: "string",
+                token: "string", // multi line """ string end
                 regex: '"{3}',
                 next: "start"
             }, {
                 defaultToken: "string"
             }],
         "rawqstring3": [{
-                token: "string",
+                token: "string", // multi line ''' string end
                 regex: "'{3}",
                 next: "start"
             }, {
@@ -379,7 +379,7 @@ var PythonHighlightRules = function () {
                 token: "constant.language.escape",
                 regex: stringEscape
             }, {
-                token: "string",
+                token: "string", // multi line """ string end
                 regex: '"{3}',
                 next: "start"
             }, {
@@ -393,7 +393,7 @@ var PythonHighlightRules = function () {
                 token: "constant.language.escape",
                 regex: stringEscape
             }, {
-                token: "string",
+                token: "string", // multi line ''' string end
                 regex: "'{3}",
                 next: "start"
             }, {
@@ -436,7 +436,7 @@ var PythonHighlightRules = function () {
                 defaultToken: "string"
             }],
         "rfqqstring3": [{
-                token: "string",
+                token: "string", // multi line """ string end
                 regex: '"{3}',
                 next: "start"
             }, {
@@ -447,7 +447,7 @@ var PythonHighlightRules = function () {
                 defaultToken: "string"
             }],
         "rfqstring3": [{
-                token: "string",
+                token: "string", // multi line ''' string end
                 regex: "'{3}",
                 next: "start"
             }, {
@@ -513,19 +513,19 @@ var PythonHighlightRules = function () {
                 push: "fqstringParRules"
             }],
         "constants": [{
-                token: "constant.numeric",
+                token: "constant.numeric", // imaginary
                 regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: floatNumber
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // long integer
                 regex: integer + "[lL]\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // integer
                 regex: integer + "\\b"
             }, {
-                token: ["punctuation", "function.support"],
+                token: ["punctuation", "function.support"], // method
                 regex: "(\\.)([a-zA-Z_]+)\\b"
             }, {
                 token: keywordMapper,
@@ -546,29 +546,29 @@ var JsonHighlightRules = function () {
     this.$rules = {
         "start": [
             {
-                token: "variable",
+                token: "variable", // single line
                 regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
             }, {
-                token: "string",
+                token: "string", // single line
                 regex: '"',
                 next: "string"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hex
                 regex: "0[xX][0-9a-fA-F]+\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
             }, {
                 token: "constant.language.boolean",
                 regex: "(?:true|false)\\b"
             }, {
-                token: "text",
+                token: "text", // single quoted strings are not allowed
                 regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
             }, {
-                token: "comment",
+                token: "comment", // comments are not allowed, but who cares?
                 regex: "\\/\\/.*$"
             }, {
-                token: "comment.start",
+                token: "comment.start", // comments are not allowed, but who cares?
                 regex: "\\/\\*",
                 next: "comment"
             }, {
@@ -599,7 +599,7 @@ var JsonHighlightRules = function () {
         ],
         "comment": [
             {
-                token: "comment.end",
+                token: "comment.end", // comments are not allowed, but who cares?
                 regex: "\\*\\/",
                 next: "start"
             }, {
@@ -613,14 +613,137 @@ exports.JsonHighlightRules = JsonHighlightRules;
 
 });
 
-ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JsDocCommentHighlightRules = function () {
+    this.$rules = {
+        "start": [
+            {
+                token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
+                regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
+                        regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
+                        next: "pop"
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "lparen.doc"],
+                regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
+                    + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
+                    + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
+                    + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
+                    + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@access\\s+(?:private|public|protected)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            },
+            JsDocCommentHighlightRules.getTagRule(),
+            {
+                defaultToken: "comment.doc.body",
+                caseInsensitive: true
+            }
+        ],
+        "doc-syntax": [{
+                token: "operator.doc",
+                regex: /[|:]/
+            }, {
+                token: "paren.doc",
+                regex: /[\[\]]/
+            }]
+    };
+    this.normalizeRules();
+};
+oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
+JsDocCommentHighlightRules.getTagRule = function (start) {
+    return {
+        token: "comment.doc.tag.storage.type",
+        regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+    };
+};
+JsDocCommentHighlightRules.getStartRule = function (start) {
+    return {
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
+        next: start
+    };
+};
+JsDocCommentHighlightRules.getEndRule = function (start) {
+    return {
+        token: "comment.doc", // closing comment
+        regex: "\\*\\/",
+        next: start
+    };
+};
+exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
 var JavaScriptHighlightRules = function (options) {
-    var keywordMapper = this.createKeywordMapper({
-        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+    var keywords = {
+        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
             "Namespace|QName|XML|XMLList|" + // E4X
             "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
             "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
@@ -629,17 +752,18 @@ var JavaScriptHighlightRules = function (options) {
             "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
             "isNaN|parseFloat|parseInt|" +
             "JSON|Math|" + // Other
-            "this|arguments|prototype|window|document",
+            "this|arguments|prototype|window|document", // Pseudo
         "keyword": "const|yield|import|get|set|async|await|" +
-            "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+            "break|case|catch|continue|default|delete|do|else|finally|for|" +
             "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
             "__parent__|__count__|escape|unescape|with|__proto__|" +
-            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
         "storage.type": "const|let|var|function",
         "constant.language": "null|Infinity|NaN|undefined",
         "support.function": "alert",
         "constant.language.boolean": "true|false"
-    }, "identifier");
+    };
+    var keywordMapper = this.createKeywordMapper(keywords, "identifier");
     var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
     var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
         "u[0-9a-fA-F]{4}|" + // unicode
@@ -648,10 +772,16 @@ var JavaScriptHighlightRules = function (options) {
         "3[0-7][0-7]?|" + // oct
         "[4-7][0-7]?|" + //oct
         ".)";
+    var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
+    var functionCallStartRule = {
+        token: ["identifier", "text", "paren.lparen"],
+        regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
+    };
     this.$rules = {
         "no_regex": [
             DocCommentHighlightRules.getStartRule("doc-start"),
             comments("no_regex"),
+            functionCallStartRule,
             {
                 token: "string",
                 regex: "'(?=.)",
@@ -661,58 +791,36 @@ var JavaScriptHighlightRules = function (options) {
                 regex: '"(?=.)',
                 next: "qqstring"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hexadecimal, octal and binary
                 regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // decimal integers and floats
                 regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
             }, {
                 token: [
-                    "storage.type", "punctuation.operator", "support.function",
-                    "punctuation.operator", "entity.name.function", "text", "keyword.operator"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text", "storage.type", "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
                     "entity.name.function", "text", "keyword.operator", "text", "storage.type",
-                    "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
                     "entity.name.function", "text", "punctuation.operator",
-                    "text", "storage.type", "text", "paren.lparen"
+                    "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "text", "text", "storage.type", "text", "paren.lparen"
+                    "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "keyword",
@@ -722,11 +830,11 @@ var JavaScriptHighlightRules = function (options) {
                 regex: "(?:" + kwBeforeRe + ")\\b",
                 next: "start"
             }, {
-                token: ["support.constant"],
+                token: "support.constant",
                 regex: /that\b/
             }, {
                 token: ["storage.type", "punctuation.operator", "support.function.firebug"],
-                regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+                regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
             }, {
                 token: keywordMapper,
                 regex: identifierRe
@@ -762,19 +870,29 @@ var JavaScriptHighlightRules = function (options) {
                 token: "text",
                 regex: "\\s+"
             }, {
+                token: "keyword.operator",
+                regex: /=/
+            }, {
+                token: [
+                    "storage.type", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex: anonymousFunctionRe + "(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
                 token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "punctuation.operator",
                 regex: /[.](?![.])/
             }, {
                 token: "support.function",
-                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+                regex: "prototype"
+            }, {
+                token: "support.function",
+                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
             }, {
                 token: "support.function.dom",
                 regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
@@ -855,13 +973,67 @@ var JavaScriptHighlightRules = function (options) {
                 defaultToken: "string.regexp.charachterclass"
             }
         ],
+        "default_parameter": [
+            {
+                token: "string",
+                regex: "'(?=.)",
+                push: [
+                    {
+                        token: "string",
+                        regex: "'|$",
+                        next: "pop"
+                    }, {
+                        include: "qstring"
+                    }
+                ]
+            }, {
+                token: "string",
+                regex: '"(?=.)',
+                push: [
+                    {
+                        token: "string",
+                        regex: '"|$',
+                        next: "pop"
+                    }, {
+                        include: "qqstring"
+                    }
+                ]
+            }, {
+                token: "constant.language",
+                regex: "null|Infinity|NaN|undefined"
+            }, {
+                token: "constant.numeric", // hexadecimal, octal and binary
+                regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+            }, {
+                token: "constant.numeric", // decimal integers and floats
+                regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
+            }, {
+                token: "punctuation.operator",
+                regex: ",",
+                next: "function_arguments"
+            }, {
+                token: "text",
+                regex: "\\s+"
+            }, {
+                token: "punctuation.operator",
+                regex: "$"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
         "function_arguments": [
+            comments("function_arguments"),
             {
                 token: "variable.parameter",
                 regex: identifierRe
             }, {
                 token: "punctuation.operator",
-                regex: "[, ]+"
+                regex: ","
+            }, {
+                token: "text",
+                regex: "\\s+"
             }, {
                 token: "punctuation.operator",
                 regex: "$"
@@ -937,6 +1109,32 @@ var JavaScriptHighlightRules = function (options) {
                 }, {
                     defaultToken: "string.quasi"
                 }]
+        }, {
+            token: ["variable.parameter", "text"],
+            regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
+        }, {
+            token: "paren.lparen",
+            regex: "(\\()(?=[^\\(]+\\s*=>)",
+            next: "function_arguments"
+        }, {
+            token: "variable.language",
+            regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
+        });
+        this.$rules["function_arguments"].unshift({
+            token: "keyword.operator",
+            regex: "=",
+            next: "default_parameter"
+        }, {
+            token: "keyword.operator",
+            regex: "\\.{3}"
+        });
+        this.$rules["property"].unshift({
+            token: "support.function",
+            regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
+                + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
+        }, {
+            token: "constant.language",
+            regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
         });
         if (!options || options.jsx != false)
             JSX.call(this);
@@ -974,7 +1172,7 @@ function JSX() {
                     value: val.substr(offset)
                 }];
         },
-        regex: "</?" + tagRegex + "",
+        regex: "</?(?:" + tagRegex + "|(?=>))",
         next: "jsxAttributes",
         nextState: "jsx"
     };
@@ -987,8 +1185,7 @@ function JSX() {
     this.$rules.jsx = [
         jsxJsRule,
         jsxTag,
-        { include: "reference" },
-        { defaultToken: "string" }
+        { include: "reference" }, { defaultToken: "string.xml" }
     ];
     this.$rules.jsxAttributes = [{
             token: "meta.tag.punctuation.tag-close.xml",
@@ -1048,7 +1245,7 @@ function JSX() {
 function comments(next) {
     return [
         {
-            token: "comment",
+            token: "comment", // multi line comment
             regex: /\/\*/,
             next: [
                 DocCommentHighlightRules.getTagRule(),
@@ -1120,7 +1317,7 @@ var PgsqlHighlightRules = function () {
         "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" +
         "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" +
         "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" +
-        "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone");
+        "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone|ties");
     var builtinFunctions = ("RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" +
         "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" +
         "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" +
@@ -1475,13 +1672,13 @@ var PgsqlHighlightRules = function () {
         "keyword": keywords
     }, "identifier", true);
     var sqlRules = [{
-            token: "string",
+            token: "string", // single line string -- assume dollar strings if multi-line for now
             regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
         }, {
-            token: "variable.language",
+            token: "variable.language", // pg identifier
             regex: '".*?"'
         }, {
-            token: "constant.numeric",
+            token: "constant.numeric", // float
             regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
         }, {
             token: keywordMapper,
@@ -1510,15 +1707,15 @@ var PgsqlHighlightRules = function () {
             },
             DocCommentHighlightRules.getStartRule("doc-start"),
             {
-                token: "comment",
+                token: "comment", // multi-line comment
                 regex: "\\/\\*",
                 next: "comment"
             }, {
                 token: "keyword.statementBegin",
-                regex: "[a-zA-Z]+",
+                regex: "[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added.
                 next: "statement"
             }, {
-                token: "support.buildin",
+                token: "support.buildin", // psql directive
                 regex: "^\\\\[\\S]+.*$"
             }
         ],
@@ -1526,7 +1723,7 @@ var PgsqlHighlightRules = function () {
                 token: "comment",
                 regex: "--.*$"
             }, {
-                token: "comment",
+                token: "comment", // multi-line comment
                 regex: "\\/\\*",
                 next: "commentStatement"
             }, {
@@ -1563,11 +1760,11 @@ var PgsqlHighlightRules = function () {
                 token: "comment",
                 regex: "--.*$"
             }, {
-                token: "comment",
+                token: "comment", // multi-line comment
                 regex: "\\/\\*",
                 next: "commentDollarSql"
             }, {
-                token: ["keyword", "statementEnd", "text", "string"],
+                token: ["keyword", "statementEnd", "text", "string"], // end quoting with dollar at the start of a line
                 regex: "(^|END)(;)?(\\s*)(\\$\\$)",
                 next: "statement"
             }, {
@@ -1577,7 +1774,7 @@ var PgsqlHighlightRules = function () {
             }
         ].concat(sqlRules),
         "comment": [{
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\*\\/",
                 next: "start"
             }, {
@@ -1585,7 +1782,7 @@ var PgsqlHighlightRules = function () {
             }
         ],
         "commentStatement": [{
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\*\\/",
                 next: "statement"
             }, {
@@ -1593,7 +1790,7 @@ var PgsqlHighlightRules = function () {
             }
         ],
         "commentDollarSql": [{
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\*\\/",
                 next: "dollarSql"
             }, {
@@ -1601,20 +1798,20 @@ var PgsqlHighlightRules = function () {
             }
         ],
         "dollarStatementString": [{
-                token: "string",
+                token: "string", // closing dollarstring
                 regex: ".*?\\$[\\w_0-9]*\\$",
                 next: "statement"
             }, {
-                token: "string",
+                token: "string", // dollarstring spanning whole line
                 regex: ".+"
             }
         ],
         "dollarSqlString": [{
-                token: "string",
+                token: "string", // closing dollarstring
                 regex: ".*?\\$[\\w_0-9]*\\$",
                 next: "dollarSql"
             }, {
-                token: "string",
+                token: "string", // dollarstring spanning whole line
                 regex: ".+"
             }
         ]

+ 19 - 19
web/86d777efd4d05137e05019407412503a.js → web/59621f6df1f47f3cdbe959a670025c7b.js

@@ -3,15 +3,15 @@ var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var DocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
-                token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
-            },
-            DocCommentHighlightRules.getTagRule(),
+        "start": [
             {
-                defaultToken: "comment.doc",
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
-            }]
+            }
+        ]
     };
 };
 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
@@ -23,14 +23,14 @@ DocCommentHighlightRules.getTagRule = function (start) {
 };
 DocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
 DocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
@@ -83,11 +83,11 @@ var sacHighlightRules = function () {
             },
             DocCommentHighlightRules.getStartRule("doc-start"),
             {
-                token: "comment",
+                token: "comment", // multi line comment
                 regex: "\\/\\*",
                 next: "comment"
             }, {
-                token: "string",
+                token: "string", // character
                 regex: "'(?:" + escapeRe + "|.)?'"
             }, {
                 token: "string.start",
@@ -109,17 +109,17 @@ var sacHighlightRules = function () {
                     { defaultToken: "string" }
                 ]
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hex
                 regex: "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
             }, {
-                token: "keyword",
+                token: "keyword", // pre-compiler directives
                 regex: "#\\s*(?:include|import|pragma|line|define|undef)\\b",
                 next: "directive"
             }, {
-                token: "keyword",
+                token: "keyword", // special case pre-compiler directive
                 regex: "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
             }, {
                 token: "support.function",
@@ -146,7 +146,7 @@ var sacHighlightRules = function () {
         ],
         "comment": [
             {
-                token: "comment",
+                token: "comment", // closing comment
                 regex: "\\*\\/",
                 next: "start"
             }, {
@@ -181,12 +181,12 @@ var sacHighlightRules = function () {
                 next: "start"
             },
             {
-                token: "constant.other",
+                token: "constant.other", // single line
                 regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
                 next: "start"
             },
             {
-                token: "constant.other",
+                token: "constant.other", // single line
                 regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
                 next: "start"
             },

+ 1 - 1
web/e956ee932ed766d1e40c10a39bf62e58.js → web/5b672566d0c18327a0da6515bd9035ab.js

@@ -14,7 +14,7 @@ var CabalHighlightRules = function () {
                 token: ["keyword"],
                 regex: /^(\s*\w.*?)(:(?:\s+|$))/
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // float
                 regex: /[\d_]+(?:(?:[\.\d_]*)?)/
             }, {
                 token: "constant.language.boolean",

+ 1565 - 0
web/5eaacd0f95f05f5feafe33dfc8bea5b5.js

@@ -0,0 +1,1565 @@
+ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JsDocCommentHighlightRules = function () {
+    this.$rules = {
+        "start": [
+            {
+                token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
+                regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
+                        regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
+                        next: "pop"
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "lparen.doc"],
+                regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
+                    + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
+                    + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
+                    + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
+                    + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@access\\s+(?:private|public|protected)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            },
+            JsDocCommentHighlightRules.getTagRule(),
+            {
+                defaultToken: "comment.doc.body",
+                caseInsensitive: true
+            }
+        ],
+        "doc-syntax": [{
+                token: "operator.doc",
+                regex: /[|:]/
+            }, {
+                token: "paren.doc",
+                regex: /[\[\]]/
+            }]
+    };
+    this.normalizeRules();
+};
+oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
+JsDocCommentHighlightRules.getTagRule = function (start) {
+    return {
+        token: "comment.doc.tag.storage.type",
+        regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+    };
+};
+JsDocCommentHighlightRules.getStartRule = function (start) {
+    return {
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
+        next: start
+    };
+};
+JsDocCommentHighlightRules.getEndRule = function (start) {
+    return {
+        token: "comment.doc", // closing comment
+        regex: "\\*\\/",
+        next: start
+    };
+};
+exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+var JavaScriptHighlightRules = function (options) {
+    var keywords = {
+        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
+            "Namespace|QName|XML|XMLList|" + // E4X
+            "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+            "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+            "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+            "SyntaxError|TypeError|URIError|" +
+            "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+            "isNaN|parseFloat|parseInt|" +
+            "JSON|Math|" + // Other
+            "this|arguments|prototype|window|document", // Pseudo
+        "keyword": "const|yield|import|get|set|async|await|" +
+            "break|case|catch|continue|default|delete|do|else|finally|for|" +
+            "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+            "__parent__|__count__|escape|unescape|with|__proto__|" +
+            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
+        "storage.type": "const|let|var|function",
+        "constant.language": "null|Infinity|NaN|undefined",
+        "support.function": "alert",
+        "constant.language.boolean": "true|false"
+    };
+    var keywordMapper = this.createKeywordMapper(keywords, "identifier");
+    var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+    var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+        "u[0-9a-fA-F]{4}|" + // unicode
+        "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+        "[0-2][0-7]{0,2}|" + // oct
+        "3[0-7][0-7]?|" + // oct
+        "[4-7][0-7]?|" + //oct
+        ".)";
+    var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
+    var functionCallStartRule = {
+        token: ["identifier", "text", "paren.lparen"],
+        regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
+    };
+    this.$rules = {
+        "no_regex": [
+            DocCommentHighlightRules.getStartRule("doc-start"),
+            comments("no_regex"),
+            functionCallStartRule,
+            {
+                token: "string",
+                regex: "'(?=.)",
+                next: "qstring"
+            }, {
+                token: "string",
+                regex: '"(?=.)',
+                next: "qqstring"
+            }, {
+                token: "constant.numeric", // hexadecimal, octal and binary
+                regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+            }, {
+                token: "constant.numeric", // decimal integers and floats
+                regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
+            }, {
+                token: [
+                    "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+                    "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token: [
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
+                ],
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token: [
+                    "entity.name.function", "text", "punctuation.operator",
+                    "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token: [
+                    "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token: "keyword",
+                regex: "from(?=\\s*('|\"))"
+            }, {
+                token: "keyword",
+                regex: "(?:" + kwBeforeRe + ")\\b",
+                next: "start"
+            }, {
+                token: "support.constant",
+                regex: /that\b/
+            }, {
+                token: ["storage.type", "punctuation.operator", "support.function.firebug"],
+                regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
+            }, {
+                token: keywordMapper,
+                regex: identifierRe
+            }, {
+                token: "punctuation.operator",
+                regex: /[.](?![.])/,
+                next: "property"
+            }, {
+                token: "storage.type",
+                regex: /=>/,
+                next: "start"
+            }, {
+                token: "keyword.operator",
+                regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+                next: "start"
+            }, {
+                token: "punctuation.operator",
+                regex: /[?:,;.]/,
+                next: "start"
+            }, {
+                token: "paren.lparen",
+                regex: /[\[({]/,
+                next: "start"
+            }, {
+                token: "paren.rparen",
+                regex: /[\])}]/
+            }, {
+                token: "comment",
+                regex: /^#!.*$/
+            }
+        ],
+        property: [{
+                token: "text",
+                regex: "\\s+"
+            }, {
+                token: "keyword.operator",
+                regex: /=/
+            }, {
+                token: [
+                    "storage.type", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex: anonymousFunctionRe + "(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token: [
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
+                ],
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
+                token: "punctuation.operator",
+                regex: /[.](?![.])/
+            }, {
+                token: "support.function",
+                regex: "prototype"
+            }, {
+                token: "support.function",
+                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+            }, {
+                token: "support.function.dom",
+                regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+            }, {
+                token: "support.constant",
+                regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+            }, {
+                token: "identifier",
+                regex: identifierRe
+            }, {
+                regex: "",
+                token: "empty",
+                next: "no_regex"
+            }
+        ],
+        "start": [
+            DocCommentHighlightRules.getStartRule("doc-start"),
+            comments("start"),
+            {
+                token: "string.regexp",
+                regex: "\\/",
+                next: "regex"
+            }, {
+                token: "text",
+                regex: "\\s+|^$",
+                next: "start"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
+        "regex": [
+            {
+                token: "regexp.keyword.operator",
+                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+            }, {
+                token: "string.regexp",
+                regex: "/[sxngimy]*",
+                next: "no_regex"
+            }, {
+                token: "invalid",
+                regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+            }, {
+                token: "constant.language.escape",
+                regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+            }, {
+                token: "constant.language.delimiter",
+                regex: /\|/
+            }, {
+                token: "constant.language.escape",
+                regex: /\[\^?/,
+                next: "regex_character_class"
+            }, {
+                token: "empty",
+                regex: "$",
+                next: "no_regex"
+            }, {
+                defaultToken: "string.regexp"
+            }
+        ],
+        "regex_character_class": [
+            {
+                token: "regexp.charclass.keyword.operator",
+                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+            }, {
+                token: "constant.language.escape",
+                regex: "]",
+                next: "regex"
+            }, {
+                token: "constant.language.escape",
+                regex: "-"
+            }, {
+                token: "empty",
+                regex: "$",
+                next: "no_regex"
+            }, {
+                defaultToken: "string.regexp.charachterclass"
+            }
+        ],
+        "default_parameter": [
+            {
+                token: "string",
+                regex: "'(?=.)",
+                push: [
+                    {
+                        token: "string",
+                        regex: "'|$",
+                        next: "pop"
+                    }, {
+                        include: "qstring"
+                    }
+                ]
+            }, {
+                token: "string",
+                regex: '"(?=.)',
+                push: [
+                    {
+                        token: "string",
+                        regex: '"|$',
+                        next: "pop"
+                    }, {
+                        include: "qqstring"
+                    }
+                ]
+            }, {
+                token: "constant.language",
+                regex: "null|Infinity|NaN|undefined"
+            }, {
+                token: "constant.numeric", // hexadecimal, octal and binary
+                regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+            }, {
+                token: "constant.numeric", // decimal integers and floats
+                regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
+            }, {
+                token: "punctuation.operator",
+                regex: ",",
+                next: "function_arguments"
+            }, {
+                token: "text",
+                regex: "\\s+"
+            }, {
+                token: "punctuation.operator",
+                regex: "$"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
+        "function_arguments": [
+            comments("function_arguments"),
+            {
+                token: "variable.parameter",
+                regex: identifierRe
+            }, {
+                token: "punctuation.operator",
+                regex: ","
+            }, {
+                token: "text",
+                regex: "\\s+"
+            }, {
+                token: "punctuation.operator",
+                regex: "$"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
+        "qqstring": [
+            {
+                token: "constant.language.escape",
+                regex: escapedRe
+            }, {
+                token: "string",
+                regex: "\\\\$",
+                consumeLineEnd: true
+            }, {
+                token: "string",
+                regex: '"|$',
+                next: "no_regex"
+            }, {
+                defaultToken: "string"
+            }
+        ],
+        "qstring": [
+            {
+                token: "constant.language.escape",
+                regex: escapedRe
+            }, {
+                token: "string",
+                regex: "\\\\$",
+                consumeLineEnd: true
+            }, {
+                token: "string",
+                regex: "'|$",
+                next: "no_regex"
+            }, {
+                defaultToken: "string"
+            }
+        ]
+    };
+    if (!options || !options.noES6) {
+        this.$rules.no_regex.unshift({
+            regex: "[{}]", onMatch: function (val, state, stack) {
+                this.next = val == "{" ? this.nextState : "";
+                if (val == "{" && stack.length) {
+                    stack.unshift("start", state);
+                }
+                else if (val == "}" && stack.length) {
+                    stack.shift();
+                    this.next = stack.shift();
+                    if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+                        return "paren.quasi.end";
+                }
+                return val == "{" ? "paren.lparen" : "paren.rparen";
+            },
+            nextState: "start"
+        }, {
+            token: "string.quasi.start",
+            regex: /`/,
+            push: [{
+                    token: "constant.language.escape",
+                    regex: escapedRe
+                }, {
+                    token: "paren.quasi.start",
+                    regex: /\${/,
+                    push: "start"
+                }, {
+                    token: "string.quasi.end",
+                    regex: /`/,
+                    next: "pop"
+                }, {
+                    defaultToken: "string.quasi"
+                }]
+        }, {
+            token: ["variable.parameter", "text"],
+            regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
+        }, {
+            token: "paren.lparen",
+            regex: "(\\()(?=[^\\(]+\\s*=>)",
+            next: "function_arguments"
+        }, {
+            token: "variable.language",
+            regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
+        });
+        this.$rules["function_arguments"].unshift({
+            token: "keyword.operator",
+            regex: "=",
+            next: "default_parameter"
+        }, {
+            token: "keyword.operator",
+            regex: "\\.{3}"
+        });
+        this.$rules["property"].unshift({
+            token: "support.function",
+            regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
+                + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
+        }, {
+            token: "constant.language",
+            regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
+        });
+        if (!options || options.jsx != false)
+            JSX.call(this);
+    }
+    this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
+    this.normalizeRules();
+};
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+function JSX() {
+    var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+    var jsxTag = {
+        onMatch: function (val, state, stack) {
+            var offset = val.charAt(1) == "/" ? 2 : 1;
+            if (offset == 1) {
+                if (state != this.nextState)
+                    stack.unshift(this.next, this.nextState, 0);
+                else
+                    stack.unshift(this.next);
+                stack[2]++;
+            }
+            else if (offset == 2) {
+                if (state == this.nextState) {
+                    stack[1]--;
+                    if (!stack[1] || stack[1] < 0) {
+                        stack.shift();
+                        stack.shift();
+                    }
+                }
+            }
+            return [{
+                    type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+                    value: val.slice(0, offset)
+                }, {
+                    type: "meta.tag.tag-name.xml",
+                    value: val.substr(offset)
+                }];
+        },
+        regex: "</?(?:" + tagRegex + "|(?=>))",
+        next: "jsxAttributes",
+        nextState: "jsx"
+    };
+    this.$rules.start.unshift(jsxTag);
+    var jsxJsRule = {
+        regex: "{",
+        token: "paren.quasi.start",
+        push: "start"
+    };
+    this.$rules.jsx = [
+        jsxJsRule,
+        jsxTag,
+        { include: "reference" }, { defaultToken: "string.xml" }
+    ];
+    this.$rules.jsxAttributes = [{
+            token: "meta.tag.punctuation.tag-close.xml",
+            regex: "/?>",
+            onMatch: function (value, currentState, stack) {
+                if (currentState == stack[0])
+                    stack.shift();
+                if (value.length == 2) {
+                    if (stack[0] == this.nextState)
+                        stack[1]--;
+                    if (!stack[1] || stack[1] < 0) {
+                        stack.splice(0, 2);
+                    }
+                }
+                this.next = stack[0] || "start";
+                return [{ type: this.token, value: value }];
+            },
+            nextState: "jsx"
+        },
+        jsxJsRule,
+        comments("jsxAttributes"),
+        {
+            token: "entity.other.attribute-name.xml",
+            regex: tagRegex
+        }, {
+            token: "keyword.operator.attribute-equals.xml",
+            regex: "="
+        }, {
+            token: "text.tag-whitespace.xml",
+            regex: "\\s+"
+        }, {
+            token: "string.attribute-value.xml",
+            regex: "'",
+            stateName: "jsx_attr_q",
+            push: [
+                { token: "string.attribute-value.xml", regex: "'", next: "pop" },
+                { include: "reference" },
+                { defaultToken: "string.attribute-value.xml" }
+            ]
+        }, {
+            token: "string.attribute-value.xml",
+            regex: '"',
+            stateName: "jsx_attr_qq",
+            push: [
+                { token: "string.attribute-value.xml", regex: '"', next: "pop" },
+                { include: "reference" },
+                { defaultToken: "string.attribute-value.xml" }
+            ]
+        },
+        jsxTag
+    ];
+    this.$rules.reference = [{
+            token: "constant.language.escape.reference.xml",
+            regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+        }];
+}
+function comments(next) {
+    return [
+        {
+            token: "comment", // multi line comment
+            regex: /\/\*/,
+            next: [
+                DocCommentHighlightRules.getTagRule(),
+                { token: "comment", regex: "\\*\\/", next: next || "pop" },
+                { defaultToken: "comment", caseInsensitive: true }
+            ]
+        }, {
+            token: "comment",
+            regex: "\\/\\/",
+            next: [
+                DocCommentHighlightRules.getTagRule(),
+                { token: "comment", regex: "$|^", next: next || "pop" },
+                { defaultToken: "comment", caseInsensitive: true }
+            ]
+        }
+    ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+
+});
+
+ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
+var Range = require("../range").Range;
+var MatchingBraceOutdent = function () { };
+(function () {
+    this.checkOutdent = function (line, input) {
+        if (!/^\s+$/.test(line))
+            return false;
+        return /^\s*\}/.test(input);
+    };
+    this.autoOutdent = function (doc, row) {
+        var line = doc.getLine(row);
+        var match = line.match(/^(\s*\})/);
+        if (!match)
+            return 0;
+        var column = match[1].length;
+        var openBracePos = doc.findMatchingBracket({ row: row, column: column });
+        if (!openBracePos || openBracePos.row == row)
+            return 0;
+        var indent = this.$getIndent(doc.getLine(openBracePos.row));
+        doc.replace(new Range(row, 0, row, column - 1), indent);
+    };
+    this.$getIndent = function (line) {
+        return line.match(/^\s*/)[0];
+    };
+}).call(MatchingBraceOutdent.prototype);
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+function is(token, type) {
+    return token && token.type.lastIndexOf(type + ".xml") > -1;
+}
+var XmlBehaviour = function () {
+    this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+        if (text == '"' || text == "'") {
+            var quote = text;
+            var selected = session.doc.getTextRange(editor.getSelectionRange());
+            if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: quote + selected + quote,
+                    selection: false
+                };
+            }
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+                return {
+                    text: "",
+                    selection: [1, 1]
+                };
+            }
+            if (!token)
+                token = iterator.stepBackward();
+            if (!token)
+                return;
+            while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+                token = iterator.stepBackward();
+            }
+            var rightSpace = !rightChar || rightChar.match(/\s/);
+            if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+                return {
+                    text: quote + quote,
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+    this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == selected) {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+    this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+                return;
+            if (is(token, "reference.attribute-value"))
+                return;
+            if (is(token, "attribute-value")) {
+                var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
+                if (position.column < tokenEndColumn)
+                    return;
+                if (position.column == tokenEndColumn) {
+                    var nextToken = iterator.stepForward();
+                    if (nextToken && is(nextToken, "attribute-value"))
+                        return;
+                    iterator.stepBackward();
+                }
+            }
+            if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
+                return;
+            while (!is(token, "tag-name")) {
+                token = iterator.stepBackward();
+                if (token.value == "<") {
+                    token = iterator.stepForward();
+                    break;
+                }
+            }
+            var tokenRow = iterator.getCurrentTokenRow();
+            var tokenColumn = iterator.getCurrentTokenColumn();
+            if (is(iterator.stepBackward(), "end-tag-open"))
+                return;
+            var element = token.value;
+            if (tokenRow == position.row)
+                element = element.substring(0, position.column - tokenColumn);
+            if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
+                return;
+            return {
+                text: ">" + "</" + element + ">",
+                selection: [1, 1]
+            };
+        }
+    });
+    this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+        if (text == "\n") {
+            var cursor = editor.getCursorPosition();
+            var line = session.getLine(cursor.row);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
+                if (token.value == "/>")
+                    return;
+                while (token && token.type.indexOf("tag-name") === -1) {
+                    token = iterator.stepBackward();
+                }
+                if (!token) {
+                    return;
+                }
+                var tag = token.value;
+                var row = iterator.getCurrentTokenRow();
+                token = iterator.stepBackward();
+                if (!token || token.type.indexOf("end-tag") !== -1) {
+                    return;
+                }
+                if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
+                    var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
+                    var line = session.getLine(row);
+                    var nextIndent = this.$getIndent(line);
+                    var indent = nextIndent + session.getTabString();
+                    if (nextToken && nextToken.value === "</") {
+                        return {
+                            text: "\n" + indent + "\n" + nextIndent,
+                            selection: [1, indent.length, 1, indent.length]
+                        };
+                    }
+                    else {
+                        return {
+                            text: "\n" + indent
+                        };
+                    }
+                }
+            }
+        }
+    });
+};
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
+
+});
+
+ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var JavaScriptBehaviour = function () {
+    var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
+    this.addBehaviours(xmlBehaviours);
+    this.inherit(CstyleBehaviour);
+    this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token)
+                return;
+            if (token.value == '<') {
+                return {
+                    text: "></>",
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+};
+oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
+exports.JavaScriptBehaviour = JavaScriptBehaviour;
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
+    BaseFoldMode.call(this);
+    this.voidElements = voidElements || {};
+    this.optionalEndTags = oop.mixin({}, this.voidElements);
+    if (optionalEndTags)
+        oop.mixin(this.optionalEndTags, optionalEndTags);
+};
+oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function () {
+    this.tagName = "";
+    this.closing = false;
+    this.selfClosing = false;
+    this.start = { row: 0, column: 0 };
+    this.end = { row: 0, column: 0 };
+};
+function is(token, type) {
+    return token && token.type && token.type.lastIndexOf(type + ".xml") > -1;
+}
+(function () {
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var tag = this._getFirstTagInLine(session, row);
+        if (!tag)
+            return this.getCommentFoldWidget(session, row);
+        if (tag.closing || (!tag.tagName && tag.selfClosing))
+            return foldStyle === "markbeginend" ? "end" : "";
+        if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+            return "";
+        if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+            return "";
+        return "start";
+    };
+    this.getCommentFoldWidget = function (session, row) {
+        if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+            return "start";
+        return "";
+    };
+    this._getFirstTagInLine = function (session, row) {
+        var tokens = session.getTokens(row);
+        var tag = new Tag();
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            if (is(token, "tag-open")) {
+                tag.end.column = tag.start.column + token.value.length;
+                tag.closing = is(token, "end-tag-open");
+                token = tokens[++i];
+                if (!token)
+                    return null;
+                tag.tagName = token.value;
+                if (token.value === "") { //skip empty tag name token for fragment
+                    token = tokens[++i];
+                    if (!token)
+                        return null;
+                    tag.tagName = token.value;
+                }
+                tag.end.column += token.value.length;
+                for (i++; i < tokens.length; i++) {
+                    token = tokens[i];
+                    tag.end.column += token.value.length;
+                    if (is(token, "tag-close")) {
+                        tag.selfClosing = token.value == '/>';
+                        break;
+                    }
+                }
+                return tag;
+            }
+            else if (is(token, "tag-close")) {
+                tag.selfClosing = token.value == '/>';
+                return tag;
+            }
+            tag.start.column += token.value.length;
+        }
+        return null;
+    };
+    this._findEndTagInLine = function (session, row, tagName, startColumn) {
+        var tokens = session.getTokens(row);
+        var column = 0;
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            column += token.value.length;
+            if (column < startColumn - 1)
+                continue;
+            if (is(token, "end-tag-open")) {
+                token = tokens[i + 1];
+                if (is(token, "tag-name") && token.value === "") {
+                    token = tokens[i + 2];
+                }
+                if (token && token.value == tagName)
+                    return true;
+            }
+        }
+        return false;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row) {
+        var firstTag = this._getFirstTagInLine(session, row);
+        if (!firstTag) {
+            return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
+        }
+        var tags = session.getMatchingTags({ row: row, column: 0 });
+        if (tags) {
+            return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
+        }
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var FoldMode = exports.FoldMode = function (commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
+        this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
+    }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+(function () {
+    this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
+    this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
+    this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
+    this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+    this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+    this._getFoldWidgetBase = this.getFoldWidget;
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var line = session.getLine(row);
+        if (this.singleLineBlockCommentRe.test(line)) {
+            if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+                return "";
+        }
+        var fw = this._getFoldWidgetBase(session, foldStyle, row);
+        if (!fw && this.startRegionRe.test(line))
+            return "start"; // lineCommentRegionStart
+        return fw;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
+        var line = session.getLine(row);
+        if (this.startRegionRe.test(line))
+            return this.getCommentRegionBlock(session, line, row);
+        var match = line.match(this.foldingStartMarker);
+        if (match) {
+            var i = match.index;
+            if (match[1])
+                return this.openingBracketBlock(session, match[1], row, i);
+            var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+            if (range && !range.isMultiLine()) {
+                if (forceMultiline) {
+                    range = this.getSectionRange(session, row);
+                }
+                else if (foldStyle != "all")
+                    range = null;
+            }
+            return range;
+        }
+        if (foldStyle === "markbegin")
+            return;
+        var match = line.match(this.foldingStopMarker);
+        if (match) {
+            var i = match.index + match[0].length;
+            if (match[1])
+                return this.closingBracketBlock(session, match[1], row, i);
+            return session.getCommentFoldRange(row, i, -1);
+        }
+    };
+    this.getSectionRange = function (session, row) {
+        var line = session.getLine(row);
+        var startIndent = line.search(/\S/);
+        var startRow = row;
+        var startColumn = line.length;
+        row = row + 1;
+        var endRow = row;
+        var maxRow = session.getLength();
+        while (++row < maxRow) {
+            line = session.getLine(row);
+            var indent = line.search(/\S/);
+            if (indent === -1)
+                continue;
+            if (startIndent > indent)
+                break;
+            var subRange = this.getFoldWidgetRange(session, "all", row);
+            if (subRange) {
+                if (subRange.start.row <= startRow) {
+                    break;
+                }
+                else if (subRange.isMultiLine()) {
+                    row = subRange.end.row;
+                }
+                else if (startIndent == indent) {
+                    break;
+                }
+            }
+            endRow = row;
+        }
+        return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+    };
+    this.getCommentRegionBlock = function (session, line, row) {
+        var startColumn = line.search(/\s*$/);
+        var maxRow = session.getLength();
+        var startRow = row;
+        var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+        var depth = 1;
+        while (++row < maxRow) {
+            line = session.getLine(row);
+            var m = re.exec(line);
+            if (!m)
+                continue;
+            if (m[1])
+                depth--;
+            else
+                depth++;
+            if (!depth)
+                break;
+        }
+        var endRow = row;
+        if (endRow > startRow) {
+            return new Range(startRow, startColumn, endRow, line.length);
+        }
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var XmlFoldMode = require("./xml").FoldMode;
+var CFoldMode = require("./cstyle").FoldMode;
+var FoldMode = exports.FoldMode = function (commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
+        this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
+    }
+    this.xmlFoldMode = new XmlFoldMode();
+};
+oop.inherits(FoldMode, CFoldMode);
+(function () {
+    this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
+    this.getFoldWidgetBase = this.getFoldWidget;
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var fw = this.getFoldWidgetBase(session, foldStyle, row);
+        if (!fw) {
+            return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
+        }
+        return fw;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
+        var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
+        if (range)
+            return range;
+        return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
+var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
+var Mode = function () {
+    this.HighlightRules = JavaScriptHighlightRules;
+    this.$outdent = new MatchingBraceOutdent();
+    this.$behaviour = new JavaScriptBehaviour();
+    this.foldingRules = new JavaScriptFoldMode();
+};
+oop.inherits(Mode, TextMode);
+(function () {
+    this.lineCommentStart = "//";
+    this.blockComment = { start: "/*", end: "*/" };
+    this.$quotes = { '"': '"', "'": "'", "`": "`" };
+    this.$pairQuotesAfter = {
+        "`": /\w/
+    };
+    this.getNextLineIndent = function (state, line, tab) {
+        var indent = this.$getIndent(line);
+        var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+        var tokens = tokenizedLine.tokens;
+        var endState = tokenizedLine.state;
+        if (tokens.length && tokens[tokens.length - 1].type == "comment") {
+            return indent;
+        }
+        if (state == "start" || state == "no_regex") {
+            var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+            if (match) {
+                indent += tab;
+            }
+        }
+        else if (state == "doc-start") {
+            if (endState == "start" || endState == "no_regex") {
+                return "";
+            }
+        }
+        return indent;
+    };
+    this.checkOutdent = function (state, line, input) {
+        return this.$outdent.checkOutdent(line, input);
+    };
+    this.autoOutdent = function (state, doc, row) {
+        this.$outdent.autoOutdent(doc, row);
+    };
+    this.createWorker = function (session) {
+        var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+        worker.attachToDocument(session.getDocument());
+        worker.on("annotate", function (results) {
+            session.setAnnotations(results.data);
+        });
+        worker.on("terminate", function () {
+            session.clearAnnotations();
+        });
+        return worker;
+    };
+    this.$id = "ace/mode/javascript";
+    this.snippetFileId = "ace/snippets/javascript";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var DocCommentHighlightRules = function () {
+    this.$rules = {
+        "start": [
+            {
+                token: "comment.doc.tag",
+                regex: "@\\w+(?=\\s|$)"
+            }, DocCommentHighlightRules.getTagRule(), {
+                defaultToken: "comment.doc.body",
+                caseInsensitive: true
+            }
+        ]
+    };
+};
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+DocCommentHighlightRules.getTagRule = function (start) {
+    return {
+        token: "comment.doc.tag.storage.type",
+        regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+    };
+};
+DocCommentHighlightRules.getStartRule = function (start) {
+    return {
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
+        next: start
+    };
+};
+DocCommentHighlightRules.getEndRule = function (start) {
+    return {
+        token: "comment.doc", // closing comment
+        regex: "\\*\\/",
+        next: start
+    };
+};
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
+
+ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JavaHighlightRules = function () {
+    var identifierRe = "[a-zA-Z_$][a-zA-Z0-9_$]*";
+    var keywords = ("abstract|continue|for|new|switch|" +
+        "assert|default|goto|package|synchronized|" +
+        "boolean|do|if|private|this|" +
+        "break|double|implements|protected|throw|" +
+        "byte|else|import|public|throws|" +
+        "case|enum|instanceof|return|transient|" +
+        "catch|extends|int|short|try|" +
+        "char|final|interface|static|void|" +
+        "class|finally|long|strictfp|volatile|" +
+        "const|float|native|super|while|" +
+        "yield|when|record|var|" +
+        "permits|(?:non\\-)?sealed");
+    var buildinConstants = ("null|Infinity|NaN|undefined");
+    var langClasses = ("AbstractMethodError|AssertionError|ClassCircularityError|" +
+        "ClassFormatError|Deprecated|EnumConstantNotPresentException|" +
+        "ExceptionInInitializerError|IllegalAccessError|" +
+        "IllegalThreadStateException|InstantiationError|InternalError|" +
+        "NegativeArraySizeException|NoSuchFieldError|Override|Process|" +
+        "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|" +
+        "SuppressWarnings|TypeNotPresentException|UnknownError|" +
+        "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|" +
+        "InstantiationException|IndexOutOfBoundsException|" +
+        "ArrayIndexOutOfBoundsException|CloneNotSupportedException|" +
+        "NoSuchFieldException|IllegalArgumentException|NumberFormatException|" +
+        "SecurityException|Void|InheritableThreadLocal|IllegalStateException|" +
+        "InterruptedException|NoSuchMethodException|IllegalAccessException|" +
+        "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|" +
+        "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|" +
+        "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|" +
+        "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|" +
+        "Character|Boolean|StackTraceElement|Appendable|StringBuffer|" +
+        "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|" +
+        "StackOverflowError|OutOfMemoryError|VirtualMachineError|" +
+        "ArrayStoreException|ClassCastException|LinkageError|" +
+        "NoClassDefFoundError|ClassNotFoundException|RuntimeException|" +
+        "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|" +
+        "Cloneable|Class|CharSequence|Comparable|String|Object");
+    var keywordMapper = this.createKeywordMapper({
+        "variable.language": "this",
+        "constant.language": buildinConstants,
+        "support.function": langClasses
+    }, "identifier");
+    this.$rules = {
+        "start": [
+            { include: "comments" },
+            { include: "multiline-strings" },
+            { include: "strings" },
+            { include: "constants" },
+            {
+                regex: "(open(?:\\s+))?module(?=\\s*\\w)",
+                token: "keyword",
+                next: [{
+                        regex: "{",
+                        token: "paren.lparen",
+                        push: [
+                            {
+                                regex: "}",
+                                token: "paren.rparen",
+                                next: "pop"
+                            },
+                            { include: "comments" },
+                            {
+                                regex: "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b",
+                                token: "keyword"
+                            }
+                        ]
+                    }, {
+                        token: "text",
+                        regex: "\\s+"
+                    }, {
+                        token: "identifier",
+                        regex: "\\w+"
+                    }, {
+                        token: "punctuation.operator",
+                        regex: "."
+                    }, {
+                        token: "text",
+                        regex: "\\s+"
+                    }, {
+                        regex: "", // exit if there is anything else
+                        next: "start"
+                    }]
+            },
+            { include: "statements" }
+        ],
+        "comments": [
+            {
+                token: "comment",
+                regex: "\\/\\/.*$"
+            },
+            {
+                token: "comment.doc", // doc comment
+                regex: /\/\*\*(?!\/)/,
+                push: "doc-start"
+            },
+            {
+                token: "comment", // multi line comment
+                regex: "\\/\\*",
+                push: [
+                    {
+                        token: "comment", // closing comment
+                        regex: "\\*\\/",
+                        next: "pop"
+                    }, {
+                        defaultToken: "comment"
+                    }
+                ]
+            },
+        ],
+        "strings": [
+            {
+                token: ["punctuation", "string"],
+                regex: /(\.)(")/,
+                push: [
+                    {
+                        token: "lparen",
+                        regex: /\\\{/,
+                        push: [
+                            {
+                                token: "text",
+                                regex: /$/,
+                                next: "start"
+                            }, {
+                                token: "rparen",
+                                regex: /}/,
+                                next: "pop"
+                            }, {
+                                include: "strings"
+                            }, {
+                                include: "constants"
+                            }, {
+                                include: "statements"
+                            }
+                        ]
+                    }, {
+                        token: "string",
+                        regex: /"/,
+                        next: "pop"
+                    }, {
+                        defaultToken: "string"
+                    }
+                ]
+            }, {
+                token: "string", // single line
+                regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+            }, {
+                token: "string", // single line
+                regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+            }
+        ],
+        "multiline-strings": [
+            {
+                token: ["punctuation", "string"],
+                regex: /(\.)(""")/,
+                push: [
+                    {
+                        token: "string",
+                        regex: '"""',
+                        next: "pop"
+                    }, {
+                        token: "lparen",
+                        regex: /\\\{/,
+                        push: [
+                            {
+                                token: "text",
+                                regex: /$/,
+                                next: "start"
+                            }, {
+                                token: "rparen",
+                                regex: /}/,
+                                next: "pop"
+                            }, {
+                                include: "multiline-strings"
+                            }, {
+                                include: "strings"
+                            }, {
+                                include: "constants"
+                            }, {
+                                include: "statements"
+                            }
+                        ]
+                    }, {
+                        token: "constant.language.escape",
+                        regex: /\\./
+                    }, {
+                        defaultToken: "string"
+                    }
+                ]
+            },
+            {
+                token: "string",
+                regex: '"""',
+                push: [
+                    {
+                        token: "string",
+                        regex: '"""',
+                        next: "pop"
+                    }, {
+                        token: "constant.language.escape",
+                        regex: /\\./
+                    }, {
+                        defaultToken: "string"
+                    }
+                ]
+            }
+        ],
+        "constants": [
+            {
+                token: "constant.numeric", // hex
+                regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
+            }, {
+                token: "constant.numeric", // float
+                regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/
+            }, {
+                token: "constant.language.boolean",
+                regex: "(?:true|false)\\b"
+            }
+        ],
+        "statements": [
+            {
+                token: ["keyword", "text", "identifier"],
+                regex: "(record)(\\s+)(" + identifierRe + ")\\b"
+            },
+            {
+                token: "keyword",
+                regex: "(?:" + keywords + ")\\b"
+            }, {
+                token: "storage.type.annotation",
+                regex: "@" + identifierRe + "\\b"
+            }, {
+                token: "entity.name.function",
+                regex: identifierRe + "(?=\\()"
+            }, {
+                token: keywordMapper, // TODO: Unicode escape sequences
+                regex: identifierRe + "\\b"
+            }, {
+                token: "keyword.operator",
+                regex: "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+            }, {
+                token: "lparen",
+                regex: "[[({]"
+            }, {
+                token: "rparen",
+                regex: "[\\])}]"
+            }, {
+                token: "text",
+                regex: "\\s+"
+            }
+        ]
+    };
+    this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("pop")]);
+    this.normalizeRules();
+};
+oop.inherits(JavaHighlightRules, TextHighlightRules);
+exports.JavaHighlightRules = JavaHighlightRules;
+
+});
+
+ace.define("ace/mode/folding/java",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var CStyleFoldMode = require("./cstyle").FoldMode;
+var Range = require("../../range").Range;
+var FoldMode = exports.FoldMode = function () { };
+oop.inherits(FoldMode, CStyleFoldMode);
+(function () {
+    this.importRegex = /^import /;
+    this.getCStyleFoldWidget = this.getFoldWidget;
+    this.getFoldWidget = function (session, foldStyle, row) {
+        if (foldStyle === "markbegin") {
+            var line = session.getLine(row);
+            if (this.importRegex.test(line)) {
+                if (row == 0 || !this.importRegex.test(session.getLine(row - 1)))
+                    return "start";
+            }
+        }
+        return this.getCStyleFoldWidget(session, foldStyle, row);
+    };
+    this.getCstyleFoldWidgetRange = this.getFoldWidgetRange;
+    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
+        var line = session.getLine(row);
+        var match = line.match(this.importRegex);
+        if (!match || foldStyle !== "markbegin")
+            return this.getCstyleFoldWidgetRange(session, foldStyle, row, forceMultiline);
+        var startColumn = match[0].length;
+        var maxRow = session.getLength();
+        var startRow = row;
+        var endRow = row;
+        while (++row < maxRow) {
+            var line = session.getLine(row);
+            if (line.match(/^\s*$/))
+                continue;
+            if (!line.match(this.importRegex))
+                break;
+            endRow = row;
+        }
+        if (endRow > startRow) {
+            var endColumn = session.getLine(endRow).length;
+            return new Range(startRow, startColumn, endRow, endColumn);
+        }
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules","ace/mode/folding/java"], function(require, exports, module){"use strict";
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
+var JavaFoldMode = require("./folding/java").FoldMode;
+var Mode = function () {
+    JavaScriptMode.call(this);
+    this.HighlightRules = JavaHighlightRules;
+    this.foldingRules = new JavaFoldMode();
+    this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, JavaScriptMode);
+(function () {
+    this.createWorker = function (session) {
+        return null;
+    };
+    this.$id = "ace/mode/java";
+    this.snippetFileId = "ace/snippets/java";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+
+});                (function() {
+                    ace.require(["ace/mode/java"], function(m) {
+                        if (typeof module == "object" && typeof exports == "object" && module) {
+                            module.exports = m;
+                        }
+                    });
+                })();
+            

+ 549 - 78
web/5faaee78f309325231ec88cae9860a3c.js → web/5ef2bfe2de79bf388f3ea6d19029d51e.js

@@ -1,52 +1,134 @@
-ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-var DocCommentHighlightRules = function () {
+var JsDocCommentHighlightRules = function () {
     this.$rules = {
-        "start": [{
+        "start": [
+            {
+                token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
+                regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
+                        regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
+                        next: "pop"
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "lparen.doc"],
+                regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
+                    + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
+                push: [
+                    {
+                        token: "lparen.doc",
+                        regex: "{",
+                        push: [
+                            {
+                                include: "doc-syntax"
+                            }, {
+                                token: "rparen.doc",
+                                regex: "}|(?=$)",
+                                next: "pop"
+                            }
+                        ]
+                    }, {
+                        token: "rparen.doc",
+                        regex: "}|(?=$)",
+                        next: "pop"
+                    }, {
+                        include: "doc-syntax"
+                    }, {
+                        defaultToken: "text.doc"
+                    }
+                ]
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
+                    + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
+                    + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
+                    + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
+            }, {
+                token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
+                regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@access\\s+(?:private|public|protected)"
+            }, {
+                token: "comment.doc.tag",
+                regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
+            }, {
                 token: "comment.doc.tag",
-                regex: "@[\\w\\d_]+" // TODO: fix email addresses
+                regex: "@\\w+(?=\\s|$)"
             },
-            DocCommentHighlightRules.getTagRule(),
+            JsDocCommentHighlightRules.getTagRule(),
             {
-                defaultToken: "comment.doc",
+                defaultToken: "comment.doc.body",
                 caseInsensitive: true
+            }
+        ],
+        "doc-syntax": [{
+                token: "operator.doc",
+                regex: /[|:]/
+            }, {
+                token: "paren.doc",
+                regex: /[\[\]]/
             }]
     };
+    this.normalizeRules();
 };
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-DocCommentHighlightRules.getTagRule = function (start) {
+oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
+JsDocCommentHighlightRules.getTagRule = function (start) {
     return {
         token: "comment.doc.tag.storage.type",
         regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
     };
 };
-DocCommentHighlightRules.getStartRule = function (start) {
+JsDocCommentHighlightRules.getStartRule = function (start) {
     return {
-        token: "comment.doc",
-        regex: "\\/\\*(?=\\*)",
+        token: "comment.doc", // doc comment
+        regex: /\/\*\*(?!\/)/,
         next: start
     };
 };
-DocCommentHighlightRules.getEndRule = function (start) {
+JsDocCommentHighlightRules.getEndRule = function (start) {
     return {
-        token: "comment.doc",
+        token: "comment.doc", // closing comment
         regex: "\\*\\/",
         next: start
     };
 };
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
+exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
 
 });
 
-ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
+ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
 var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
 var JavaScriptHighlightRules = function (options) {
-    var keywordMapper = this.createKeywordMapper({
-        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+    var keywords = {
+        "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
             "Namespace|QName|XML|XMLList|" + // E4X
             "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
             "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
@@ -55,17 +137,18 @@ var JavaScriptHighlightRules = function (options) {
             "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
             "isNaN|parseFloat|parseInt|" +
             "JSON|Math|" + // Other
-            "this|arguments|prototype|window|document",
+            "this|arguments|prototype|window|document", // Pseudo
         "keyword": "const|yield|import|get|set|async|await|" +
-            "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+            "break|case|catch|continue|default|delete|do|else|finally|for|" +
             "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
             "__parent__|__count__|escape|unescape|with|__proto__|" +
-            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
         "storage.type": "const|let|var|function",
         "constant.language": "null|Infinity|NaN|undefined",
         "support.function": "alert",
         "constant.language.boolean": "true|false"
-    }, "identifier");
+    };
+    var keywordMapper = this.createKeywordMapper(keywords, "identifier");
     var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
     var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
         "u[0-9a-fA-F]{4}|" + // unicode
@@ -74,10 +157,16 @@ var JavaScriptHighlightRules = function (options) {
         "3[0-7][0-7]?|" + // oct
         "[4-7][0-7]?|" + //oct
         ".)";
+    var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
+    var functionCallStartRule = {
+        token: ["identifier", "text", "paren.lparen"],
+        regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
+    };
     this.$rules = {
         "no_regex": [
             DocCommentHighlightRules.getStartRule("doc-start"),
             comments("no_regex"),
+            functionCallStartRule,
             {
                 token: "string",
                 regex: "'(?=.)",
@@ -87,58 +176,36 @@ var JavaScriptHighlightRules = function (options) {
                 regex: '"(?=.)',
                 next: "qqstring"
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // hexadecimal, octal and binary
                 regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
             }, {
-                token: "constant.numeric",
+                token: "constant.numeric", // decimal integers and floats
                 regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
             }, {
                 token: [
-                    "storage.type", "punctuation.operator", "support.function",
-                    "punctuation.operator", "entity.name.function", "text", "keyword.operator"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text", "storage.type", "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
                     "entity.name.function", "text", "keyword.operator", "text", "storage.type",
-                    "text", "paren.lparen"
-                ],
-                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
                     "entity.name.function", "text", "punctuation.operator",
-                    "text", "storage.type", "text", "paren.lparen"
+                    "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: [
-                    "text", "text", "storage.type", "text", "paren.lparen"
+                    "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
                 ],
-                regex: "(:)(\\s*)(function)(\\s*)(\\()",
+                regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "keyword",
@@ -148,11 +215,11 @@ var JavaScriptHighlightRules = function (options) {
                 regex: "(?:" + kwBeforeRe + ")\\b",
                 next: "start"
             }, {
-                token: ["support.constant"],
+                token: "support.constant",
                 regex: /that\b/
             }, {
                 token: ["storage.type", "punctuation.operator", "support.function.firebug"],
-                regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+                regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
             }, {
                 token: keywordMapper,
                 regex: identifierRe
@@ -188,19 +255,29 @@ var JavaScriptHighlightRules = function (options) {
                 token: "text",
                 regex: "\\s+"
             }, {
+                token: "keyword.operator",
+                regex: /=/
+            }, {
+                token: [
+                    "storage.type", "text", "storage.type", "text", "paren.lparen"
+                ],
+                regex: anonymousFunctionRe + "(\\s*)(\\()",
+                next: "function_arguments"
+            }, {
                 token: [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+                    "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
                 ],
-                regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
+                regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
                 next: "function_arguments"
             }, {
                 token: "punctuation.operator",
                 regex: /[.](?![.])/
             }, {
                 token: "support.function",
-                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+                regex: "prototype"
+            }, {
+                token: "support.function",
+                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
             }, {
                 token: "support.function.dom",
                 regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
@@ -281,13 +358,67 @@ var JavaScriptHighlightRules = function (options) {
                 defaultToken: "string.regexp.charachterclass"
             }
         ],
+        "default_parameter": [
+            {
+                token: "string",
+                regex: "'(?=.)",
+                push: [
+                    {
+                        token: "string",
+                        regex: "'|$",
+                        next: "pop"
+                    }, {
+                        include: "qstring"
+                    }
+                ]
+            }, {
+                token: "string",
+                regex: '"(?=.)',
+                push: [
+                    {
+                        token: "string",
+                        regex: '"|$',
+                        next: "pop"
+                    }, {
+                        include: "qqstring"
+                    }
+                ]
+            }, {
+                token: "constant.language",
+                regex: "null|Infinity|NaN|undefined"
+            }, {
+                token: "constant.numeric", // hexadecimal, octal and binary
+                regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+            }, {
+                token: "constant.numeric", // decimal integers and floats
+                regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
+            }, {
+                token: "punctuation.operator",
+                regex: ",",
+                next: "function_arguments"
+            }, {
+                token: "text",
+                regex: "\\s+"
+            }, {
+                token: "punctuation.operator",
+                regex: "$"
+            }, {
+                token: "empty",
+                regex: "",
+                next: "no_regex"
+            }
+        ],
         "function_arguments": [
+            comments("function_arguments"),
             {
                 token: "variable.parameter",
                 regex: identifierRe
             }, {
                 token: "punctuation.operator",
-                regex: "[, ]+"
+                regex: ","
+            }, {
+                token: "text",
+                regex: "\\s+"
             }, {
                 token: "punctuation.operator",
                 regex: "$"
@@ -363,6 +494,32 @@ var JavaScriptHighlightRules = function (options) {
                 }, {
                     defaultToken: "string.quasi"
                 }]
+        }, {
+            token: ["variable.parameter", "text"],
+            regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
+        }, {
+            token: "paren.lparen",
+            regex: "(\\()(?=[^\\(]+\\s*=>)",
+            next: "function_arguments"
+        }, {
+            token: "variable.language",
+            regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
+        });
+        this.$rules["function_arguments"].unshift({
+            token: "keyword.operator",
+            regex: "=",
+            next: "default_parameter"
+        }, {
+            token: "keyword.operator",
+            regex: "\\.{3}"
+        });
+        this.$rules["property"].unshift({
+            token: "support.function",
+            regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
+                + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
+        }, {
+            token: "constant.language",
+            regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
         });
         if (!options || options.jsx != false)
             JSX.call(this);
@@ -400,7 +557,7 @@ function JSX() {
                     value: val.substr(offset)
                 }];
         },
-        regex: "</?" + tagRegex + "",
+        regex: "</?(?:" + tagRegex + "|(?=>))",
         next: "jsxAttributes",
         nextState: "jsx"
     };
@@ -413,8 +570,7 @@ function JSX() {
     this.$rules.jsx = [
         jsxJsRule,
         jsxTag,
-        { include: "reference" },
-        { defaultToken: "string" }
+        { include: "reference" }, { defaultToken: "string.xml" }
     ];
     this.$rules.jsxAttributes = [{
             token: "meta.tag.punctuation.tag-close.xml",
@@ -474,7 +630,7 @@ function JSX() {
 function comments(next) {
     return [
         {
-            token: "comment",
+            token: "comment", // multi line comment
             regex: /\/\*/,
             next: [
                 DocCommentHighlightRules.getTagRule(),
@@ -525,6 +681,293 @@ exports.MatchingBraceOutdent = MatchingBraceOutdent;
 
 });
 
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+function is(token, type) {
+    return token && token.type.lastIndexOf(type + ".xml") > -1;
+}
+var XmlBehaviour = function () {
+    this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+        if (text == '"' || text == "'") {
+            var quote = text;
+            var selected = session.doc.getTextRange(editor.getSelectionRange());
+            if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+                return {
+                    text: quote + selected + quote,
+                    selection: false
+                };
+            }
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+                return {
+                    text: "",
+                    selection: [1, 1]
+                };
+            }
+            if (!token)
+                token = iterator.stepBackward();
+            if (!token)
+                return;
+            while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+                token = iterator.stepBackward();
+            }
+            var rightSpace = !rightChar || rightChar.match(/\s/);
+            if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+                return {
+                    text: quote + quote,
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+    this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == selected) {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+    this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+                return;
+            if (is(token, "reference.attribute-value"))
+                return;
+            if (is(token, "attribute-value")) {
+                var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
+                if (position.column < tokenEndColumn)
+                    return;
+                if (position.column == tokenEndColumn) {
+                    var nextToken = iterator.stepForward();
+                    if (nextToken && is(nextToken, "attribute-value"))
+                        return;
+                    iterator.stepBackward();
+                }
+            }
+            if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
+                return;
+            while (!is(token, "tag-name")) {
+                token = iterator.stepBackward();
+                if (token.value == "<") {
+                    token = iterator.stepForward();
+                    break;
+                }
+            }
+            var tokenRow = iterator.getCurrentTokenRow();
+            var tokenColumn = iterator.getCurrentTokenColumn();
+            if (is(iterator.stepBackward(), "end-tag-open"))
+                return;
+            var element = token.value;
+            if (tokenRow == position.row)
+                element = element.substring(0, position.column - tokenColumn);
+            if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
+                return;
+            return {
+                text: ">" + "</" + element + ">",
+                selection: [1, 1]
+            };
+        }
+    });
+    this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+        if (text == "\n") {
+            var cursor = editor.getCursorPosition();
+            var line = session.getLine(cursor.row);
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
+                if (token.value == "/>")
+                    return;
+                while (token && token.type.indexOf("tag-name") === -1) {
+                    token = iterator.stepBackward();
+                }
+                if (!token) {
+                    return;
+                }
+                var tag = token.value;
+                var row = iterator.getCurrentTokenRow();
+                token = iterator.stepBackward();
+                if (!token || token.type.indexOf("end-tag") !== -1) {
+                    return;
+                }
+                if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
+                    var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
+                    var line = session.getLine(row);
+                    var nextIndent = this.$getIndent(line);
+                    var indent = nextIndent + session.getTabString();
+                    if (nextToken && nextToken.value === "</") {
+                        return {
+                            text: "\n" + indent + "\n" + nextIndent,
+                            selection: [1, indent.length, 1, indent.length]
+                        };
+                    }
+                    else {
+                        return {
+                            text: "\n" + indent
+                        };
+                    }
+                }
+            }
+        }
+    });
+};
+oop.inherits(XmlBehaviour, Behaviour);
+exports.XmlBehaviour = XmlBehaviour;
+
+});
+
+ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var JavaScriptBehaviour = function () {
+    var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
+    this.addBehaviours(xmlBehaviours);
+    this.inherit(CstyleBehaviour);
+    this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
+        if (text == '>') {
+            var position = editor.getSelectionRange().start;
+            var iterator = new TokenIterator(session, position.row, position.column);
+            var token = iterator.getCurrentToken() || iterator.stepBackward();
+            if (!token)
+                return;
+            if (token.value == '<') {
+                return {
+                    text: "></>",
+                    selection: [1, 1]
+                };
+            }
+        }
+    });
+};
+oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
+exports.JavaScriptBehaviour = JavaScriptBehaviour;
+
+});
+
+ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
+    BaseFoldMode.call(this);
+    this.voidElements = voidElements || {};
+    this.optionalEndTags = oop.mixin({}, this.voidElements);
+    if (optionalEndTags)
+        oop.mixin(this.optionalEndTags, optionalEndTags);
+};
+oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function () {
+    this.tagName = "";
+    this.closing = false;
+    this.selfClosing = false;
+    this.start = { row: 0, column: 0 };
+    this.end = { row: 0, column: 0 };
+};
+function is(token, type) {
+    return token && token.type && token.type.lastIndexOf(type + ".xml") > -1;
+}
+(function () {
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var tag = this._getFirstTagInLine(session, row);
+        if (!tag)
+            return this.getCommentFoldWidget(session, row);
+        if (tag.closing || (!tag.tagName && tag.selfClosing))
+            return foldStyle === "markbeginend" ? "end" : "";
+        if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+            return "";
+        if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+            return "";
+        return "start";
+    };
+    this.getCommentFoldWidget = function (session, row) {
+        if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+            return "start";
+        return "";
+    };
+    this._getFirstTagInLine = function (session, row) {
+        var tokens = session.getTokens(row);
+        var tag = new Tag();
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            if (is(token, "tag-open")) {
+                tag.end.column = tag.start.column + token.value.length;
+                tag.closing = is(token, "end-tag-open");
+                token = tokens[++i];
+                if (!token)
+                    return null;
+                tag.tagName = token.value;
+                if (token.value === "") { //skip empty tag name token for fragment
+                    token = tokens[++i];
+                    if (!token)
+                        return null;
+                    tag.tagName = token.value;
+                }
+                tag.end.column += token.value.length;
+                for (i++; i < tokens.length; i++) {
+                    token = tokens[i];
+                    tag.end.column += token.value.length;
+                    if (is(token, "tag-close")) {
+                        tag.selfClosing = token.value == '/>';
+                        break;
+                    }
+                }
+                return tag;
+            }
+            else if (is(token, "tag-close")) {
+                tag.selfClosing = token.value == '/>';
+                return tag;
+            }
+            tag.start.column += token.value.length;
+        }
+        return null;
+    };
+    this._findEndTagInLine = function (session, row, tagName, startColumn) {
+        var tokens = session.getTokens(row);
+        var column = 0;
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            column += token.value.length;
+            if (column < startColumn - 1)
+                continue;
+            if (is(token, "end-tag-open")) {
+                token = tokens[i + 1];
+                if (is(token, "tag-name") && token.value === "") {
+                    token = tokens[i + 2];
+                }
+                if (token && token.value == tagName)
+                    return true;
+            }
+        }
+        return false;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row) {
+        var firstTag = this._getFirstTagInLine(session, row);
+        if (!firstTag) {
+            return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
+        }
+        var tags = session.getMatchingTags({ row: row, column: 0 });
+        if (tags) {
+            return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
+        }
+    };
+}).call(FoldMode.prototype);
+
+});
+
 ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
 var oop = require("../../lib/oop");
 var Range = require("../../range").Range;
@@ -641,25 +1084,60 @@ oop.inherits(FoldMode, BaseFoldMode);
 
 });
 
-ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
+var oop = require("../../lib/oop");
+var XmlFoldMode = require("./xml").FoldMode;
+var CFoldMode = require("./cstyle").FoldMode;
+var FoldMode = exports.FoldMode = function (commentRegex) {
+    if (commentRegex) {
+        this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
+        this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
+    }
+    this.xmlFoldMode = new XmlFoldMode();
+};
+oop.inherits(FoldMode, CFoldMode);
+(function () {
+    this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
+    this.getFoldWidgetBase = this.getFoldWidget;
+    this.getFoldWidget = function (session, foldStyle, row) {
+        var fw = this.getFoldWidgetBase(session, foldStyle, row);
+        if (!fw) {
+            return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
+        }
+        return fw;
+    };
+    this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
+        var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
+        if (range)
+            return range;
+        return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
+    };
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
 var oop = require("../lib/oop");
 var TextMode = require("./text").Mode;
 var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
 var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
 var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
+var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
 var Mode = function () {
     this.HighlightRules = JavaScriptHighlightRules;
     this.$outdent = new MatchingBraceOutdent();
-    this.$behaviour = new CstyleBehaviour();
-    this.foldingRules = new CStyleFoldMode();
+    this.$behaviour = new JavaScriptBehaviour();
+    this.foldingRules = new JavaScriptFoldMode();
 };
 oop.inherits(Mode, TextMode);
 (function () {
     this.lineCommentStart = "//";
     this.blockComment = { start: "/*", end: "*/" };
     this.$quotes = { '"': '"', "'": "'", "`": "`" };
+    this.$pairQuotesAfter = {
+        "`": /\w/
+    };
     this.getNextLineIndent = function (state, line, tab) {
         var indent = this.$getIndent(line);
         var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
@@ -678,13 +1156,6 @@ oop.inherits(Mode, TextMode);
             if (endState == "start" || endState == "no_regex") {
                 return "";
             }
-            var match = line.match(/^\s*(\/?)\*/);
-            if (match) {
-                if (match[1]) {
-                    indent += " ";
-                }
-                indent += "* ";
-            }
         }
         return indent;
     };

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio