datagram 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. data/.env.sample +7 -0
  2. data/.gitignore +20 -0
  3. data/.rbenv-version +1 -0
  4. data/Gemfile +12 -0
  5. data/LICENSE.txt +22 -0
  6. data/Procfile +1 -0
  7. data/README.md +29 -0
  8. data/Rakefile +1 -0
  9. data/config.ru +5 -0
  10. data/datagram.gemspec +23 -0
  11. data/db/migrate/1_create_queries.rb +9 -0
  12. data/db/migrate/2_add_name_to_queries.rb +5 -0
  13. data/lib/datagram/version.rb +3 -0
  14. data/lib/datagram.rb +135 -0
  15. data/lib/views/application.coffee +222 -0
  16. data/lib/views/index.haml +47 -0
  17. data/lib/views/layout.haml +17 -0
  18. data/lib/views/style.sass +179 -0
  19. data/public/ace/ace.js +15209 -0
  20. data/public/ace/ext-elastic_tabstops_lite.js +301 -0
  21. data/public/ace/ext-emmet.js +253 -0
  22. data/public/ace/ext-searchbox.js +441 -0
  23. data/public/ace/ext-spellcheck.js +67 -0
  24. data/public/ace/ext-static_highlight.js +96 -0
  25. data/public/ace/ext-textarea.js +492 -0
  26. data/public/ace/ext-whitespace.js +204 -0
  27. data/public/ace/keybinding-emacs.js +962 -0
  28. data/public/ace/keybinding-vim.js +1704 -0
  29. data/public/ace/mode-abap.js +260 -0
  30. data/public/ace/mode-asciidoc.js +372 -0
  31. data/public/ace/mode-c9search.js +182 -0
  32. data/public/ace/mode-c_cpp.js +737 -0
  33. data/public/ace/mode-clojure.js +299 -0
  34. data/public/ace/mode-coffee.js +426 -0
  35. data/public/ace/mode-coldfusion.js +1753 -0
  36. data/public/ace/mode-csharp.js +612 -0
  37. data/public/ace/mode-css.js +773 -0
  38. data/public/ace/mode-curly.js +1950 -0
  39. data/public/ace/mode-dart.js +945 -0
  40. data/public/ace/mode-diff.js +166 -0
  41. data/public/ace/mode-django.js +1969 -0
  42. data/public/ace/mode-dot.js +320 -0
  43. data/public/ace/mode-ftl.js +907 -0
  44. data/public/ace/mode-glsl.js +810 -0
  45. data/public/ace/mode-golang.js +632 -0
  46. data/public/ace/mode-groovy.js +1037 -0
  47. data/public/ace/mode-haml.js +487 -0
  48. data/public/ace/mode-haxe.js +609 -0
  49. data/public/ace/mode-html.js +1881 -0
  50. data/public/ace/mode-jade.js +1951 -0
  51. data/public/ace/mode-java.js +996 -0
  52. data/public/ace/mode-javascript.js +876 -0
  53. data/public/ace/mode-json.js +578 -0
  54. data/public/ace/mode-jsp.js +1351 -0
  55. data/public/ace/mode-jsx.js +635 -0
  56. data/public/ace/mode-latex.js +189 -0
  57. data/public/ace/mode-less.js +807 -0
  58. data/public/ace/mode-liquid.js +862 -0
  59. data/public/ace/mode-lisp.js +138 -0
  60. data/public/ace/mode-livescript.js +288 -0
  61. data/public/ace/mode-logiql.js +664 -0
  62. data/public/ace/mode-lsl.js +828 -0
  63. data/public/ace/mode-lua.js +455 -0
  64. data/public/ace/mode-luapage.js +2340 -0
  65. data/public/ace/mode-lucene.js +64 -0
  66. data/public/ace/mode-makefile.js +313 -0
  67. data/public/ace/mode-markdown.js +2280 -0
  68. data/public/ace/mode-mushcode.js +704 -0
  69. data/public/ace/mode-mushcode_high_rules.js +569 -0
  70. data/public/ace/mode-objectivec.js +659 -0
  71. data/public/ace/mode-ocaml.js +443 -0
  72. data/public/ace/mode-pascal.js +233 -0
  73. data/public/ace/mode-perl.js +316 -0
  74. data/public/ace/mode-pgsql.js +908 -0
  75. data/public/ace/mode-php.js +2291 -0
  76. data/public/ace/mode-powershell.js +618 -0
  77. data/public/ace/mode-python.js +264 -0
  78. data/public/ace/mode-r.js +404 -0
  79. data/public/ace/mode-rdoc.js +184 -0
  80. data/public/ace/mode-rhtml.js +2168 -0
  81. data/public/ace/mode-ruby.js +431 -0
  82. data/public/ace/mode-sass.js +442 -0
  83. data/public/ace/mode-scad.js +670 -0
  84. data/public/ace/mode-scala.js +1025 -0
  85. data/public/ace/mode-scheme.js +144 -0
  86. data/public/ace/mode-scss.js +832 -0
  87. data/public/ace/mode-sh.js +204 -0
  88. data/public/ace/mode-sql.js +118 -0
  89. data/public/ace/mode-stylus.js +483 -0
  90. data/public/ace/mode-svg.js +1442 -0
  91. data/public/ace/mode-tcl.js +319 -0
  92. data/public/ace/mode-tex.js +166 -0
  93. data/public/ace/mode-text.js +0 -0
  94. data/public/ace/mode-textile.js +170 -0
  95. data/public/ace/mode-tmsnippet.js +200 -0
  96. data/public/ace/mode-toml.js +180 -0
  97. data/public/ace/mode-typescript.js +961 -0
  98. data/public/ace/mode-vbscript.js +281 -0
  99. data/public/ace/mode-velocity.js +962 -0
  100. data/public/ace/mode-xml.js +789 -0
  101. data/public/ace/mode-xquery.js +2750 -0
  102. data/public/ace/mode-yaml.js +289 -0
  103. data/public/ace/theme-ambiance.js +202 -0
  104. data/public/ace/theme-chaos.js +182 -0
  105. data/public/ace/theme-chrome.js +161 -0
  106. data/public/ace/theme-clouds.js +135 -0
  107. data/public/ace/theme-clouds_midnight.js +136 -0
  108. data/public/ace/theme-cobalt.js +150 -0
  109. data/public/ace/theme-crimson_editor.js +154 -0
  110. data/public/ace/theme-dawn.js +146 -0
  111. data/public/ace/theme-dreamweaver.js +173 -0
  112. data/public/ace/theme-eclipse.js +122 -0
  113. data/public/ace/theme-github.js +136 -0
  114. data/public/ace/theme-idle_fingers.js +136 -0
  115. data/public/ace/theme-kr.js +143 -0
  116. data/public/ace/theme-merbivore.js +135 -0
  117. data/public/ace/theme-merbivore_soft.js +136 -0
  118. data/public/ace/theme-mono_industrial.js +148 -0
  119. data/public/ace/theme-monokai.js +140 -0
  120. data/public/ace/theme-pastel_on_dark.js +148 -0
  121. data/public/ace/theme-solarized_dark.js +128 -0
  122. data/public/ace/theme-solarized_light.js +131 -0
  123. data/public/ace/theme-terminal.js +154 -0
  124. data/public/ace/theme-textmate.js +0 -0
  125. data/public/ace/theme-tomorrow.js +147 -0
  126. data/public/ace/theme-tomorrow_night.js +147 -0
  127. data/public/ace/theme-tomorrow_night_blue.js +145 -0
  128. data/public/ace/theme-tomorrow_night_bright.js +147 -0
  129. data/public/ace/theme-tomorrow_night_eighties.js +144 -0
  130. data/public/ace/theme-twilight.js +147 -0
  131. data/public/ace/theme-vibrant_ink.js +131 -0
  132. data/public/ace/theme-xcode.js +125 -0
  133. data/public/ace/worker-coffee.js +7091 -0
  134. data/public/ace/worker-css.js +8289 -0
  135. data/public/ace/worker-javascript.js +6496 -0
  136. data/public/ace/worker-json.js +2305 -0
  137. data/public/ace/worker-lua.js +3313 -0
  138. data/public/ace/worker-php.js +6743 -0
  139. data/public/ace/worker-xquery.js +21897 -0
  140. data/public/font/FontAwesome.otf +0 -0
  141. data/public/font/fontawesome-webfont.eot +0 -0
  142. data/public/font/fontawesome-webfont.svg +284 -0
  143. data/public/font/fontawesome-webfont.ttf +0 -0
  144. data/public/font/fontawesome-webfont.woff +0 -0
  145. data/public/font-awesome.css +540 -0
  146. data/public/jquery.js +9597 -0
  147. data/script/migrate.sh +2 -0
  148. metadata +242 -0
