corrade-nucleus-nucleons – Blame information for rev 2

Subversion Repositories:
Rev:
Rev Author Line No. Line
2 office 1 define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
2 "use strict";
3  
4 var oop = require("../lib/oop");
5 var lang = require("../lib/lang");
6 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
7 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";
8 var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
9 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";
10 var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
11 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";
12  
13 var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
14 var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
15 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";
16  
17 var CssHighlightRules = function() {
18  
19 var keywordMapper = this.createKeywordMapper({
20 "support.function": supportFunction,
21 "support.constant": supportConstant,
22 "support.type": supportType,
23 "support.constant.color": supportConstantColor,
24 "support.constant.fonts": supportConstantFonts
25 }, "text", true);
26  
27 this.$rules = {
28 "start" : [{
29 token : "comment", // multi line comment
30 regex : "\\/\\*",
31 push : "comment"
32 }, {
33 token: "paren.lparen",
34 regex: "\\{",
35 push: "ruleset"
36 }, {
37 token: "string",
38 regex: "@.*?{",
39 push: "media"
40 }, {
41 token: "keyword",
42 regex: "#[a-z0-9-_]+"
43 }, {
44 token: "variable",
45 regex: "\\.[a-z0-9-_]+"
46 }, {
47 token: "string",
48 regex: ":[a-z0-9-_]+"
49 }, {
50 token: "constant",
51 regex: "[a-z0-9-_]+"
52 }, {
53 caseInsensitive: true
54 }],
55  
56 "media" : [{
57 token : "comment", // multi line comment
58 regex : "\\/\\*",
59 push : "comment"
60 }, {
61 token: "paren.lparen",
62 regex: "\\{",
63 push: "ruleset"
64 }, {
65 token: "string",
66 regex: "\\}",
67 next: "pop"
68 }, {
69 token: "keyword",
70 regex: "#[a-z0-9-_]+"
71 }, {
72 token: "variable",
73 regex: "\\.[a-z0-9-_]+"
74 }, {
75 token: "string",
76 regex: ":[a-z0-9-_]+"
77 }, {
78 token: "constant",
79 regex: "[a-z0-9-_]+"
80 }, {
81 caseInsensitive: true
82 }],
83  
84 "comment" : [{
85 token : "comment",
86 regex : "\\*\\/",
87 next : "pop"
88 }, {
89 defaultToken : "comment"
90 }],
91  
92 "ruleset" : [
93 {
94 token : "paren.rparen",
95 regex : "\\}",
96 next: "pop"
97 }, {
98 token : "comment", // multi line comment
99 regex : "\\/\\*",
100 push : "comment"
101 }, {
102 token : "string", // single line
103 regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
104 }, {
105 token : "string", // single line
106 regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
107 }, {
108 token : ["constant.numeric", "keyword"],
109 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|%)"
110 }, {
111 token : "constant.numeric",
112 regex : numRe
113 }, {
114 token : "constant.numeric", // hex6 color
115 regex : "#[a-f0-9]{6}"
116 }, {
117 token : "constant.numeric", // hex3 color
118 regex : "#[a-f0-9]{3}"
119 }, {
120 token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
121 regex : pseudoElements
122 }, {
123 token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
124 regex : pseudoClasses
125 }, {
126 token : ["support.function", "string", "support.function"],
127 regex : "(url\\()(.*)(\\))"
128 }, {
129 token : keywordMapper,
130 regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
131 }, {
132 caseInsensitive: true
133 }]
134 };
135  
136 this.normalizeRules();
137 };
138  
139 oop.inherits(CssHighlightRules, TextHighlightRules);
140  
141 exports.CssHighlightRules = CssHighlightRules;
142  
143 });
144  
145 define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
146 "use strict";
147  
148 var oop = require("../lib/oop");
149 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
150  
151 var DocCommentHighlightRules = function() {
152 this.$rules = {
153 "start" : [ {
154 token : "comment.doc.tag",
155 regex : "@[\\w\\d_]+" // TODO: fix email addresses
156 },
157 DocCommentHighlightRules.getTagRule(),
158 {
159 defaultToken : "comment.doc",
160 caseInsensitive: true
161 }]
162 };
163 };
164  
165 oop.inherits(DocCommentHighlightRules, TextHighlightRules);
166  
167 DocCommentHighlightRules.getTagRule = function(start) {
168 return {
169 token : "comment.doc.tag.storage.type",
170 regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
171 };
172 }
173  
174 DocCommentHighlightRules.getStartRule = function(start) {
175 return {
176 token : "comment.doc", // doc comment
177 regex : "\\/\\*(?=\\*)",
178 next : start
179 };
180 };
181  
182 DocCommentHighlightRules.getEndRule = function (start) {
183 return {
184 token : "comment.doc", // closing comment
185 regex : "\\*\\/",
186 next : start
187 };
188 };
189  
190  
191 exports.DocCommentHighlightRules = DocCommentHighlightRules;
192  
193 });
194  
195 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) {
196 "use strict";
197  
198 var oop = require("../lib/oop");
199 var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
200 var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
201 var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
202  
203 var JavaScriptHighlightRules = function(options) {
204 var keywordMapper = this.createKeywordMapper({
205 "variable.language":
206 "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
207 "Namespace|QName|XML|XMLList|" + // E4X
208 "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
209 "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
210 "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
211 "SyntaxError|TypeError|URIError|" +
212 "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
213 "isNaN|parseFloat|parseInt|" +
214 "JSON|Math|" + // Other
215 "this|arguments|prototype|window|document" , // Pseudo
216 "keyword":
217 "const|yield|import|get|set|async|await|" +
218 "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
219 "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
220 "__parent__|__count__|escape|unescape|with|__proto__|" +
221 "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
222 "storage.type":
223 "const|let|var|function",
224 "constant.language":
225 "null|Infinity|NaN|undefined",
226 "support.function":
227 "alert",
228 "constant.language.boolean": "true|false"
229 }, "identifier");
230 var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
231  
232 var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
233 "u[0-9a-fA-F]{4}|" + // unicode
234 "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
235 "[0-2][0-7]{0,2}|" + // oct
236 "3[0-7][0-7]?|" + // oct
237 "[4-7][0-7]?|" + //oct
238 ".)";
239  
240 this.$rules = {
241 "no_regex" : [
242 DocCommentHighlightRules.getStartRule("doc-start"),
243 comments("no_regex"),
244 {
245 token : "string",
246 regex : "'(?=.)",
247 next : "qstring"
248 }, {
249 token : "string",
250 regex : '"(?=.)',
251 next : "qqstring"
252 }, {
253 token : "constant.numeric", // hex
254 regex : /0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/
255 }, {
256 token : "constant.numeric", // float
257 regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
258 }, {
259 token : [
260 "storage.type", "punctuation.operator", "support.function",
261 "punctuation.operator", "entity.name.function", "text","keyword.operator"
262 ],
263 regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
264 next: "function_arguments"
265 }, {
266 token : [
267 "storage.type", "punctuation.operator", "entity.name.function", "text",
268 "keyword.operator", "text", "storage.type", "text", "paren.lparen"
269 ],
270 regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
271 next: "function_arguments"
272 }, {
273 token : [
274 "entity.name.function", "text", "keyword.operator", "text", "storage.type",
275 "text", "paren.lparen"
276 ],
277 regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
278 next: "function_arguments"
279 }, {
280 token : [
281 "storage.type", "punctuation.operator", "entity.name.function", "text",
282 "keyword.operator", "text",
283 "storage.type", "text", "entity.name.function", "text", "paren.lparen"
284 ],
285 regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
286 next: "function_arguments"
287 }, {
288 token : [
289 "storage.type", "text", "entity.name.function", "text", "paren.lparen"
290 ],
291 regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
292 next: "function_arguments"
293 }, {
294 token : [
295 "entity.name.function", "text", "punctuation.operator",
296 "text", "storage.type", "text", "paren.lparen"
297 ],
298 regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
299 next: "function_arguments"
300 }, {
301 token : [
302 "text", "text", "storage.type", "text", "paren.lparen"
303 ],
304 regex : "(:)(\\s*)(function)(\\s*)(\\()",
305 next: "function_arguments"
306 }, {
307 token : "keyword",
308 regex : "(?:" + kwBeforeRe + ")\\b",
309 next : "start"
310 }, {
311 token : ["support.constant"],
312 regex : /that\b/
313 }, {
314 token : ["storage.type", "punctuation.operator", "support.function.firebug"],
315 regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
316 }, {
317 token : keywordMapper,
318 regex : identifierRe
319 }, {
320 token : "punctuation.operator",
321 regex : /[.](?![.])/,
322 next : "property"
323 }, {
324 token : "keyword.operator",
325 regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
326 <+=?|> next : "start"
327 <+=?|> }, {
328 <+=?|> token : "punctuation.operator",
329 <+=?|> regex : /[?:,;.]/,
330 <+=?|> next : "start"
331 <+=?|> }, {
332 <+=?|> token : "paren.lparen",
333 <+=?|> regex : /[\[({]/,
334 <+=?|> next : "start"
335 <+=?|> }, {
336 <+=?|> token : "paren.rparen",
337 <+=?|> regex : /[\])}]/
338 <+=?|> }, {
339 <+=?|> token: "comment",
340 <+=?|> regex: /^#!.*$/
341 <+=?|> }
342 <+=?|> ],
343 <+=?|> property: [{
344 <+=?|> token : "text",
345 <+=?|> regex : "\\s+"
346 <+=?|> }, {
347 <+=?|> token : [
348 <+=?|> "storage.type", "punctuation.operator", "entity.name.function", "text",
349 <+=?|> "keyword.operator", "text",
350 <+=?|> "storage.type", "text", "entity.name.function", "text", "paren.lparen"
351 <+=?|> ],
352 <+=?|> regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
353 <+=?|> next: "function_arguments"
354 <+=?|> }, {
355 <+=?|> token : "punctuation.operator",
356 <+=?|> regex : /[.](?![.])/
357 <+=?|> }, {
358 <+=?|> token : "support.function",
359 <+=?|> 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(?=\()/
360 <+=?|> }, {
361 <+=?|> token : "support.function.dom",
362 <+=?|> 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(?=\()/
363 <+=?|> }, {
364 <+=?|> token : "support.constant",
365 <+=?|> 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/
366 <+=?|> }, {
367 <+=?|> token : "identifier",
368 <+=?|> regex : identifierRe
369 <+=?|> }, {
370 <+=?|> regex: "",
371 <+=?|> token: "empty",
372 <+=?|> next: "no_regex"
373 <+=?|> }
374 <+=?|> ],
375 <+=?|> "start": [
376 <+=?|> DocCommentHighlightRules.getStartRule("doc-start"),
377 <+=?|> comments("start"),
378 <+=?|> {
379 <+=?|> token: "string.regexp",
380 <+=?|> regex: "\\/",
381 <+=?|> next: "regex"
382 <+=?|> }, {
383 <+=?|> token : "text",
384 <+=?|> regex : "\\s+|^$",
385 <+=?|> next : "start"
386 <+=?|> }, {
387 <+=?|> token: "empty",
388 <+=?|> regex: "",
389 <+=?|> next: "no_regex"
390 <+=?|> }
391 <+=?|> ],
392 <+=?|> "regex": [
393 <+=?|> {
394 <+=?|> token: "regexp.keyword.operator",
395 <+=?|> regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
396 <+=?|> }, {
397 <+=?|> token: "string.regexp",
398 <+=?|> regex: "/[sxngimy]*",
399 <+=?|> next: "no_regex"
400 <+=?|> }, {
401 <+=?|> token : "invalid",
402 <+=?|> regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
403 <+=?|> }, {
404 <+=?|> token : "constant.language.escape",
405 <+=?|> regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
406 <+=?|> }, {
407 <+=?|> token : "constant.language.delimiter",
408 <+=?|> regex: /\|/
409 <+=?|> }, {
410 <+=?|> token: "constant.language.escape",
411 <+=?|> regex: /\[\^?/,
412 <+=?|> next: "regex_character_class"
413 <+=?|> }, {
414 <+=?|> token: "empty",
415 <+=?|> regex: "$",
416 <+=?|> next: "no_regex"
417 <+=?|> }, {
418 <+=?|> defaultToken: "string.regexp"
419 <+=?|> }
420 <+=?|> ],
421 <+=?|> "regex_character_class": [
422 <+=?|> {
423 <+=?|> token: "regexp.charclass.keyword.operator",
424 <+=?|> regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
425 <+=?|> }, {
426 <+=?|> token: "constant.language.escape",
427 <+=?|> regex: "]",
428 <+=?|> next: "regex"
429 <+=?|> }, {
430 <+=?|> token: "constant.language.escape",
431 <+=?|> regex: "-"
432 <+=?|> }, {
433 <+=?|> token: "empty",
434 <+=?|> regex: "$",
435 <+=?|> next: "no_regex"
436 <+=?|> }, {
437 <+=?|> defaultToken: "string.regexp.charachterclass"
438 <+=?|> }
439 <+=?|> ],
440 <+=?|> "function_arguments": [
441 <+=?|> {
442 <+=?|> token: "variable.parameter",
443 <+=?|> regex: identifierRe
444 <+=?|> }, {
445 <+=?|> token: "punctuation.operator",
446 <+=?|> regex: "[, ]+"
447 <+=?|> }, {
448 <+=?|> token: "punctuation.operator",
449 <+=?|> regex: "$"
450 <+=?|> }, {
451 <+=?|> token: "empty",
452 <+=?|> regex: "",
453 <+=?|> next: "no_regex"
454 <+=?|> }
455 <+=?|> ],
456 <+=?|> "qqstring" : [
457 <+=?|> {
458 <+=?|> token : "constant.language.escape",
459 <+=?|> regex : escapedRe
460 <+=?|> }, {
461 <+=?|> token : "string",
462 <+=?|> regex : "\\\\$",
463 <+=?|> next : "qqstring"
464 <+=?|> }, {
465 <+=?|> token : "string",
466 <+=?|> regex : '"|$',
467 <+=?|> next : "no_regex"
468 <+=?|> }, {
469 <+=?|> defaultToken: "string"
470 <+=?|> }
471 <+=?|> ],
472 <+=?|> "qstring" : [
473 <+=?|> {
474 <+=?|> token : "constant.language.escape",
475 <+=?|> regex : escapedRe
476 <+=?|> }, {
477 <+=?|> token : "string",
478 <+=?|> regex : "\\\\$",
479 <+=?|> next : "qstring"
480 <+=?|> }, {
481 <+=?|> token : "string",
482 <+=?|> regex : "'|$",
483 <+=?|> next : "no_regex"
484 <+=?|> }, {
485 <+=?|> defaultToken: "string"
486 <+=?|> }
487 <+=?|> ]
488 <+=?|> };
489  
490  
491 <+=?|> if (!options || !options.noES6) {
492 <+=?|> this.$rules.no_regex.unshift({
493 <+=?|> regex: "[{}]", onMatch: function(val, state, stack) {
494 <+=?|> this.next = val == "{" ? this.nextState : "";
495 <+=?|> if (val == "{" && stack.length) {
496 <+=?|> stack.unshift("start", state);
497 <+=?|> }
498 <+=?|> else if (val == "}" && stack.length) {
499 <+=?|> stack.shift();
500 <+=?|> this.next = stack.shift();
501 <+=?|> if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
502 <+=?|> return "paren.quasi.end";
503 <+=?|> }
504 <+=?|> return val == "{" ? "paren.lparen" : "paren.rparen";
505 <+=?|> },
506 <+=?|> nextState: "start"
507 <+=?|> }, {
508 <+=?|> token : "string.quasi.start",
509 <+=?|> regex : /`/,
510 <+=?|> push : [{
511 <+=?|> token : "constant.language.escape",
512 <+=?|> regex : escapedRe
513 <+=?|> }, {
514 <+=?|> token : "paren.quasi.start",
515 <+=?|> regex : /\${/,
516 <+=?|> push : "start"
517 <+=?|> }, {
518 <+=?|> token : "string.quasi.end",
519 <+=?|> regex : /`/,
520 <+=?|> next : "pop"
521 <+=?|> }, {
522 <+=?|> defaultToken: "string.quasi"
523 <+=?|> }]
524 <+=?|> });
525  
526 <+=?|> if (!options || options.jsx != false)
527 <+=?|> JSX.call(this);
528 <+=?|> }
529  
530 <+=?|> this.embedRules(DocCommentHighlightRules, "doc-",
531 <+=?|> [ DocCommentHighlightRules.getEndRule("no_regex") ]);
532  
533 <+=?|> this.normalizeRules();
534 <+=?|>};
535  
536 <+=?|>oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
537  
538 <+=?|>function JSX() {
539 <+=?|> var tagRegex = identifierRe.replace("\\d", "\\d\\-");
540 <+=?|> var jsxTag = {
541 <+=?|> onMatch : function(val, state, stack) {
542 <+=?|> var offset = val.charAt(1) == "/" ? 2 : 1;
543 <+=?|> if (offset == 1) {
544 <+=?|> if (state != this.nextState)
545 <+=?|> stack.unshift(this.next, this.nextState, 0);
546 <+=?|> else
547 <+=?|> stack.unshift(this.next);
548 <+=?|> stack[2]++;
549 <+=?|> } else if (offset == 2) {
550 <+=?|> if (state == this.nextState) {
551 <+=?|> stack[1]--;
552 <+=?|> if (!stack[1] || stack[1] < 0) {
553 <+=?|> stack.shift();
554 <+=?|> stack.shift();
555 <+=?|> }
556 <+=?|> }
557 <+=?|> }
558 <+=?|> return [{
559 <+=?|> type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
560 <+=?|> value: val.slice(0, offset)
561 <+=?|> }, {
562 <+=?|> type: "meta.tag.tag-name.xml",
563 <+=?|> value: val.substr(offset)
564 <+=?|> }];
565 <+=?|> },
566 <+=?|> regex : "</?" + tagRegex + "",
567 <+=?|> next: "jsxAttributes",
568 <+=?|> nextState: "jsx"
569 <+=?|> };
570 <+=?|> this.$rules.start.unshift(jsxTag);
571 <+=?|> var jsxJsRule = {
572 <+=?|> regex: "{",
573 <+=?|> token: "paren.quasi.start",
574 <+=?|> push: "start"
575 <+=?|> };
576 <+=?|> this.$rules.jsx = [
577 <+=?|> jsxJsRule,
578 <+=?|> jsxTag,
579 <+=?|> {include : "reference"},
580 <+=?|> {defaultToken: "string"}
581 <+=?|> ];
582 <+=?|> this.$rules.jsxAttributes = [{
583 <+=?|> token : "meta.tag.punctuation.tag-close.xml",
584 <+=?|> regex : "/?>",
585 <+=?|> onMatch : function(value, currentState, stack) {
586 <+=?|> if (currentState == stack[0])
587 <+=?|> stack.shift();
588 <+=?|> if (value.length == 2) {
589 <+=?|> if (stack[0] == this.nextState)
590 <+=?|> stack[1]--;
591 <+=?|> if (!stack[1] || stack[1] < 0) {
592 <+=?|> stack.splice(0, 2);
593 <+=?|> }
594 <+=?|> }
595 <+=?|> this.next = stack[0] || "start";
596 <+=?|> return [{type: this.token, value: value}];
597 <+=?|> },
598 <+=?|> nextState: "jsx"
599 <+=?|> },
600 <+=?|> jsxJsRule,
601 <+=?|> comments("jsxAttributes"),
602 <+=?|> {
603 <+=?|> token : "entity.other.attribute-name.xml",
604 <+=?|> regex : tagRegex
605 <+=?|> }, {
606 <+=?|> token : "keyword.operator.attribute-equals.xml",
607 <+=?|> regex : "="
608 <+=?|> }, {
609 <+=?|> token : "text.tag-whitespace.xml",
610 <+=?|> regex : "\\s+"
611 <+=?|> }, {
612 <+=?|> token : "string.attribute-value.xml",
613 <+=?|> regex : "'",
614 <+=?|> stateName : "jsx_attr_q",
615 <+=?|> push : [
616 <+=?|> {token : "string.attribute-value.xml", regex: "'", next: "pop"},
617 <+=?|> {include : "reference"},
618 <+=?|> {defaultToken : "string.attribute-value.xml"}
619 <+=?|> ]
620 <+=?|> }, {
621 <+=?|> token : "string.attribute-value.xml",
622 <+=?|> regex : '"',
623 <+=?|> stateName : "jsx_attr_qq",
624 <+=?|> push : [
625 <+=?|> {token : "string.attribute-value.xml", regex: '"', next: "pop"},
626 <+=?|> {include : "reference"},
627 <+=?|> {defaultToken : "string.attribute-value.xml"}
628 <+=?|> ]
629 <+=?|> },
630 <+=?|> jsxTag
631 <+=?|> ];
632 <+=?|> this.$rules.reference = [{
633 <+=?|> token : "constant.language.escape.reference.xml",
634 <+=?|> regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
635 <+=?|> }];
636 <+=?|>}
637  
638 <+=?|>function comments(next) {
639 <+=?|> return [
640 <+=?|> {
641 <+=?|> token : "comment", // multi line comment
642 <+=?|> regex : /\/\*/,
643 <+=?|> next: [
644 <+=?|> DocCommentHighlightRules.getTagRule(),
645 <+=?|> {token : "comment", regex : "\\*\\/", next : next || "pop"},
646 <+=?|> {defaultToken : "comment", caseInsensitive: true}
647 <+=?|> ]
648 <+=?|> }, {
649 <+=?|> token : "comment",
650 <+=?|> regex : "\\/\\/",
651 <+=?|> next: [
652 <+=?|> DocCommentHighlightRules.getTagRule(),
653 <+=?|> {token : "comment", regex : "$|^", next : next || "pop"},
654 <+=?|> {defaultToken : "comment", caseInsensitive: true}
655 <+=?|> ]
656 <+=?|> }
657 <+=?|> ];
658 <+=?|>}
659 <+=?|>exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
660 <+=?|>});
661  
662 <+=?|>define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
663 <+=?|>"use strict";
664  
665 <+=?|>var oop = require("../lib/oop");
666 <+=?|>var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
667  
668 <+=?|>var XmlHighlightRules = function(normalize) {
669 <+=?|> var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
670  
671 <+=?|> this.$rules = {
672 <+=?|> start : [
673 <+=?|> {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
674 <+=?|> {
675 <+=?|> token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
676 <+=?|> regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
677 <+=?|> },
678 <+=?|> {
679 <+=?|> token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
680 <+=?|> regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
681 <+=?|> },
682 <+=?|> {token : "comment.xml", regex : "<\\!--", next : "comment"},
683 <+=?|> {
684 <+=?|> token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
685 <+=?|> regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
686 <+=?|> },
687 <+=?|> {include : "tag"},
688 <+=?|> {token : "text.end-tag-open.xml", regex: "</"},
689 <+=?|> {token : "text.tag-open.xml", regex: "<"},
690 <+=?|> {include : "reference"},
691 <+=?|> {defaultToken : "text.xml"}
692 <+=?|> ],
693  
694 <+=?|> xml_decl : [{
695 <+=?|> token : "entity.other.attribute-name.decl-attribute-name.xml",
696 <+=?|> regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
697 <+=?|> }, {
698 <+=?|> token : "keyword.operator.decl-attribute-equals.xml",
699 <+=?|> regex : "="
700 <+=?|> }, {
701 <+=?|> include: "whitespace"
702 <+=?|> }, {
703 <+=?|> include: "string"
704 <+=?|> }, {
705 <+=?|> token : "punctuation.xml-decl.xml",
706 <+=?|> regex : "\\?>",
707 <+=?|> next : "start"
708 <+=?|> }],
709  
710 <+=?|> processing_instruction : [
711 <+=?|> {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
712 <+=?|> {defaultToken : "instruction.xml"}
713 <+=?|> ],
714  
715 <+=?|> doctype : [
716 <+=?|> {include : "whitespace"},
717 <+=?|> {include : "string"},
718 <+=?|> {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
719 <+=?|> {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
720 <+=?|> {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
721 <+=?|> ],
722  
723 <+=?|> int_subset : [{
724 <+=?|> token : "text.xml",
725 <+=?|> regex : "\\s+"
726 <+=?|> }, {
727 <+=?|> token: "punctuation.int-subset.xml",
728 <+=?|> regex: "]",
729 <+=?|> next: "pop"
730 <+=?|> }, {
731 <+=?|> token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
732 <+=?|> regex : "(<\\!)(" + tagRegex + ")",
733 <+=?|> push : [{
734 <+=?|> token : "text",
735 <+=?|> regex : "\\s+"
736 <+=?|> },
737 <+=?|> {
738 <+=?|> token : "punctuation.markup-decl.xml",
739 <+=?|> regex : ">",
740 <+=?|> next : "pop"
741 <+=?|> },
742 <+=?|> {include : "string"}]
743 <+=?|> }],
744  
745 <+=?|> cdata : [
746 <+=?|> {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
747 <+=?|> {token : "text.xml", regex : "\\s+"},
748 <+=?|> {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
749 <+=?|> ],
750  
751 <+=?|> comment : [
752 <+=?|> {token : "comment.xml", regex : "-->", next : "start"},
753 <+=?|> {defaultToken : "comment.xml"}
754 <+=?|> ],
755  
756 <+=?|> reference : [{
757 <+=?|> token : "constant.language.escape.reference.xml",
758 <+=?|> regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
759 <+=?|> }],
760  
761 <+=?|> attr_reference : [{
762 <+=?|> token : "constant.language.escape.reference.attribute-value.xml",
763 <+=?|> regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
764 <+=?|> }],
765  
766 <+=?|> tag : [{
767 <+=?|> token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
768 <+=?|> regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
769 <+=?|> next: [
770 <+=?|> {include : "attributes"},
771 <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
772 <+=?|> ]
773 <+=?|> }],
774  
775 <+=?|> tag_whitespace : [
776 <+=?|> {token : "text.tag-whitespace.xml", regex : "\\s+"}
777 <+=?|> ],
778 <+=?|> whitespace : [
779 <+=?|> {token : "text.whitespace.xml", regex : "\\s+"}
780 <+=?|> ],
781 <+=?|> string: [{
782 <+=?|> token : "string.xml",
783 <+=?|> regex : "'",
784 <+=?|> push : [
785 <+=?|> {token : "string.xml", regex: "'", next: "pop"},
786 <+=?|> {defaultToken : "string.xml"}
787 <+=?|> ]
788 <+=?|> }, {
789 <+=?|> token : "string.xml",
790 <+=?|> regex : '"',
791 <+=?|> push : [
792 <+=?|> {token : "string.xml", regex: '"', next: "pop"},
793 <+=?|> {defaultToken : "string.xml"}
794 <+=?|> ]
795 <+=?|> }],
796  
797 <+=?|> attributes: [{
798 <+=?|> token : "entity.other.attribute-name.xml",
799 <+=?|> regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
800 <+=?|> }, {
801 <+=?|> token : "keyword.operator.attribute-equals.xml",
802 <+=?|> regex : "="
803 <+=?|> }, {
804 <+=?|> include: "tag_whitespace"
805 <+=?|> }, {
806 <+=?|> include: "attribute_value"
807 <+=?|> }],
808  
809 <+=?|> attribute_value: [{
810 <+=?|> token : "string.attribute-value.xml",
811 <+=?|> regex : "'",
812 <+=?|> push : [
813 <+=?|> {token : "string.attribute-value.xml", regex: "'", next: "pop"},
814 <+=?|> {include : "attr_reference"},
815 <+=?|> {defaultToken : "string.attribute-value.xml"}
816 <+=?|> ]
817 <+=?|> }, {
818 <+=?|> token : "string.attribute-value.xml",
819 <+=?|> regex : '"',
820 <+=?|> push : [
821 <+=?|> {token : "string.attribute-value.xml", regex: '"', next: "pop"},
822 <+=?|> {include : "attr_reference"},
823 <+=?|> {defaultToken : "string.attribute-value.xml"}
824 <+=?|> ]
825 <+=?|> }]
826 <+=?|> };
827  
828 <+=?|> if (this.constructor === XmlHighlightRules)
829 <+=?|> this.normalizeRules();
830 <+=?|>};
831  
832  
833 <+=?|>(function() {
834  
835 <+=?|> this.embedTagRules = function(HighlightRules, prefix, tag){
836 <+=?|> this.$rules.tag.unshift({
837 <+=?|> token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
838 <+=?|> regex : "(<)(" + tag + "(?=\\s|>|$))",
839 <+=?|> next: [
840 <+=?|> {include : "attributes"},
841 <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
842 <+=?|> ]
843 <+=?|> });
844  
845 <+=?|> this.$rules[tag + "-end"] = [
846 <+=?|> {include : "attributes"},
847 <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
848 <+=?|> onMatch : function(value, currentState, stack) {
849 <+=?|> stack.splice(0);
850 <+=?|> return this.token;
851 <+=?|> }}
852 <+=?|> ]
853  
854 <+=?|> this.embedRules(HighlightRules, prefix, [{
855 <+=?|> token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
856 <+=?|> regex : "(</)(" + tag + "(?=\\s|>|$))",
857 <+=?|> next: tag + "-end"
858 <+=?|> }, {
859 <+=?|> token: "string.cdata.xml",
860 <+=?|> regex : "<\\!\\[CDATA\\["
861 <+=?|> }, {
862 <+=?|> token: "string.cdata.xml",
863 <+=?|> regex : "\\]\\]>"
864 <+=?|> }]);
865 <+=?|> };
866  
867 <+=?|>}).call(TextHighlightRules.prototype);
868  
869 <+=?|>oop.inherits(XmlHighlightRules, TextHighlightRules);
870  
871 <+=?|>exports.XmlHighlightRules = XmlHighlightRules;
872 <+=?|>});
873  
874 <+=?|>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) {
875 <+=?|>"use strict";
876  
877 <+=?|>var oop = require("../lib/oop");
878 <+=?|>var lang = require("../lib/lang");
879 <+=?|>var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
880 <+=?|>var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
881 <+=?|>var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
882  
883 <+=?|>var tagMap = lang.createMap({
884 <+=?|> a : 'anchor',
885 <+=?|> button : 'form',
886 <+=?|> form : 'form',
887 <+=?|> img : 'image',
888 <+=?|> input : 'form',
889 <+=?|> label : 'form',
890 <+=?|> option : 'form',
891 <+=?|> script : 'script',
892 <+=?|> select : 'form',
893 <+=?|> textarea : 'form',
894 <+=?|> style : 'style',
895 <+=?|> table : 'table',
896 <+=?|> tbody : 'table',
897 <+=?|> td : 'table',
898 <+=?|> tfoot : 'table',
899 <+=?|> th : 'table',
900 <+=?|> tr : 'table'
901 <+=?|>});
902  
903 <+=?|>var HtmlHighlightRules = function() {
904 <+=?|> XmlHighlightRules.call(this);
905  
906 <+=?|> this.addRules({
907 <+=?|> attributes: [{
908 <+=?|> include : "tag_whitespace"
909 <+=?|> }, {
910 <+=?|> token : "entity.other.attribute-name.xml",
911 <+=?|> regex : "[-_a-zA-Z0-9:.]+"
912 <+=?|> }, {
913 <+=?|> token : "keyword.operator.attribute-equals.xml",
914 <+=?|> regex : "=",
915 <+=?|> push : [{
916 <+=?|> include: "tag_whitespace"
917 <+=?|> }, {
918 <+=?|> token : "string.unquoted.attribute-value.html",
919 <+=?|> regex : "[^<>='\"`\\s]+",
920 <+=?|> next : "pop"
921 <+=?|> }, {
922 <+=?|> token : "empty",
923 <+=?|> regex : "",
924 <+=?|> next : "pop"
925 <+=?|> }]
926 <+=?|> }, {
927 <+=?|> include : "attribute_value"
928 <+=?|> }],
929 <+=?|> tag: [{
930 <+=?|> token : function(start, tag) {
931 <+=?|> var group = tagMap[tag];
932 <+=?|> return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
933 <+=?|> "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
934 <+=?|> },
935 <+=?|> regex : "(</?)([-_a-zA-Z0-9:.]+)",
936 <+=?|> next: "tag_stuff"
937 <+=?|> }],
938 <+=?|> tag_stuff: [
939 <+=?|> {include : "attributes"},
940 <+=?|> {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
941 <+=?|> ]
942 <+=?|> });
943  
944 <+=?|> this.embedTagRules(CssHighlightRules, "css-", "style");
945 <+=?|> this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
946  
947 <+=?|> if (this.constructor === HtmlHighlightRules)
948 <+=?|> this.normalizeRules();
949 <+=?|>};
950  
951 <+=?|>oop.inherits(HtmlHighlightRules, XmlHighlightRules);
952  
953 <+=?|>exports.HtmlHighlightRules = HtmlHighlightRules;
954 <+=?|>});
955  
956 <+=?|>define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
957 <+=?|>"use strict";
958  
959 <+=?|>var Range = require("../range").Range;
960  
961 <+=?|>var MatchingBraceOutdent = function() {};
962  
963 <+=?|>(function() {
964  
965 <+=?|> this.checkOutdent = function(line, input) {
966 <+=?|> if (! /^\s+$/.test(line))
967 <+=?|> return false;
968  
969 <+=?|> return /^\s*\}/.test(input);
970 <+=?|> };
971  
972 <+=?|> this.autoOutdent = function(doc, row) {
973 <+=?|> var line = doc.getLine(row);
974 <+=?|> var match = line.match(/^(\s*\})/);
975  
976 <+=?|> if (!match) return 0;
977  
978 <+=?|> var column = match[1].length;
979 <+=?|> var openBracePos = doc.findMatchingBracket({row: row, column: column});
980  
981 <+=?|> if (!openBracePos || openBracePos.row == row) return 0;
982  
983 <+=?|> var indent = this.$getIndent(doc.getLine(openBracePos.row));
984 <+=?|> doc.replace(new Range(row, 0, row, column-1), indent);
985 <+=?|> };
986  
987 <+=?|> this.$getIndent = function(line) {
988 <+=?|> return line.match(/^\s*/)[0];
989 <+=?|> };
990  
991 <+=?|>}).call(MatchingBraceOutdent.prototype);
992  
993 <+=?|>exports.MatchingBraceOutdent = MatchingBraceOutdent;
994 <+=?|>});
995  
996 <+=?|>define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
997 <+=?|>"use strict";
998  
999 <+=?|>var oop = require("../../lib/oop");
1000 <+=?|>var Range = require("../../range").Range;
1001 <+=?|>var BaseFoldMode = require("./fold_mode").FoldMode;
1002  
1003 <+=?|>var FoldMode = exports.FoldMode = function(commentRegex) {
1004 <+=?|> if (commentRegex) {
1005 <+=?|> this.foldingStartMarker = new RegExp(
1006 <+=?|> this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
1007 <+=?|> );
1008 <+=?|> this.foldingStopMarker = new RegExp(
1009 <+=?|> this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
1010 <+=?|> );
1011 <+=?|> }
1012 <+=?|>};
1013 <+=?|>oop.inherits(FoldMode, BaseFoldMode);
1014  
1015 <+=?|>(function() {
1016  
1017 <+=?|> this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
1018 <+=?|> this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
1019 <+=?|> this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
1020 <+=?|> this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
1021 <+=?|> this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
1022 <+=?|> this._getFoldWidgetBase = this.getFoldWidget;
1023 <+=?|> this.getFoldWidget = function(session, foldStyle, row) {
1024 <+=?|> var line = session.getLine(row);
1025  
1026 <+=?|> if (this.singleLineBlockCommentRe.test(line)) {
1027 <+=?|> if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
1028 <+=?|> return "";
1029 <+=?|> }
1030  
1031 <+=?|> var fw = this._getFoldWidgetBase(session, foldStyle, row);
1032  
1033 <+=?|> if (!fw && this.startRegionRe.test(line))
1034 <+=?|> return "start"; // lineCommentRegionStart
1035  
1036 <+=?|> return fw;
1037 <+=?|> };
1038  
1039 <+=?|> this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
1040 <+=?|> var line = session.getLine(row);
1041  
1042 <+=?|> if (this.startRegionRe.test(line))
1043 <+=?|> return this.getCommentRegionBlock(session, line, row);
1044  
1045 <+=?|> var match = line.match(this.foldingStartMarker);
1046 <+=?|> if (match) {
1047 <+=?|> var i = match.index;
1048  
1049 <+=?|> if (match[1])
1050 <+=?|> return this.openingBracketBlock(session, match[1], row, i);
1051  
1052 <+=?|> var range = session.getCommentFoldRange(row, i + match[0].length, 1);
1053  
1054 <+=?|> if (range && !range.isMultiLine()) {
1055 <+=?|> if (forceMultiline) {
1056 <+=?|> range = this.getSectionRange(session, row);
1057 <+=?|> } else if (foldStyle != "all")
1058 <+=?|> range = null;
1059 <+=?|> }
1060  
1061 <+=?|> return range;
1062 <+=?|> }
1063  
1064 <+=?|> if (foldStyle === "markbegin")
1065 <+=?|> return;
1066  
1067 <+=?|> var match = line.match(this.foldingStopMarker);
1068 <+=?|> if (match) {
1069 <+=?|> var i = match.index + match[0].length;
1070  
1071 <+=?|> if (match[1])
1072 <+=?|> return this.closingBracketBlock(session, match[1], row, i);
1073  
1074 <+=?|> return session.getCommentFoldRange(row, i, -1);
1075 <+=?|> }
1076 <+=?|> };
1077  
1078 <+=?|> this.getSectionRange = function(session, row) {
1079 <+=?|> var line = session.getLine(row);
1080 <+=?|> var startIndent = line.search(/\S/);
1081 <+=?|> var startRow = row;
1082 <+=?|> var startColumn = line.length;
1083 <+=?|> row = row + 1;
1084 <+=?|> var endRow = row;
1085 <+=?|> var maxRow = session.getLength();
1086 <+=?|> while (++row < maxRow) {
1087 <+=?|> line = session.getLine(row);
1088 <+=?|> var indent = line.search(/\S/);
1089 <+=?|> if (indent === -1)
1090 <+=?|> continue;
1091 <+=?|> if (startIndent > indent)
1092 <+=?|> break;
1093 <+=?|> var subRange = this.getFoldWidgetRange(session, "all", row);
1094  
1095 <+=?|> if (subRange) {
1096 <+=?|> if (subRange.start.row <= startRow) {
1097 <+=?|> break;
1098 <+=?|> } else if (subRange.isMultiLine()) {
1099 <+=?|> row = subRange.end.row;
1100 <+=?|> } else if (startIndent == indent) {
1101 <+=?|> break;
1102 <+=?|> }
1103 <+=?|> }
1104 <+=?|> endRow = row;
1105 <+=?|> }
1106  
1107 <+=?|> return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
1108 <+=?|> };
1109 <+=?|> this.getCommentRegionBlock = function(session, line, row) {
1110 <+=?|> var startColumn = line.search(/\s*$/);
1111 <+=?|> var maxRow = session.getLength();
1112 <+=?|> var startRow = row;
1113  
1114 <+=?|> var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
1115 <+=?|> var depth = 1;
1116 <+=?|> while (++row < maxRow) {
1117 <+=?|> line = session.getLine(row);
1118 <+=?|> var m = re.exec(line);
1119 <+=?|> if (!m) continue;
1120 <+=?|> if (m[1]) depth--;
1121 <+=?|> else depth++;
1122  
1123 <+=?|> if (!depth) break;
1124 <+=?|> }
1125  
1126 <+=?|> var endRow = row;
1127 <+=?|> if (endRow > startRow) {
1128 <+=?|> return new Range(startRow, startColumn, endRow, line.length);
1129 <+=?|> }
1130 <+=?|> };
1131  
1132 <+=?|>}).call(FoldMode.prototype);
1133  
1134 <+=?|>});
1135  
1136 <+=?|>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) {
1137 <+=?|>"use strict";
1138  
1139 <+=?|>var oop = require("../lib/oop");
1140 <+=?|>var TextMode = require("./text").Mode;
1141 <+=?|>var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1142 <+=?|>var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1143 <+=?|>var WorkerClient = require("../worker/worker_client").WorkerClient;
1144 <+=?|>var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
1145 <+=?|>var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1146  
1147 <+=?|>var Mode = function() {
1148 <+=?|> this.HighlightRules = JavaScriptHighlightRules;
1149  
1150 <+=?|> this.$outdent = new MatchingBraceOutdent();
1151 <+=?|> this.$behaviour = new CstyleBehaviour();
1152 <+=?|> this.foldingRules = new CStyleFoldMode();
1153 <+=?|>};
1154 <+=?|>oop.inherits(Mode, TextMode);
1155  
1156 <+=?|>(function() {
1157  
1158 <+=?|> this.lineCommentStart = "//";
1159 <+=?|> this.blockComment = {start: "/*", end: "*/"};
1160  
1161 <+=?|> this.getNextLineIndent = function(state, line, tab) {
1162 <+=?|> var indent = this.$getIndent(line);
1163  
1164 <+=?|> var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
1165 <+=?|> var tokens = tokenizedLine.tokens;
1166 <+=?|> var endState = tokenizedLine.state;
1167  
1168 <+=?|> if (tokens.length && tokens[tokens.length-1].type == "comment") {
1169 <+=?|> return indent;
1170 <+=?|> }
1171  
1172 <+=?|> if (state == "start" || state == "no_regex") {
1173 <+=?|> var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
1174 <+=?|> if (match) {
1175 <+=?|> indent += tab;
1176 <+=?|> }
1177 <+=?|> } else if (state == "doc-start") {
1178 <+=?|> if (endState == "start" || endState == "no_regex") {
1179 <+=?|> return "";
1180 <+=?|> }
1181 <+=?|> var match = line.match(/^\s*(\/?)\*/);
1182 <+=?|> if (match) {
1183 <+=?|> if (match[1]) {
1184 <+=?|> indent += " ";
1185 <+=?|> }
1186 <+=?|> indent += "* ";
1187 <+=?|> }
1188 <+=?|> }
1189  
1190 <+=?|> return indent;
1191 <+=?|> };
1192  
1193 <+=?|> this.checkOutdent = function(state, line, input) {
1194 <+=?|> return this.$outdent.checkOutdent(line, input);
1195 <+=?|> };
1196  
1197 <+=?|> this.autoOutdent = function(state, doc, row) {
1198 <+=?|> this.$outdent.autoOutdent(doc, row);
1199 <+=?|> };
1200  
1201 <+=?|> this.createWorker = function(session) {
1202 <+=?|> var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
1203 <+=?|> worker.attachToDocument(session.getDocument());
1204  
1205 <+=?|> worker.on("annotate", function(results) {
1206 <+=?|> session.setAnnotations(results.data);
1207 <+=?|> });
1208  
1209 <+=?|> worker.on("terminate", function() {
1210 <+=?|> session.clearAnnotations();
1211 <+=?|> });
1212  
1213 <+=?|> return worker;
1214 <+=?|> };
1215  
1216 <+=?|> this.$id = "ace/mode/javascript";
1217 <+=?|>}).call(Mode.prototype);
1218  
1219 <+=?|>exports.Mode = Mode;
1220 <+=?|>});
1221  
1222 <+=?|>define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
1223 <+=?|>"use strict";
1224  
1225 <+=?|>var propertyMap = {
1226 <+=?|> "background": {"#$0": 1},
1227 <+=?|> "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
1228 <+=?|> "background-image": {"url('/$0')": 1},
1229 <+=?|> "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
1230 <+=?|> "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
1231 <+=?|> "background-attachment": {"scroll": 1, "fixed": 1},
1232 <+=?|> "background-size": {"cover": 1, "contain": 1},
1233 <+=?|> "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
1234 <+=?|> "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
1235 <+=?|> "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
1236 <+=?|> "border-color": {"#$0": 1},
1237 <+=?|> "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
1238 <+=?|> "border-collapse": {"collapse": 1, "separate": 1},
1239 <+=?|> "bottom": {"px": 1, "em": 1, "%": 1},
1240 <+=?|> "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
1241 <+=?|> "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
1242 <+=?|> "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},
1243 <+=?|> "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
1244 <+=?|> "empty-cells": {"show": 1, "hide": 1},
1245 <+=?|> "float": {"left": 1, "right": 1, "none": 1},
1246 <+=?|> "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},
1247 <+=?|> "font-size": {"px": 1, "em": 1, "%": 1},
1248 <+=?|> "font-weight": {"bold": 1, "normal": 1},
1249 <+=?|> "font-style": {"italic": 1, "normal": 1},
1250 <+=?|> "font-variant": {"normal": 1, "small-caps": 1},
1251 <+=?|> "height": {"px": 1, "em": 1, "%": 1},
1252 <+=?|> "left": {"px": 1, "em": 1, "%": 1},
1253 <+=?|> "letter-spacing": {"normal": 1},
1254 <+=?|> "line-height": {"normal": 1},
1255 <+=?|> "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},
1256 <+=?|> "margin": {"px": 1, "em": 1, "%": 1},
1257 <+=?|> "margin-right": {"px": 1, "em": 1, "%": 1},
1258 <+=?|> "margin-left": {"px": 1, "em": 1, "%": 1},
1259 <+=?|> "margin-top": {"px": 1, "em": 1, "%": 1},
1260 <+=?|> "margin-bottom": {"px": 1, "em": 1, "%": 1},
1261 <+=?|> "max-height": {"px": 1, "em": 1, "%": 1},
1262 <+=?|> "max-width": {"px": 1, "em": 1, "%": 1},
1263 <+=?|> "min-height": {"px": 1, "em": 1, "%": 1},
1264 <+=?|> "min-width": {"px": 1, "em": 1, "%": 1},
1265 <+=?|> "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1266 <+=?|> "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1267 <+=?|> "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1268 <+=?|> "padding": {"px": 1, "em": 1, "%": 1},
1269 <+=?|> "padding-top": {"px": 1, "em": 1, "%": 1},
1270 <+=?|> "padding-right": {"px": 1, "em": 1, "%": 1},
1271 <+=?|> "padding-bottom": {"px": 1, "em": 1, "%": 1},
1272 <+=?|> "padding-left": {"px": 1, "em": 1, "%": 1},
1273 <+=?|> "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1274 <+=?|> "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1275 <+=?|> "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
1276 <+=?|> "right": {"px": 1, "em": 1, "%": 1},
1277 <+=?|> "table-layout": {"fixed": 1, "auto": 1},
1278 <+=?|> "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
1279 <+=?|> "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
1280 <+=?|> "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
1281 <+=?|> "top": {"px": 1, "em": 1, "%": 1},
1282 <+=?|> "vertical-align": {"top": 1, "bottom": 1},
1283 <+=?|> "visibility": {"hidden": 1, "visible": 1},
1284 <+=?|> "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
1285 <+=?|> "width": {"px": 1, "em": 1, "%": 1},
1286 <+=?|> "word-spacing": {"normal": 1},
1287 <+=?|> "filter": {"alpha(opacity=$0100)": 1},
1288  
1289 <+=?|> "text-shadow": {"$02px 2px 2px #777": 1},
1290 <+=?|> "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
1291 <+=?|> "-moz-border-radius": 1,
1292 <+=?|> "-moz-border-radius-topright": 1,
1293 <+=?|> "-moz-border-radius-bottomright": 1,
1294 <+=?|> "-moz-border-radius-topleft": 1,
1295 <+=?|> "-moz-border-radius-bottomleft": 1,
1296 <+=?|> "-webkit-border-radius": 1,
1297 <+=?|> "-webkit-border-top-right-radius": 1,
1298 <+=?|> "-webkit-border-top-left-radius": 1,
1299 <+=?|> "-webkit-border-bottom-right-radius": 1,
1300 <+=?|> "-webkit-border-bottom-left-radius": 1,
1301 <+=?|> "-moz-box-shadow": 1,
1302 <+=?|> "-webkit-box-shadow": 1,
1303 <+=?|> "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1304 <+=?|> "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1305 <+=?|> "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
1306 <+=?|>};
1307  
1308 <+=?|>var CssCompletions = function() {
1309  
1310 <+=?|>};
1311  
1312 <+=?|>(function() {
1313  
1314 <+=?|> this.completionsDefined = false;
1315  
1316 <+=?|> this.defineCompletions = function() {
1317 <+=?|> if (document) {
1318 <+=?|> var style = document.createElement('c').style;
1319  
1320 <+=?|> for (var i in style) {
1321 <+=?|> if (typeof style[i] !== 'string')
1322 <+=?|> continue;
1323  
1324 <+=?|> var name = i.replace(/[A-Z]/g, function(x) {
1325 <+=?|> return '-' + x.toLowerCase();
1326 <+=?|> });
1327  
1328 <+=?|> if (!propertyMap.hasOwnProperty(name))
1329 <+=?|> propertyMap[name] = 1;
1330 <+=?|> }
1331 <+=?|> }
1332  
1333 <+=?|> this.completionsDefined = true;
1334 <+=?|> }
1335  
1336 <+=?|> this.getCompletions = function(state, session, pos, prefix) {
1337 <+=?|> if (!this.completionsDefined) {
1338 <+=?|> this.defineCompletions();
1339 <+=?|> }
1340  
1341 <+=?|> var token = session.getTokenAt(pos.row, pos.column);
1342  
1343 <+=?|> if (!token)
1344 <+=?|> return [];
1345 <+=?|> if (state==='ruleset'){
1346 <+=?|> var line = session.getLine(pos.row).substr(0, pos.column);
1347 <+=?|> if (/:[^;]+$/.test(line)) {
1348 <+=?|> /([\w\-]+):[^:]*$/.test(line);
1349  
1350 <+=?|> return this.getPropertyValueCompletions(state, session, pos, prefix);
1351 <+=?|> } else {
1352 <+=?|> return this.getPropertyCompletions(state, session, pos, prefix);
1353 <+=?|> }
1354 <+=?|> }
1355  
1356 <+=?|> return [];
1357 <+=?|> };
1358  
1359 <+=?|> this.getPropertyCompletions = function(state, session, pos, prefix) {
1360 <+=?|> var properties = Object.keys(propertyMap);
1361 <+=?|> return properties.map(function(property){
1362 <+=?|> return {
1363 <+=?|> caption: property,
1364 <+=?|> snippet: property + ': $0',
1365 <+=?|> meta: "property",
1366 <+=?|> score: Number.MAX_VALUE
1367 <+=?|> };
1368 <+=?|> });
1369 <+=?|> };
1370  
1371 <+=?|> this.getPropertyValueCompletions = function(state, session, pos, prefix) {
1372 <+=?|> var line = session.getLine(pos.row).substr(0, pos.column);
1373 <+=?|> var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
1374  
1375 <+=?|> if (!property)
1376 <+=?|> return [];
1377 <+=?|> var values = [];
1378 <+=?|> if (property in propertyMap && typeof propertyMap[property] === "object") {
1379 <+=?|> values = Object.keys(propertyMap[property]);
1380 <+=?|> }
1381 <+=?|> return values.map(function(value){
1382 <+=?|> return {
1383 <+=?|> caption: value,
1384 <+=?|> snippet: value,
1385 <+=?|> meta: "property value",
1386 <+=?|> score: Number.MAX_VALUE
1387 <+=?|> };
1388 <+=?|> });
1389 <+=?|> };
1390  
1391 <+=?|>}).call(CssCompletions.prototype);
1392  
1393 <+=?|>exports.CssCompletions = CssCompletions;
1394 <+=?|>});
1395  
1396 <+=?|>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) {
1397 <+=?|>"use strict";
1398  
1399 <+=?|>var oop = require("../../lib/oop");
1400 <+=?|>var Behaviour = require("../behaviour").Behaviour;
1401 <+=?|>var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1402 <+=?|>var TokenIterator = require("../../token_iterator").TokenIterator;
1403  
1404 <+=?|>var CssBehaviour = function () {
1405  
1406 <+=?|> this.inherit(CstyleBehaviour);
1407  
1408 <+=?|> this.add("colon", "insertion", function (state, action, editor, session, text) {
1409 <+=?|> if (text === ':') {
1410 <+=?|> var cursor = editor.getCursorPosition();
1411 <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);
1412 <+=?|> var token = iterator.getCurrentToken();
1413 <+=?|> if (token && token.value.match(/\s+/)) {
1414 <+=?|> token = iterator.stepBackward();
1415 <+=?|> }
1416 <+=?|> if (token && token.type === 'support.type') {
1417 <+=?|> var line = session.doc.getLine(cursor.row);
1418 <+=?|> var rightChar = line.substring(cursor.column, cursor.column + 1);
1419 <+=?|> if (rightChar === ':') {
1420 <+=?|> return {
1421 <+=?|> text: '',
1422 <+=?|> selection: [1, 1]
1423 <+=?|> }
1424 <+=?|> }
1425 <+=?|> if (!line.substring(cursor.column).match(/^\s*;/)) {
1426 <+=?|> return {
1427 <+=?|> text: ':;',
1428 <+=?|> selection: [1, 1]
1429 <+=?|> }
1430 <+=?|> }
1431 <+=?|> }
1432 <+=?|> }
1433 <+=?|> });
1434  
1435 <+=?|> this.add("colon", "deletion", function (state, action, editor, session, range) {
1436 <+=?|> var selected = session.doc.getTextRange(range);
1437 <+=?|> if (!range.isMultiLine() && selected === ':') {
1438 <+=?|> var cursor = editor.getCursorPosition();
1439 <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);
1440 <+=?|> var token = iterator.getCurrentToken();
1441 <+=?|> if (token && token.value.match(/\s+/)) {
1442 <+=?|> token = iterator.stepBackward();
1443 <+=?|> }
1444 <+=?|> if (token && token.type === 'support.type') {
1445 <+=?|> var line = session.doc.getLine(range.start.row);
1446 <+=?|> var rightChar = line.substring(range.end.column, range.end.column + 1);
1447 <+=?|> if (rightChar === ';') {
1448 <+=?|> range.end.column ++;
1449 <+=?|> return range;
1450 <+=?|> }
1451 <+=?|> }
1452 <+=?|> }
1453 <+=?|> });
1454  
1455 <+=?|> this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1456 <+=?|> if (text === ';') {
1457 <+=?|> var cursor = editor.getCursorPosition();
1458 <+=?|> var line = session.doc.getLine(cursor.row);
1459 <+=?|> var rightChar = line.substring(cursor.column, cursor.column + 1);
1460 <+=?|> if (rightChar === ';') {
1461 <+=?|> return {
1462 <+=?|> text: '',
1463 <+=?|> selection: [1, 1]
1464 <+=?|> }
1465 <+=?|> }
1466 <+=?|> }
1467 <+=?|> });
1468  
1469 <+=?|>}
1470 <+=?|>oop.inherits(CssBehaviour, CstyleBehaviour);
1471  
1472 <+=?|>exports.CssBehaviour = CssBehaviour;
1473 <+=?|>});
1474  
1475 <+=?|>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) {
1476 <+=?|>"use strict";
1477  
1478 <+=?|>var oop = require("../lib/oop");
1479 <+=?|>var TextMode = require("./text").Mode;
1480 <+=?|>var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1481 <+=?|>var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1482 <+=?|>var WorkerClient = require("../worker/worker_client").WorkerClient;
1483 <+=?|>var CssCompletions = require("./css_completions").CssCompletions;
1484 <+=?|>var CssBehaviour = require("./behaviour/css").CssBehaviour;
1485 <+=?|>var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1486  
1487 <+=?|>var Mode = function() {
1488 <+=?|> this.HighlightRules = CssHighlightRules;
1489 <+=?|> this.$outdent = new MatchingBraceOutdent();
1490 <+=?|> this.$behaviour = new CssBehaviour();
1491 <+=?|> this.$completer = new CssCompletions();
1492 <+=?|> this.foldingRules = new CStyleFoldMode();
1493 <+=?|>};
1494 <+=?|>oop.inherits(Mode, TextMode);
1495  
1496 <+=?|>(function() {
1497  
1498 <+=?|> this.foldingRules = "cStyle";
1499 <+=?|> this.blockComment = {start: "/*", end: "*/"};
1500  
1501 <+=?|> this.getNextLineIndent = function(state, line, tab) {
1502 <+=?|> var indent = this.$getIndent(line);
1503 <+=?|> var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
1504 <+=?|> if (tokens.length && tokens[tokens.length-1].type == "comment") {
1505 <+=?|> return indent;
1506 <+=?|> }
1507  
1508 <+=?|> var match = line.match(/^.*\{\s*$/);
1509 <+=?|> if (match) {
1510 <+=?|> indent += tab;
1511 <+=?|> }
1512  
1513 <+=?|> return indent;
1514 <+=?|> };
1515  
1516 <+=?|> this.checkOutdent = function(state, line, input) {
1517 <+=?|> return this.$outdent.checkOutdent(line, input);
1518 <+=?|> };
1519  
1520 <+=?|> this.autoOutdent = function(state, doc, row) {
1521 <+=?|> this.$outdent.autoOutdent(doc, row);
1522 <+=?|> };
1523  
1524 <+=?|> this.getCompletions = function(state, session, pos, prefix) {
1525 <+=?|> return this.$completer.getCompletions(state, session, pos, prefix);
1526 <+=?|> };
1527  
1528 <+=?|> this.createWorker = function(session) {
1529 <+=?|> var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
1530 <+=?|> worker.attachToDocument(session.getDocument());
1531  
1532 <+=?|> worker.on("annotate", function(e) {
1533 <+=?|> session.setAnnotations(e.data);
1534 <+=?|> });
1535  
1536 <+=?|> worker.on("terminate", function() {
1537 <+=?|> session.clearAnnotations();
1538 <+=?|> });
1539  
1540 <+=?|> return worker;
1541 <+=?|> };
1542  
1543 <+=?|> this.$id = "ace/mode/css";
1544 <+=?|>}).call(Mode.prototype);
1545  
1546 <+=?|>exports.Mode = Mode;
1547  
1548 <+=?|>});
1549  
1550 <+=?|>define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
1551 <+=?|>"use strict";
1552  
1553 <+=?|>var oop = require("../../lib/oop");
1554 <+=?|>var Behaviour = require("../behaviour").Behaviour;
1555 <+=?|>var TokenIterator = require("../../token_iterator").TokenIterator;
1556 <+=?|>var lang = require("../../lib/lang");
1557  
1558 <+=?|>function is(token, type) {
1559 <+=?|> return token.type.lastIndexOf(type + ".xml") > -1;
1560 <+=?|>}
1561  
1562 <+=?|>var XmlBehaviour = function () {
1563  
1564 <+=?|> this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1565 <+=?|> if (text == '"' || text == "'") {
1566 <+=?|> var quote = text;
1567 <+=?|> var selected = session.doc.getTextRange(editor.getSelectionRange());
1568 <+=?|> if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
1569 <+=?|> return {
1570 <+=?|> text: quote + selected + quote,
1571 <+=?|> selection: false
1572 <+=?|> };
1573 <+=?|> }
1574  
1575 <+=?|> var cursor = editor.getCursorPosition();
1576 <+=?|> var line = session.doc.getLine(cursor.row);
1577 <+=?|> var rightChar = line.substring(cursor.column, cursor.column + 1);
1578 <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);
1579 <+=?|> var token = iterator.getCurrentToken();
1580  
1581 <+=?|> if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1582 <+=?|> return {
1583 <+=?|> text: "",
1584 <+=?|> selection: [1, 1]
1585 <+=?|> };
1586 <+=?|> }
1587  
1588 <+=?|> if (!token)
1589 <+=?|> token = iterator.stepBackward();
1590  
1591 <+=?|> if (!token)
1592 <+=?|> return;
1593  
1594 <+=?|> while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1595 <+=?|> token = iterator.stepBackward();
1596 <+=?|> }
1597 <+=?|> var rightSpace = !rightChar || rightChar.match(/\s/);
1598 <+=?|> if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
1599 <+=?|> return {
1600 <+=?|> text: quote + quote,
1601 <+=?|> selection: [1, 1]
1602 <+=?|> };
1603 <+=?|> }
1604 <+=?|> }
1605 <+=?|> });
1606  
1607 <+=?|> this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
1608 <+=?|> var selected = session.doc.getTextRange(range);
1609 <+=?|> if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1610 <+=?|> var line = session.doc.getLine(range.start.row);
1611 <+=?|> var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
1612 <+=?|> if (rightChar == selected) {
1613 <+=?|> range.end.column++;
1614 <+=?|> return range;
1615 <+=?|> }
1616 <+=?|> }
1617 <+=?|> });
1618  
1619 <+=?|> this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1620 <+=?|> if (text == '>') {
1621 <+=?|> var position = editor.getSelectionRange().start;
1622 <+=?|> var iterator = new TokenIterator(session, position.row, position.column);
1623 <+=?|> var token = iterator.getCurrentToken() || iterator.stepBackward();
1624 <+=?|> if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
1625 <+=?|> return;
1626 <+=?|> if (is(token, "reference.attribute-value"))
1627 <+=?|> return;
1628 <+=?|> if (is(token, "attribute-value")) {
1629 <+=?|> var firstChar = token.value.charAt(0);
1630 <+=?|> if (firstChar == '"' || firstChar == "'") {
1631 <+=?|> var lastChar = token.value.charAt(token.value.length - 1);
1632 <+=?|> var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
1633 <+=?|> if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
1634 <+=?|> return;
1635 <+=?|> }
1636 <+=?|> }
1637 <+=?|> while (!is(token, "tag-name")) {
1638 <+=?|> token = iterator.stepBackward();
1639 <+=?|> if (token.value == "<") {
1640 <+=?|> token = iterator.stepForward();
1641 <+=?|> break;
1642 <+=?|> }
1643 <+=?|> }
1644  
1645 <+=?|> var tokenRow = iterator.getCurrentTokenRow();
1646 <+=?|> var tokenColumn = iterator.getCurrentTokenColumn();
1647 <+=?|> if (is(iterator.stepBackward(), "end-tag-open"))
1648 <+=?|> return;
1649  
1650 <+=?|> var element = token.value;
1651 <+=?|> if (tokenRow == position.row)
1652 <+=?|> element = element.substring(0, position.column - tokenColumn);
1653  
1654 <+=?|> if (this.voidElements.hasOwnProperty(element.toLowerCase()))
1655 <+=?|> return;
1656  
1657 <+=?|> return {
1658 <+=?|> text: ">" + "</" + element + ">",
1659 <+=?|> selection: [1, 1]
1660 <+=?|> };
1661 <+=?|> }
1662 <+=?|> });
1663  
1664 <+=?|> this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1665 <+=?|> if (text == "\n") {
1666 <+=?|> var cursor = editor.getCursorPosition();
1667 <+=?|> var line = session.getLine(cursor.row);
1668 <+=?|> var iterator = new TokenIterator(session, cursor.row, cursor.column);
1669 <+=?|> var token = iterator.getCurrentToken();
1670  
1671 <+=?|> if (token && token.type.indexOf("tag-close") !== -1) {
1672 <+=?|> if (token.value == "/>")
1673 <+=?|> return;
1674 <+=?|> while (token && token.type.indexOf("tag-name") === -1) {
1675 <+=?|> token = iterator.stepBackward();
1676 <+=?|> }
1677  
1678 <+=?|> if (!token) {
1679 <+=?|> return;
1680 <+=?|> }
1681  
1682 <+=?|> var tag = token.value;
1683 <+=?|> var row = iterator.getCurrentTokenRow();
1684 <+=?|> token = iterator.stepBackward();
1685 <+=?|> if (!token || token.type.indexOf("end-tag") !== -1) {
1686 <+=?|> return;
1687 <+=?|> }
1688  
1689 <+=?|> if (this.voidElements && !this.voidElements[tag]) {
1690 <+=?|> var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
1691 <+=?|> var line = session.getLine(row);
1692 <+=?|> var nextIndent = this.$getIndent(line);
1693 <+=?|> var indent = nextIndent + session.getTabString();
1694  
1695 <+=?|> if (nextToken && nextToken.value === "</") {
1696 <+=?|> return {
1697 <+=?|> text: "\n" + indent + "\n" + nextIndent,
1698 <+=?|> selection: [1, indent.length, 1, indent.length]
1699 <+=?|> };
1700 <+=?|> } else {
1701 <+=?|> return {
1702 <+=?|> text: "\n" + indent
1703 <+=?|> };
1704 <+=?|> }
1705 <+=?|> }
1706 <+=?|> }
1707 <+=?|> }
1708 <+=?|> });
1709  
1710 <+=?|>};
1711  
1712 <+=?|>oop.inherits(XmlBehaviour, Behaviour);
1713  
1714 <+=?|>exports.XmlBehaviour = XmlBehaviour;
1715 <+=?|>});
1716  
1717 <+=?|>define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
1718 <+=?|>"use strict";
1719  
1720 <+=?|>var oop = require("../../lib/oop");
1721 <+=?|>var BaseFoldMode = require("./fold_mode").FoldMode;
1722  
1723 <+=?|>var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
1724 <+=?|> this.defaultMode = defaultMode;
1725 <+=?|> this.subModes = subModes;
1726 <+=?|>};
1727 <+=?|>oop.inherits(FoldMode, BaseFoldMode);
1728  
1729 <+=?|>(function() {
1730  
1731  
1732 <+=?|> this.$getMode = function(state) {
1733 <+=?|> if (typeof state != "string")
1734 <+=?|> state = state[0];
1735 <+=?|> for (var key in this.subModes) {
1736 <+=?|> if (state.indexOf(key) === 0)
1737 <+=?|> return this.subModes[key];
1738 <+=?|> }
1739 <+=?|> return null;
1740 <+=?|> };
1741  
1742 <+=?|> this.$tryMode = function(state, session, foldStyle, row) {
1743 <+=?|> var mode = this.$getMode(state);
1744 <+=?|> return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
1745 <+=?|> };
1746  
1747 <+=?|> this.getFoldWidget = function(session, foldStyle, row) {
1748 <+=?|> return (
1749 <+=?|> this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
1750 <+=?|> this.$tryMode(session.getState(row), session, foldStyle, row) ||
1751 <+=?|> this.defaultMode.getFoldWidget(session, foldStyle, row)
1752 <+=?|> );
1753 <+=?|> };
1754  
1755 <+=?|> this.getFoldWidgetRange = function(session, foldStyle, row) {
1756 <+=?|> var mode = this.$getMode(session.getState(row-1));
1757  
1758 <+=?|> if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1759 <+=?|> mode = this.$getMode(session.getState(row));
1760  
1761 <+=?|> if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1762 <+=?|> mode = this.defaultMode;
1763  
1764 <+=?|> return mode.getFoldWidgetRange(session, foldStyle, row);
1765 <+=?|> };
1766  
1767 <+=?|>}).call(FoldMode.prototype);
1768  
1769 <+=?|>});
1770  
1771 <+=?|>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) {
1772 <+=?|>"use strict";
1773  
1774 <+=?|>var oop = require("../../lib/oop");
1775 <+=?|>var lang = require("../../lib/lang");
1776 <+=?|>var Range = require("../../range").Range;
1777 <+=?|>var BaseFoldMode = require("./fold_mode").FoldMode;
1778 <+=?|>var TokenIterator = require("../../token_iterator").TokenIterator;
1779  
1780 <+=?|>var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
1781 <+=?|> BaseFoldMode.call(this);
1782 <+=?|> this.voidElements = voidElements || {};
1783 <+=?|> this.optionalEndTags = oop.mixin({}, this.voidElements);
1784 <+=?|> if (optionalEndTags)
1785 <+=?|> oop.mixin(this.optionalEndTags, optionalEndTags);
1786  
1787 <+=?|>};
1788 <+=?|>oop.inherits(FoldMode, BaseFoldMode);
1789  
1790 <+=?|>var Tag = function() {
1791 <+=?|> this.tagName = "";
1792 <+=?|> this.closing = false;
1793 <+=?|> this.selfClosing = false;
1794 <+=?|> this.start = {row: 0, column: 0};
1795 <+=?|> this.end = {row: 0, column: 0};
1796 <+=?|>};
1797  
1798 <+=?|>function is(token, type) {
1799 <+=?|> return token.type.lastIndexOf(type + ".xml") > -1;
1800 <+=?|>}
1801  
1802 <+=?|>(function() {
1803  
1804 <+=?|> this.getFoldWidget = function(session, foldStyle, row) {
1805 <+=?|> var tag = this._getFirstTagInLine(session, row);
1806  
1807 <+=?|> if (!tag)
1808 <+=?|> return "";
1809  
1810 <+=?|> if (tag.closing || (!tag.tagName && tag.selfClosing))
1811 <+=?|> return foldStyle == "markbeginend" ? "end" : "";
1812  
1813 <+=?|> if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1814 <+=?|> return "";
1815  
1816 <+=?|> if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1817 <+=?|> return "";
1818  
1819 <+=?|> return "start";
1820 <+=?|> };
1821 <+=?|> this._getFirstTagInLine = function(session, row) {
1822 <+=?|> var tokens = session.getTokens(row);
1823 <+=?|> var tag = new Tag();
1824  
1825 <+=?|> for (var i = 0; i < tokens.length; i++) {
1826 <+=?|> var token = tokens[i];
1827 <+=?|> if (is(token, "tag-open")) {
1828 <+=?|> tag.end.column = tag.start.column + token.value.length;
1829 <+=?|> tag.closing = is(token, "end-tag-open");
1830 <+=?|> token = tokens[++i];
1831 <+=?|> if (!token)
1832 <+=?|> return null;
1833 <+=?|> tag.tagName = token.value;
1834 <+=?|> tag.end.column += token.value.length;
1835 <+=?|> for (i++; i < tokens.length; i++) {
1836 <+=?|> token = tokens[i];
1837 <+=?|> tag.end.column += token.value.length;
1838 <+=?|> if (is(token, "tag-close")) {
1839 <+=?|> tag.selfClosing = token.value == '/>';
1840 <+=?|> break;
1841 <+=?|> }
1842 <+=?|> }
1843 <+=?|> return tag;
1844 <+=?|> } else if (is(token, "tag-close")) {
1845 <+=?|> tag.selfClosing = token.value == '/>';
1846 <+=?|> return tag;
1847 <+=?|> }
1848 <+=?|> tag.start.column += token.value.length;
1849 <+=?|> }
1850  
1851 <+=?|> return null;
1852 <+=?|> };
1853  
1854 <+=?|> this._findEndTagInLine = function(session, row, tagName, startColumn) {
1855 <+=?|> var tokens = session.getTokens(row);
1856 <+=?|> var column = 0;
1857 <+=?|> for (var i = 0; i < tokens.length; i++) {
1858 <+=?|> var token = tokens[i];
1859 <+=?|> column += token.value.length;
1860 <+=?|> if (column < startColumn)
1861 <+=?|> continue;
1862 <+=?|> if (is(token, "end-tag-open")) {
1863 <+=?|> token = tokens[i + 1];
1864 <+=?|> if (token && token.value == tagName)
1865 <+=?|> return true;
1866 <+=?|> }
1867 <+=?|> }
1868 <+=?|> return false;
1869 <+=?|> };
1870 <+=?|> this._readTagForward = function(iterator) {
1871 <+=?|> var token = iterator.getCurrentToken();
1872 <+=?|> if (!token)
1873 <+=?|> return null;
1874  
1875 <+=?|> var tag = new Tag();
1876 <+=?|> do {
1877 <+=?|> if (is(token, "tag-open")) {
1878 <+=?|> tag.closing = is(token, "end-tag-open");
1879 <+=?|> tag.start.row = iterator.getCurrentTokenRow();
1880 <+=?|> tag.start.column = iterator.getCurrentTokenColumn();
1881 <+=?|> } else if (is(token, "tag-name")) {
1882 <+=?|> tag.tagName = token.value;
1883 <+=?|> } else if (is(token, "tag-close")) {
1884 <+=?|> tag.selfClosing = token.value == "/>";
1885 <+=?|> tag.end.row = iterator.getCurrentTokenRow();
1886 <+=?|> tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1887 <+=?|> iterator.stepForward();
1888 <+=?|> return tag;
1889 <+=?|> }
1890 <+=?|> } while(token = iterator.stepForward());
1891  
1892 <+=?|> return null;
1893 <+=?|> };
1894  
1895 <+=?|> this._readTagBackward = function(iterator) {
1896 <+=?|> var token = iterator.getCurrentToken();
1897 <+=?|> if (!token)
1898 <+=?|> return null;
1899  
1900 <+=?|> var tag = new Tag();
1901 <+=?|> do {
1902 <+=?|> if (is(token, "tag-open")) {
1903 <+=?|> tag.closing = is(token, "end-tag-open");
1904 <+=?|> tag.start.row = iterator.getCurrentTokenRow();
1905 <+=?|> tag.start.column = iterator.getCurrentTokenColumn();
1906 <+=?|> iterator.stepBackward();
1907 <+=?|> return tag;
1908 <+=?|> } else if (is(token, "tag-name")) {
1909 <+=?|> tag.tagName = token.value;
1910 <+=?|> } else if (is(token, "tag-close")) {
1911 <+=?|> tag.selfClosing = token.value == "/>";
1912 <+=?|> tag.end.row = iterator.getCurrentTokenRow();
1913 <+=?|> tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1914 <+=?|> }
1915 <+=?|> } while(token = iterator.stepBackward());
1916  
1917 <+=?|> return null;
1918 <+=?|> };
1919  
1920 <+=?|> this._pop = function(stack, tag) {
1921 <+=?|> while (stack.length) {
1922  
1923 <+=?|> var top = stack[stack.length-1];
1924 <+=?|> if (!tag || top.tagName == tag.tagName) {
1925 <+=?|> return stack.pop();
1926 <+=?|> }
1927 <+=?|> else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
1928 <+=?|> stack.pop();
1929 <+=?|> continue;
1930 <+=?|> } else {
1931 <+=?|> return null;
1932 <+=?|> }
1933 <+=?|> }
1934 <+=?|> };
1935  
1936 <+=?|> this.getFoldWidgetRange = function(session, foldStyle, row) {
1937 <+=?|> var firstTag = this._getFirstTagInLine(session, row);
1938  
1939 <+=?|> if (!firstTag)
1940 <+=?|> return null;
1941  
1942 <+=?|> var isBackward = firstTag.closing || firstTag.selfClosing;
1943 <+=?|> var stack = [];
1944 <+=?|> var tag;
1945  
1946 <+=?|> if (!isBackward) {
1947 <+=?|> var iterator = new TokenIterator(session, row, firstTag.start.column);
1948 <+=?|> var start = {
1949 <+=?|> row: row,
1950 <+=?|> column: firstTag.start.column + firstTag.tagName.length + 2
1951 <+=?|> };
1952 <+=?|> if (firstTag.start.row == firstTag.end.row)
1953 <+=?|> start.column = firstTag.end.column;
1954 <+=?|> while (tag = this._readTagForward(iterator)) {
1955 <+=?|> if (tag.selfClosing) {
1956 <+=?|> if (!stack.length) {
1957 <+=?|> tag.start.column += tag.tagName.length + 2;
1958 <+=?|> tag.end.column -= 2;
1959 <+=?|> return Range.fromPoints(tag.start, tag.end);
1960 <+=?|> } else
1961 <+=?|> continue;
1962 <+=?|> }
1963  
1964 <+=?|> if (tag.closing) {
1965 <+=?|> this._pop(stack, tag);
1966 <+=?|> if (stack.length == 0)
1967 <+=?|> return Range.fromPoints(start, tag.start);
1968 <+=?|> }
1969 <+=?|> else {
1970 <+=?|> stack.push(tag);
1971 <+=?|> }
1972 <+=?|> }
1973 <+=?|> }
1974 <+=?|> else {
1975 <+=?|> var iterator = new TokenIterator(session, row, firstTag.end.column);
1976 <+=?|> var end = {
1977 <+=?|> row: row,
1978 <+=?|> column: firstTag.start.column
1979 <+=?|> };
1980  
1981 <+=?|> while (tag = this._readTagBackward(iterator)) {
1982 <+=?|> if (tag.selfClosing) {
1983 <+=?|> if (!stack.length) {
1984 <+=?|> tag.start.column += tag.tagName.length + 2;
1985 <+=?|> tag.end.column -= 2;
1986 <+=?|> return Range.fromPoints(tag.start, tag.end);
1987 <+=?|> } else
1988 <+=?|> continue;
1989 <+=?|> }
1990  
1991 <+=?|> if (!tag.closing) {
1992 <+=?|> this._pop(stack, tag);
1993 <+=?|> if (stack.length == 0) {
1994 <+=?|> tag.start.column += tag.tagName.length + 2;
1995 <+=?|> if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
1996 <+=?|> tag.start.column = tag.end.column;
1997 <+=?|> return Range.fromPoints(tag.start, end);
1998 <+=?|> }
1999 <+=?|> }
2000 <+=?|> else {
2001 <+=?|> stack.push(tag);
2002 <+=?|> }
2003 <+=?|> }
2004 <+=?|> }
2005  
2006 <+=?|> };
2007  
2008 <+=?|>}).call(FoldMode.prototype);
2009  
2010 <+=?|>});
2011  
2012 <+=?|>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) {
2013 <+=?|>"use strict";
2014  
2015 <+=?|>var oop = require("../../lib/oop");
2016 <+=?|>var MixedFoldMode = require("./mixed").FoldMode;
2017 <+=?|>var XmlFoldMode = require("./xml").FoldMode;
2018 <+=?|>var CStyleFoldMode = require("./cstyle").FoldMode;
2019  
2020 <+=?|>var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
2021 <+=?|> MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
2022 <+=?|> "js-": new CStyleFoldMode(),
2023 <+=?|> "css-": new CStyleFoldMode()
2024 <+=?|> });
2025 <+=?|>};
2026  
2027 <+=?|>oop.inherits(FoldMode, MixedFoldMode);
2028  
2029 <+=?|>});
2030  
2031 <+=?|>define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
2032 <+=?|>"use strict";
2033  
2034 <+=?|>var TokenIterator = require("../token_iterator").TokenIterator;
2035  
2036 <+=?|>var commonAttributes = [
2037 <+=?|> "accesskey",
2038 <+=?|> "class",
2039 <+=?|> "contenteditable",
2040 <+=?|> "contextmenu",
2041 <+=?|> "dir",
2042 <+=?|> "draggable",
2043 <+=?|> "dropzone",
2044 <+=?|> "hidden",
2045 <+=?|> "id",
2046 <+=?|> "inert",
2047 <+=?|> "itemid",
2048 <+=?|> "itemprop",
2049 <+=?|> "itemref",
2050 <+=?|> "itemscope",
2051 <+=?|> "itemtype",
2052 <+=?|> "lang",
2053 <+=?|> "spellcheck",
2054 <+=?|> "style",
2055 <+=?|> "tabindex",
2056 <+=?|> "title",
2057 <+=?|> "translate"
2058 <+=?|>];
2059  
2060 <+=?|>var eventAttributes = [
2061 <+=?|> "onabort",
2062 <+=?|> "onblur",
2063 <+=?|> "oncancel",
2064 <+=?|> "oncanplay",
2065 <+=?|> "oncanplaythrough",
2066 <+=?|> "onchange",
2067 <+=?|> "onclick",
2068 <+=?|> "onclose",
2069 <+=?|> "oncontextmenu",
2070 <+=?|> "oncuechange",
2071 <+=?|> "ondblclick",
2072 <+=?|> "ondrag",
2073 <+=?|> "ondragend",
2074 <+=?|> "ondragenter",
2075 <+=?|> "ondragleave",
2076 <+=?|> "ondragover",
2077 <+=?|> "ondragstart",
2078 <+=?|> "ondrop",
2079 <+=?|> "ondurationchange",
2080 <+=?|> "onemptied",
2081 <+=?|> "onended",
2082 <+=?|> "onerror",
2083 <+=?|> "onfocus",
2084 <+=?|> "oninput",
2085 <+=?|> "oninvalid",
2086 <+=?|> "onkeydown",
2087 <+=?|> "onkeypress",
2088 <+=?|> "onkeyup",
2089 <+=?|> "onload",
2090 <+=?|> "onloadeddata",
2091 <+=?|> "onloadedmetadata",
2092 <+=?|> "onloadstart",
2093 <+=?|> "onmousedown",
2094 <+=?|> "onmousemove",
2095 <+=?|> "onmouseout",
2096 <+=?|> "onmouseover",
2097 <+=?|> "onmouseup",
2098 <+=?|> "onmousewheel",
2099 <+=?|> "onpause",
2100 <+=?|> "onplay",
2101 <+=?|> "onplaying",
2102 <+=?|> "onprogress",
2103 <+=?|> "onratechange",
2104 <+=?|> "onreset",
2105 <+=?|> "onscroll",
2106 <+=?|> "onseeked",
2107 <+=?|> "onseeking",
2108 <+=?|> "onselect",
2109 <+=?|> "onshow",
2110 <+=?|> "onstalled",
2111 <+=?|> "onsubmit",
2112 <+=?|> "onsuspend",
2113 <+=?|> "ontimeupdate",
2114 <+=?|> "onvolumechange",
2115 <+=?|> "onwaiting"
2116 <+=?|>];
2117  
2118 <+=?|>var globalAttributes = commonAttributes.concat(eventAttributes);
2119  
2120 <+=?|>var attributeMap = {
2121 <+=?|> "html": {"manifest": 1},
2122 <+=?|> "head": {},
2123 <+=?|> "title": {},
2124 <+=?|> "base": {"href": 1, "target": 1},
2125 <+=?|> "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},
2126 <+=?|> "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
2127 <+=?|> "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
2128 <+=?|> "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
2129 <+=?|> "noscript": {"href": 1},
2130 <+=?|> "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},
2131 <+=?|> "section": {},
2132 <+=?|> "nav": {},
2133 <+=?|> "article": {"pubdate": 1},
2134 <+=?|> "aside": {},
2135 <+=?|> "h1": {},
2136 <+=?|> "h2": {},
2137 <+=?|> "h3": {},
2138 <+=?|> "h4": {},
2139 <+=?|> "h5": {},
2140 <+=?|> "h6": {},
2141 <+=?|> "header": {},
2142 <+=?|> "footer": {},
2143 <+=?|> "address": {},
2144 <+=?|> "main": {},
2145 <+=?|> "p": {},
2146 <+=?|> "hr": {},
2147 <+=?|> "pre": {},
2148 <+=?|> "blockquote": {"cite": 1},
2149 <+=?|> "ol": {"start": 1, "reversed": 1},
2150 <+=?|> "ul": {},
2151 <+=?|> "li": {"value": 1},
2152 <+=?|> "dl": {},
2153 <+=?|> "dt": {},
2154 <+=?|> "dd": {},
2155 <+=?|> "figure": {},
2156 <+=?|> "figcaption": {},
2157 <+=?|> "div": {},
2158 <+=?|> "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},
2159 <+=?|> "em": {},
2160 <+=?|> "strong": {},
2161 <+=?|> "small": {},
2162 <+=?|> "s": {},
2163 <+=?|> "cite": {},
2164 <+=?|> "q": {"cite": 1},
2165 <+=?|> "dfn": {},
2166 <+=?|> "abbr": {},
2167 <+=?|> "data": {},
2168 <+=?|> "time": {"datetime": 1},
2169 <+=?|> "code": {},
2170 <+=?|> "var": {},
2171 <+=?|> "samp": {},
2172 <+=?|> "kbd": {},
2173 <+=?|> "sub": {},
2174 <+=?|> "sup": {},
2175 <+=?|> "i": {},
2176 <+=?|> "b": {},
2177 <+=?|> "u": {},
2178 <+=?|> "mark": {},
2179 <+=?|> "ruby": {},
2180 <+=?|> "rt": {},
2181 <+=?|> "rp": {},
2182 <+=?|> "bdi": {},
2183 <+=?|> "bdo": {},
2184 <+=?|> "span": {},
2185 <+=?|> "br": {},
2186 <+=?|> "wbr": {},
2187 <+=?|> "ins": {"cite": 1, "datetime": 1},
2188 <+=?|> "del": {"cite": 1, "datetime": 1},
2189 <+=?|> "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
2190 <+=?|> "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}},
2191 <+=?|> "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
2192 <+=?|> "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
2193 <+=?|> "param": {"name": 1, "value": 1},
2194 <+=?|> "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}},
2195 <+=?|> "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
2196 <+=?|> "source": {"src": 1, "type": 1, "media": 1},
2197 <+=?|> "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
2198 <+=?|> "canvas": {"width": 1, "height": 1},
2199 <+=?|> "map": {"name": 1},
2200 <+=?|> "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
2201 <+=?|> "svg": {},
2202 <+=?|> "math": {},
2203 <+=?|> "table": {"summary": 1},
2204 <+=?|> "caption": {},
2205 <+=?|> "colgroup": {"span": 1},
2206 <+=?|> "col": {"span": 1},
2207 <+=?|> "tbody": {},
2208 <+=?|> "thead": {},
2209 <+=?|> "tfoot": {},
2210 <+=?|> "tr": {},
2211 <+=?|> "td": {"headers": 1, "rowspan": 1, "colspan": 1},
2212 <+=?|> "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
2213 <+=?|> "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}},
2214 <+=?|> "fieldset": {"disabled": 1, "form": 1, "name": 1},
2215 <+=?|> "legend": {},
2216 <+=?|> "label": {"form": 1, "for": 1},
2217 <+=?|> "input": {
2218 <+=?|> "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},
2219 <+=?|> "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},
2220 <+=?|> "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}},
2221 <+=?|> "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
2222 <+=?|> "datalist": {},
2223 <+=?|> "optgroup": {"disabled": 1, "label": 1},
2224 <+=?|> "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
2225 <+=?|> "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}},
2226 <+=?|> "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
2227 <+=?|> "output": {"for": 1, "form": 1, "name": 1},
2228 <+=?|> "progress": {"value": 1, "max": 1},
2229 <+=?|> "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
2230 <+=?|> "details": {"open": 1},
2231 <+=?|> "summary": {},
2232 <+=?|> "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
2233 <+=?|> "menu": {"type": 1, "label": 1},
2234 <+=?|> "dialog": {"open": 1}
2235 <+=?|>};
2236  
2237 <+=?|>var elements = Object.keys(attributeMap);
2238  
2239 <+=?|>function is(token, type) {
2240 <+=?|> return token.type.lastIndexOf(type + ".xml") > -1;
2241 <+=?|>}
2242  
2243 <+=?|>function findTagName(session, pos) {
2244 <+=?|> var iterator = new TokenIterator(session, pos.row, pos.column);
2245 <+=?|> var token = iterator.getCurrentToken();
2246 <+=?|> while (token && !is(token, "tag-name")){
2247 <+=?|> token = iterator.stepBackward();
2248 <+=?|> }
2249 <+=?|> if (token)
2250 <+=?|> return token.value;
2251 <+=?|>}
2252  
2253 <+=?|>function findAttributeName(session, pos) {
2254 <+=?|> var iterator = new TokenIterator(session, pos.row, pos.column);
2255 <+=?|> var token = iterator.getCurrentToken();
2256 <+=?|> while (token && !is(token, "attribute-name")){
2257 <+=?|> token = iterator.stepBackward();
2258 <+=?|> }
2259 <+=?|> if (token)
2260 <+=?|> return token.value;
2261 <+=?|>}
2262  
2263 <+=?|>var HtmlCompletions = function() {
2264  
2265 <+=?|>};
2266  
2267 <+=?|>(function() {
2268  
2269 <+=?|> this.getCompletions = function(state, session, pos, prefix) {
2270 <+=?|> var token = session.getTokenAt(pos.row, pos.column);
2271  
2272 <+=?|> if (!token)
2273 <+=?|> return [];
2274 <+=?|> if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
2275 <+=?|> return this.getTagCompletions(state, session, pos, prefix);
2276 <+=?|> if (is(token, "tag-whitespace") || is(token, "attribute-name"))
2277 <+=?|> return this.getAttributeCompletions(state, session, pos, prefix);
2278 <+=?|> if (is(token, "attribute-value"))
2279 <+=?|> return this.getAttributeValueCompletions(state, session, pos, prefix);
2280 <+=?|> var line = session.getLine(pos.row).substr(0, pos.column);
2281 <+=?|> if (/&[a-z]*$/i.test(line))
2282 <+=?|> return this.getHTMLEntityCompletions(state, session, pos, prefix);
2283  
2284 <+=?|> return [];
2285 <+=?|> };
2286  
2287 <+=?|> this.getTagCompletions = function(state, session, pos, prefix) {
2288 <+=?|> return elements.map(function(element){
2289 <+=?|> return {
2290 <+=?|> value: element,
2291 <+=?|> meta: "tag",
2292 <+=?|> score: Number.MAX_VALUE
2293 <+=?|> };
2294 <+=?|> });
2295 <+=?|> };
2296  
2297 <+=?|> this.getAttributeCompletions = function(state, session, pos, prefix) {
2298 <+=?|> var tagName = findTagName(session, pos);
2299 <+=?|> if (!tagName)
2300 <+=?|> return [];
2301 <+=?|> var attributes = globalAttributes;
2302 <+=?|> if (tagName in attributeMap) {
2303 <+=?|> attributes = attributes.concat(Object.keys(attributeMap[tagName]));
2304 <+=?|> }
2305 <+=?|> return attributes.map(function(attribute){
2306 <+=?|> return {
2307 <+=?|> caption: attribute,
2308 <+=?|> snippet: attribute + '="$0"',
2309 <+=?|> meta: "attribute",
2310 <+=?|> score: Number.MAX_VALUE
2311 <+=?|> };
2312 <+=?|> });
2313 <+=?|> };
2314  
2315 <+=?|> this.getAttributeValueCompletions = function(state, session, pos, prefix) {
2316 <+=?|> var tagName = findTagName(session, pos);
2317 <+=?|> var attributeName = findAttributeName(session, pos);
2318  
2319 <+=?|> if (!tagName)
2320 <+=?|> return [];
2321 <+=?|> var values = [];
2322 <+=?|> if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
2323 <+=?|> values = Object.keys(attributeMap[tagName][attributeName]);
2324 <+=?|> }
2325 <+=?|> return values.map(function(value){
2326 <+=?|> return {
2327 <+=?|> caption: value,
2328 <+=?|> snippet: value,
2329 <+=?|> meta: "attribute value",
2330 <+=?|> score: Number.MAX_VALUE
2331 <+=?|> };
2332 <+=?|> });
2333 <+=?|> };
2334  
2335 <+=?|> this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
2336 <+=?|> 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;'];
2337  
2338 <+=?|> return values.map(function(value){
2339 <+=?|> return {
2340 <+=?|> caption: value,
2341 <+=?|> snippet: value,
2342 <+=?|> meta: "html entity",
2343 <+=?|> score: Number.MAX_VALUE
2344 <+=?|> };
2345 <+=?|> });
2346 <+=?|> };
2347  
2348 <+=?|>}).call(HtmlCompletions.prototype);
2349  
2350 <+=?|>exports.HtmlCompletions = HtmlCompletions;
2351 <+=?|>});
2352  
2353 <+=?|>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) {
2354 <+=?|>"use strict";
2355  
2356 <+=?|>var oop = require("../lib/oop");
2357 <+=?|>var lang = require("../lib/lang");
2358 <+=?|>var TextMode = require("./text").Mode;
2359 <+=?|>var JavaScriptMode = require("./javascript").Mode;
2360 <+=?|>var CssMode = require("./css").Mode;
2361 <+=?|>var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2362 <+=?|>var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
2363 <+=?|>var HtmlFoldMode = require("./folding/html").FoldMode;
2364 <+=?|>var HtmlCompletions = require("./html_completions").HtmlCompletions;
2365 <+=?|>var WorkerClient = require("../worker/worker_client").WorkerClient;
2366 <+=?|>var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2367 <+=?|>var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2368  
2369 <+=?|>var Mode = function(options) {
2370 <+=?|> this.fragmentContext = options && options.fragmentContext;
2371 <+=?|> this.HighlightRules = HtmlHighlightRules;
2372 <+=?|> this.$behaviour = new XmlBehaviour();
2373 <+=?|> this.$completer = new HtmlCompletions();
2374  
2375 <+=?|> this.createModeDelegates({
2376 <+=?|> "js-": JavaScriptMode,
2377 <+=?|> "css-": CssMode
2378 <+=?|> });
2379  
2380 <+=?|> this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2381 <+=?|>};
2382 <+=?|>oop.inherits(Mode, TextMode);
2383  
2384 <+=?|>(function() {
2385  
2386 <+=?|> this.blockComment = {start: "<!--", end: "-->"};
2387  
2388 <+=?|> this.voidElements = lang.arrayToMap(voidElements);
2389  
2390 <+=?|> this.getNextLineIndent = function(state, line, tab) {
2391 <+=?|> return this.$getIndent(line);
2392 <+=?|> };
2393  
2394 <+=?|> this.checkOutdent = function(state, line, input) {
2395 <+=?|> return false;
2396 <+=?|> };
2397  
2398 <+=?|> this.getCompletions = function(state, session, pos, prefix) {
2399 <+=?|> return this.$completer.getCompletions(state, session, pos, prefix);
2400 <+=?|> };
2401  
2402 <+=?|> this.createWorker = function(session) {
2403 <+=?|> if (this.constructor != Mode)
2404 <+=?|> return;
2405 <+=?|> var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2406 <+=?|> worker.attachToDocument(session.getDocument());
2407  
2408 <+=?|> if (this.fragmentContext)
2409 <+=?|> worker.call("setOptions", [{context: this.fragmentContext}]);
2410  
2411 <+=?|> worker.on("error", function(e) {
2412 <+=?|> session.setAnnotations(e.data);
2413 <+=?|> });
2414  
2415 <+=?|> worker.on("terminate", function() {
2416 <+=?|> session.clearAnnotations();
2417 <+=?|> });
2418  
2419 <+=?|> return worker;
2420 <+=?|> };
2421  
2422 <+=?|> this.$id = "ace/mode/html";
2423 <+=?|>}).call(Mode.prototype);
2424  
2425 <+=?|>exports.Mode = Mode;
2426 <+=?|>});
2427  
2428 <+=?|>define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2429 <+=?|>"use strict";
2430  
2431 <+=?|>var oop = require("../lib/oop");
2432 <+=?|>var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2433 <+=?|>var constantOtherSymbol = exports.constantOtherSymbol = {
2434 <+=?|> token : "constant.other.symbol.ruby", // symbol
2435 <+=?|> regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
2436 <+=?|>};
2437  
2438 <+=?|>var qString = exports.qString = {
2439 <+=?|> token : "string", // single line
2440 <+=?|> regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
2441 <+=?|>};
2442  
2443 <+=?|>var qqString = exports.qqString = {
2444 <+=?|> token : "string", // single line
2445 <+=?|> regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
2446 <+=?|>};
2447  
2448 <+=?|>var tString = exports.tString = {
2449 <+=?|> token : "string", // backtick string
2450 <+=?|> regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
2451 <+=?|>};
2452  
2453 <+=?|>var constantNumericHex = exports.constantNumericHex = {
2454 <+=?|> token : "constant.numeric", // hex
2455 <+=?|> regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
2456 <+=?|>};
2457  
2458 <+=?|>var constantNumericFloat = exports.constantNumericFloat = {
2459 <+=?|> token : "constant.numeric", // float
2460 <+=?|> regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
2461 <+=?|>};
2462  
2463 <+=?|>var RubyHighlightRules = function() {
2464  
2465 <+=?|> var builtinFunctions = (
2466 <+=?|> "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
2467 <+=?|> "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
2468 <+=?|> "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
2469 <+=?|> "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
2470 <+=?|> "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
2471 <+=?|> "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
2472 <+=?|> "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
2473 <+=?|> "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
2474 <+=?|> "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
2475 <+=?|> "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" +
2476 <+=?|> "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
2477 <+=?|> "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
2478 <+=?|> "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
2479 <+=?|> "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
2480 <+=?|> "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
2481 <+=?|> "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
2482 <+=?|> "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
2483 <+=?|> "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
2484 <+=?|> "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
2485 <+=?|> "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
2486 <+=?|> "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
2487 <+=?|> "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
2488 <+=?|> "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
2489 <+=?|> "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
2490 <+=?|> "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
2491 <+=?|> "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
2492 <+=?|> "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
2493 <+=?|> "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
2494 <+=?|> "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
2495 <+=?|> "has_many|has_one|belongs_to|has_and_belongs_to_many"
2496 <+=?|> );
2497  
2498 <+=?|> var keywords = (
2499 <+=?|> "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
2500 <+=?|> "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
2501 <+=?|> "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
2502 <+=?|> );
2503  
2504 <+=?|> var buildinConstants = (
2505 <+=?|> "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
2506 <+=?|> "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
2507 <+=?|> );
2508  
2509 <+=?|> var builtinVariables = (
2510 <+=?|> "$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" +
2511 <+=?|> "$!|root_url|flash|session|cookies|params|request|response|logger|self"
2512 <+=?|> );
2513  
2514 <+=?|> var keywordMapper = this.$keywords = this.createKeywordMapper({
2515 <+=?|> "keyword": keywords,
2516 <+=?|> "constant.language": buildinConstants,
2517 <+=?|> "variable.language": builtinVariables,
2518 <+=?|> "support.function": builtinFunctions,
2519 <+=?|> "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
2520 <+=?|> }, "identifier");
2521  
2522 <+=?|> this.$rules = {
2523 <+=?|> "start" : [
2524 <+=?|> {
2525 <+=?|> token : "comment",
2526 <+=?|> regex : "#.*$"
2527 <+=?|> }, {
2528 <+=?|> token : "comment", // multi line comment
2529 <+=?|> regex : "^=begin(?:$|\\s.*$)",
2530 <+=?|> next : "comment"
2531 <+=?|> }, {
2532 <+=?|> token : "string.regexp",
2533 <+=?|> regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
2534 <+=?|> },
2535  
2536 <+=?|> [{
2537 <+=?|> regex: "[{}]", onMatch: function(val, state, stack) {
2538 <+=?|> this.next = val == "{" ? this.nextState : "";
2539 <+=?|> if (val == "{" && stack.length) {
2540 <+=?|> stack.unshift("start", state);
2541 <+=?|> return "paren.lparen";
2542 <+=?|> }
2543 <+=?|> if (val == "}" && stack.length) {
2544 <+=?|> stack.shift();
2545 <+=?|> this.next = stack.shift();
2546 <+=?|> if (this.next.indexOf("string") != -1)
2547 <+=?|> return "paren.end";
2548 <+=?|> }
2549 <+=?|> return val == "{" ? "paren.lparen" : "paren.rparen";
2550 <+=?|> },
2551 <+=?|> nextState: "start"
2552 <+=?|> }, {
2553 <+=?|> token : "string.start",
2554 <+=?|> regex : /"/,
2555 <+=?|> push : [{
2556 <+=?|> token : "constant.language.escape",
2557 <+=?|> regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
2558 <+=?|> }, {
2559 <+=?|> token : "paren.start",
2560 <+=?|> regex : /#{/,
2561 <+=?|> push : "start"
2562 <+=?|> }, {
2563 <+=?|> token : "string.end",
2564 <+=?|> regex : /"/,
2565 <+=?|> next : "pop"
2566 <+=?|> }, {
2567 <+=?|> defaultToken: "string"
2568 <+=?|> }]
2569 <+=?|> }, {
2570 <+=?|> token : "string.start",
2571 <+=?|> regex : /`/,
2572 <+=?|> push : [{
2573 <+=?|> token : "constant.language.escape",
2574 <+=?|> regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
2575 <+=?|> }, {
2576 <+=?|> token : "paren.start",
2577 <+=?|> regex : /#{/,
2578 <+=?|> push : "start"
2579 <+=?|> }, {
2580 <+=?|> token : "string.end",
2581 <+=?|> regex : /`/,
2582 <+=?|> next : "pop"
2583 <+=?|> }, {
2584 <+=?|> defaultToken: "string"
2585 <+=?|> }]
2586 <+=?|> }, {
2587 <+=?|> token : "string.start",
2588 <+=?|> regex : /'/,
2589 <+=?|> push : [{
2590 <+=?|> token : "constant.language.escape",
2591 <+=?|> regex : /\\['\\]/
2592 <+=?|> }, {
2593 <+=?|> token : "string.end",
2594 <+=?|> regex : /'/,
2595 <+=?|> next : "pop"
2596 <+=?|> }, {
2597 <+=?|> defaultToken: "string"
2598 <+=?|> }]
2599 <+=?|> }],
2600  
2601 <+=?|> {
2602 <+=?|> token : "text", // namespaces aren't symbols
2603 <+=?|> regex : "::"
2604 <+=?|> }, {
2605 <+=?|> token : "variable.instance", // instance variable
2606 <+=?|> regex : "@{1,2}[a-zA-Z_\\d]+"
2607 <+=?|> }, {
2608 <+=?|> token : "support.class", // class name
2609 <+=?|> regex : "[A-Z][a-zA-Z_\\d]+"
2610 <+=?|> },
2611  
2612 <+=?|> constantOtherSymbol,
2613 <+=?|> constantNumericHex,
2614 <+=?|> constantNumericFloat,
2615  
2616 <+=?|> {
2617 <+=?|> token : "constant.language.boolean",
2618 <+=?|> regex : "(?:true|false)\\b"
2619 <+=?|> }, {
2620 <+=?|> token : keywordMapper,
2621 <+=?|> regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
2622 <+=?|> }, {
2623 <+=?|> token : "punctuation.separator.key-value",
2624 <+=?|> regex : "=>"
2625 <+=?|> }, {
2626 <+=?|> stateName: "heredoc",
2627 <+=?|> onMatch : function(value, currentState, stack) {
2628 <+=?|> var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
2629 <+=?|> var tokens = value.split(this.splitRegex);
2630 <+=?|> stack.push(next, tokens[3]);
2631 <+=?|> return [
2632 <+=?|> {type:"constant", value: tokens[1]},
2633 <+=?|> {type:"string", value: tokens[2]},
2634 <+=?|> {type:"support.class", value: tokens[3]},
2635 <+=?|> {type:"string", value: tokens[4]}
2636 <+=?|> ];
2637 <+=?|> },
2638 <+=?|> regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
2639 <+=?|> rules: {
2640 <+=?|> heredoc: [{
2641 <+=?|> onMatch: function(value, currentState, stack) {
2642 <+=?|> if (value === stack[1]) {
2643 <+=?|> stack.shift();
2644 <+=?|> stack.shift();
2645 <+=?|> this.next = stack[0] || "start";
2646 <+=?|> return "support.class";
2647 <+=?|> }
2648 <+=?|> this.next = "";
2649 <+=?|> return "string";
2650 <+=?|> },
2651 <+=?|> regex: ".*$",
2652 <+=?|> next: "start"
2653 <+=?|> }],
2654 <+=?|> indentedHeredoc: [{
2655 <+=?|> token: "string",
2656 <+=?|> regex: "^ +"
2657 <+=?|> }, {
2658 <+=?|> onMatch: function(value, currentState, stack) {
2659 <+=?|> if (value === stack[1]) {
2660 <+=?|> stack.shift();
2661 <+=?|> stack.shift();
2662 <+=?|> this.next = stack[0] || "start";
2663 <+=?|> return "support.class";
2664 <+=?|> }
2665 <+=?|> this.next = "";
2666 <+=?|> return "string";
2667 <+=?|> },
2668 <+=?|> regex: ".*$",
2669 <+=?|> next: "start"
2670 <+=?|> }]
2671 <+=?|> }
2672 <+=?|> }, {
2673 <+=?|> regex : "$",
2674 <+=?|> token : "empty",
2675 <+=?|> next : function(currentState, stack) {
2676 <+=?|> if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
2677 <+=?|> return stack[0];
2678 <+=?|> return currentState;
2679 <+=?|> }
2680 <+=?|> }, {
2681 <+=?|> token : "string.character",
2682 <+=?|> regex : "\\B\\?."
2683 <+=?|> }, {
2684 <+=?|> token : "keyword.operator",
2685 <+=?|> regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
2686 <+=?|> }, {
2687 <+=?|> token : "paren.lparen",
2688 <+=?|> regex : "[[({]"
2689 <+=?|> }, {
2690 <+=?|> token : "paren.rparen",
2691 <+=?|> regex : "[\\])}]"
2692 <+=?|> }, {
2693 <+=?|> token : "text",
2694 <+=?|> regex : "\\s+"
2695 <+=?|> }
2696 <+=?|> ],
2697 <+=?|> "comment" : [
2698 <+=?|> {
2699 <+=?|> token : "comment", // closing comment
2700 <+=?|> regex : "^=end(?:$|\\s.*$)",
2701 <+=?|> next : "start"
2702 <+=?|> }, {
2703 <+=?|> token : "comment", // comment spanning whole line
2704 <+=?|> regex : ".+"
2705 <+=?|> }
2706 <+=?|> ]
2707 <+=?|> };
2708  
2709 <+=?|> this.normalizeRules();
2710 <+=?|>};
2711  
2712 <+=?|>oop.inherits(RubyHighlightRules, TextHighlightRules);
2713  
2714 <+=?|>exports.RubyHighlightRules = RubyHighlightRules;
2715 <+=?|>});
2716  
2717 <+=?|>define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
2718 <+=?|>"use strict";
2719  
2720 <+=?|>var oop = require("../../lib/oop");
2721 <+=?|>var BaseFoldMode = require("./fold_mode").FoldMode;
2722 <+=?|>var Range = require("../../range").Range;
2723  
2724 <+=?|>var FoldMode = exports.FoldMode = function() {};
2725 <+=?|>oop.inherits(FoldMode, BaseFoldMode);
2726  
2727 <+=?|>(function() {
2728  
2729 <+=?|> this.getFoldWidgetRange = function(session, foldStyle, row) {
2730 <+=?|> var range = this.indentationBlock(session, row);
2731 <+=?|> if (range)
2732 <+=?|> return range;
2733  
2734 <+=?|> var re = /\S/;
2735 <+=?|> var line = session.getLine(row);
2736 <+=?|> var startLevel = line.search(re);
2737 <+=?|> if (startLevel == -1 || line[startLevel] != "#")
2738 <+=?|> return;
2739  
2740 <+=?|> var startColumn = line.length;
2741 <+=?|> var maxRow = session.getLength();
2742 <+=?|> var startRow = row;
2743 <+=?|> var endRow = row;
2744  
2745 <+=?|> while (++row < maxRow) {
2746 <+=?|> line = session.getLine(row);
2747 <+=?|> var level = line.search(re);
2748  
2749 <+=?|> if (level == -1)
2750 <+=?|> continue;
2751  
2752 <+=?|> if (line[level] != "#")
2753 <+=?|> break;
2754  
2755 <+=?|> endRow = row;
2756 <+=?|> }
2757  
2758 <+=?|> if (endRow > startRow) {
2759 <+=?|> var endColumn = session.getLine(endRow).length;
2760 <+=?|> return new Range(startRow, startColumn, endRow, endColumn);
2761 <+=?|> }
2762 <+=?|> };
2763 <+=?|> this.getFoldWidget = function(session, foldStyle, row) {
2764 <+=?|> var line = session.getLine(row);
2765 <+=?|> var indent = line.search(/\S/);
2766 <+=?|> var next = session.getLine(row + 1);
2767 <+=?|> var prev = session.getLine(row - 1);
2768 <+=?|> var prevIndent = prev.search(/\S/);
2769 <+=?|> var nextIndent = next.search(/\S/);
2770  
2771 <+=?|> if (indent == -1) {
2772 <+=?|> session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
2773 <+=?|> return "";
2774 <+=?|> }
2775 <+=?|> if (prevIndent == -1) {
2776 <+=?|> if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
2777 <+=?|> session.foldWidgets[row - 1] = "";
2778 <+=?|> session.foldWidgets[row + 1] = "";
2779 <+=?|> return "start";
2780 <+=?|> }
2781 <+=?|> } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
2782 <+=?|> if (session.getLine(row - 2).search(/\S/) == -1) {
2783 <+=?|> session.foldWidgets[row - 1] = "start";
2784 <+=?|> session.foldWidgets[row + 1] = "";
2785 <+=?|> return "";
2786 <+=?|> }
2787 <+=?|> }
2788  
2789 <+=?|> if (prevIndent!= -1 && prevIndent < indent)
2790 <+=?|> session.foldWidgets[row - 1] = "start";
2791 <+=?|> else
2792 <+=?|> session.foldWidgets[row - 1] = "";
2793  
2794 <+=?|> if (indent < nextIndent)
2795 <+=?|> return "start";
2796 <+=?|> else
2797 <+=?|> return "";
2798 <+=?|> };
2799  
2800 <+=?|>}).call(FoldMode.prototype);
2801  
2802 <+=?|>});
2803  
2804 <+=?|>define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
2805 <+=?|>"use strict";
2806  
2807 <+=?|>var oop = require("../lib/oop");
2808 <+=?|>var TextMode = require("./text").Mode;
2809 <+=?|>var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
2810 <+=?|>var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
2811 <+=?|>var Range = require("../range").Range;
2812 <+=?|>var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
2813 <+=?|>var FoldMode = require("./folding/coffee").FoldMode;
2814  
2815 <+=?|>var Mode = function() {
2816 <+=?|> this.HighlightRules = RubyHighlightRules;
2817 <+=?|> this.$outdent = new MatchingBraceOutdent();
2818 <+=?|> this.$behaviour = new CstyleBehaviour();
2819 <+=?|> this.foldingRules = new FoldMode();
2820 <+=?|>};
2821 <+=?|>oop.inherits(Mode, TextMode);
2822  
2823 <+=?|>(function() {
2824  
2825  
2826 <+=?|> this.lineCommentStart = "#";
2827  
2828 <+=?|> this.getNextLineIndent = function(state, line, tab) {
2829 <+=?|> var indent = this.$getIndent(line);
2830  
2831 <+=?|> var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
2832 <+=?|> var tokens = tokenizedLine.tokens;
2833  
2834 <+=?|> if (tokens.length && tokens[tokens.length-1].type == "comment") {
2835 <+=?|> return indent;
2836 <+=?|> }
2837  
2838 <+=?|> if (state == "start") {
2839 <+=?|> var match = line.match(/^.*[\{\(\[]\s*$/);
2840 <+=?|> var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
2841 <+=?|> var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
2842 <+=?|> var startingConditional = line.match(/^\s*(if|else|when)\s*/)
2843 <+=?|> if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
2844 <+=?|> indent += tab;
2845 <+=?|> }
2846 <+=?|> }
2847  
2848 <+=?|> return indent;
2849 <+=?|> };
2850  
2851 <+=?|> this.checkOutdent = function(state, line, input) {
2852 <+=?|> return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
2853 <+=?|> };
2854  
2855 <+=?|> this.autoOutdent = function(state, session, row) {
2856 <+=?|> var line = session.getLine(row);
2857 <+=?|> if (/}/.test(line))
2858 <+=?|> return this.$outdent.autoOutdent(session, row);
2859 <+=?|> var indent = this.$getIndent(line);
2860 <+=?|> var prevLine = session.getLine(row - 1);
2861 <+=?|> var prevIndent = this.$getIndent(prevLine);
2862 <+=?|> var tab = session.getTabString();
2863 <+=?|> if (prevIndent.length <= indent.length) {
2864 <+=?|> if (indent.slice(-tab.length) == tab)
2865 <+=?|> session.remove(new Range(row, indent.length-tab.length, row, indent.length));
2866 <+=?|> }
2867 <+=?|> };
2868  
2869 <+=?|> this.$id = "ace/mode/ruby";
2870 <+=?|>}).call(Mode.prototype);
2871  
2872 <+=?|>exports.Mode = Mode;
2873 <+=?|>});
2874  
2875 <+=?|>define("ace/mode/ejs",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/lib/oop","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module) {
2876 <+=?|>"use strict";
2877  
2878 <+=?|>var oop = require("../lib/oop");
2879 <+=?|>var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2880 <+=?|>var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
2881  
2882 <+=?|>var EjsHighlightRules = function(start, end) {
2883 <+=?|> HtmlHighlightRules.call(this);
2884  
2885 <+=?|> if (!start)
2886 <+=?|> start = "(?:<%|<\\?|{{)";
2887 <+=?|> if (!end)
2888 <+=?|> end = "(?:%>|\\?>|}})";
2889  
2890 <+=?|> for (var i in this.$rules) {
2891 <+=?|> this.$rules[i].unshift({
2892 <+=?|> token : "markup.list.meta.tag",
2893 <+=?|> regex : start + "(?![>}])[-=]?",
2894 <+=?|> push : "ejs-start"
2895 <+=?|> });
2896 <+=?|> }
2897  
2898 <+=?|> this.embedRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "ejs-", [{
2899 <+=?|> token : "markup.list.meta.tag",
2900 <+=?|> regex : "-?" + end,
2901 <+=?|> next : "pop"
2902 <+=?|> }, {
2903 <+=?|> token: "comment",
2904 <+=?|> regex: "//.*?" + end,
2905 <+=?|> next: "pop"
2906 <+=?|> }]);
2907  
2908 <+=?|> this.normalizeRules();
2909 <+=?|>};
2910  
2911  
2912 <+=?|>oop.inherits(EjsHighlightRules, HtmlHighlightRules);
2913  
2914 <+=?|>exports.EjsHighlightRules = EjsHighlightRules;
2915  
2916  
2917 <+=?|>var oop = require("../lib/oop");
2918 <+=?|>var HtmlMode = require("./html").Mode;
2919 <+=?|>var JavaScriptMode = require("./javascript").Mode;
2920 <+=?|>var CssMode = require("./css").Mode;
2921 <+=?|>var RubyMode = require("./ruby").Mode;
2922  
2923 <+=?|>var Mode = function() {
2924 <+=?|> HtmlMode.call(this);
2925 <+=?|> this.HighlightRules = EjsHighlightRules;
2926 <+=?|> this.createModeDelegates({
2927 <+=?|> "js-": JavaScriptMode,
2928 <+=?|> "css-": CssMode,
2929 <+=?|> "ejs-": JavaScriptMode
2930 <+=?|> });
2931 <+=?|>};
2932 <+=?|>oop.inherits(Mode, HtmlMode);
2933  
2934 <+=?|>(function() {
2935  
2936 <+=?|> this.$id = "ace/mode/ejs";
2937 <+=?|>}).call(Mode.prototype);
2938  
2939 <+=?|>exports.Mode = Mode;
2940 <+=?|>});