corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2 "use strict";
3  
4 var oop = require("../lib/oop");
5 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6  
7 var DocCommentHighlightRules = function() {
8 this.$rules = {
9 "start" : [ {
10 token : "comment.doc.tag",
11 regex : "@[\\w\\d_]+" // TODO: fix email addresses
12 },
13 DocCommentHighlightRules.getTagRule(),
14 {
15 defaultToken : "comment.doc",
16 caseInsensitive: true
17 }]
18 };
19 };
20  
21 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
22  
23 DocCommentHighlightRules.getTagRule = function(start) {
24 return {
25 token : "comment.doc.tag.storage.type",
26 regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
27 };
28 }
29  
30 DocCommentHighlightRules.getStartRule = function(start) {
31 return {
32 token : "comment.doc", // doc comment
33 regex : "\\/\\*(?=\\*)",
34 next : start
35 };
36 };
37  
38 DocCommentHighlightRules.getEndRule = function (start) {
39 return {
40 token : "comment.doc", // closing comment
41 regex : "\\*\\/",
42 next : start
43 };
44 };
45  
46  
47 exports.DocCommentHighlightRules = DocCommentHighlightRules;
48  
49 });
50  
51 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) {
52 "use strict";
53  
54 var oop = require("../lib/oop");
55 var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
56 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
57 var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
58  
59 var JavaScriptHighlightRules = function(options) {
60 var keywordMapper = this.createKeywordMapper({
61 "variable.language":
62 "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
63 "Namespace|QName|XML|XMLList|" + // E4X
64 "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
65 "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
66 "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
67 "SyntaxError|TypeError|URIError|" +
68 "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
69 "isNaN|parseFloat|parseInt|" +
70 "JSON|Math|" + // Other
71 "this|arguments|prototype|window|document" , // Pseudo
72 "keyword":
73 "const|yield|import|get|set|async|await|" +
74 "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
75 "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
76 "__parent__|__count__|escape|unescape|with|__proto__|" +
77 "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
78 "storage.type":
79 "const|let|var|function",
80 "constant.language":
81 "null|Infinity|NaN|undefined",
82 "support.function":
83 "alert",
84 "constant.language.boolean": "true|false"
85 }, "identifier");
86 var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
87  
88 var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
89 "u[0-9a-fA-F]{4}|" + // unicode
90 "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
91 "[0-2][0-7]{0,2}|" + // oct
92 "3[0-7][0-7]?|" + // oct
93 "[4-7][0-7]?|" + //oct
94 ".)";
95  
96 this.$rules = {
97 "no_regex" : [
98 DocCommentHighlightRules.getStartRule("doc-start"),
99 comments("no_regex"),
100 {
101 token : "string",
102 regex : "'(?=.)",
103 next : "qstring"
104 }, {
105 token : "string",
106 regex : '"(?=.)',
107 next : "qqstring"
108 }, {
109 token : "constant.numeric", // hex
110 regex : /0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/
111 }, {
112 token : "constant.numeric", // float
113 regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
114 }, {
115 token : [
116 "storage.type", "punctuation.operator", "support.function",
117 "punctuation.operator", "entity.name.function", "text","keyword.operator"
118 ],
119 regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
120 next: "function_arguments"
121 }, {
122 token : [
123 "storage.type", "punctuation.operator", "entity.name.function", "text",
124 "keyword.operator", "text", "storage.type", "text", "paren.lparen"
125 ],
126 regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
127 next: "function_arguments"
128 }, {
129 token : [
130 "entity.name.function", "text", "keyword.operator", "text", "storage.type",
131 "text", "paren.lparen"
132 ],
133 regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
134 next: "function_arguments"
135 }, {
136 token : [
137 "storage.type", "punctuation.operator", "entity.name.function", "text",
138 "keyword.operator", "text",
139 "storage.type", "text", "entity.name.function", "text", "paren.lparen"
140 ],
141 regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
142 next: "function_arguments"
143 }, {
144 token : [
145 "storage.type", "text", "entity.name.function", "text", "paren.lparen"
146 ],
147 regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
148 next: "function_arguments"
149 }, {
150 token : [
151 "entity.name.function", "text", "punctuation.operator",
152 "text", "storage.type", "text", "paren.lparen"
153 ],
154 regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
155 next: "function_arguments"
156 }, {
157 token : [
158 "text", "text", "storage.type", "text", "paren.lparen"
159 ],
160 regex : "(:)(\\s*)(function)(\\s*)(\\()",
161 next: "function_arguments"
162 }, {
163 token : "keyword",
164 regex : "(?:" + kwBeforeRe + ")\\b",
165 next : "start"
166 }, {
167 token : ["support.constant"],
168 regex : /that\b/
169 }, {
170 token : ["storage.type", "punctuation.operator", "support.function.firebug"],
171 regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
172 }, {
173 token : keywordMapper,
174 regex : identifierRe
175 }, {
176 token : "punctuation.operator",
177 regex : /[.](?![.])/,
178 next : "property"
179 }, {
180 token : "keyword.operator",
181 regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
182 <+=?|> next : "start"
183 <+=?|> }, {
184 <+=?|> token : "punctuation.operator",
185 <+=?|> regex : /[?:,;.]/,
186 <+=?|> next : "start"
187 <+=?|> }, {
188 <+=?|> token : "paren.lparen",
189 <+=?|> regex : /[\[({]/,
190 <+=?|> next : "start"
191 <+=?|> }, {
192 <+=?|> token : "paren.rparen",
193 <+=?|> regex : /[\])}]/
194 <+=?|> }, {
195 <+=?|> token: "comment",
196 <+=?|> regex: /^#!.*$/
197 <+=?|> }
198 <+=?|> ],
199 <+=?|> property: [{
200 <+=?|> token : "text",
201 <+=?|> regex : "\\s+"
202 <+=?|> }, {
203 <+=?|> token : [
204 <+=?|> "storage.type", "punctuation.operator", "entity.name.function", "text",
205 <+=?|> "keyword.operator", "text",
206 <+=?|> "storage.type", "text", "entity.name.function", "text", "paren.lparen"
207 <+=?|> ],
208 <+=?|> regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
209 <+=?|> next: "function_arguments"
210 <+=?|> }, {
211 <+=?|> token : "punctuation.operator",
212 <+=?|> regex : /[.](?![.])/
213 <+=?|> }, {
214 <+=?|> token : "support.function",
215 <+=?|> 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(?=\()/
216 <+=?|> }, {
217 <+=?|> token : "support.function.dom",
218 <+=?|> 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(?=\()/
219 <+=?|> }, {
220 <+=?|> token : "support.constant",
221 <+=?|> 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/
222 <+=?|> }, {
223 <+=?|> token : "identifier",
224 <+=?|> regex : identifierRe
225 <+=?|> }, {
226 <+=?|> regex: "",
227 <+=?|> token: "empty",
228 <+=?|> next: "no_regex"
229 <+=?|> }
230 <+=?|> ],
231 <+=?|> "start": [
232 <+=?|> DocCommentHighlightRules.getStartRule("doc-start"),
233 <+=?|> comments("start"),
234 <+=?|> {
235 <+=?|> token: "string.regexp",
236 <+=?|> regex: "\\/",
237 <+=?|> next: "regex"
238 <+=?|> }, {
239 <+=?|> token : "text",
240 <+=?|> regex : "\\s+|^$",
241 <+=?|> next : "start"
242 <+=?|> }, {
243 <+=?|> token: "empty",
244 <+=?|> regex: "",
245 <+=?|> next: "no_regex"
246 <+=?|> }
247 <+=?|> ],
248 <+=?|> "regex": [
249 <+=?|> {
250 <+=?|> token: "regexp.keyword.operator",
251 <+=?|> regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
252 <+=?|> }, {
253 <+=?|> token: "string.regexp",
254 <+=?|> regex: "/[sxngimy]*",
255 <+=?|> next: "no_regex"
256 <+=?|> }, {
257 <+=?|> token : "invalid",
258 <+=?|> regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
259 <+=?|> }, {
260 <+=?|> token : "constant.language.escape",
261 <+=?|> regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
262 <+=?|> }, {
263 <+=?|> token : "constant.language.delimiter",
264 <+=?|> regex: /\|/
265 <+=?|> }, {
266 <+=?|> token: "constant.language.escape",
267 <+=?|> regex: /\[\^?/,
268 <+=?|> next: "regex_character_class"
269 <+=?|> }, {
270 <+=?|> token: "empty",
271 <+=?|> regex: "$",
272 <+=?|> next: "no_regex"
273 <+=?|> }, {
274 <+=?|> defaultToken: "string.regexp"
275 <+=?|> }
276 <+=?|> ],
277 <+=?|> "regex_character_class": [
278 <+=?|> {
279 <+=?|> token: "regexp.charclass.keyword.operator",
280 <+=?|> regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
281 <+=?|> }, {
282 <+=?|> token: "constant.language.escape",
283 <+=?|> regex: "]",
284 <+=?|> next: "regex"
285 <+=?|> }, {
286 <+=?|> token: "constant.language.escape",
287 <+=?|> regex: "-"
288 <+=?|> }, {
289 <+=?|> token: "empty",
290 <+=?|> regex: "$",
291 <+=?|> next: "no_regex"
292 <+=?|> }, {
293 <+=?|> defaultToken: "string.regexp.charachterclass"
294 <+=?|> }
295 <+=?|> ],
296 <+=?|> "function_arguments": [
297 <+=?|> {
298 <+=?|> token: "variable.parameter",
299 <+=?|> regex: identifierRe
300 <+=?|> }, {
301 <+=?|> token: "punctuation.operator",
302 <+=?|> regex: "[, ]+"
303 <+=?|> }, {
304 <+=?|> token: "punctuation.operator",
305 <+=?|> regex: "$"
306 <+=?|> }, {
307 <+=?|> token: "empty",
308 <+=?|> regex: "",
309 <+=?|> next: "no_regex"
310 <+=?|> }
311 <+=?|> ],
312 <+=?|> "qqstring" : [
313 <+=?|> {
314 <+=?|> token : "constant.language.escape",
315 <+=?|> regex : escapedRe
316 <+=?|> }, {
317 <+=?|> token : "string",
318 <+=?|> regex : "\\\\$",
319 <+=?|> next : "qqstring"
320 <+=?|> }, {
321 <+=?|> token : "string",
322 <+=?|> regex : '"|$',
323 <+=?|> next : "no_regex"
324 <+=?|> }, {
325 <+=?|> defaultToken: "string"
326 <+=?|> }
327 <+=?|> ],
328 <+=?|> "qstring" : [
329 <+=?|> {
330 <+=?|> token : "constant.language.escape",
331 <+=?|> regex : escapedRe
332 <+=?|> }, {
333 <+=?|> token : "string",
334 <+=?|> regex : "\\\\$",
335 <+=?|> next : "qstring"
336 <+=?|> }, {
337 <+=?|> token : "string",
338 <+=?|> regex : "'|$",
339 <+=?|> next : "no_regex"
340 <+=?|> }, {
341 <+=?|> defaultToken: "string"
342 <+=?|> }
343 <+=?|> ]
344 <+=?|> };
345  
346  
347 <+=?|> if (!options || !options.noES6) {
348 <+=?|> this.$rules.no_regex.unshift({
349 <+=?|> regex: "[{}]", onMatch: function(val, state, stack) {
350 <+=?|> this.next = val == "{" ? this.nextState : "";
351 <+=?|> if (val == "{" && stack.length) {
352 <+=?|> stack.unshift("start", state);
353 <+=?|> }
354 <+=?|> else if (val == "}" && stack.length) {
355 <+=?|> stack.shift();
356 <+=?|> this.next = stack.shift();
357 <+=?|> if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
358 <+=?|> return "paren.quasi.end";
359 <+=?|> }
360 <+=?|> return val == "{" ? "paren.lparen" : "paren.rparen";
361 <+=?|> },
362 <+=?|> nextState: "start"
363 <+=?|> }, {
364 <+=?|> token : "string.quasi.start",
365 <+=?|> regex : /`/,
366 <+=?|> push : [{
367 <+=?|> token : "constant.language.escape",
368 <+=?|> regex : escapedRe
369 <+=?|> }, {
370 <+=?|> token : "paren.quasi.start",
371 <+=?|> regex : /\${/,
372 <+=?|> push : "start"
373 <+=?|> }, {
374 <+=?|> token : "string.quasi.end",
375 <+=?|> regex : /`/,
376 <+=?|> next : "pop"
377 <+=?|> }, {
378 <+=?|> defaultToken: "string.quasi"
379 <+=?|> }]
380 <+=?|> });
381  
382 <+=?|> if (!options || options.jsx != false)
383 <+=?|> JSX.call(this);
384 <+=?|> }
385  
386 <+=?|> this.embedRules(DocCommentHighlightRules, "doc-",
387 <+=?|> [ DocCommentHighlightRules.getEndRule("no_regex") ]);
388  
389 <+=?|> this.normalizeRules();
390 <+=?|>};
391  
392 <+=?|>oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
393  
394 <+=?|>function JSX() {
395 <+=?|> var tagRegex = identifierRe.replace("\\d", "\\d\\-");
396 <+=?|> var jsxTag = {
397 <+=?|> onMatch : function(val, state, stack) {
398 <+=?|> var offset = val.charAt(1) == "/" ? 2 : 1;
399 <+=?|> if (offset == 1) {
400 <+=?|> if (state != this.nextState)
401 <+=?|> stack.unshift(this.next, this.nextState, 0);
402 <+=?|> else
403 <+=?|> stack.unshift(this.next);
404 <+=?|> stack[2]++;
405 <+=?|> } else if (offset == 2) {
406 <+=?|> if (state == this.nextState) {
407 <+=?|> stack[1]--;
408 <+=?|> if (!stack[1] || stack[1] < 0) {
409 <+=?|> stack.shift();
410 <+=?|> stack.shift();
411 <+=?|> }
412 <+=?|> }
413 <+=?|> }
414 <+=?|> return [{
415 <+=?|> type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
416 <+=?|> value: val.slice(0, offset)
417 <+=?|> }, {
418 <+=?|> type: "meta.tag.tag-name.xml",
419 <+=?|> value: val.substr(offset)
420 <+=?|> }];
421 <+=?|> },
422 <+=?|> regex : "</?" + tagRegex + "",
423 <+=?|> next: "jsxAttributes",
424 <+=?|> nextState: "jsx"
425 <+=?|> };
426 <+=?|> this.$rules.start.unshift(jsxTag);
427 <+=?|> var jsxJsRule = {
428 <+=?|> regex: "{",
429 <+=?|> token: "paren.quasi.start",
430 <+=?|> push: "start"
431 <+=?|> };
432 <+=?|> this.$rules.jsx = [
433 <+=?|> jsxJsRule,
434 <+=?|> jsxTag,
435 <+=?|> {include : "reference"},
436 <+=?|> {defaultToken: "string"}
437 <+=?|> ];
438 <+=?|> this.$rules.jsxAttributes = [{
439 <+=?|> token : "meta.tag.punctuation.tag-close.xml",
440 <+=?|> regex : "/?>",
441 <+=?|> onMatch : function(value, currentState, stack) {
442 <+=?|> if (currentState == stack[0])
443 <+=?|> stack.shift();
444 <+=?|> if (value.length == 2) {
445 <+=?|> if (stack[0] == this.nextState)
446 <+=?|> stack[1]--;
447 <+=?|> if (!stack[1] || stack[1] < 0) {
448 <+=?|> stack.splice(0, 2);
449 <+=?|> }
450 <+=?|> }
451 <+=?|> this.next = stack[0] || "start";
452 <+=?|> return [{type: this.token, value: value}];
453 <+=?|> },
454 <+=?|> nextState: "jsx"
455 <+=?|> },
456 <+=?|> jsxJsRule,
457 <+=?|> comments("jsxAttributes"),
458 <+=?|> {
459 <+=?|> token : "entity.other.attribute-name.xml",
460 <+=?|> regex : tagRegex
461 <+=?|> }, {
462 <+=?|> token : "keyword.operator.attribute-equals.xml",
463 <+=?|> regex : "="
464 <+=?|> }, {
465 <+=?|> token : "text.tag-whitespace.xml",
466 <+=?|> regex : "\\s+"
467 <+=?|> }, {
468 <+=?|> token : "string.attribute-value.xml",
469 <+=?|> regex : "'",
470 <+=?|> stateName : "jsx_attr_q",
471 <+=?|> push : [
472 <+=?|> {token : "string.attribute-value.xml", regex: "'", next: "pop"},
473 <+=?|> {include : "reference"},
474 <+=?|> {defaultToken : "string.attribute-value.xml"}
475 <+=?|> ]
476 <+=?|> }, {
477 <+=?|> token : "string.attribute-value.xml",
478 <+=?|> regex : '"',
479 <+=?|> stateName : "jsx_attr_qq",
480 <+=?|> push : [
481 <+=?|> {token : "string.attribute-value.xml", regex: '"', next: "pop"},
482 <+=?|> {include : "reference"},
483 <+=?|> {defaultToken : "string.attribute-value.xml"}
484 <+=?|> ]
485 <+=?|> },
486 <+=?|> jsxTag
487 <+=?|> ];
488 <+=?|> this.$rules.reference = [{
489 <+=?|> token : "constant.language.escape.reference.xml",
490 <+=?|> regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
491 <+=?|> }];
492 <+=?|>}
493  
494 <+=?|>function comments(next) {
495 <+=?|> return [
496 <+=?|> {
497 <+=?|> token : "comment", // multi line comment
498 <+=?|> regex : /\/\*/,
499 <+=?|> next: [
500 <+=?|> DocCommentHighlightRules.getTagRule(),
501 <+=?|> {token : "comment", regex : "\\*\\/", next : next || "pop"},
502 <+=?|> {defaultToken : "comment", caseInsensitive: true}
503 <+=?|> ]
504 <+=?|> }, {
505 <+=?|> token : "comment",
506 <+=?|> regex : "\\/\\/",
507 <+=?|> next: [
508 <+=?|> DocCommentHighlightRules.getTagRule(),
509 <+=?|> {token : "comment", regex : "$|^", next : next || "pop"},
510 <+=?|> {defaultToken : "comment", caseInsensitive: true}
511 <+=?|> ]
512 <+=?|> }
513 <+=?|> ];
514 <+=?|>}
515 <+=?|>exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
516 <+=?|>});
517  
518 <+=?|>ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
519 <+=?|>"use strict";
520  
521 <+=?|>var Range = require("../range").Range;
522  
523 <+=?|>var MatchingBraceOutdent = function() {};
524  
525 <+=?|>(function() {
526  
527 <+=?|> this.checkOutdent = function(line, input) {
528 <+=?|> if (! /^\s+$/.test(line))
529 <+=?|> return false;
530  
531 <+=?|> return /^\s*\}/.test(input);
532 <+=?|> };
533  
534 <+=?|> this.autoOutdent = function(doc, row) {
535 <+=?|> var line = doc.getLine(row);
536 <+=?|> var match = line.match(/^(\s*\})/);
537  
538 <+=?|> if (!match) return 0;
539  
540 <+=?|> var column = match[1].length;
541 <+=?|> var openBracePos = doc.findMatchingBracket({row: row, column: column});
542  
543 <+=?|> if (!openBracePos || openBracePos.row == row) return 0;
544  
545 <+=?|> var indent = this.$getIndent(doc.getLine(openBracePos.row));
546 <+=?|> doc.replace(new Range(row, 0, row, column-1), indent);
547 <+=?|> };
548  
549 <+=?|> this.$getIndent = function(line) {
550 <+=?|> return line.match(/^\s*/)[0];
551 <+=?|> };
552  
553 <+=?|>}).call(MatchingBraceOutdent.prototype);
554  
555 <+=?|>exports.MatchingBraceOutdent = MatchingBraceOutdent;
556 <+=?|>});
557  
558 <+=?|>ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
559 <+=?|>"use strict";
560  
561 <+=?|>var oop = require("../../lib/oop");
562 <+=?|>var Range = require("../../range").Range;
563 <+=?|>var BaseFoldMode = require("./fold_mode").FoldMode;
564  
565 <+=?|>var FoldMode = exports.FoldMode = function(commentRegex) {
566 <+=?|> if (commentRegex) {
567 <+=?|> this.foldingStartMarker = new RegExp(
568 <+=?|> this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
569 <+=?|> );
570 <+=?|> this.foldingStopMarker = new RegExp(
571 <+=?|> this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
572 <+=?|> );
573 <+=?|> }
574 <+=?|>};
575 <+=?|>oop.inherits(FoldMode, BaseFoldMode);
576  
577 <+=?|>(function() {
578  
579 <+=?|> this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
580 <+=?|> this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
581 <+=?|> this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
582 <+=?|> this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
583 <+=?|> this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
584 <+=?|> this._getFoldWidgetBase = this.getFoldWidget;
585 <+=?|> this.getFoldWidget = function(session, foldStyle, row) {
586 <+=?|> var line = session.getLine(row);
587  
588 <+=?|> if (this.singleLineBlockCommentRe.test(line)) {
589 <+=?|> if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
590 <+=?|> return "";
591 <+=?|> }
592  
593 <+=?|> var fw = this._getFoldWidgetBase(session, foldStyle, row);
594  
595 <+=?|> if (!fw && this.startRegionRe.test(line))
596 <+=?|> return "start"; // lineCommentRegionStart
597  
598 <+=?|> return fw;
599 <+=?|> };
600  
601 <+=?|> this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
602 <+=?|> var line = session.getLine(row);
603  
604 <+=?|> if (this.startRegionRe.test(line))
605 <+=?|> return this.getCommentRegionBlock(session, line, row);
606  
607 <+=?|> var match = line.match(this.foldingStartMarker);
608 <+=?|> if (match) {
609 <+=?|> var i = match.index;
610  
611 <+=?|> if (match[1])
612 <+=?|> return this.openingBracketBlock(session, match[1], row, i);
613  
614 <+=?|> var range = session.getCommentFoldRange(row, i + match[0].length, 1);
615  
616 <+=?|> if (range && !range.isMultiLine()) {
617 <+=?|> if (forceMultiline) {
618 <+=?|> range = this.getSectionRange(session, row);
619 <+=?|> } else if (foldStyle != "all")
620 <+=?|> range = null;
621 <+=?|> }
622  
623 <+=?|> return range;
624 <+=?|> }
625  
626 <+=?|> if (foldStyle === "markbegin")
627 <+=?|> return;
628  
629 <+=?|> var match = line.match(this.foldingStopMarker);
630 <+=?|> if (match) {
631 <+=?|> var i = match.index + match[0].length;
632  
633 <+=?|> if (match[1])
634 <+=?|> return this.closingBracketBlock(session, match[1], row, i);
635  
636 <+=?|> return session.getCommentFoldRange(row, i, -1);
637 <+=?|> }
638 <+=?|> };
639  
640 <+=?|> this.getSectionRange = function(session, row) {
641 <+=?|> var line = session.getLine(row);
642 <+=?|> var startIndent = line.search(/\S/);
643 <+=?|> var startRow = row;
644 <+=?|> var startColumn = line.length;
645 <+=?|> row = row + 1;
646 <+=?|> var endRow = row;
647 <+=?|> var maxRow = session.getLength();
648 <+=?|> while (++row < maxRow) {
649 <+=?|> line = session.getLine(row);
650 <+=?|> var indent = line.search(/\S/);
651 <+=?|> if (indent === -1)
652 <+=?|> continue;
653 <+=?|> if (startIndent > indent)
654 <+=?|> break;
655 <+=?|> var subRange = this.getFoldWidgetRange(session, "all", row);
656  
657 <+=?|> if (subRange) {
658 <+=?|> if (subRange.start.row <= startRow) {
659 <+=?|> break;
660 <+=?|> } else if (subRange.isMultiLine()) {
661 <+=?|> row = subRange.end.row;
662 <+=?|> } else if (startIndent == indent) {
663 <+=?|> break;
664 <+=?|> }
665 <+=?|> }
666 <+=?|> endRow = row;
667 <+=?|> }
668  
669 <+=?|> return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
670 <+=?|> };
671 <+=?|> this.getCommentRegionBlock = function(session, line, row) {
672 <+=?|> var startColumn = line.search(/\s*$/);
673 <+=?|> var maxRow = session.getLength();
674 <+=?|> var startRow = row;
675  
676 <+=?|> var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
677 <+=?|> var depth = 1;
678 <+=?|> while (++row < maxRow) {
679 <+=?|> line = session.getLine(row);
680 <+=?|> var m = re.exec(line);
681 <+=?|> if (!m) continue;
682 <+=?|> if (m[1]) depth--;
683 <+=?|> else depth++;
684  
685 <+=?|> if (!depth) break;
686 <+=?|> }
687  
688 <+=?|> var endRow = row;
689 <+=?|> if (endRow > startRow) {
690 <+=?|> return new Range(startRow, startColumn, endRow, line.length);
691 <+=?|> }
692 <+=?|> };
693  
694 <+=?|>}).call(FoldMode.prototype);
695  
696 <+=?|>});
697  
698 <+=?|>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) {
699 <+=?|>"use strict";
700  
701 <+=?|>var oop = require("../lib/oop");
702 <+=?|>var TextMode = require("./text").Mode;
703 <+=?|>var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
704 <+=?|>var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
705 <+=?|>var WorkerClient = require("../worker/worker_client").WorkerClient;
706 <+=?|>var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
707 <+=?|>var CStyleFoldMode = require("./folding/cstyle").FoldMode;
708  
709 <+=?|>var Mode = function() {
710 <+=?|> this.HighlightRules = JavaScriptHighlightRules;
711  
712 <+=?|> this.$outdent = new MatchingBraceOutdent();
713 <+=?|> this.$behaviour = new CstyleBehaviour();
714 <+=?|> this.foldingRules = new CStyleFoldMode();
715 <+=?|>};
716 <+=?|>oop.inherits(Mode, TextMode);
717  
718 <+=?|>(function() {
719  
720 <+=?|> this.lineCommentStart = "//";
721 <+=?|> this.blockComment = {start: "/*", end: "*/"};
722  
723 <+=?|> this.getNextLineIndent = function(state, line, tab) {
724 <+=?|> var indent = this.$getIndent(line);
725  
726 <+=?|> var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
727 <+=?|> var tokens = tokenizedLine.tokens;
728 <+=?|> var endState = tokenizedLine.state;
729  
730 <+=?|> if (tokens.length && tokens[tokens.length-1].type == "comment") {
731 <+=?|> return indent;
732 <+=?|> }
733  
734 <+=?|> if (state == "start" || state == "no_regex") {
735 <+=?|> var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
736 <+=?|> if (match) {
737 <+=?|> indent += tab;
738 <+=?|> }
739 <+=?|> } else if (state == "doc-start") {
740 <+=?|> if (endState == "start" || endState == "no_regex") {
741 <+=?|> return "";
742 <+=?|> }
743 <+=?|> var match = line.match(/^\s*(\/?)\*/);
744 <+=?|> if (match) {
745 <+=?|> if (match[1]) {
746 <+=?|> indent += " ";
747 <+=?|> }
748 <+=?|> indent += "* ";
749 <+=?|> }
750 <+=?|> }
751  
752 <+=?|> return indent;
753 <+=?|> };
754  
755 <+=?|> this.checkOutdent = function(state, line, input) {
756 <+=?|> return this.$outdent.checkOutdent(line, input);
757 <+=?|> };
758  
759 <+=?|> this.autoOutdent = function(state, doc, row) {
760 <+=?|> this.$outdent.autoOutdent(doc, row);
761 <+=?|> };
762  
763 <+=?|> this.createWorker = function(session) {
764 <+=?|> var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
765 <+=?|> worker.attachToDocument(session.getDocument());
766  
767 <+=?|> worker.on("annotate", function(results) {
768 <+=?|> session.setAnnotations(results.data);
769 <+=?|> });
770  
771 <+=?|> worker.on("terminate", function() {
772 <+=?|> session.clearAnnotations();
773 <+=?|> });
774  
775 <+=?|> return worker;
776 <+=?|> };
777  
778 <+=?|> this.$id = "ace/mode/javascript";
779 <+=?|>}).call(Mode.prototype);
780  
781 <+=?|>exports.Mode = Mode;
782 <+=?|>});
783  
784 <+=?|>ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
785 <+=?|>"use strict";
786  
787 <+=?|>var oop = require("../lib/oop");
788 <+=?|>var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
789  
790 <+=?|>var XmlHighlightRules = function(normalize) {
791 <+=?|> var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
792  
793 <+=?|> this.$rules = {
794 <+=?|> start : [
795 <+=?|> {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
796 <+=?|> {
797 <+=?|> token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
798 <+=?|> regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
799 <+=?|> },
800 <+=?|> {
801 <+=?|> token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
802 <+=?|> regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
803 <+=?|> },
804 <+=?|> {token : "comment.xml", regex : "<\\!--", next : "comment"},
805 <+=?|> {
806 <+=?|> token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
807 <+=?|> regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
808 <+=?|> },
809 <+=?|> {include : "tag"},
810 <+=?|> {token : "text.end-tag-open.xml", regex: "</"},
811 <+=?|> {token : "text.tag-open.xml", regex: "<"},
812 <+=?|> {include : "reference"},
813 <+=?|> {defaultToken : "text.xml"}
814 <+=?|> ],
815  
816 <+=?|> xml_decl : [{
817 <+=?|> token : "entity.other.attribute-name.decl-attribute-name.xml",
818 <+=?|> regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
819 <+=?|> }, {
820 <+=?|> token : "keyword.operator.decl-attribute-equals.xml",
821 <+=?|> regex : "="
822 <+=?|> }, {
823 <+=?|> include: "whitespace"
824 <+=?|> }, {
825 <+=?|> include: "string"
826 <+=?|> }, {
827 <+=?|> token : "punctuation.xml-decl.xml",
828 <+=?|> regex : "\\?>",
829 <+=?|> next : "start"
830 <+=?|> }],
831  
832 <+=?|> processing_instruction : [
833 <+=?|> {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
834 <+=?|> {defaultToken : "instruction.xml"}
835 <+=?|> ],
836  
837 <+=?|> doctype : [
838 <+=?|> {include : "whitespace"},
839 <+=?|> {include : "string"},
840 <+=?|> {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
841 <+=?|> {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
842 <+=?|> {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
843 <+=?|> ],
844  
845 <+=?|> int_subset : [{
846 <+=?|> token : "text.xml",
847 <+=?|> regex : "\\s+"
848 <+=?|> }, {
849 <+=?|> token: "punctuation.int-subset.xml",
850 <+=?|> regex: "]",
851 <+=?|> next: "pop"
852 <+=?|> }, {
853 <+=?|> token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
854 <+=?|> regex : "(<\\!)(" + tagRegex + ")",
855 <+=?|> push : [{
856 <+=?|> token : "text",
857 <+=?|> regex : "\\s+"
858 <+=?|> },
859 <+=?|> {
860 <+=?|> token : "punctuation.markup-decl.xml",
861 <+=?|> regex : ">",
862 <+=?|> next : "pop"
863 <+=?|> },
864 <+=?|> {include : "string"}]
865 <+=?|> }],
866  
867 <+=?|> cdata : [
868 <+=?|> {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
869 <+=?|> {token : "text.xml", regex : "\\s+"},
870 <+=?|> {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
871 <+=?|> ],
872  
873 <+=?|> comment : [
874 <+=?|> {token : "comment.xml", regex : "-->", next : "start"},
875 <+=?|> {defaultToken : "comment.xml"}
876 <+=?|> ],
877  
878 <+=?|> reference : [{
879 <+=?|> token : "constant.language.escape.reference.xml",
880 <+=?|> regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
881 <+=?|> }],
882  
883 <+=?|> attr_reference : [{
884 <+=?|> token : "constant.language.escape.reference.attribute-value.xml",
885 <+=?|> regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
886 <+=?|> }],
887  
888 <+=?|> tag : [{
889 <+=?|> token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
890 <+=?|> regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
891 <+=?|> next: [
892 <+=?|> {include : "attributes"},
893 <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
894 <+=?|> ]
895 <+=?|> }],
896  
897 <+=?|> tag_whitespace : [
898 <+=?|> {token : "text.tag-whitespace.xml", regex : "\\s+"}
899 <+=?|> ],
900 <+=?|> whitespace : [
901 <+=?|> {token : "text.whitespace.xml", regex : "\\s+"}
902 <+=?|> ],
903 <+=?|> string: [{
904 <+=?|> token : "string.xml",
905 <+=?|> regex : "'",
906 <+=?|> push : [
907 <+=?|> {token : "string.xml", regex: "'", next: "pop"},
908 <+=?|> {defaultToken : "string.xml"}
909 <+=?|> ]
910 <+=?|> }, {
911 <+=?|> token : "string.xml",
912 <+=?|> regex : '"',
913 <+=?|> push : [
914 <+=?|> {token : "string.xml", regex: '"', next: "pop"},
915 <+=?|> {defaultToken : "string.xml"}
916 <+=?|> ]
917 <+=?|> }],
918  
919 <+=?|> attributes: [{
920 <+=?|> token : "entity.other.attribute-name.xml",
921 <+=?|> regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
922 <+=?|> }, {
923 <+=?|> token : "keyword.operator.attribute-equals.xml",
924 <+=?|> regex : "="
925 <+=?|> }, {
926 <+=?|> include: "tag_whitespace"
927 <+=?|> }, {
928 <+=?|> include: "attribute_value"
929 <+=?|> }],
930  
931 <+=?|> attribute_value: [{
932 <+=?|> token : "string.attribute-value.xml",
933 <+=?|> regex : "'",
934 <+=?|> push : [
935 <+=?|> {token : "string.attribute-value.xml", regex: "'", next: "pop"},
936 <+=?|> {include : "attr_reference"},
937 <+=?|> {defaultToken : "string.attribute-value.xml"}
938 <+=?|> ]
939 <+=?|> }, {
940 <+=?|> token : "string.attribute-value.xml",
941 <+=?|> regex : '"',
942 <+=?|> push : [
943 <+=?|> {token : "string.attribute-value.xml", regex: '"', next: "pop"},
944 <+=?|> {include : "attr_reference"},
945 <+=?|> {defaultToken : "string.attribute-value.xml"}
946 <+=?|> ]
947 <+=?|> }]
948 <+=?|> };
949  
950 <+=?|> if (this.constructor === XmlHighlightRules)
951 <+=?|> this.normalizeRules();
952 <+=?|>};
953  
954  
955 <+=?|>(function() {
956  
957 <+=?|> this.embedTagRules = function(HighlightRules, prefix, tag){
958 <+=?|> this.$rules.tag.unshift({
959 <+=?|> token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
960 <+=?|> regex : "(<)(" + tag + "(?=\\s|>|$))",
961 <+=?|> next: [
962 <+=?|> {include : "attributes"},
963 <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
964 <+=?|> ]
965 <+=?|> });
966  
967 <+=?|> this.$rules[tag + "-end"] = [
968 <+=?|> {include : "attributes"},
969 <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
970 <+=?|> onMatch : function(value, currentState, stack) {
971 <+=?|> stack.splice(0);
972 <+=?|> return this.token;
973 <+=?|> }}
974 <+=?|> ]
975  
976 <+=?|> this.embedRules(HighlightRules, prefix, [{
977 <+=?|> token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
978 <+=?|> regex : "(</)(" + tag + "(?=\\s|>|$))",
979 <+=?|> next: tag + "-end"
980 <+=?|> }, {
981 <+=?|> token: "string.cdata.xml",
982 <+=?|> regex : "<\\!\\[CDATA\\["
983 <+=?|> }, {
984 <+=?|> token: "string.cdata.xml",
985 <+=?|> regex : "\\]\\]>"
986 <+=?|> }]);
987 <+=?|> };
988  
989 <+=?|>}).call(TextHighlightRules.prototype);
990  
991 <+=?|>oop.inherits(XmlHighlightRules, TextHighlightRules);
992  
993 <+=?|>exports.XmlHighlightRules = XmlHighlightRules;
994 <+=?|>});
995  
996 <+=?|>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) {
997 <+=?|>"use strict";
998  
999 <+=?|>var oop = require("../../lib/oop");
1000 <+=?|>var Behaviour = require("../behaviour").Behaviour;
1001 <+=?|>var TokenIterator = require("../../token_iterator").TokenIterator;
1002 <+=?|>var lang = require("../../lib/lang");
1003  
1004 <+=?|>function is(token, type) {
1005 <+=?|> return token.type.lastIndexOf(type + ".xml") > -1;
1006 <+=?|>}
1007  
1008 <+=?|>var XmlBehaviour = function () {
1009  
1010 <+=?|> this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1011 <+=?|> if (text == '"' || text == "'") {
1012 <+=?|> var quote = text;
1013 <+=?|> var selected = session.doc.getTextRange(editor.getSelectionRange());
1014 <+=?|> if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
1015 <+=?|> return {
1016 <+=?|> text: quote + selected + quote,
1017 <+=?|> selection: false
1018 <+=?|> };
1019 <+=?|> }
1020  
1021 <+=?|> var cursor = editor.getCursorPosition();
1022 <+=?|> var line = session.doc.getLine(cursor.row);
1023 <+=?|> var rightChar = line.substring(cursor.column, cursor.column + 1);
1024 <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);
1025 <+=?|> var token = iterator.getCurrentToken();
1026  
1027 <+=?|> if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1028 <+=?|> return {
1029 <+=?|> text: "",
1030 <+=?|> selection: [1, 1]
1031 <+=?|> };
1032 <+=?|> }
1033  
1034 <+=?|> if (!token)
1035 <+=?|> token = iterator.stepBackward();
1036  
1037 <+=?|> if (!token)
1038 <+=?|> return;
1039  
1040 <+=?|> while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1041 <+=?|> token = iterator.stepBackward();
1042 <+=?|> }
1043 <+=?|> var rightSpace = !rightChar || rightChar.match(/\s/);
1044 <+=?|> if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
1045 <+=?|> return {
1046 <+=?|> text: quote + quote,
1047 <+=?|> selection: [1, 1]
1048 <+=?|> };
1049 <+=?|> }
1050 <+=?|> }
1051 <+=?|> });
1052  
1053 <+=?|> this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
1054 <+=?|> var selected = session.doc.getTextRange(range);
1055 <+=?|> if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1056 <+=?|> var line = session.doc.getLine(range.start.row);
1057 <+=?|> var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
1058 <+=?|> if (rightChar == selected) {
1059 <+=?|> range.end.column++;
1060 <+=?|> return range;
1061 <+=?|> }
1062 <+=?|> }
1063 <+=?|> });
1064  
1065 <+=?|> this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1066 <+=?|> if (text == '>') {
1067 <+=?|> var position = editor.getSelectionRange().start;
1068 <+=?|> var iterator = new TokenIterator(session, position.row, position.column);
1069 <+=?|> var token = iterator.getCurrentToken() || iterator.stepBackward();
1070 <+=?|> if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
1071 <+=?|> return;
1072 <+=?|> if (is(token, "reference.attribute-value"))
1073 <+=?|> return;
1074 <+=?|> if (is(token, "attribute-value")) {
1075 <+=?|> var firstChar = token.value.charAt(0);
1076 <+=?|> if (firstChar == '"' || firstChar == "'") {
1077 <+=?|> var lastChar = token.value.charAt(token.value.length - 1);
1078 <+=?|> var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
1079 <+=?|> if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
1080 <+=?|> return;
1081 <+=?|> }
1082 <+=?|> }
1083 <+=?|> while (!is(token, "tag-name")) {
1084 <+=?|> token = iterator.stepBackward();
1085 <+=?|> if (token.value == "<") {
1086 <+=?|> token = iterator.stepForward();
1087 <+=?|> break;
1088 <+=?|> }
1089 <+=?|> }
1090  
1091 <+=?|> var tokenRow = iterator.getCurrentTokenRow();
1092 <+=?|> var tokenColumn = iterator.getCurrentTokenColumn();
1093 <+=?|> if (is(iterator.stepBackward(), "end-tag-open"))
1094 <+=?|> return;
1095  
1096 <+=?|> var element = token.value;
1097 <+=?|> if (tokenRow == position.row)
1098 <+=?|> element = element.substring(0, position.column - tokenColumn);
1099  
1100 <+=?|> if (this.voidElements.hasOwnProperty(element.toLowerCase()))
1101 <+=?|> return;
1102  
1103 <+=?|> return {
1104 <+=?|> text: ">" + "</" + element + ">",
1105 <+=?|> selection: [1, 1]
1106 <+=?|> };
1107 <+=?|> }
1108 <+=?|> });
1109  
1110 <+=?|> this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1111 <+=?|> if (text == "\n") {
1112 <+=?|> var cursor = editor.getCursorPosition();
1113 <+=?|> var line = session.getLine(cursor.row);
1114 <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);
1115 <+=?|> var token = iterator.getCurrentToken();
1116  
1117 <+=?|> if (token && token.type.indexOf("tag-close") !== -1) {
1118 <+=?|> if (token.value == "/>")
1119 <+=?|> return;
1120 <+=?|> while (token && token.type.indexOf("tag-name") === -1) {
1121 <+=?|> token = iterator.stepBackward();
1122 <+=?|> }
1123  
1124 <+=?|> if (!token) {
1125 <+=?|> return;
1126 <+=?|> }
1127  
1128 <+=?|> var tag = token.value;
1129 <+=?|> var row = iterator.getCurrentTokenRow();
1130 <+=?|> token = iterator.stepBackward();
1131 <+=?|> if (!token || token.type.indexOf("end-tag") !== -1) {
1132 <+=?|> return;
1133 <+=?|> }
1134  
1135 <+=?|> if (this.voidElements && !this.voidElements[tag]) {
1136 <+=?|> var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
1137 <+=?|> var line = session.getLine(row);
1138 <+=?|> var nextIndent = this.$getIndent(line);
1139 <+=?|> var indent = nextIndent + session.getTabString();
1140  
1141 <+=?|> if (nextToken && nextToken.value === "</") {
1142 <+=?|> return {
1143 <+=?|> text: "\n" + indent + "\n" + nextIndent,
1144 <+=?|> selection: [1, indent.length, 1, indent.length]
1145 <+=?|> };
1146 <+=?|> } else {
1147 <+=?|> return {
1148 <+=?|> text: "\n" + indent
1149 <+=?|> };
1150 <+=?|> }
1151 <+=?|> }
1152 <+=?|> }
1153 <+=?|> }
1154 <+=?|> });
1155  
1156 <+=?|>};
1157  
1158 <+=?|>oop.inherits(XmlBehaviour, Behaviour);
1159  
1160 <+=?|>exports.XmlBehaviour = XmlBehaviour;
1161 <+=?|>});
1162  
1163 <+=?|>ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
1164 <+=?|>"use strict";
1165  
1166 <+=?|>var oop = require("../../lib/oop");
1167 <+=?|>var lang = require("../../lib/lang");
1168 <+=?|>var Range = require("../../range").Range;
1169 <+=?|>var BaseFoldMode = require("./fold_mode").FoldMode;
1170 <+=?|>var TokenIterator = require("../../token_iterator").TokenIterator;
1171  
1172 <+=?|>var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
1173 <+=?|> BaseFoldMode.call(this);
1174 <+=?|> this.voidElements = voidElements || {};
1175 <+=?|> this.optionalEndTags = oop.mixin({}, this.voidElements);
1176 <+=?|> if (optionalEndTags)
1177 <+=?|> oop.mixin(this.optionalEndTags, optionalEndTags);
1178  
1179 <+=?|>};
1180 <+=?|>oop.inherits(FoldMode, BaseFoldMode);
1181  
1182 <+=?|>var Tag = function() {
1183 <+=?|> this.tagName = "";
1184 <+=?|> this.closing = false;
1185 <+=?|> this.selfClosing = false;
1186 <+=?|> this.start = {row: 0, column: 0};
1187 <+=?|> this.end = {row: 0, column: 0};
1188 <+=?|>};
1189  
1190 <+=?|>function is(token, type) {
1191 <+=?|> return token.type.lastIndexOf(type + ".xml") > -1;
1192 <+=?|>}
1193  
1194 <+=?|>(function() {
1195  
1196 <+=?|> this.getFoldWidget = function(session, foldStyle, row) {
1197 <+=?|> var tag = this._getFirstTagInLine(session, row);
1198  
1199 <+=?|> if (!tag)
1200 <+=?|> return "";
1201  
1202 <+=?|> if (tag.closing || (!tag.tagName && tag.selfClosing))
1203 <+=?|> return foldStyle == "markbeginend" ? "end" : "";
1204  
1205 <+=?|> if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1206 <+=?|> return "";
1207  
1208 <+=?|> if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1209 <+=?|> return "";
1210  
1211 <+=?|> return "start";
1212 <+=?|> };
1213 <+=?|> this._getFirstTagInLine = function(session, row) {
1214 <+=?|> var tokens = session.getTokens(row);
1215 <+=?|> var tag = new Tag();
1216  
1217 <+=?|> for (var i = 0; i < tokens.length; i++) {
1218 <+=?|> var token = tokens[i];
1219 <+=?|> if (is(token, "tag-open")) {
1220 <+=?|> tag.end.column = tag.start.column + token.value.length;
1221 <+=?|> tag.closing = is(token, "end-tag-open");
1222 <+=?|> token = tokens[++i];
1223 <+=?|> if (!token)
1224 <+=?|> return null;
1225 <+=?|> tag.tagName = token.value;
1226 <+=?|> tag.end.column += token.value.length;
1227 <+=?|> for (i++; i < tokens.length; i++) {
1228 <+=?|> token = tokens[i];
1229 <+=?|> tag.end.column += token.value.length;
1230 <+=?|> if (is(token, "tag-close")) {
1231 <+=?|> tag.selfClosing = token.value == '/>';
1232 <+=?|> break;
1233 <+=?|> }
1234 <+=?|> }
1235 <+=?|> return tag;
1236 <+=?|> } else if (is(token, "tag-close")) {
1237 <+=?|> tag.selfClosing = token.value == '/>';
1238 <+=?|> return tag;
1239 <+=?|> }
1240 <+=?|> tag.start.column += token.value.length;
1241 <+=?|> }
1242  
1243 <+=?|> return null;
1244 <+=?|> };
1245  
1246 <+=?|> this._findEndTagInLine = function(session, row, tagName, startColumn) {
1247 <+=?|> var tokens = session.getTokens(row);
1248 <+=?|> var column = 0;
1249 <+=?|> for (var i = 0; i < tokens.length; i++) {
1250 <+=?|> var token = tokens[i];
1251 <+=?|> column += token.value.length;
1252 <+=?|> if (column < startColumn)
1253 <+=?|> continue;
1254 <+=?|> if (is(token, "end-tag-open")) {
1255 <+=?|> token = tokens[i + 1];
1256 <+=?|> if (token && token.value == tagName)
1257 <+=?|> return true;
1258 <+=?|> }
1259 <+=?|> }
1260 <+=?|> return false;
1261 <+=?|> };
1262 <+=?|> this._readTagForward = function(iterator) {
1263 <+=?|> var token = iterator.getCurrentToken();
1264 <+=?|> if (!token)
1265 <+=?|> return null;
1266  
1267 <+=?|> var tag = new Tag();
1268 <+=?|> do {
1269 <+=?|> if (is(token, "tag-open")) {
1270 <+=?|> tag.closing = is(token, "end-tag-open");
1271 <+=?|> tag.start.row = iterator.getCurrentTokenRow();
1272 <+=?|> tag.start.column = iterator.getCurrentTokenColumn();
1273 <+=?|> } else if (is(token, "tag-name")) {
1274 <+=?|> tag.tagName = token.value;
1275 <+=?|> } else if (is(token, "tag-close")) {
1276 <+=?|> tag.selfClosing = token.value == "/>";
1277 <+=?|> tag.end.row = iterator.getCurrentTokenRow();
1278 <+=?|> tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1279 <+=?|> iterator.stepForward();
1280 <+=?|> return tag;
1281 <+=?|> }
1282 <+=?|> } while(token = iterator.stepForward());
1283  
1284 <+=?|> return null;
1285 <+=?|> };
1286  
1287 <+=?|> this._readTagBackward = function(iterator) {
1288 <+=?|> var token = iterator.getCurrentToken();
1289 <+=?|> if (!token)
1290 <+=?|> return null;
1291  
1292 <+=?|> var tag = new Tag();
1293 <+=?|> do {
1294 <+=?|> if (is(token, "tag-open")) {
1295 <+=?|> tag.closing = is(token, "end-tag-open");
1296 <+=?|> tag.start.row = iterator.getCurrentTokenRow();
1297 <+=?|> tag.start.column = iterator.getCurrentTokenColumn();
1298 <+=?|> iterator.stepBackward();
1299 <+=?|> return tag;
1300 <+=?|> } else if (is(token, "tag-name")) {
1301 <+=?|> tag.tagName = token.value;
1302 <+=?|> } else if (is(token, "tag-close")) {
1303 <+=?|> tag.selfClosing = token.value == "/>";
1304 <+=?|> tag.end.row = iterator.getCurrentTokenRow();
1305 <+=?|> tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1306 <+=?|> }
1307 <+=?|> } while(token = iterator.stepBackward());
1308  
1309 <+=?|> return null;
1310 <+=?|> };
1311  
1312 <+=?|> this._pop = function(stack, tag) {
1313 <+=?|> while (stack.length) {
1314  
1315 <+=?|> var top = stack[stack.length-1];
1316 <+=?|> if (!tag || top.tagName == tag.tagName) {
1317 <+=?|> return stack.pop();
1318 <+=?|> }
1319 <+=?|> else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
1320 <+=?|> stack.pop();
1321 <+=?|> continue;
1322 <+=?|> } else {
1323 <+=?|> return null;
1324 <+=?|> }
1325 <+=?|> }
1326 <+=?|> };
1327  
1328 <+=?|> this.getFoldWidgetRange = function(session, foldStyle, row) {
1329 <+=?|> var firstTag = this._getFirstTagInLine(session, row);
1330  
1331 <+=?|> if (!firstTag)
1332 <+=?|> return null;
1333  
1334 <+=?|> var isBackward = firstTag.closing || firstTag.selfClosing;
1335 <+=?|> var stack = [];
1336 <+=?|> var tag;
1337  
1338 <+=?|> if (!isBackward) {
1339 <+=?|> var iterator = new TokenIterator(session, row, firstTag.start.column);
1340 <+=?|> var start = {
1341 <+=?|> row: row,
1342 <+=?|> column: firstTag.start.column + firstTag.tagName.length + 2
1343 <+=?|> };
1344 <+=?|> if (firstTag.start.row == firstTag.end.row)
1345 <+=?|> start.column = firstTag.end.column;
1346 <+=?|> while (tag = this._readTagForward(iterator)) {
1347 <+=?|> if (tag.selfClosing) {
1348 <+=?|> if (!stack.length) {
1349 <+=?|> tag.start.column += tag.tagName.length + 2;
1350 <+=?|> tag.end.column -= 2;
1351 <+=?|> return Range.fromPoints(tag.start, tag.end);
1352 <+=?|> } else
1353 <+=?|> continue;
1354 <+=?|> }
1355  
1356 <+=?|> if (tag.closing) {
1357 <+=?|> this._pop(stack, tag);
1358 <+=?|> if (stack.length == 0)
1359 <+=?|> return Range.fromPoints(start, tag.start);
1360 <+=?|> }
1361 <+=?|> else {
1362 <+=?|> stack.push(tag);
1363 <+=?|> }
1364 <+=?|> }
1365 <+=?|> }
1366 <+=?|> else {
1367 <+=?|> var iterator = new TokenIterator(session, row, firstTag.end.column);
1368 <+=?|> var end = {
1369 <+=?|> row: row,
1370 <+=?|> column: firstTag.start.column
1371 <+=?|> };
1372  
1373 <+=?|> while (tag = this._readTagBackward(iterator)) {
1374 <+=?|> if (tag.selfClosing) {
1375 <+=?|> if (!stack.length) {
1376 <+=?|> tag.start.column += tag.tagName.length + 2;
1377 <+=?|> tag.end.column -= 2;
1378 <+=?|> return Range.fromPoints(tag.start, tag.end);
1379 <+=?|> } else
1380 <+=?|> continue;
1381 <+=?|> }
1382  
1383 <+=?|> if (!tag.closing) {
1384 <+=?|> this._pop(stack, tag);
1385 <+=?|> if (stack.length == 0) {
1386 <+=?|> tag.start.column += tag.tagName.length + 2;
1387 <+=?|> if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
1388 <+=?|> tag.start.column = tag.end.column;
1389 <+=?|> return Range.fromPoints(tag.start, end);
1390 <+=?|> }
1391 <+=?|> }
1392 <+=?|> else {
1393 <+=?|> stack.push(tag);
1394 <+=?|> }
1395 <+=?|> }
1396 <+=?|> }
1397  
1398 <+=?|> };
1399  
1400 <+=?|>}).call(FoldMode.prototype);
1401  
1402 <+=?|>});
1403  
1404 <+=?|>ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) {
1405 <+=?|>"use strict";
1406  
1407 <+=?|>var oop = require("../lib/oop");
1408 <+=?|>var lang = require("../lib/lang");
1409 <+=?|>var TextMode = require("./text").Mode;
1410 <+=?|>var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1411 <+=?|>var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
1412 <+=?|>var XmlFoldMode = require("./folding/xml").FoldMode;
1413 <+=?|>var WorkerClient = require("../worker/worker_client").WorkerClient;
1414  
1415 <+=?|>var Mode = function() {
1416 <+=?|> this.HighlightRules = XmlHighlightRules;
1417 <+=?|> this.$behaviour = new XmlBehaviour();
1418 <+=?|> this.foldingRules = new XmlFoldMode();
1419 <+=?|>};
1420  
1421 <+=?|>oop.inherits(Mode, TextMode);
1422  
1423 <+=?|>(function() {
1424  
1425 <+=?|> this.voidElements = lang.arrayToMap([]);
1426  
1427 <+=?|> this.blockComment = {start: "<!--", end: "-->"};
1428  
1429 <+=?|> this.createWorker = function(session) {
1430 <+=?|> var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
1431 <+=?|> worker.attachToDocument(session.getDocument());
1432  
1433 <+=?|> worker.on("error", function(e) {
1434 <+=?|> session.setAnnotations(e.data);
1435 <+=?|> });
1436  
1437 <+=?|> worker.on("terminate", function() {
1438 <+=?|> session.clearAnnotations();
1439 <+=?|> });
1440  
1441 <+=?|> return worker;
1442 <+=?|> };
1443  
1444 <+=?|> this.$id = "ace/mode/xml";
1445 <+=?|>}).call(Mode.prototype);
1446  
1447 <+=?|>exports.Mode = Mode;
1448 <+=?|>});
1449  
1450 <+=?|>ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
1451 <+=?|>"use strict";
1452  
1453 <+=?|>var oop = require("../lib/oop");
1454 <+=?|>var lang = require("../lib/lang");
1455 <+=?|>var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1456 <+=?|>var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
1457 <+=?|>var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
1458 <+=?|>var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
1459 <+=?|>var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
1460 <+=?|>var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
1461  
1462 <+=?|>var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
1463 <+=?|>var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
1464 <+=?|>var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
1465  
1466 <+=?|>var CssHighlightRules = function() {
1467  
1468 <+=?|> var keywordMapper = this.createKeywordMapper({
1469 <+=?|> "support.function": supportFunction,
1470 <+=?|> "support.constant": supportConstant,
1471 <+=?|> "support.type": supportType,
1472 <+=?|> "support.constant.color": supportConstantColor,
1473 <+=?|> "support.constant.fonts": supportConstantFonts
1474 <+=?|> }, "text", true);
1475  
1476 <+=?|> this.$rules = {
1477 <+=?|> "start" : [{
1478 <+=?|> token : "comment", // multi line comment
1479 <+=?|> regex : "\\/\\*",
1480 <+=?|> push : "comment"
1481 <+=?|> }, {
1482 <+=?|> token: "paren.lparen",
1483 <+=?|> regex: "\\{",
1484 <+=?|> push: "ruleset"
1485 <+=?|> }, {
1486 <+=?|> token: "string",
1487 <+=?|> regex: "@.*?{",
1488 <+=?|> push: "media"
1489 <+=?|> }, {
1490 <+=?|> token: "keyword",
1491 <+=?|> regex: "#[a-z0-9-_]+"
1492 <+=?|> }, {
1493 <+=?|> token: "variable",
1494 <+=?|> regex: "\\.[a-z0-9-_]+"
1495 <+=?|> }, {
1496 <+=?|> token: "string",
1497 <+=?|> regex: ":[a-z0-9-_]+"
1498 <+=?|> }, {
1499 <+=?|> token: "constant",
1500 <+=?|> regex: "[a-z0-9-_]+"
1501 <+=?|> }, {
1502 <+=?|> caseInsensitive: true
1503 <+=?|> }],
1504  
1505 <+=?|> "media" : [{
1506 <+=?|> token : "comment", // multi line comment
1507 <+=?|> regex : "\\/\\*",
1508 <+=?|> push : "comment"
1509 <+=?|> }, {
1510 <+=?|> token: "paren.lparen",
1511 <+=?|> regex: "\\{",
1512 <+=?|> push: "ruleset"
1513 <+=?|> }, {
1514 <+=?|> token: "string",
1515 <+=?|> regex: "\\}",
1516 <+=?|> next: "pop"
1517 <+=?|> }, {
1518 <+=?|> token: "keyword",
1519 <+=?|> regex: "#[a-z0-9-_]+"
1520 <+=?|> }, {
1521 <+=?|> token: "variable",
1522 <+=?|> regex: "\\.[a-z0-9-_]+"
1523 <+=?|> }, {
1524 <+=?|> token: "string",
1525 <+=?|> regex: ":[a-z0-9-_]+"
1526 <+=?|> }, {
1527 <+=?|> token: "constant",
1528 <+=?|> regex: "[a-z0-9-_]+"
1529 <+=?|> }, {
1530 <+=?|> caseInsensitive: true
1531 <+=?|> }],
1532  
1533 <+=?|> "comment" : [{
1534 <+=?|> token : "comment",
1535 <+=?|> regex : "\\*\\/",
1536 <+=?|> next : "pop"
1537 <+=?|> }, {
1538 <+=?|> defaultToken : "comment"
1539 <+=?|> }],
1540  
1541 <+=?|> "ruleset" : [
1542 <+=?|> {
1543 <+=?|> token : "paren.rparen",
1544 <+=?|> regex : "\\}",
1545 <+=?|> next: "pop"
1546 <+=?|> }, {
1547 <+=?|> token : "comment", // multi line comment
1548 <+=?|> regex : "\\/\\*",
1549 <+=?|> push : "comment"
1550 <+=?|> }, {
1551 <+=?|> token : "string", // single line
1552 <+=?|> regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1553 <+=?|> }, {
1554 <+=?|> token : "string", // single line
1555 <+=?|> regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1556 <+=?|> }, {
1557 <+=?|> token : ["constant.numeric", "keyword"],
1558 <+=?|> regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
1559 <+=?|> }, {
1560 <+=?|> token : "constant.numeric",
1561 <+=?|> regex : numRe
1562 <+=?|> }, {
1563 <+=?|> token : "constant.numeric", // hex6 color
1564 <+=?|> regex : "#[a-f0-9]{6}"
1565 <+=?|> }, {
1566 <+=?|> token : "constant.numeric", // hex3 color
1567 <+=?|> regex : "#[a-f0-9]{3}"
1568 <+=?|> }, {
1569 <+=?|> token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
1570 <+=?|> regex : pseudoElements
1571 <+=?|> }, {
1572 <+=?|> token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
1573 <+=?|> regex : pseudoClasses
1574 <+=?|> }, {
1575 <+=?|> token : ["support.function", "string", "support.function"],
1576 <+=?|> regex : "(url\\()(.*)(\\))"
1577 <+=?|> }, {
1578 <+=?|> token : keywordMapper,
1579 <+=?|> regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
1580 <+=?|> }, {
1581 <+=?|> caseInsensitive: true
1582 <+=?|> }]
1583 <+=?|> };
1584  
1585 <+=?|> this.normalizeRules();
1586 <+=?|>};
1587  
1588 <+=?|>oop.inherits(CssHighlightRules, TextHighlightRules);
1589  
1590 <+=?|>exports.CssHighlightRules = CssHighlightRules;
1591  
1592 <+=?|>});
1593  
1594 <+=?|>ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
1595 <+=?|>"use strict";
1596  
1597 <+=?|>var propertyMap = {
1598 <+=?|> "background": {"#$0": 1},
1599 <+=?|> "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
1600 <+=?|> "background-image": {"url('/$0')": 1},
1601 <+=?|> "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
1602 <+=?|> "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
1603 <+=?|> "background-attachment": {"scroll": 1, "fixed": 1},
1604 <+=?|> "background-size": {"cover": 1, "contain": 1},
1605 <+=?|> "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
1606 <+=?|> "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
1607 <+=?|> "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
1608 <+=?|> "border-color": {"#$0": 1},
1609 <+=?|> "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
1610 <+=?|> "border-collapse": {"collapse": 1, "separate": 1},
1611 <+=?|> "bottom": {"px": 1, "em": 1, "%": 1},
1612 <+=?|> "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
1613 <+=?|> "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
1614 <+=?|> "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
1615 <+=?|> "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
1616 <+=?|> "empty-cells": {"show": 1, "hide": 1},
1617 <+=?|> "float": {"left": 1, "right": 1, "none": 1},
1618 <+=?|> "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
1619 <+=?|> "font-size": {"px": 1, "em": 1, "%": 1},
1620 <+=?|> "font-weight": {"bold": 1, "normal": 1},
1621 <+=?|> "font-style": {"italic": 1, "normal": 1},
1622 <+=?|> "font-variant": {"normal": 1, "small-caps": 1},
1623 <+=?|> "height": {"px": 1, "em": 1, "%": 1},
1624 <+=?|> "left": {"px": 1, "em": 1, "%": 1},
1625 <+=?|> "letter-spacing": {"normal": 1},
1626 <+=?|> "line-height": {"normal": 1},
1627 <+=?|> "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
1628 <+=?|> "margin": {"px": 1, "em": 1, "%": 1},
1629 <+=?|> "margin-right": {"px": 1, "em": 1, "%": 1},
1630 <+=?|> "margin-left": {"px": 1, "em": 1, "%": 1},
1631 <+=?|> "margin-top": {"px": 1, "em": 1, "%": 1},
1632 <+=?|> "margin-bottom": {"px": 1, "em": 1, "%": 1},
1633 <+=?|> "max-height": {"px": 1, "em": 1, "%": 1},
1634 <+=?|> "max-width": {"px": 1, "em": 1, "%": 1},
1635 <+=?|> "min-height": {"px": 1, "em": 1, "%": 1},
1636 <+=?|> "min-width": {"px": 1, "em": 1, "%": 1},
1637 <+=?|> "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1638 <+=?|> "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1639 <+=?|> "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1640 <+=?|> "padding": {"px": 1, "em": 1, "%": 1},
1641 <+=?|> "padding-top": {"px": 1, "em": 1, "%": 1},
1642 <+=?|> "padding-right": {"px": 1, "em": 1, "%": 1},
1643 <+=?|> "padding-bottom": {"px": 1, "em": 1, "%": 1},
1644 <+=?|> "padding-left": {"px": 1, "em": 1, "%": 1},
1645 <+=?|> "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1646 <+=?|> "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1647 <+=?|> "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
1648 <+=?|> "right": {"px": 1, "em": 1, "%": 1},
1649 <+=?|> "table-layout": {"fixed": 1, "auto": 1},
1650 <+=?|> "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
1651 <+=?|> "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
1652 <+=?|> "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
1653 <+=?|> "top": {"px": 1, "em": 1, "%": 1},
1654 <+=?|> "vertical-align": {"top": 1, "bottom": 1},
1655 <+=?|> "visibility": {"hidden": 1, "visible": 1},
1656 <+=?|> "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
1657 <+=?|> "width": {"px": 1, "em": 1, "%": 1},
1658 <+=?|> "word-spacing": {"normal": 1},
1659 <+=?|> "filter": {"alpha(opacity=$0100)": 1},
1660  
1661 <+=?|> "text-shadow": {"$02px 2px 2px #777": 1},
1662 <+=?|> "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
1663 <+=?|> "-moz-border-radius": 1,
1664 <+=?|> "-moz-border-radius-topright": 1,
1665 <+=?|> "-moz-border-radius-bottomright": 1,
1666 <+=?|> "-moz-border-radius-topleft": 1,
1667 <+=?|> "-moz-border-radius-bottomleft": 1,
1668 <+=?|> "-webkit-border-radius": 1,
1669 <+=?|> "-webkit-border-top-right-radius": 1,
1670 <+=?|> "-webkit-border-top-left-radius": 1,
1671 <+=?|> "-webkit-border-bottom-right-radius": 1,
1672 <+=?|> "-webkit-border-bottom-left-radius": 1,
1673 <+=?|> "-moz-box-shadow": 1,
1674 <+=?|> "-webkit-box-shadow": 1,
1675 <+=?|> "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1676 <+=?|> "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1677 <+=?|> "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
1678 <+=?|>};
1679  
1680 <+=?|>var CssCompletions = function() {
1681  
1682 <+=?|>};
1683  
1684 <+=?|>(function() {
1685  
1686 <+=?|> this.completionsDefined = false;
1687  
1688 <+=?|> this.defineCompletions = function() {
1689 <+=?|> if (document) {
1690 <+=?|> var style = document.createElement('c').style;
1691  
1692 <+=?|> for (var i in style) {
1693 <+=?|> if (typeof style[i] !== 'string')
1694 <+=?|> continue;
1695  
1696 <+=?|> var name = i.replace(/[A-Z]/g, function(x) {
1697 <+=?|> return '-' + x.toLowerCase();
1698 <+=?|> });
1699  
1700 <+=?|> if (!propertyMap.hasOwnProperty(name))
1701 <+=?|> propertyMap[name] = 1;
1702 <+=?|> }
1703 <+=?|> }
1704  
1705 <+=?|> this.completionsDefined = true;
1706 <+=?|> }
1707  
1708 <+=?|> this.getCompletions = function(state, session, pos, prefix) {
1709 <+=?|> if (!this.completionsDefined) {
1710 <+=?|> this.defineCompletions();
1711 <+=?|> }
1712  
1713 <+=?|> var token = session.getTokenAt(pos.row, pos.column);
1714  
1715 <+=?|> if (!token)
1716 <+=?|> return [];
1717 <+=?|> if (state==='ruleset'){
1718 <+=?|> var line = session.getLine(pos.row).substr(0, pos.column);
1719 <+=?|> if (/:[^;]+$/.test(line)) {
1720 <+=?|> /([\w\-]+):[^:]*$/.test(line);
1721  
1722 <+=?|> return this.getPropertyValueCompletions(state, session, pos, prefix);
1723 <+=?|> } else {
1724 <+=?|> return this.getPropertyCompletions(state, session, pos, prefix);
1725 <+=?|> }
1726 <+=?|> }
1727  
1728 <+=?|> return [];
1729 <+=?|> };
1730  
1731 <+=?|> this.getPropertyCompletions = function(state, session, pos, prefix) {
1732 <+=?|> var properties = Object.keys(propertyMap);
1733 <+=?|> return properties.map(function(property){
1734 <+=?|> return {
1735 <+=?|> caption: property,
1736 <+=?|> snippet: property + ': $0',
1737 <+=?|> meta: "property",
1738 <+=?|> score: Number.MAX_VALUE
1739 <+=?|> };
1740 <+=?|> });
1741 <+=?|> };
1742  
1743 <+=?|> this.getPropertyValueCompletions = function(state, session, pos, prefix) {
1744 <+=?|> var line = session.getLine(pos.row).substr(0, pos.column);
1745 <+=?|> var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
1746  
1747 <+=?|> if (!property)
1748 <+=?|> return [];
1749 <+=?|> var values = [];
1750 <+=?|> if (property in propertyMap && typeof propertyMap[property] === "object") {
1751 <+=?|> values = Object.keys(propertyMap[property]);
1752 <+=?|> }
1753 <+=?|> return values.map(function(value){
1754 <+=?|> return {
1755 <+=?|> caption: value,
1756 <+=?|> snippet: value,
1757 <+=?|> meta: "property value",
1758 <+=?|> score: Number.MAX_VALUE
1759 <+=?|> };
1760 <+=?|> });
1761 <+=?|> };
1762  
1763 <+=?|>}).call(CssCompletions.prototype);
1764  
1765 <+=?|>exports.CssCompletions = CssCompletions;
1766 <+=?|>});
1767  
1768 <+=?|>ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
1769 <+=?|>"use strict";
1770  
1771 <+=?|>var oop = require("../../lib/oop");
1772 <+=?|>var Behaviour = require("../behaviour").Behaviour;
1773 <+=?|>var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1774 <+=?|>var TokenIterator = require("../../token_iterator").TokenIterator;
1775  
1776 <+=?|>var CssBehaviour = function () {
1777  
1778 <+=?|> this.inherit(CstyleBehaviour);
1779  
1780 <+=?|> this.add("colon", "insertion", function (state, action, editor, session, text) {
1781 <+=?|> if (text === ':') {
1782 <+=?|> var cursor = editor.getCursorPosition();
1783 <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);
1784 <+=?|> var token = iterator.getCurrentToken();
1785 <+=?|> if (token && token.value.match(/\s+/)) {
1786 <+=?|> token = iterator.stepBackward();
1787 <+=?|> }
1788 <+=?|> if (token && token.type === 'support.type') {
1789 <+=?|> var line = session.doc.getLine(cursor.row);
1790 <+=?|> var rightChar = line.substring(cursor.column, cursor.column + 1);
1791 <+=?|> if (rightChar === ':') {
1792 <+=?|> return {
1793 <+=?|> text: '',
1794 <+=?|> selection: [1, 1]
1795 <+=?|> }
1796 <+=?|> }
1797 <+=?|> if (!line.substring(cursor.column).match(/^\s*;/)) {
1798 <+=?|> return {
1799 <+=?|> text: ':;',
1800 <+=?|> selection: [1, 1]
1801 <+=?|> }
1802 <+=?|> }
1803 <+=?|> }
1804 <+=?|> }
1805 <+=?|> });
1806  
1807 <+=?|> this.add("colon", "deletion", function (state, action, editor, session, range) {
1808 <+=?|> var selected = session.doc.getTextRange(range);
1809 <+=?|> if (!range.isMultiLine() && selected === ':') {
1810 <+=?|> var cursor = editor.getCursorPosition();
1811 <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);
1812 <+=?|> var token = iterator.getCurrentToken();
1813 <+=?|> if (token && token.value.match(/\s+/)) {
1814 <+=?|> token = iterator.stepBackward();
1815 <+=?|> }
1816 <+=?|> if (token && token.type === 'support.type') {
1817 <+=?|> var line = session.doc.getLine(range.start.row);
1818 <+=?|> var rightChar = line.substring(range.end.column, range.end.column + 1);
1819 <+=?|> if (rightChar === ';') {
1820 <+=?|> range.end.column ++;
1821 <+=?|> return range;
1822 <+=?|> }
1823 <+=?|> }
1824 <+=?|> }
1825 <+=?|> });
1826  
1827 <+=?|> this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1828 <+=?|> if (text === ';') {
1829 <+=?|> var cursor = editor.getCursorPosition();
1830 <+=?|> var line = session.doc.getLine(cursor.row);
1831 <+=?|> var rightChar = line.substring(cursor.column, cursor.column + 1);
1832 <+=?|> if (rightChar === ';') {
1833 <+=?|> return {
1834 <+=?|> text: '',
1835 <+=?|> selection: [1, 1]
1836 <+=?|> }
1837 <+=?|> }
1838 <+=?|> }
1839 <+=?|> });
1840  
1841 <+=?|>}
1842 <+=?|>oop.inherits(CssBehaviour, CstyleBehaviour);
1843  
1844 <+=?|>exports.CssBehaviour = CssBehaviour;
1845 <+=?|>});
1846  
1847 <+=?|>ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
1848 <+=?|>"use strict";
1849  
1850 <+=?|>var oop = require("../lib/oop");
1851 <+=?|>var TextMode = require("./text").Mode;
1852 <+=?|>var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1853 <+=?|>var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1854 <+=?|>var WorkerClient = require("../worker/worker_client").WorkerClient;
1855 <+=?|>var CssCompletions = require("./css_completions").CssCompletions;
1856 <+=?|>var CssBehaviour = require("./behaviour/css").CssBehaviour;
1857 <+=?|>var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1858  
1859 <+=?|>var Mode = function() {
1860 <+=?|> this.HighlightRules = CssHighlightRules;
1861 <+=?|> this.$outdent = new MatchingBraceOutdent();
1862 <+=?|> this.$behaviour = new CssBehaviour();
1863 <+=?|> this.$completer = new CssCompletions();
1864 <+=?|> this.foldingRules = new CStyleFoldMode();
1865 <+=?|>};
1866 <+=?|>oop.inherits(Mode, TextMode);
1867  
1868 <+=?|>(function() {
1869  
1870 <+=?|> this.foldingRules = "cStyle";
1871 <+=?|> this.blockComment = {start: "/*", end: "*/"};
1872  
1873 <+=?|> this.getNextLineIndent = function(state, line, tab) {
1874 <+=?|> var indent = this.$getIndent(line);
1875 <+=?|> var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
1876 <+=?|> if (tokens.length && tokens[tokens.length-1].type == "comment") {
1877 <+=?|> return indent;
1878 <+=?|> }
1879  
1880 <+=?|> var match = line.match(/^.*\{\s*$/);
1881 <+=?|> if (match) {
1882 <+=?|> indent += tab;
1883 <+=?|> }
1884  
1885 <+=?|> return indent;
1886 <+=?|> };
1887  
1888 <+=?|> this.checkOutdent = function(state, line, input) {
1889 <+=?|> return this.$outdent.checkOutdent(line, input);
1890 <+=?|> };
1891  
1892 <+=?|> this.autoOutdent = function(state, doc, row) {
1893 <+=?|> this.$outdent.autoOutdent(doc, row);
1894 <+=?|> };
1895  
1896 <+=?|> this.getCompletions = function(state, session, pos, prefix) {
1897 <+=?|> return this.$completer.getCompletions(state, session, pos, prefix);
1898 <+=?|> };
1899  
1900 <+=?|> this.createWorker = function(session) {
1901 <+=?|> var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
1902 <+=?|> worker.attachToDocument(session.getDocument());
1903  
1904 <+=?|> worker.on("annotate", function(e) {
1905 <+=?|> session.setAnnotations(e.data);
1906 <+=?|> });
1907  
1908 <+=?|> worker.on("terminate", function() {
1909 <+=?|> session.clearAnnotations();
1910 <+=?|> });
1911  
1912 <+=?|> return worker;
1913 <+=?|> };
1914  
1915 <+=?|> this.$id = "ace/mode/css";
1916 <+=?|>}).call(Mode.prototype);
1917  
1918 <+=?|>exports.Mode = Mode;
1919  
1920 <+=?|>});
1921  
1922 <+=?|>ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
1923 <+=?|>"use strict";
1924  
1925 <+=?|>var oop = require("../lib/oop");
1926 <+=?|>var lang = require("../lib/lang");
1927 <+=?|>var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1928 <+=?|>var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1929 <+=?|>var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1930  
1931 <+=?|>var tagMap = lang.createMap({
1932 <+=?|> a : 'anchor',
1933 <+=?|> button : 'form',
1934 <+=?|> form : 'form',
1935 <+=?|> img : 'image',
1936 <+=?|> input : 'form',
1937 <+=?|> label : 'form',
1938 <+=?|> option : 'form',
1939 <+=?|> script : 'script',
1940 <+=?|> select : 'form',
1941 <+=?|> textarea : 'form',
1942 <+=?|> style : 'style',
1943 <+=?|> table : 'table',
1944 <+=?|> tbody : 'table',
1945 <+=?|> td : 'table',
1946 <+=?|> tfoot : 'table',
1947 <+=?|> th : 'table',
1948 <+=?|> tr : 'table'
1949 <+=?|>});
1950  
1951 <+=?|>var HtmlHighlightRules = function() {
1952 <+=?|> XmlHighlightRules.call(this);
1953  
1954 <+=?|> this.addRules({
1955 <+=?|> attributes: [{
1956 <+=?|> include : "tag_whitespace"
1957 <+=?|> }, {
1958 <+=?|> token : "entity.other.attribute-name.xml",
1959 <+=?|> regex : "[-_a-zA-Z0-9:.]+"
1960 <+=?|> }, {
1961 <+=?|> token : "keyword.operator.attribute-equals.xml",
1962 <+=?|> regex : "=",
1963 <+=?|> push : [{
1964 <+=?|> include: "tag_whitespace"
1965 <+=?|> }, {
1966 <+=?|> token : "string.unquoted.attribute-value.html",
1967 <+=?|> regex : "[^<>='\"`\\s]+",
1968 <+=?|> next : "pop"
1969 <+=?|> }, {
1970 <+=?|> token : "empty",
1971 <+=?|> regex : "",
1972 <+=?|> next : "pop"
1973 <+=?|> }]
1974 <+=?|> }, {
1975 <+=?|> include : "attribute_value"
1976 <+=?|> }],
1977 <+=?|> tag: [{
1978 <+=?|> token : function(start, tag) {
1979 <+=?|> var group = tagMap[tag];
1980 <+=?|> return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
1981 <+=?|> "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
1982 <+=?|> },
1983 <+=?|> regex : "(</?)([-_a-zA-Z0-9:.]+)",
1984 <+=?|> next: "tag_stuff"
1985 <+=?|> }],
1986 <+=?|> tag_stuff: [
1987 <+=?|> {include : "attributes"},
1988 <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
1989 <+=?|> ]
1990 <+=?|> });
1991  
1992 <+=?|> this.embedTagRules(CssHighlightRules, "css-", "style");
1993 <+=?|> this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
1994  
1995 <+=?|> if (this.constructor === HtmlHighlightRules)
1996 <+=?|> this.normalizeRules();
1997 <+=?|>};
1998  
1999 <+=?|>oop.inherits(HtmlHighlightRules, XmlHighlightRules);
2000  
2001 <+=?|>exports.HtmlHighlightRules = HtmlHighlightRules;
2002 <+=?|>});
2003  
2004 <+=?|>ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
2005 <+=?|>"use strict";
2006  
2007 <+=?|>var oop = require("../../lib/oop");
2008 <+=?|>var BaseFoldMode = require("./fold_mode").FoldMode;
2009  
2010 <+=?|>var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
2011 <+=?|> this.defaultMode = defaultMode;
2012 <+=?|> this.subModes = subModes;
2013 <+=?|>};
2014 <+=?|>oop.inherits(FoldMode, BaseFoldMode);
2015  
2016 <+=?|>(function() {
2017  
2018  
2019 <+=?|> this.$getMode = function(state) {
2020 <+=?|> if (typeof state != "string")
2021 <+=?|> state = state[0];
2022 <+=?|> for (var key in this.subModes) {
2023 <+=?|> if (state.indexOf(key) === 0)
2024 <+=?|> return this.subModes[key];
2025 <+=?|> }
2026 <+=?|> return null;
2027 <+=?|> };
2028  
2029 <+=?|> this.$tryMode = function(state, session, foldStyle, row) {
2030 <+=?|> var mode = this.$getMode(state);
2031 <+=?|> return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
2032 <+=?|> };
2033  
2034 <+=?|> this.getFoldWidget = function(session, foldStyle, row) {
2035 <+=?|> return (
2036 <+=?|> this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
2037 <+=?|> this.$tryMode(session.getState(row), session, foldStyle, row) ||
2038 <+=?|> this.defaultMode.getFoldWidget(session, foldStyle, row)
2039 <+=?|> );
2040 <+=?|> };
2041  
2042 <+=?|> this.getFoldWidgetRange = function(session, foldStyle, row) {
2043 <+=?|> var mode = this.$getMode(session.getState(row-1));
2044  
2045 <+=?|> if (!mode || !mode.getFoldWidget(session, foldStyle, row))
2046 <+=?|> mode = this.$getMode(session.getState(row));
2047  
2048 <+=?|> if (!mode || !mode.getFoldWidget(session, foldStyle, row))
2049 <+=?|> mode = this.defaultMode;
2050  
2051 <+=?|> return mode.getFoldWidgetRange(session, foldStyle, row);
2052 <+=?|> };
2053  
2054 <+=?|>}).call(FoldMode.prototype);
2055  
2056 <+=?|>});
2057  
2058 <+=?|>ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
2059 <+=?|>"use strict";
2060  
2061 <+=?|>var oop = require("../../lib/oop");
2062 <+=?|>var MixedFoldMode = require("./mixed").FoldMode;
2063 <+=?|>var XmlFoldMode = require("./xml").FoldMode;
2064 <+=?|>var CStyleFoldMode = require("./cstyle").FoldMode;
2065  
2066 <+=?|>var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
2067 <+=?|> MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
2068 <+=?|> "js-": new CStyleFoldMode(),
2069 <+=?|> "css-": new CStyleFoldMode()
2070 <+=?|> });
2071 <+=?|>};
2072  
2073 <+=?|>oop.inherits(FoldMode, MixedFoldMode);
2074  
2075 <+=?|>});
2076  
2077 <+=?|>ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
2078 <+=?|>"use strict";
2079  
2080 <+=?|>var TokenIterator = require("../token_iterator").TokenIterator;
2081  
2082 <+=?|>var commonAttributes = [
2083 <+=?|> "accesskey",
2084 <+=?|> "class",
2085 <+=?|> "contenteditable",
2086 <+=?|> "contextmenu",
2087 <+=?|> "dir",
2088 <+=?|> "draggable",
2089 <+=?|> "dropzone",
2090 <+=?|> "hidden",
2091 <+=?|> "id",
2092 <+=?|> "inert",
2093 <+=?|> "itemid",
2094 <+=?|> "itemprop",
2095 <+=?|> "itemref",
2096 <+=?|> "itemscope",
2097 <+=?|> "itemtype",
2098 <+=?|> "lang",
2099 <+=?|> "spellcheck",
2100 <+=?|> "style",
2101 <+=?|> "tabindex",
2102 <+=?|> "title",
2103 <+=?|> "translate"
2104 <+=?|>];
2105  
2106 <+=?|>var eventAttributes = [
2107 <+=?|> "onabort",
2108 <+=?|> "onblur",
2109 <+=?|> "oncancel",
2110 <+=?|> "oncanplay",
2111 <+=?|> "oncanplaythrough",
2112 <+=?|> "onchange",
2113 <+=?|> "onclick",
2114 <+=?|> "onclose",
2115 <+=?|> "oncontextmenu",
2116 <+=?|> "oncuechange",
2117 <+=?|> "ondblclick",
2118 <+=?|> "ondrag",
2119 <+=?|> "ondragend",
2120 <+=?|> "ondragenter",
2121 <+=?|> "ondragleave",
2122 <+=?|> "ondragover",
2123 <+=?|> "ondragstart",
2124 <+=?|> "ondrop",
2125 <+=?|> "ondurationchange",
2126 <+=?|> "onemptied",
2127 <+=?|> "onended",
2128 <+=?|> "onerror",
2129 <+=?|> "onfocus",
2130 <+=?|> "oninput",
2131 <+=?|> "oninvalid",
2132 <+=?|> "onkeydown",
2133 <+=?|> "onkeypress",
2134 <+=?|> "onkeyup",
2135 <+=?|> "onload",
2136 <+=?|> "onloadeddata",
2137 <+=?|> "onloadedmetadata",
2138 <+=?|> "onloadstart",
2139 <+=?|> "onmousedown",
2140 <+=?|> "onmousemove",
2141 <+=?|> "onmouseout",
2142 <+=?|> "onmouseover",
2143 <+=?|> "onmouseup",
2144 <+=?|> "onmousewheel",
2145 <+=?|> "onpause",
2146 <+=?|> "onplay",
2147 <+=?|> "onplaying",
2148 <+=?|> "onprogress",
2149 <+=?|> "onratechange",
2150 <+=?|> "onreset",
2151 <+=?|> "onscroll",
2152 <+=?|> "onseeked",
2153 <+=?|> "onseeking",
2154 <+=?|> "onselect",
2155 <+=?|> "onshow",
2156 <+=?|> "onstalled",
2157 <+=?|> "onsubmit",
2158 <+=?|> "onsuspend",
2159 <+=?|> "ontimeupdate",
2160 <+=?|> "onvolumechange",
2161 <+=?|> "onwaiting"
2162 <+=?|>];
2163  
2164 <+=?|>var globalAttributes = commonAttributes.concat(eventAttributes);
2165  
2166 <+=?|>var attributeMap = {
2167 <+=?|> "html": {"manifest": 1},
2168 <+=?|> "head": {},
2169 <+=?|> "title": {},
2170 <+=?|> "base": {"href": 1, "target": 1},
2171 <+=?|> "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
2172 <+=?|> "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
2173 <+=?|> "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
2174 <+=?|> "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
2175 <+=?|> "noscript": {"href": 1},
2176 <+=?|> "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
2177 <+=?|> "section": {},
2178 <+=?|> "nav": {},
2179 <+=?|> "article": {"pubdate": 1},
2180 <+=?|> "aside": {},
2181 <+=?|> "h1": {},
2182 <+=?|> "h2": {},
2183 <+=?|> "h3": {},
2184 <+=?|> "h4": {},
2185 <+=?|> "h5": {},
2186 <+=?|> "h6": {},
2187 <+=?|> "header": {},
2188 <+=?|> "footer": {},
2189 <+=?|> "address": {},
2190 <+=?|> "main": {},
2191 <+=?|> "p": {},
2192 <+=?|> "hr": {},
2193 <+=?|> "pre": {},
2194 <+=?|> "blockquote": {"cite": 1},
2195 <+=?|> "ol": {"start": 1, "reversed": 1},
2196 <+=?|> "ul": {},
2197 <+=?|> "li": {"value": 1},
2198 <+=?|> "dl": {},
2199 <+=?|> "dt": {},
2200 <+=?|> "dd": {},
2201 <+=?|> "figure": {},
2202 <+=?|> "figcaption": {},
2203 <+=?|> "div": {},
2204 <+=?|> "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
2205 <+=?|> "em": {},
2206 <+=?|> "strong": {},
2207 <+=?|> "small": {},
2208 <+=?|> "s": {},
2209 <+=?|> "cite": {},
2210 <+=?|> "q": {"cite": 1},
2211 <+=?|> "dfn": {},
2212 <+=?|> "abbr": {},
2213 <+=?|> "data": {},
2214 <+=?|> "time": {"datetime": 1},
2215 <+=?|> "code": {},
2216 <+=?|> "var": {},
2217 <+=?|> "samp": {},
2218 <+=?|> "kbd": {},
2219 <+=?|> "sub": {},
2220 <+=?|> "sup": {},
2221 <+=?|> "i": {},
2222 <+=?|> "b": {},
2223 <+=?|> "u": {},
2224 <+=?|> "mark": {},
2225 <+=?|> "ruby": {},
2226 <+=?|> "rt": {},
2227 <+=?|> "rp": {},
2228 <+=?|> "bdi": {},
2229 <+=?|> "bdo": {},
2230 <+=?|> "span": {},
2231 <+=?|> "br": {},
2232 <+=?|> "wbr": {},
2233 <+=?|> "ins": {"cite": 1, "datetime": 1},
2234 <+=?|> "del": {"cite": 1, "datetime": 1},
2235 <+=?|> "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
2236 <+=?|> "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
2237 <+=?|> "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
2238 <+=?|> "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
2239 <+=?|> "param": {"name": 1, "value": 1},
2240 <+=?|> "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
2241 <+=?|> "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
2242 <+=?|> "source": {"src": 1, "type": 1, "media": 1},
2243 <+=?|> "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
2244 <+=?|> "canvas": {"width": 1, "height": 1},
2245 <+=?|> "map": {"name": 1},
2246 <+=?|> "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
2247 <+=?|> "svg": {},
2248 <+=?|> "math": {},
2249 <+=?|> "table": {"summary": 1},
2250 <+=?|> "caption": {},
2251 <+=?|> "colgroup": {"span": 1},
2252 <+=?|> "col": {"span": 1},
2253 <+=?|> "tbody": {},
2254 <+=?|> "thead": {},
2255 <+=?|> "tfoot": {},
2256 <+=?|> "tr": {},
2257 <+=?|> "td": {"headers": 1, "rowspan": 1, "colspan": 1},
2258 <+=?|> "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
2259 <+=?|> "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
2260 <+=?|> "fieldset": {"disabled": 1, "form": 1, "name": 1},
2261 <+=?|> "legend": {},
2262 <+=?|> "label": {"form": 1, "for": 1},
2263 <+=?|> "input": {
2264 <+=?|> "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
2265 <+=?|> "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
2266 <+=?|> "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
2267 <+=?|> "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
2268 <+=?|> "datalist": {},
2269 <+=?|> "optgroup": {"disabled": 1, "label": 1},
2270 <+=?|> "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
2271 <+=?|> "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
2272 <+=?|> "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
2273 <+=?|> "output": {"for": 1, "form": 1, "name": 1},
2274 <+=?|> "progress": {"value": 1, "max": 1},
2275 <+=?|> "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
2276 <+=?|> "details": {"open": 1},
2277 <+=?|> "summary": {},
2278 <+=?|> "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
2279 <+=?|> "menu": {"type": 1, "label": 1},
2280 <+=?|> "dialog": {"open": 1}
2281 <+=?|>};
2282  
2283 <+=?|>var elements = Object.keys(attributeMap);
2284  
2285 <+=?|>function is(token, type) {
2286 <+=?|> return token.type.lastIndexOf(type + ".xml") > -1;
2287 <+=?|>}
2288  
2289 <+=?|>function findTagName(session, pos) {
2290 <+=?|> var iterator = new TokenIterator(session, pos.row, pos.column);
2291 <+=?|> var token = iterator.getCurrentToken();
2292 <+=?|> while (token && !is(token, "tag-name")){
2293 <+=?|> token = iterator.stepBackward();
2294 <+=?|> }
2295 <+=?|> if (token)
2296 <+=?|> return token.value;
2297 <+=?|>}
2298  
2299 <+=?|>function findAttributeName(session, pos) {
2300 <+=?|> var iterator = new TokenIterator(session, pos.row, pos.column);
2301 <+=?|> var token = iterator.getCurrentToken();
2302 <+=?|> while (token && !is(token, "attribute-name")){
2303 <+=?|> token = iterator.stepBackward();
2304 <+=?|> }
2305 <+=?|> if (token)
2306 <+=?|> return token.value;
2307 <+=?|>}
2308  
2309 <+=?|>var HtmlCompletions = function() {
2310  
2311 <+=?|>};
2312  
2313 <+=?|>(function() {
2314  
2315 <+=?|> this.getCompletions = function(state, session, pos, prefix) {
2316 <+=?|> var token = session.getTokenAt(pos.row, pos.column);
2317  
2318 <+=?|> if (!token)
2319 <+=?|> return [];
2320 <+=?|> if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
2321 <+=?|> return this.getTagCompletions(state, session, pos, prefix);
2322 <+=?|> if (is(token, "tag-whitespace") || is(token, "attribute-name"))
2323 <+=?|> return this.getAttributeCompletions(state, session, pos, prefix);
2324 <+=?|> if (is(token, "attribute-value"))
2325 <+=?|> return this.getAttributeValueCompletions(state, session, pos, prefix);
2326 <+=?|> var line = session.getLine(pos.row).substr(0, pos.column);
2327 <+=?|> if (/&[a-z]*$/i.test(line))
2328 <+=?|> return this.getHTMLEntityCompletions(state, session, pos, prefix);
2329  
2330 <+=?|> return [];
2331 <+=?|> };
2332  
2333 <+=?|> this.getTagCompletions = function(state, session, pos, prefix) {
2334 <+=?|> return elements.map(function(element){
2335 <+=?|> return {
2336 <+=?|> value: element,
2337 <+=?|> meta: "tag",
2338 <+=?|> score: Number.MAX_VALUE
2339 <+=?|> };
2340 <+=?|> });
2341 <+=?|> };
2342  
2343 <+=?|> this.getAttributeCompletions = function(state, session, pos, prefix) {
2344 <+=?|> var tagName = findTagName(session, pos);
2345 <+=?|> if (!tagName)
2346 <+=?|> return [];
2347 <+=?|> var attributes = globalAttributes;
2348 <+=?|> if (tagName in attributeMap) {
2349 <+=?|> attributes = attributes.concat(Object.keys(attributeMap[tagName]));
2350 <+=?|> }
2351 <+=?|> return attributes.map(function(attribute){
2352 <+=?|> return {
2353 <+=?|> caption: attribute,
2354 <+=?|> snippet: attribute + '="$0"',
2355 <+=?|> meta: "attribute",
2356 <+=?|> score: Number.MAX_VALUE
2357 <+=?|> };
2358 <+=?|> });
2359 <+=?|> };
2360  
2361 <+=?|> this.getAttributeValueCompletions = function(state, session, pos, prefix) {
2362 <+=?|> var tagName = findTagName(session, pos);
2363 <+=?|> var attributeName = findAttributeName(session, pos);
2364  
2365 <+=?|> if (!tagName)
2366 <+=?|> return [];
2367 <+=?|> var values = [];
2368 <+=?|> if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
2369 <+=?|> values = Object.keys(attributeMap[tagName][attributeName]);
2370 <+=?|> }
2371 <+=?|> return values.map(function(value){
2372 <+=?|> return {
2373 <+=?|> caption: value,
2374 <+=?|> snippet: value,
2375 <+=?|> meta: "attribute value",
2376 <+=?|> score: Number.MAX_VALUE
2377 <+=?|> };
2378 <+=?|> });
2379 <+=?|> };
2380  
2381 <+=?|> this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
2382 <+=?|> var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
2383  
2384 <+=?|> return values.map(function(value){
2385 <+=?|> return {
2386 <+=?|> caption: value,
2387 <+=?|> snippet: value,
2388 <+=?|> meta: "html entity",
2389 <+=?|> score: Number.MAX_VALUE
2390 <+=?|> };
2391 <+=?|> });
2392 <+=?|> };
2393  
2394 <+=?|>}).call(HtmlCompletions.prototype);
2395  
2396 <+=?|>exports.HtmlCompletions = HtmlCompletions;
2397 <+=?|>});
2398  
2399 <+=?|>ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
2400 <+=?|>"use strict";
2401  
2402 <+=?|>var oop = require("../lib/oop");
2403 <+=?|>var lang = require("../lib/lang");
2404 <+=?|>var TextMode = require("./text").Mode;
2405 <+=?|>var JavaScriptMode = require("./javascript").Mode;
2406 <+=?|>var CssMode = require("./css").Mode;
2407 <+=?|>var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2408 <+=?|>var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
2409 <+=?|>var HtmlFoldMode = require("./folding/html").FoldMode;
2410 <+=?|>var HtmlCompletions = require("./html_completions").HtmlCompletions;
2411 <+=?|>var WorkerClient = require("../worker/worker_client").WorkerClient;
2412 <+=?|>var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2413 <+=?|>var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2414  
2415 <+=?|>var Mode = function(options) {
2416 <+=?|> this.fragmentContext = options && options.fragmentContext;
2417 <+=?|> this.HighlightRules = HtmlHighlightRules;
2418 <+=?|> this.$behaviour = new XmlBehaviour();
2419 <+=?|> this.$completer = new HtmlCompletions();
2420  
2421 <+=?|> this.createModeDelegates({
2422 <+=?|> "js-": JavaScriptMode,
2423 <+=?|> "css-": CssMode
2424 <+=?|> });
2425  
2426 <+=?|> this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2427 <+=?|>};
2428 <+=?|>oop.inherits(Mode, TextMode);
2429  
2430 <+=?|>(function() {
2431  
2432 <+=?|> this.blockComment = {start: "<!--", end: "-->"};
2433  
2434 <+=?|> this.voidElements = lang.arrayToMap(voidElements);
2435  
2436 <+=?|> this.getNextLineIndent = function(state, line, tab) {
2437 <+=?|> return this.$getIndent(line);
2438 <+=?|> };
2439  
2440 <+=?|> this.checkOutdent = function(state, line, input) {
2441 <+=?|> return false;
2442 <+=?|> };
2443  
2444 <+=?|> this.getCompletions = function(state, session, pos, prefix) {
2445 <+=?|> return this.$completer.getCompletions(state, session, pos, prefix);
2446 <+=?|> };
2447  
2448 <+=?|> this.createWorker = function(session) {
2449 <+=?|> if (this.constructor != Mode)
2450 <+=?|> return;
2451 <+=?|> var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2452 <+=?|> worker.attachToDocument(session.getDocument());
2453  
2454 <+=?|> if (this.fragmentContext)
2455 <+=?|> worker.call("setOptions", [{context: this.fragmentContext}]);
2456  
2457 <+=?|> worker.on("error", function(e) {
2458 <+=?|> session.setAnnotations(e.data);
2459 <+=?|> });
2460  
2461 <+=?|> worker.on("terminate", function() {
2462 <+=?|> session.clearAnnotations();
2463 <+=?|> });
2464  
2465 <+=?|> return worker;
2466 <+=?|> };
2467  
2468 <+=?|> this.$id = "ace/mode/html";
2469 <+=?|>}).call(Mode.prototype);
2470  
2471 <+=?|>exports.Mode = Mode;
2472 <+=?|>});
2473  
2474 <+=?|>ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) {
2475 <+=?|>"use strict";
2476  
2477 <+=?|>var oop = require("../lib/oop");
2478 <+=?|>var lang = require("../lib/lang");
2479 <+=?|>var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2480 <+=?|>var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
2481 <+=?|>var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
2482 <+=?|>var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2483 <+=?|>var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
2484  
2485 <+=?|>var escaped = function(ch) {
2486 <+=?|> return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
2487 <+=?|>}
2488  
2489 <+=?|>function github_embed(tag, prefix) {
2490 <+=?|> return { // Github style block
2491 <+=?|> token : "support.function",
2492 <+=?|> regex : "^\\s*```" + tag + "\\s*$",
2493 <+=?|> push : prefix + "start"
2494 <+=?|> };
2495 <+=?|>}
2496  
2497 <+=?|>var MarkdownHighlightRules = function() {
2498 <+=?|> HtmlHighlightRules.call(this);
2499  
2500 <+=?|> this.$rules["start"].unshift({
2501 <+=?|> token : "empty_line",
2502 <+=?|> regex : '^$',
2503 <+=?|> next: "allowBlock"
2504 <+=?|> }, { // h1
2505 <+=?|> token: "markup.heading.1",
2506 <+=?|> regex: "^=+(?=\\s*$)"
2507 <+=?|> }, { // h2
2508 <+=?|> token: "markup.heading.2",
2509 <+=?|> regex: "^\\-+(?=\\s*$)"
2510 <+=?|> }, {
2511 <+=?|> token : function(value) {
2512 <+=?|> return "markup.heading." + value.length;
2513 <+=?|> },
2514 <+=?|> regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
2515 <+=?|> next : "header"
2516 <+=?|> },
2517 <+=?|> github_embed("(?:javascript|js)", "jscode-"),
2518 <+=?|> github_embed("xml", "xmlcode-"),
2519 <+=?|> github_embed("html", "htmlcode-"),
2520 <+=?|> github_embed("css", "csscode-"),
2521 <+=?|> { // Github style block
2522 <+=?|> token : "support.function",
2523 <+=?|> regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
2524 <+=?|> next : "githubblock"
2525 <+=?|> }, { // block quote
2526 <+=?|> token : "string.blockquote",
2527 <+=?|> regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
2528 <+=?|> next : "blockquote"
2529 <+=?|> }, { // HR * - _
2530 <+=?|> token : "constant",
2531 <+=?|> regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",
2532 <+=?|> next: "allowBlock"
2533 <+=?|> }, { // list
2534 <+=?|> token : "markup.list",
2535 <+=?|> regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
2536 <+=?|> next : "listblock-start"
2537 <+=?|> }, {
2538 <+=?|> include : "basic"
2539 <+=?|> });
2540  
2541 <+=?|> this.addRules({
2542 <+=?|> "basic" : [{
2543 <+=?|> token : "constant.language.escape",
2544 <+=?|> regex : /\\[\\`*_{}\[\]()#+\-.!]/
2545 <+=?|> }, { // code span `
2546 <+=?|> token : "support.function",
2547 <+=?|> regex : "(`+)(.*?[^`])(\\1)"
2548 <+=?|> }, { // reference
2549 <+=?|> token : ["text", "constant", "text", "url", "string", "text"],
2550 <+=?|> regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
2551 <+=?|> }, { // link by reference
2552 <+=?|> token : ["text", "string", "text", "constant", "text"],
2553 <+=?|> regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])"
2554 <+=?|> }, { // link by url
2555 <+=?|> token : ["text", "string", "text", "markup.underline", "string", "text"],
2556 <+=?|> regex : "(\\[)(" + // [
2557 <+=?|> escaped("]") + // link text
2558 <+=?|> ")(\\]\\()"+ // ](
2559 <+=?|> '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href
2560 <+=?|> '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
2561 <+=?|> "(\\))" // )
2562 <+=?|> }, { // strong ** __
2563 <+=?|> token : "string.strong",
2564 <+=?|> regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
2565 <+=?|> }, { // emphasis * _
2566 <+=?|> token : "string.emphasis",
2567 <+=?|> regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
2568 <+=?|> }, { //
2569 <+=?|> token : ["text", "url", "text"],
2570 <+=?|> regex : "(<)("+
2571 <+=?|> "(?:https?|ftp|dict):[^'\">\\s]+"+
2572 <+=?|> "|"+
2573 <+=?|> "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
2574 <+=?|> ")(>)"
2575 <+=?|> }],
2576 <+=?|> "allowBlock": [
2577 <+=?|> {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},
2578 <+=?|> {token : "empty_line", regex : '^$', next: "allowBlock"},
2579 <+=?|> {token : "empty", regex : "", next : "start"}
2580 <+=?|> ],
2581  
2582 <+=?|> "header" : [{
2583 <+=?|> regex: "$",
2584 <+=?|> next : "start"
2585 <+=?|> }, {
2586 <+=?|> include: "basic"
2587 <+=?|> }, {
2588 <+=?|> defaultToken : "heading"
2589 <+=?|> } ],
2590  
2591 <+=?|> "listblock-start" : [{
2592 <+=?|> token : "support.variable",
2593 <+=?|> regex : /(?:\[[ x]\])?/,
2594 <+=?|> next : "listblock"
2595 <+=?|> }],
2596  
2597 <+=?|> "listblock" : [ { // Lists only escape on completely blank lines.
2598 <+=?|> token : "empty_line",
2599 <+=?|> regex : "^$",
2600 <+=?|> next : "start"
2601 <+=?|> }, { // list
2602 <+=?|> token : "markup.list",
2603 <+=?|> regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
2604 <+=?|> next : "listblock-start"
2605 <+=?|> }, {
2606 <+=?|> include : "basic", noEscape: true
2607 <+=?|> }, { // Github style block
2608 <+=?|> token : "support.function",
2609 <+=?|> regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
2610 <+=?|> next : "githubblock"
2611 <+=?|> }, {
2612 <+=?|> defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
2613 <+=?|> } ],
2614  
2615 <+=?|> "blockquote" : [ { // Blockquotes only escape on blank lines.
2616 <+=?|> token : "empty_line",
2617 <+=?|> regex : "^\\s*$",
2618 <+=?|> next : "start"
2619 <+=?|> }, { // block quote
2620 <+=?|> token : "string.blockquote",
2621 <+=?|> regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
2622 <+=?|> next : "blockquote"
2623 <+=?|> }, {
2624 <+=?|> include : "basic", noEscape: true
2625 <+=?|> }, {
2626 <+=?|> defaultToken : "string.blockquote"
2627 <+=?|> } ],
2628  
2629 <+=?|> "githubblock" : [ {
2630 <+=?|> token : "support.function",
2631 <+=?|> regex : "^\\s*```",
2632 <+=?|> next : "start"
2633 <+=?|> }, {
2634 <+=?|> token : "support.function",
2635 <+=?|> regex : ".+"
2636 <+=?|> } ]
2637 <+=?|> });
2638  
2639 <+=?|> this.embedRules(JavaScriptHighlightRules, "jscode-", [{
2640 <+=?|> token : "support.function",
2641 <+=?|> regex : "^\\s*```",
2642 <+=?|> next : "pop"
2643 <+=?|> }]);
2644  
2645 <+=?|> this.embedRules(HtmlHighlightRules, "htmlcode-", [{
2646 <+=?|> token : "support.function",
2647 <+=?|> regex : "^\\s*```",
2648 <+=?|> next : "pop"
2649 <+=?|> }]);
2650  
2651 <+=?|> this.embedRules(CssHighlightRules, "csscode-", [{
2652 <+=?|> token : "support.function",
2653 <+=?|> regex : "^\\s*```",
2654 <+=?|> next : "pop"
2655 <+=?|> }]);
2656  
2657 <+=?|> this.embedRules(XmlHighlightRules, "xmlcode-", [{
2658 <+=?|> token : "support.function",
2659 <+=?|> regex : "^\\s*```",
2660 <+=?|> next : "pop"
2661 <+=?|> }]);
2662  
2663 <+=?|> this.normalizeRules();
2664 <+=?|>};
2665 <+=?|>oop.inherits(MarkdownHighlightRules, TextHighlightRules);
2666  
2667 <+=?|>exports.MarkdownHighlightRules = MarkdownHighlightRules;
2668 <+=?|>});
2669  
2670 <+=?|>ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
2671 <+=?|>"use strict";
2672  
2673 <+=?|>var oop = require("../../lib/oop");
2674 <+=?|>var BaseFoldMode = require("./fold_mode").FoldMode;
2675 <+=?|>var Range = require("../../range").Range;
2676  
2677 <+=?|>var FoldMode = exports.FoldMode = function() {};
2678 <+=?|>oop.inherits(FoldMode, BaseFoldMode);
2679  
2680 <+=?|>(function() {
2681 <+=?|> this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/;
2682  
2683 <+=?|> this.getFoldWidget = function(session, foldStyle, row) {
2684 <+=?|> var line = session.getLine(row);
2685 <+=?|> if (!this.foldingStartMarker.test(line))
2686 <+=?|> return "";
2687  
2688 <+=?|> if (line[0] == "`") {
2689 <+=?|> if (session.bgTokenizer.getState(row) == "start")
2690 <+=?|> return "end";
2691 <+=?|> return "start";
2692 <+=?|> }
2693  
2694 <+=?|> return "start";
2695 <+=?|> };
2696  
2697 <+=?|> this.getFoldWidgetRange = function(session, foldStyle, row) {
2698 <+=?|> var line = session.getLine(row);
2699 <+=?|> var startColumn = line.length;
2700 <+=?|> var maxRow = session.getLength();
2701 <+=?|> var startRow = row;
2702 <+=?|> var endRow = row;
2703 <+=?|> if (!line.match(this.foldingStartMarker))
2704 <+=?|> return;
2705  
2706 <+=?|> if (line[0] == "`") {
2707 <+=?|> if (session.bgTokenizer.getState(row) !== "start") {
2708 <+=?|> while (++row < maxRow) {
2709 <+=?|> line = session.getLine(row);
2710 <+=?|> if (line[0] == "`" & line.substring(0, 3) == "```")
2711 <+=?|> break;
2712 <+=?|> }
2713 <+=?|> return new Range(startRow, startColumn, row, 0);
2714 <+=?|> } else {
2715 <+=?|> while (row -- > 0) {
2716 <+=?|> line = session.getLine(row);
2717 <+=?|> if (line[0] == "`" & line.substring(0, 3) == "```")
2718 <+=?|> break;
2719 <+=?|> }
2720 <+=?|> return new Range(row, line.length, startRow, 0);
2721 <+=?|> }
2722 <+=?|> }
2723  
2724 <+=?|> var token;
2725 <+=?|> function isHeading(row) {
2726 <+=?|> token = session.getTokens(row)[0];
2727 <+=?|> return token && token.type.lastIndexOf(heading, 0) === 0;
2728 <+=?|> }
2729  
2730 <+=?|> var heading = "markup.heading";
2731 <+=?|> function getLevel() {
2732 <+=?|> var ch = token.value[0];
2733 <+=?|> if (ch == "=") return 6;
2734 <+=?|> if (ch == "-") return 5;
2735 <+=?|> return 7 - token.value.search(/[^#]/);
2736 <+=?|> }
2737  
2738 <+=?|> if (isHeading(row)) {
2739 <+=?|> var startHeadingLevel = getLevel();
2740 <+=?|> while (++row < maxRow) {
2741 <+=?|> if (!isHeading(row))
2742 <+=?|> continue;
2743 <+=?|> var level = getLevel();
2744 <+=?|> if (level >= startHeadingLevel)
2745 <+=?|> break;
2746 <+=?|> }
2747  
2748 <+=?|> endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2);
2749  
2750 <+=?|> if (endRow > startRow) {
2751 <+=?|> while (endRow > startRow && /^\s*$/.test(session.getLine(endRow)))
2752 <+=?|> endRow--;
2753 <+=?|> }
2754  
2755 <+=?|> if (endRow > startRow) {
2756 <+=?|> var endColumn = session.getLine(endRow).length;
2757 <+=?|> return new Range(startRow, startColumn, endRow, endColumn);
2758 <+=?|> }
2759 <+=?|> }
2760 <+=?|> };
2761  
2762 <+=?|>}).call(FoldMode.prototype);
2763  
2764 <+=?|>});
2765  
2766 <+=?|>ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown"], function(require, exports, module) {
2767 <+=?|>"use strict";
2768  
2769 <+=?|>var oop = require("../lib/oop");
2770 <+=?|>var TextMode = require("./text").Mode;
2771 <+=?|>var JavaScriptMode = require("./javascript").Mode;
2772 <+=?|>var XmlMode = require("./xml").Mode;
2773 <+=?|>var HtmlMode = require("./html").Mode;
2774 <+=?|>var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
2775 <+=?|>var MarkdownFoldMode = require("./folding/markdown").FoldMode;
2776  
2777 <+=?|>var Mode = function() {
2778 <+=?|> this.HighlightRules = MarkdownHighlightRules;
2779  
2780 <+=?|> this.createModeDelegates({
2781 <+=?|> "js-": JavaScriptMode,
2782 <+=?|> "xml-": XmlMode,
2783 <+=?|> "html-": HtmlMode
2784 <+=?|> });
2785  
2786 <+=?|> this.foldingRules = new MarkdownFoldMode();
2787 <+=?|> this.$behaviour = this.$defaultBehaviour;
2788 <+=?|>};
2789 <+=?|>oop.inherits(Mode, TextMode);
2790  
2791 <+=?|>(function() {
2792 <+=?|> this.type = "text";
2793 <+=?|> this.blockComment = {start: "<!--", end: "-->"};
2794  
2795 <+=?|> this.getNextLineIndent = function(state, line, tab) {
2796 <+=?|> if (state == "listblock") {
2797 <+=?|> var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line);
2798 <+=?|> if (!match)
2799 <+=?|> return "";
2800 <+=?|> var marker = match[2];
2801 <+=?|> if (!marker)
2802 <+=?|> marker = parseInt(match[3], 10) + 1 + ".";
2803 <+=?|> return match[1] + marker + match[4];
2804 <+=?|> } else {
2805 <+=?|> return this.$getIndent(line);
2806 <+=?|> }
2807 <+=?|> };
2808 <+=?|> this.$id = "ace/mode/markdown";
2809 <+=?|>}).call(Mode.prototype);
2810  
2811 <+=?|>exports.Mode = Mode;
2812 <+=?|>});