@@ -0,0 +1,483 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2012, Ajax.org B.V.
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ * * Redistributions of source code must retain the above copyright
10
+ * notice, this list of conditions and the following disclaimer.
11
+ * * Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * * Neither the name of Ajax.org B.V. nor the
15
+ * names of its contributors may be used to endorse or promote products
16
+ * derived from this software without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *
29
+ *
30
+ * Contributor(s):
31
+ *
32
+ *
33
+ *
34
+ * ***** END LICENSE BLOCK ***** */
35
+
36
+ define('ace/mode/stylus', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/stylus_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
37
+
38
+
39
+ var oop = require("../lib/oop");
40
+ var TextMode = require("./text").Mode;
41
+ var Tokenizer = require("../tokenizer").Tokenizer;
42
+ var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules;
43
+ var FoldMode = require("./folding/coffee").FoldMode;
44
+
45
+ var Mode = function() {
46
+ var highlighter = new StylusHighlightRules();
47
+ this.foldingRules = new FoldMode();
48
+
49
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
50
+ };
51
+ oop.inherits(Mode, TextMode);
52
+
53
+ (function() {
54
+ }).call(Mode.prototype);
55
+
56
+ exports.Mode = Mode;
57
+ });
58
+
59
+ define('ace/mode/stylus_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
60
+
61
+
62
+ var oop = require("../lib/oop");
63
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
64
+ var CssHighlightRules = require("./css_highlight_rules");
65
+
66
+ var StylusHighlightRules = function() {
67
+
68
+ var keywordMapper = this.createKeywordMapper({
69
+ "support.type": CssHighlightRules.supportType,
70
+ "support.function": CssHighlightRules.supportFunction,
71
+ "support.constant": CssHighlightRules.supportConstant,
72
+ "support.constant.color": CssHighlightRules.supportConstantColor,
73
+ "support.constant.fonts": CssHighlightRules.supportConstantFonts
74
+ }, "text", true);
75
+
76
+ this.$rules = {
77
+ start: [
78
+ {
79
+ token : "comment",
80
+ regex : /\/\/.*$/
81
+ },
82
+ {
83
+ token : "comment", // multi line comment
84
+ regex : /\/\*/,
85
+ next : "comment"
86
+ },
87
+ {
88
+ token: ["entity.name.function.stylus", "text"],
89
+ regex: "^([-a-zA-Z_][-\\w]*)?(\\()"
90
+ },
91
+ {
92
+ token: ["entity.other.attribute-name.class.stylus"],
93
+ regex: "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*"
94
+ },
95
+ {
96
+ token: ["entity.language.stylus"],
97
+ regex: "^ *&"
98
+ },
99
+ {
100
+ token: ["variable.language.stylus"],
101
+ regex: "(arguments)"
102
+ },
103
+ {
104
+ token: ["keyword.stylus"],
105
+ regex: "@[-\\w]+"
106
+ },
107
+ {
108
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
109
+ regex : CssHighlightRules.pseudoElements
110
+ }, {
111
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
112
+ regex : CssHighlightRules.pseudoClasses
113
+ },
114
+ {
115
+ token: ["entity.name.tag.stylus"],
116
+ regex: "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)"
117
+ },
118
+ {
119
+ token : "constant.numeric", // hex6 color
120
+ regex : "#[a-f0-9]{6}"
121
+ },
122
+ {
123
+ token : "constant.numeric", // hex3 color
124
+ regex : "#[a-f0-9]{3}"
125
+ },
126
+ {
127
+ token: ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"],
128
+ regex: "(#)([a-zA-Z][a-zA-Z0-9_-]*)"
129
+ },
130
+ {
131
+ token: "meta.vendor-prefix.stylus",
132
+ regex: "-webkit-|-moz\\-|-ms-|-o-"
133
+ },
134
+ {
135
+ token: "keyword.control.stylus",
136
+ regex: "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b"
137
+ },
138
+ {
139
+ token: "keyword.operator.stylus",
140
+ regex: "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!="
141
+ },
142
+ {
143
+ token: "keyword.operator.stylus",
144
+ regex: "(?:in|is(?:nt)?|not)\\b"
145
+ },
146
+ {
147
+ token : "string",
148
+ regex : "'(?=.)",
149
+ next : "qstring"
150
+ }, {
151
+ token : "string",
152
+ regex : '"(?=.)',
153
+ next : "qqstring"
154
+ },
155
+ {
156
+ token : "constant.numeric",
157
+ regex : CssHighlightRules.numRe
158
+ },
159
+ {
160
+ token : "keyword",
161
+ regex : "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b"
162
+ },
163
+ {
164
+ token : keywordMapper,
165
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
166
+ }
167
+ ],
168
+ "comment" : [
169
+ {
170
+ token : "comment", // closing comment
171
+ regex : ".*?\\*\\/",
172
+ next : "start"
173
+ }, {
174
+ token : "comment", // comment spanning whole line
175
+ regex : ".+"
176
+ }
177
+ ],
178
+ "qqstring" : [
179
+ {
180
+ token : "string",
181
+ regex : '[^"\\\\]+'
182
+ },
183
+ {
184
+ token : "string",
185
+ regex : "\\\\$",
186
+ next : "qqstring"
187
+ },
188
+ {
189
+ token : "string",
190
+ regex : '"|$',
191
+ next : "start"
192
+ }
193
+ ],
194
+ "qstring" : [
195
+ {
196
+ token : "string",
197
+ regex : "[^'\\\\]+"
198
+ },
199
+ {
200
+ token : "string",
201
+ regex : "\\\\$",
202
+ next : "qstring"
203
+ },
204
+ {
205
+ token : "string",
206
+ regex : "'|$",
207
+ next : "start"
208
+ }
209
+ ]
210
+ }
211
+
212
+ };
213
+
214
+ oop.inherits(StylusHighlightRules, TextHighlightRules);
215
+
216
+ exports.StylusHighlightRules = StylusHighlightRules;
217
+ });
218
+
219
+ define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
220
+
221
+
222
+ var oop = require("../lib/oop");
223
+ var lang = require("../lib/lang");
224
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
225
+ var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|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|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
226
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
227
+ 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";
228
+ var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
229
+ var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
230
+
231
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
232
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
233
+ 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";
234
+
235
+ var CssHighlightRules = function() {
236
+
237
+ var keywordMapper = this.createKeywordMapper({
238
+ "support.function": supportFunction,
239
+ "support.constant": supportConstant,
240
+ "support.type": supportType,
241
+ "support.constant.color": supportConstantColor,
242
+ "support.constant.fonts": supportConstantFonts
243
+ }, "text", true);
244
+
245
+ var base_ruleset = [
246
+ {
247
+ token : "comment", // multi line comment
248
+ regex : "\\/\\*",
249
+ next : "ruleset_comment"
250
+ }, {
251
+ token : "string", // single line
252
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
253
+ }, {
254
+ token : "string", // single line
255
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
256
+ }, {
257
+ token : ["constant.numeric", "keyword"],
258
+ 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|%)"
259
+ }, {
260
+ token : "constant.numeric",
261
+ regex : numRe
262
+ }, {
263
+ token : "constant.numeric", // hex6 color
264
+ regex : "#[a-f0-9]{6}"
265
+ }, {
266
+ token : "constant.numeric", // hex3 color
267
+ regex : "#[a-f0-9]{3}"
268
+ }, {
269
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
270
+ regex : pseudoElements
271
+ }, {
272
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
273
+ regex : pseudoClasses
274
+ }, {
275
+ token : ["support.function", "string", "support.function"],
276
+ regex : "(url\\()(.*)(\\))"
277
+ }, {
278
+ token : keywordMapper,
279
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
280
+ }, {
281
+ caseInsensitive: true
282
+ }
283
+ ];
284
+
285
+ var ruleset = lang.copyArray(base_ruleset);
286
+ ruleset.unshift({
287
+ token : "paren.rparen",
288
+ regex : "\\}",
289
+ next: "start"
290
+ });
291
+
292
+ var media_ruleset = lang.copyArray( base_ruleset );
293
+ media_ruleset.unshift({
294
+ token : "paren.rparen",
295
+ regex : "\\}",
296
+ next: "media"
297
+ });
298
+
299
+ var base_comment = [{
300
+ token : "comment", // comment spanning whole line
301
+ regex : ".+"
302
+ }];
303
+
304
+ var comment = lang.copyArray(base_comment);
305
+ comment.unshift({
306
+ token : "comment", // closing comment
307
+ regex : ".*?\\*\\/",
308
+ next : "start"
309
+ });
310
+
311
+ var media_comment = lang.copyArray(base_comment);
312
+ media_comment.unshift({
313
+ token : "comment", // closing comment
314
+ regex : ".*?\\*\\/",
315
+ next : "media"
316
+ });
317
+
318
+ var ruleset_comment = lang.copyArray(base_comment);
319
+ ruleset_comment.unshift({
320
+ token : "comment", // closing comment
321
+ regex : ".*?\\*\\/",
322
+ next : "ruleset"
323
+ });
324
+
325
+ this.$rules = {
326
+ "start" : [{
327
+ token : "comment", // multi line comment
328
+ regex : "\\/\\*",
329
+ next : "comment"
330
+ }, {
331
+ token: "paren.lparen",
332
+ regex: "\\{",
333
+ next: "ruleset"
334
+ }, {
335
+ token: "string",
336
+ regex: "@.*?{",
337
+ next: "media"
338
+ },{
339
+ token: "keyword",
340
+ regex: "#[a-z0-9-_]+"
341
+ },{
342
+ token: "variable",
343
+ regex: "\\.[a-z0-9-_]+"
344
+ },{
345
+ token: "string",
346
+ regex: ":[a-z0-9-_]+"
347
+ },{
348
+ token: "constant",
349
+ regex: "[a-z0-9-_]+"
350
+ },{
351
+ caseInsensitive: true
352
+ }],
353
+
354
+ "media" : [ {
355
+ token : "comment", // multi line comment
356
+ regex : "\\/\\*",
357
+ next : "media_comment"
358
+ }, {
359
+ token: "paren.lparen",
360
+ regex: "\\{",
361
+ next: "media_ruleset"
362
+ },{
363
+ token: "string",
364
+ regex: "\\}",
365
+ next: "start"
366
+ },{
367
+ token: "keyword",
368
+ regex: "#[a-z0-9-_]+"
369
+ },{
370
+ token: "variable",
371
+ regex: "\\.[a-z0-9-_]+"
372
+ },{
373
+ token: "string",
374
+ regex: ":[a-z0-9-_]+"
375
+ },{
376
+ token: "constant",
377
+ regex: "[a-z0-9-_]+"
378
+ },{
379
+ caseInsensitive: true
380
+ }],
381
+
382
+ "comment" : comment,
383
+
384
+ "ruleset" : ruleset,
385
+ "ruleset_comment" : ruleset_comment,
386
+
387
+ "media_ruleset" : media_ruleset,
388
+ "media_comment" : media_comment
389
+ };
390
+ };
391
+
392
+ oop.inherits(CssHighlightRules, TextHighlightRules);
393
+
394
+ exports.CssHighlightRules = CssHighlightRules;
395
+
396
+ });
397
+
398
+ define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
399
+
400
+
401
+ var oop = require("../../lib/oop");
402
+ var BaseFoldMode = require("./fold_mode").FoldMode;
403
+ var Range = require("../../range").Range;
404
+
405
+ var FoldMode = exports.FoldMode = function() {};
406
+ oop.inherits(FoldMode, BaseFoldMode);
407
+
408
+ (function() {
409
+
410
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
411
+ var range = this.indentationBlock(session, row);
412
+ if (range)
413
+ return range;
414
+
415
+ var re = /\S/;
416
+ var line = session.getLine(row);
417
+ var startLevel = line.search(re);
418
+ if (startLevel == -1 || line[startLevel] != "#")
419
+ return;
420
+
421
+ var startColumn = line.length;
422
+ var maxRow = session.getLength();
423
+ var startRow = row;
424
+ var endRow = row;
425
+
426
+ while (++row < maxRow) {
427
+ line = session.getLine(row);
428
+ var level = line.search(re);
429
+
430
+ if (level == -1)
431
+ continue;
432
+
433
+ if (line[level] != "#")
434
+ break;
435
+
436
+ endRow = row;
437
+ }
438
+
439
+ if (endRow > startRow) {
440
+ var endColumn = session.getLine(endRow).length;
441
+ return new Range(startRow, startColumn, endRow, endColumn);
442
+ }
443
+ };
444
+ this.getFoldWidget = function(session, foldStyle, row) {
445
+ var line = session.getLine(row);
446
+ var indent = line.search(/\S/);
447
+ var next = session.getLine(row + 1);
448
+ var prev = session.getLine(row - 1);
449
+ var prevIndent = prev.search(/\S/);
450
+ var nextIndent = next.search(/\S/);
451
+
452
+ if (indent == -1) {
453
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
454
+ return "";
455
+ }
456
+ if (prevIndent == -1) {
457
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
458
+ session.foldWidgets[row - 1] = "";
459
+ session.foldWidgets[row + 1] = "";
460
+ return "start";
461
+ }
462
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
463
+ if (session.getLine(row - 2).search(/\S/) == -1) {
464
+ session.foldWidgets[row - 1] = "start";
465
+ session.foldWidgets[row + 1] = "";
466
+ return "";
467
+ }
468
+ }
469
+
470
+ if (prevIndent!= -1 && prevIndent < indent)
471
+ session.foldWidgets[row - 1] = "start";
472
+ else
473
+ session.foldWidgets[row - 1] = "";
474
+
475
+ if (indent < nextIndent)
476
+ return "start";
477
+ else
478
+ return "";
479
+ };
480
+
481
+ }).call(FoldMode.prototype);
482
+
483
+ });